Skip to content

Commit 1cccc71

Browse files
committed
fix isDebuggableApp check
1 parent 401a420 commit 1cccc71

2 files changed

Lines changed: 6 additions & 10 deletions

File tree

build/project-template-gradle/src/main/java/com/tns/LogcatLogger.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
public final class LogcatLogger implements Logger
77
{
88
private final static String DEFAULT_LOG_TAG = "TNS.Java";
9-
9+
1010
private boolean enabled;
1111

1212
public LogcatLogger(boolean isEnabled, Context context)
@@ -41,10 +41,8 @@ public final void write(String tag, String msg)
4141

4242
private void initLogging(Context context)
4343
{
44-
// TODO: Pete
45-
// boolean isDebuggableApp = JsDebugger.isDebuggableApp(context);
46-
// if (isDebuggableApp)
47-
if (true)
44+
boolean isDebuggableApp = AndroidJsDebugger.isDebuggableApp(context);
45+
if (isDebuggableApp)
4846
{
4947
String verboseLoggingProp = Util.readSystemProperty("nativescript.verbose.logging");
5048

test-app/src/com/tns/LogcatLogger.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
public final class LogcatLogger implements Logger
77
{
88
private final static String DEFAULT_LOG_TAG = "TNS.Java";
9-
9+
1010
private boolean enabled;
1111

1212
public LogcatLogger(boolean isEnabled, Context context)
@@ -41,10 +41,8 @@ public final void write(String tag, String msg)
4141

4242
private void initLogging(Context context)
4343
{
44-
// TODO: Pete
45-
// boolean isDebuggableApp = JsDebugger.isDebuggableApp(context);
46-
// if (isDebuggableApp)
47-
if (true)
44+
boolean isDebuggableApp = AndroidJsDebugger.isDebuggableApp(context);
45+
if (isDebuggableApp)
4846
{
4947
String verboseLoggingProp = Util.readSystemProperty("nativescript.verbose.logging");
5048

0 commit comments

Comments
 (0)