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

Commit a858c5f6 authored by Phil Weaver's avatar Phil Weaver
Browse files

Handle accessibility button state on user switch

Bug: 78196203
Test: Enable Magnification with button, switch to guest,
see accessibility button disappear

Change-Id: I4feda07243a6c17a5985f29dbea9d4ad0adcb0cf
parent 2897fd31
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);
            };
        }
    };