@@ -46,7 +46,8 @@ public void initRuntime()
4646 {
4747 System .loadLibrary ("NativeScript" );
4848
49- Logger logger = new LogcatLogger (false , app );
49+ Logger logger = new LogcatLogger (true , app );
50+ Debugger debugger = new AndroidJsDebugger (app , logger );
5051
5152 boolean showErrorIntent = hasErrorIntent ();
5253 if (!showErrorIntent )
@@ -89,7 +90,7 @@ public void initRuntime()
8990 e .printStackTrace ();
9091 }
9192 ThreadScheduler workThreadScheduler = new WorkThreadScheduler (new Handler (Looper .getMainLooper ()));
92- Configuration config = new Configuration (this . app , workThreadScheduler , logger , appName , null , rootDir , appDir , classLoader , dexDir , dexThumb );
93+ Configuration config = new Configuration (workThreadScheduler , logger , debugger , appName , null , rootDir , appDir , classLoader , dexDir , dexThumb );
9394 Runtime runtime = new Runtime (config );
9495
9596 exHandler .setRuntime (runtime );
@@ -114,21 +115,29 @@ public void initRuntime()
114115 }
115116 }
116117
117-
118-
119-
120118 runtime .init ();
121119 runtime .runScript (new File (appDir , "internal/ts_helpers.js" ));
122-
123- File javaClassesModule = new File (appDir , "app/tns-java-classes.js" );
124- if (javaClassesModule .exists ()) {
125- runtime .runModule (javaClassesModule );
126- }
127-
128120 Runtime .initInstance (this .app );
129121 runtime .run ();
130122 }
131123 }
132124
125+ /* public static boolean isDebuggableApp(Context context)
126+ {
127+ int flags;
128+ try
129+ {
130+ flags = context.getPackageManager().getPackageInfo(context.getPackageName(), 0).applicationInfo.flags;
131+ }
132+ catch (NameNotFoundException e)
133+ {
134+ flags = 0;
135+ e.printStackTrace();
136+ }
137+
138+ boolean isDebuggableApp = ((flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0);
139+ return isDebuggableApp;
140+ }*/
141+
133142 private final String logTag = "MyApp" ;
134143}
0 commit comments