Loading core/java/android/app/ActivityManager.java +14 −0 Original line number Diff line number Diff line Loading @@ -5345,6 +5345,20 @@ public class ActivityManager { } } /** * Checks if the process represented by the given {@code pid} is frozen. * * @hide */ @RequiresPermission(android.Manifest.permission.DUMP) public boolean isProcessFrozen(int pid) { try { return getService().isProcessFrozen(pid); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** * @return The reason code of whether or not the given UID should be exempted from background * restrictions here. Loading core/java/android/app/IActivityManager.aidl +4 −0 Original line number Diff line number Diff line Loading @@ -779,6 +779,10 @@ interface IActivityManager { @JavaPassthrough(annotation="@android.annotation.RequiresPermission(android.Manifest.permission.DUMP)") boolean isModernBroadcastQueueEnabled(); /** Checks if the process represented by the given pid is frozen. */ @JavaPassthrough(annotation="@android.annotation.RequiresPermission(android.Manifest.permission.DUMP)") boolean isProcessFrozen(int pid); /** * @return The reason code of whether or not the given UID should be exempted from background * restrictions here. Loading services/core/java/com/android/server/am/ActivityManagerService.java +6 −0 Original line number Diff line number Diff line Loading @@ -18497,6 +18497,12 @@ public class ActivityManagerService extends IActivityManager.Stub return mEnableModernQueue; } @Override public boolean isProcessFrozen(int pid) { enforceCallingPermission(permission.DUMP, "isProcessFrozen()"); return mOomAdjuster.mCachedAppOptimizer.isProcessFrozen(pid); } @Override @ReasonCode public int getBackgroundRestrictionExemptionReason(int uid) { services/core/java/com/android/server/am/BroadcastProcessQueue.java +1 −0 Original line number Diff line number Diff line Loading @@ -1113,6 +1113,7 @@ class BroadcastProcessQueue { pw.print(" because "); pw.print(reasonToString(mRunnableAtReason)); pw.println(); pw.print("mProcessCached="); pw.println(mProcessCached); pw.increaseIndent(); if (mActive != null) { dumpRecord("ACTIVE", now, pw, mActive, mActiveIndex); Loading services/core/java/com/android/server/am/CachedAppOptimizer.java +6 −0 Original line number Diff line number Diff line Loading @@ -1509,6 +1509,12 @@ public final class CachedAppOptimizer { return profile; } boolean isProcessFrozen(int pid) { synchronized (mProcLock) { return mFrozenProcesses.contains(pid); } } @VisibleForTesting static final class SingleCompactionStats { private static final float STATSD_SAMPLE_RATE = 0.1f; Loading Loading
core/java/android/app/ActivityManager.java +14 −0 Original line number Diff line number Diff line Loading @@ -5345,6 +5345,20 @@ public class ActivityManager { } } /** * Checks if the process represented by the given {@code pid} is frozen. * * @hide */ @RequiresPermission(android.Manifest.permission.DUMP) public boolean isProcessFrozen(int pid) { try { return getService().isProcessFrozen(pid); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** * @return The reason code of whether or not the given UID should be exempted from background * restrictions here. Loading
core/java/android/app/IActivityManager.aidl +4 −0 Original line number Diff line number Diff line Loading @@ -779,6 +779,10 @@ interface IActivityManager { @JavaPassthrough(annotation="@android.annotation.RequiresPermission(android.Manifest.permission.DUMP)") boolean isModernBroadcastQueueEnabled(); /** Checks if the process represented by the given pid is frozen. */ @JavaPassthrough(annotation="@android.annotation.RequiresPermission(android.Manifest.permission.DUMP)") boolean isProcessFrozen(int pid); /** * @return The reason code of whether or not the given UID should be exempted from background * restrictions here. Loading
services/core/java/com/android/server/am/ActivityManagerService.java +6 −0 Original line number Diff line number Diff line Loading @@ -18497,6 +18497,12 @@ public class ActivityManagerService extends IActivityManager.Stub return mEnableModernQueue; } @Override public boolean isProcessFrozen(int pid) { enforceCallingPermission(permission.DUMP, "isProcessFrozen()"); return mOomAdjuster.mCachedAppOptimizer.isProcessFrozen(pid); } @Override @ReasonCode public int getBackgroundRestrictionExemptionReason(int uid) {
services/core/java/com/android/server/am/BroadcastProcessQueue.java +1 −0 Original line number Diff line number Diff line Loading @@ -1113,6 +1113,7 @@ class BroadcastProcessQueue { pw.print(" because "); pw.print(reasonToString(mRunnableAtReason)); pw.println(); pw.print("mProcessCached="); pw.println(mProcessCached); pw.increaseIndent(); if (mActive != null) { dumpRecord("ACTIVE", now, pw, mActive, mActiveIndex); Loading
services/core/java/com/android/server/am/CachedAppOptimizer.java +6 −0 Original line number Diff line number Diff line Loading @@ -1509,6 +1509,12 @@ public final class CachedAppOptimizer { return profile; } boolean isProcessFrozen(int pid) { synchronized (mProcLock) { return mFrozenProcesses.contains(pid); } } @VisibleForTesting static final class SingleCompactionStats { private static final float STATSD_SAMPLE_RATE = 0.1f; Loading