diff options
author | Dianne Hackborn <hackbod@google.com> | 2011-03-01 22:21:04 -0800 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2011-03-01 22:21:04 -0800 |
commit | f02e57bec0d5496555f7dcb8a126268ec46d9d51 (patch) | |
tree | 40969d63d2f240c92db943916629dd7d5bd3071f /services | |
parent | 3cc66b30bf78f1badd94c8db1f8295c4183651ac (diff) | |
download | frameworks_base-f02e57bec0d5496555f7dcb8a126268ec46d9d51.zip frameworks_base-f02e57bec0d5496555f7dcb8a126268ec46d9d51.tar.gz frameworks_base-f02e57bec0d5496555f7dcb8a126268ec46d9d51.tar.bz2 |
Fix issue #3431230: "am" debugging commands failing on -userdebug builds
Change-Id: I6b5a8bf68d3bd76c7331ee97bab9a68b5033cb5a
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/am/ActivityManagerService.java | 9 |
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); } |