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

Commit 7195aaa3 authored by Android Build Merger (Role)'s avatar Android Build Merger (Role) Committed by Android (Google) Code Review
Browse files

Merge "Merge "Listen to USER_STARTED instead of USER_ADDED from...

Merge "Merge "Listen to USER_STARTED instead of USER_ADDED from WebViewUpdateService." into oc-dev am: 61f57e74" into oc-dev-plus-aosp
parents 528adaed e78e9491
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -92,7 +92,7 @@ public class WebViewUpdateService extends SystemService {
                                    (intent.getExtras().getBoolean(Intent.EXTRA_REPLACING)
                                     ? PACKAGE_ADDED_REPLACED : PACKAGE_ADDED), userId);
                            break;
                        case Intent.ACTION_USER_ADDED:
                        case Intent.ACTION_USER_STARTED:
                            mImpl.handleNewUser(userId);
                            break;
                        case Intent.ACTION_USER_REMOVED:
@@ -115,7 +115,7 @@ public class WebViewUpdateService extends SystemService {
                null /* broadcast permission */, null /* handler */);

        IntentFilter userAddedFilter = new IntentFilter();
        userAddedFilter.addAction(Intent.ACTION_USER_ADDED);
        userAddedFilter.addAction(Intent.ACTION_USER_STARTED);
        userAddedFilter.addAction(Intent.ACTION_USER_REMOVED);
        getContext().registerReceiverAsUser(mWebViewUpdatedReceiver, UserHandle.ALL,
                userAddedFilter, null /* broadcast permission */, null /* handler */);
+4 −0
Original line number Diff line number Diff line
@@ -116,6 +116,10 @@ public class WebViewUpdateServiceImpl {
    }

    void handleNewUser(int userId) {
        // The system user is always started at boot, and by that point we have already run one
        // round of the package-changing logic (through prepareWebViewInSystemServer()), so early
        // out here.
        if (userId == UserHandle.USER_SYSTEM) return;
        handleUserChange();
    }