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

Commit 488981a4 authored by Xin Guan's avatar Xin Guan Committed by Android (Google) Code Review
Browse files

Merge "UsageStats: Use dedicated thread to monitor the state of packages." into main

parents d57f4a7e 19fd95bb
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -403,7 +403,9 @@ public class UsageStatsService extends SystemService implements

        mAppStandby.addListener(mStandbyChangeListener);

        mPackageMonitor.register(getContext(), null, UserHandle.ALL, true);
        mPackageMonitor.register(getContext(),
                /* thread= */ USE_DEDICATED_HANDLER_THREAD ? mHandler.getLooper() : null,
                UserHandle.ALL, true);

        IntentFilter filter = new IntentFilter(Intent.ACTION_USER_REMOVED);
        filter.addAction(Intent.ACTION_USER_STARTED);