Loading core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -4876,6 +4876,7 @@ package android.app { field public static final int REASON_DEPENDENCY_DIED = 12; // 0xc field public static final int REASON_EXCESSIVE_RESOURCE_USAGE = 9; // 0x9 field public static final int REASON_EXIT_SELF = 1; // 0x1 field public static final int REASON_FREEZER = 14; // 0xe field public static final int REASON_INITIALIZATION_FAILURE = 7; // 0x7 field public static final int REASON_LOW_MEMORY = 3; // 0x3 field public static final int REASON_OTHER = 13; // 0xd core/java/android/app/ApplicationExitInfo.java +9 −0 Original line number Diff line number Diff line Loading @@ -155,6 +155,12 @@ public final class ApplicationExitInfo implements Parcelable { */ public static final int REASON_OTHER = 13; /** * Application process was killed by App Freezer, for example, because it receives * sync binder transactions while being frozen. */ public static final int REASON_FREEZER = 14; /** * Application process kills subreason is unknown. * Loading Loading @@ -487,6 +493,7 @@ public final class ApplicationExitInfo implements Parcelable { REASON_USER_STOPPED, REASON_DEPENDENCY_DIED, REASON_OTHER, REASON_FREEZER, }) @Retention(RetentionPolicy.SOURCE) public @interface Reason {} Loading Loading @@ -1138,6 +1145,8 @@ public final class ApplicationExitInfo implements Parcelable { return "DEPENDENCY DIED"; case REASON_OTHER: return "OTHER KILLS BY SYSTEM"; case REASON_FREEZER: return "FREEZER"; default: return "UNKNOWN"; } Loading core/java/android/app/IActivityManager.aidl +4 −0 Original line number Diff line number Diff line Loading @@ -679,6 +679,10 @@ interface IActivityManager { */ boolean isAppFreezerSupported(); /** * Return whether the app freezer is enabled (true) or not (false) by this system. */ boolean isAppFreezerEnabled(); /** * Kills uid with the reason of permission change. Loading services/core/java/com/android/server/am/ActivityManagerService.java +5 −0 Original line number Diff line number Diff line Loading @@ -17905,6 +17905,11 @@ public class ActivityManagerService extends IActivityManager.Stub } } @Override public boolean isAppFreezerEnabled() { return mOomAdjuster.mCachedAppOptimizer.useFreezer(); } /** * Resets the state of the {@link com.android.server.am.AppErrors} instance. * This is intended for testing within the CTS only and is protected by services/core/java/com/android/server/am/CachedAppOptimizer.java +5 −5 Original line number Diff line number Diff line Loading @@ -977,7 +977,7 @@ public final class CachedAppOptimizer { Slog.d(TAG_AM, "pid " + pid + " " + app.processName + " received sync transactions while frozen, killing"); app.killLocked("Sync transaction while in frozen state", ApplicationExitInfo.REASON_OTHER, ApplicationExitInfo.REASON_FREEZER, ApplicationExitInfo.SUBREASON_FREEZER_BINDER_TRANSACTION, true); processKilled = true; } Loading @@ -990,7 +990,7 @@ public final class CachedAppOptimizer { Slog.d(TAG_AM, "Unable to query binder frozen info for pid " + pid + " " + app.processName + ". Killing it. Exception: " + e); app.killLocked("Unable to query binder frozen stats", ApplicationExitInfo.REASON_OTHER, ApplicationExitInfo.REASON_FREEZER, ApplicationExitInfo.SUBREASON_FREEZER_BINDER_IOCTL, true); processKilled = true; } Loading @@ -1007,7 +1007,7 @@ public final class CachedAppOptimizer { Slog.e(TAG_AM, "Unable to unfreeze binder for " + pid + " " + app.processName + ". Killing it"); app.killLocked("Unable to unfreeze", ApplicationExitInfo.REASON_OTHER, ApplicationExitInfo.REASON_FREEZER, ApplicationExitInfo.SUBREASON_FREEZER_BINDER_IOCTL, true); return; } Loading Loading @@ -1423,7 +1423,7 @@ public final class CachedAppOptimizer { mFreezeHandler.post(() -> { synchronized (mAm) { proc.killLocked("Unable to freeze binder interface", ApplicationExitInfo.REASON_OTHER, ApplicationExitInfo.REASON_FREEZER, ApplicationExitInfo.SUBREASON_FREEZER_BINDER_IOCTL, true); } }); Loading Loading @@ -1477,7 +1477,7 @@ public final class CachedAppOptimizer { mFreezeHandler.post(() -> { synchronized (mAm) { proc.killLocked("Unable to freeze binder interface", ApplicationExitInfo.REASON_OTHER, ApplicationExitInfo.REASON_FREEZER, ApplicationExitInfo.SUBREASON_FREEZER_BINDER_IOCTL, true); } }); Loading Loading
core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -4876,6 +4876,7 @@ package android.app { field public static final int REASON_DEPENDENCY_DIED = 12; // 0xc field public static final int REASON_EXCESSIVE_RESOURCE_USAGE = 9; // 0x9 field public static final int REASON_EXIT_SELF = 1; // 0x1 field public static final int REASON_FREEZER = 14; // 0xe field public static final int REASON_INITIALIZATION_FAILURE = 7; // 0x7 field public static final int REASON_LOW_MEMORY = 3; // 0x3 field public static final int REASON_OTHER = 13; // 0xd
core/java/android/app/ApplicationExitInfo.java +9 −0 Original line number Diff line number Diff line Loading @@ -155,6 +155,12 @@ public final class ApplicationExitInfo implements Parcelable { */ public static final int REASON_OTHER = 13; /** * Application process was killed by App Freezer, for example, because it receives * sync binder transactions while being frozen. */ public static final int REASON_FREEZER = 14; /** * Application process kills subreason is unknown. * Loading Loading @@ -487,6 +493,7 @@ public final class ApplicationExitInfo implements Parcelable { REASON_USER_STOPPED, REASON_DEPENDENCY_DIED, REASON_OTHER, REASON_FREEZER, }) @Retention(RetentionPolicy.SOURCE) public @interface Reason {} Loading Loading @@ -1138,6 +1145,8 @@ public final class ApplicationExitInfo implements Parcelable { return "DEPENDENCY DIED"; case REASON_OTHER: return "OTHER KILLS BY SYSTEM"; case REASON_FREEZER: return "FREEZER"; default: return "UNKNOWN"; } Loading
core/java/android/app/IActivityManager.aidl +4 −0 Original line number Diff line number Diff line Loading @@ -679,6 +679,10 @@ interface IActivityManager { */ boolean isAppFreezerSupported(); /** * Return whether the app freezer is enabled (true) or not (false) by this system. */ boolean isAppFreezerEnabled(); /** * Kills uid with the reason of permission change. Loading
services/core/java/com/android/server/am/ActivityManagerService.java +5 −0 Original line number Diff line number Diff line Loading @@ -17905,6 +17905,11 @@ public class ActivityManagerService extends IActivityManager.Stub } } @Override public boolean isAppFreezerEnabled() { return mOomAdjuster.mCachedAppOptimizer.useFreezer(); } /** * Resets the state of the {@link com.android.server.am.AppErrors} instance. * This is intended for testing within the CTS only and is protected by
services/core/java/com/android/server/am/CachedAppOptimizer.java +5 −5 Original line number Diff line number Diff line Loading @@ -977,7 +977,7 @@ public final class CachedAppOptimizer { Slog.d(TAG_AM, "pid " + pid + " " + app.processName + " received sync transactions while frozen, killing"); app.killLocked("Sync transaction while in frozen state", ApplicationExitInfo.REASON_OTHER, ApplicationExitInfo.REASON_FREEZER, ApplicationExitInfo.SUBREASON_FREEZER_BINDER_TRANSACTION, true); processKilled = true; } Loading @@ -990,7 +990,7 @@ public final class CachedAppOptimizer { Slog.d(TAG_AM, "Unable to query binder frozen info for pid " + pid + " " + app.processName + ". Killing it. Exception: " + e); app.killLocked("Unable to query binder frozen stats", ApplicationExitInfo.REASON_OTHER, ApplicationExitInfo.REASON_FREEZER, ApplicationExitInfo.SUBREASON_FREEZER_BINDER_IOCTL, true); processKilled = true; } Loading @@ -1007,7 +1007,7 @@ public final class CachedAppOptimizer { Slog.e(TAG_AM, "Unable to unfreeze binder for " + pid + " " + app.processName + ". Killing it"); app.killLocked("Unable to unfreeze", ApplicationExitInfo.REASON_OTHER, ApplicationExitInfo.REASON_FREEZER, ApplicationExitInfo.SUBREASON_FREEZER_BINDER_IOCTL, true); return; } Loading Loading @@ -1423,7 +1423,7 @@ public final class CachedAppOptimizer { mFreezeHandler.post(() -> { synchronized (mAm) { proc.killLocked("Unable to freeze binder interface", ApplicationExitInfo.REASON_OTHER, ApplicationExitInfo.REASON_FREEZER, ApplicationExitInfo.SUBREASON_FREEZER_BINDER_IOCTL, true); } }); Loading Loading @@ -1477,7 +1477,7 @@ public final class CachedAppOptimizer { mFreezeHandler.post(() -> { synchronized (mAm) { proc.killLocked("Unable to freeze binder interface", ApplicationExitInfo.REASON_OTHER, ApplicationExitInfo.REASON_FREEZER, ApplicationExitInfo.SUBREASON_FREEZER_BINDER_IOCTL, true); } }); Loading