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;
    }
}

posted @ 2014-03-27 16:49  xiaokang088  阅读(220)  评论(0编辑  收藏  举报