Loading core/java/android/app/ActivityManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -144,7 +144,7 @@ public class ActivityManager { } @Override public void onUidStateChanged(int uid, int procState) { public void onUidStateChanged(int uid, int procState, long procStateSeq) { mListener.onUidImportance(uid, RunningAppProcessInfo.procStateToImportance(procState)); } Loading core/java/android/app/IUidObserver.aidl +6 −1 Original line number Diff line number Diff line Loading @@ -20,8 +20,13 @@ package android.app; oneway interface IUidObserver { /** * General report of a state change of an uid. * * @param uid The uid for which the state change is being reported. * @param procState The updated process state for the uid. * @param procStateSeq The sequence no. associated with process state change of the uid, * see UidRecord.procStateSeq for details. */ void onUidStateChanged(int uid, int procState); void onUidStateChanged(int uid, int procState, long procStateSeq); /** * Report that there are no longer any processes running for a uid. Loading services/core/java/com/android/server/AlarmManagerService.java +2 −1 Original line number Diff line number Diff line Loading @@ -2839,7 +2839,8 @@ class AlarmManagerService extends SystemService { } final class UidObserver extends IUidObserver.Stub { @Override public void onUidStateChanged(int uid, int procState) throws RemoteException { @Override public void onUidStateChanged(int uid, int procState, long procStateSeq) throws RemoteException { } @Override public void onUidGone(int uid, boolean disabled) throws RemoteException { Loading services/core/java/com/android/server/am/ActivityManagerService.java +3 −1 Original line number Diff line number Diff line Loading @@ -4370,7 +4370,8 @@ public class ActivityManagerService extends IActivityManager.Stub if (reg.lastProcStates != null) { reg.lastProcStates.put(item.uid, item.processState); } observer.onUidStateChanged(item.uid, item.processState); observer.onUidStateChanged(item.uid, item.processState, item.procStateSeq); } } } Loading Loading @@ -21486,6 +21487,7 @@ public class ActivityManagerService extends IActivityManager.Stub pendingChange.processState = uidRec != null ? uidRec.setProcState : ActivityManager.PROCESS_STATE_NONEXISTENT; pendingChange.ephemeral = uidRec.ephemeral; pendingChange.procStateSeq = uidRec != null ? uidRec.curProcStateSeq : 0; // Directly update the power manager, since we sit on top of it and it is critical // it be kept in sync (so wake locks will be held as soon as appropriate). services/core/java/com/android/server/am/UidRecord.java +1 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ public final class UidRecord { int change; int processState; boolean ephemeral; long procStateSeq; } ChangeItem pendingChange; Loading Loading
core/java/android/app/ActivityManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -144,7 +144,7 @@ public class ActivityManager { } @Override public void onUidStateChanged(int uid, int procState) { public void onUidStateChanged(int uid, int procState, long procStateSeq) { mListener.onUidImportance(uid, RunningAppProcessInfo.procStateToImportance(procState)); } Loading
core/java/android/app/IUidObserver.aidl +6 −1 Original line number Diff line number Diff line Loading @@ -20,8 +20,13 @@ package android.app; oneway interface IUidObserver { /** * General report of a state change of an uid. * * @param uid The uid for which the state change is being reported. * @param procState The updated process state for the uid. * @param procStateSeq The sequence no. associated with process state change of the uid, * see UidRecord.procStateSeq for details. */ void onUidStateChanged(int uid, int procState); void onUidStateChanged(int uid, int procState, long procStateSeq); /** * Report that there are no longer any processes running for a uid. Loading
services/core/java/com/android/server/AlarmManagerService.java +2 −1 Original line number Diff line number Diff line Loading @@ -2839,7 +2839,8 @@ class AlarmManagerService extends SystemService { } final class UidObserver extends IUidObserver.Stub { @Override public void onUidStateChanged(int uid, int procState) throws RemoteException { @Override public void onUidStateChanged(int uid, int procState, long procStateSeq) throws RemoteException { } @Override public void onUidGone(int uid, boolean disabled) throws RemoteException { Loading
services/core/java/com/android/server/am/ActivityManagerService.java +3 −1 Original line number Diff line number Diff line Loading @@ -4370,7 +4370,8 @@ public class ActivityManagerService extends IActivityManager.Stub if (reg.lastProcStates != null) { reg.lastProcStates.put(item.uid, item.processState); } observer.onUidStateChanged(item.uid, item.processState); observer.onUidStateChanged(item.uid, item.processState, item.procStateSeq); } } } Loading Loading @@ -21486,6 +21487,7 @@ public class ActivityManagerService extends IActivityManager.Stub pendingChange.processState = uidRec != null ? uidRec.setProcState : ActivityManager.PROCESS_STATE_NONEXISTENT; pendingChange.ephemeral = uidRec.ephemeral; pendingChange.procStateSeq = uidRec != null ? uidRec.curProcStateSeq : 0; // Directly update the power manager, since we sit on top of it and it is critical // it be kept in sync (so wake locks will be held as soon as appropriate).
services/core/java/com/android/server/am/UidRecord.java +1 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ public final class UidRecord { int change; int processState; boolean ephemeral; long procStateSeq; } ChangeItem pendingChange; Loading