DO NOT MERGE Check apps idle states on time changes
And ensure that the listeners are informed of app standby transitions
that might occur during time changes.
Fix for apps that sometimes don't have network access until reboot.
Bug: 26488100
Change-Id: Ic342c188a6cd19faee88f50b2c6a342a6968cb23
(cherry picked from commit c465e71cdc)
This commit is contained in:
committed by
Akshay Thakker
parent
d1811e07d5
commit
35664f25ae
@@ -551,6 +551,7 @@ public class UsageStatsService extends SystemService implements
|
||||
}
|
||||
mRealTimeSnapshot = actualRealtime;
|
||||
mSystemTimeSnapshot = actualSystemTime;
|
||||
postCheckIdleStates(UserHandle.USER_ALL);
|
||||
}
|
||||
return actualSystemTime;
|
||||
}
|
||||
@@ -595,7 +596,7 @@ public class UsageStatsService extends SystemService implements
|
||||
|| event.mEventType == Event.SYSTEM_INTERACTION
|
||||
|| event.mEventType == Event.USER_INTERACTION)) {
|
||||
if (previouslyIdle) {
|
||||
// Slog.d(TAG, "Informing listeners of out-of-idle " + event.mPackage);
|
||||
//Slog.d(TAG, "Informing listeners of out-of-idle " + event.mPackage);
|
||||
mHandler.sendMessage(mHandler.obtainMessage(MSG_INFORM_LISTENERS, userId,
|
||||
/* idle = */ 0, event.mPackage));
|
||||
notifyBatteryStats(event.mPackage, userId, false);
|
||||
|
||||
Reference in New Issue
Block a user