Fix incorrect message being sent for all intents.
Only send the CHECK_PACKAGE_IDLE_STATE message for
ACTION_PACKAGE_CHANGED and not for ACTION_PACKAGE_ADDED.
Bug: 214580000
Test: atest UsageStatsDatabaseTest
Test: manually verify buckets are restored
Change-Id: Iac1433b9b7e3904eb7f753cd0617ac64ab6f7944
(cherry picked from commit 69f86a6475)
This commit is contained in:
@@ -2116,8 +2116,10 @@ public class AppStandbyController
|
||||
}
|
||||
// component-level enable/disable can affect bucketing, so we always
|
||||
// reevaluate that for any PACKAGE_CHANGED
|
||||
mHandler.obtainMessage(MSG_CHECK_PACKAGE_IDLE_STATE, userId, -1, pkgName)
|
||||
.sendToTarget();
|
||||
if (Intent.ACTION_PACKAGE_CHANGED.equals(action)) {
|
||||
mHandler.obtainMessage(MSG_CHECK_PACKAGE_IDLE_STATE, userId, -1, pkgName)
|
||||
.sendToTarget();
|
||||
}
|
||||
}
|
||||
if ((Intent.ACTION_PACKAGE_REMOVED.equals(action) ||
|
||||
Intent.ACTION_PACKAGE_ADDED.equals(action))) {
|
||||
|
||||
Reference in New Issue
Block a user