commit | 77bb0b72919bb93d89095f2f78accac160633c02 | [log] [tgz] |
---|---|---|
author | TreeHugger Robot <treehugger-gerrit@google.com> | Tue Jan 26 23:27:57 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Tue Jan 26 23:27:57 2021 +0000 |
tree | 7c66eccf27f3c374b42da1aeb572b279a242e3a4 | |
parent | e8f6e92fe0f8ddbba07689a9230b6a4714c508c4 [diff] | |
parent | 2c23216d49fcae0c153fb6c8cdc10601bc932548 [diff] |
Merge "ActivityManagerService: all users can handle freezer state in debug builds" into rvc-qpr-dev am: 595e3ee3c0 am: 2c23216d49 Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13408289 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Id3cb960fd0d8614dbe9dca5549058a895c227d5c
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java index c8677f0..05f2fa0 100644 --- a/services/core/java/com/android/server/am/ActivityManagerService.java +++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -17565,7 +17565,7 @@ int callerUid = Binder.getCallingUid(); // Only system can toggle the freezer state - if (callerUid == SYSTEM_UID) { + if (callerUid == SYSTEM_UID || Build.IS_DEBUGGABLE) { return mOomAdjuster.mCachedAppOptimizer.enableFreezer(enable); } else { throw new SecurityException("Caller uid " + callerUid + " cannot set freezer state ");