I am trying to get application's debuggable attribute value from code:
packageInfo = context.getPackageManager().getPackageInfo(packageName, 0);
int flags = packageInfo.applicationInfo.flags;
isDebugMode = (flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0;
And I have noticed that when debuggable attribute is not specified in manifest this code defines it as true. And documentation says that it is false by default.
What's wrong?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…