Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 69f86a64 authored by Varun Shah's avatar Varun Shah
Browse files

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
parent 497aa8cb
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -2187,9 +2187,11 @@ public class AppStandbyController
                }
                // component-level enable/disable can affect bucketing, so we always
                // reevaluate that for any PACKAGE_CHANGED
                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))) {
                if (intent.getBooleanExtra(Intent.EXTRA_REPLACING, false)) {