]> git.tdb.fi Git - builder.git/commitdiff
Set the debuggable flag in Android manifest if debug is set in build info
authorMikko Rasa <tdb@tdb.fi>
Thu, 19 Nov 2015 09:01:24 +0000 (11:01 +0200)
committerMikko Rasa <tdb@tdb.fi>
Thu, 19 Nov 2015 09:07:06 +0000 (11:07 +0200)
source/androidmanifestgenerator.cpp

index 719bf95d16672e1f53cfdc9d5c2aa8cdfa3c717a..156dfb35fd9abcdbca33710c5ce4f70b2edf71a0 100644 (file)
@@ -35,12 +35,16 @@ void AndroidManifestGenerator::Worker::main()
        const Component &comp = *manifest.get_component();
        const SourcePackage &pkg = comp.get_package();
 
+       BuildInfo binfo;
+       manifest.collect_build_info(binfo);
+
        IO::BufferedFile out(manifest.get_path().str(), IO::M_WRITE);
        out.write("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n");
        IO::print(out, "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\" package=\"%s\">\n", comp.get_name());
        out.write("\t<uses-sdk android:minSdkVersion=\"9\" />\n");
        // TODO Make the icon name configurable
-       IO::print(out, "\t<application android:icon=\"@drawable/icon\" android:label=\"%s\" android:hasCode=\"false\">\n", pkg.get_label());
+       bool debuggable = binfo.debug;
+       IO::print(out, "\t<application android:icon=\"@drawable/icon\" android:label=\"%s\" android:hasCode=\"false\" android:debuggable=\"%s\">\n", pkg.get_label(), debuggable);
        if(SharedLibrary *native_lib = manifest.get_native_library())
        {
                out.write("\t\t<activity android:name=\"android.app.NativeActivity\">\n");