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

Commit 24fd4350 authored by Phil Weaver's avatar Phil Weaver Committed by Android (Google) Code Review
Browse files

Merge "Handle accessibility button state on user switch" into pi-dev

parents ebcb2e00 a858c5f6
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -281,6 +281,7 @@ public class NavigationBarFragment extends Fragment implements Callbacks {

        IntentFilter filter = new IntentFilter(Intent.ACTION_SCREEN_OFF);
        filter.addAction(Intent.ACTION_SCREEN_ON);
        filter.addAction(Intent.ACTION_USER_SWITCHED);
        getContext().registerReceiverAsUser(mBroadcastReceiver, UserHandle.ALL, filter, null, null);
        notifyNavigationBarScreenOn();
        mOverviewProxyService.addCallback(mOverviewProxyListener);
@@ -1084,6 +1085,10 @@ public class NavigationBarFragment extends Fragment implements Callbacks {
                    || Intent.ACTION_SCREEN_ON.equals(action)) {
                notifyNavigationBarScreenOn();
            }
            if (Intent.ACTION_USER_SWITCHED.equals(action)) {
                // The accessibility settings may be different for the new user
                updateAccessibilityServicesState(mAccessibilityManager);
            };
        }
    };