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 ");