summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2011-03-02 10:19:12 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-03-02 10:19:12 -0800
commit0528bc77948e49bd75cfd4082fb8fef3a7238626 (patch)
tree325f0ba3b0b07953c73b099f1ea57f3c50ab2b96
parent65a63a2b5da5309aac78646d01fc71a03bcf82c6 (diff)
parentf02e57bec0d5496555f7dcb8a126268ec46d9d51 (diff)
downloadframeworks_base-0528bc77948e49bd75cfd4082fb8fef3a7238626.zip
frameworks_base-0528bc77948e49bd75cfd4082fb8fef3a7238626.tar.gz
frameworks_base-0528bc77948e49bd75cfd4082fb8fef3a7238626.tar.bz2
Merge "Fix issue #3431230: "am" debugging commands failing on -userdebug builds"
-rw-r--r--services/java/com/android/server/am/ActivityManagerService.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index ea49661..e6dfb7f 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -180,6 +180,7 @@ public final class ActivityManagerService extends ActivityManagerNative
static final int STOCK_PM_FLAGS = PackageManager.GET_SHARED_LIBRARY_FILES;
private static final String SYSTEM_SECURE = "ro.secure";
+ private static final String SYSTEM_DEBUGGABLE = "ro.debuggable";
// This is the maximum number of application processes we would like
// to have running. Due to the asynchronous nature of things, we can
@@ -12940,8 +12941,8 @@ public final class ActivityManagerService extends ActivityManagerNative
throw new IllegalArgumentException("Unknown process: " + process);
}
- boolean isSecure = "1".equals(SystemProperties.get(SYSTEM_SECURE, "0"));
- if (isSecure) {
+ boolean isDebuggable = "1".equals(SystemProperties.get(SYSTEM_DEBUGGABLE, "0"));
+ if (!isDebuggable) {
if ((proc.info.flags&ApplicationInfo.FLAG_DEBUGGABLE) == 0) {
throw new SecurityException("Process not debuggable: " + proc);
}
@@ -13002,8 +13003,8 @@ public final class ActivityManagerService extends ActivityManagerNative
throw new IllegalArgumentException("Unknown process: " + process);
}
- boolean isSecure = "1".equals(SystemProperties.get(SYSTEM_SECURE, "0"));
- if (isSecure) {
+ boolean isDebuggable = "1".equals(SystemProperties.get(SYSTEM_DEBUGGABLE, "0"));
+ if (!isDebuggable) {
if ((proc.info.flags&ApplicationInfo.FLAG_DEBUGGABLE) == 0) {
throw new SecurityException("Process not debuggable: " + proc);
}