getIsDebuggable

/*
* if set  android:debuggable="true" in  Manifest, return true.
* if set android:debuggable="false" in  Manifest, return false.
* if don't set ,return true;
*/
public boolean getIsDebuggable() {
    try {
        ApplicationInfo applicationInfo = this.getApplicationInfo();
        if ((applicationInfo.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0) {
            return true;
        } else {
            return false;
        }
    } catch (Exception ex) {
        ex.printStackTrace();
        return false;
    }
}

你可能感兴趣的:(debug)