Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bbebaf7a authored by Marco Ballesio's avatar Marco Ballesio
Browse files

ActivityManagerService: all users can handle freezer state in debug builds

Processes whose proxy maps exceed CRASH_AT_SIZE might need to disable
the freezer prior dumping their binding for debug purposes. This happens
on builds with the IS_DEBUGGABLE flag set, so ActivityManager needs to
allow freezer state toggling from any user in this case.

Bug: 178037173
Test: booted device with userdebug, forced interface dumps from all
binder proxies with no crashes.

Change-Id: Ib1f5c7f6ad2b404d56fef566b3d9f17730592762
parent de3b7f1a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -20367,7 +20367,7 @@ public class ActivityManagerService extends IActivityManager.Stub
        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 ");