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

Commit 7849fbe7 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Recalculate restricted actions each time A11yMenu is opened." into main

parents 6580a0d2 713924b1
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -348,7 +348,17 @@ public class A11yMenuOverlayLayout {

    /** Toggles a11y menu layout visibility. */
    public void toggleVisibility() {
        mLayout.setVisibility((mLayout.getVisibility() == View.VISIBLE) ? View.GONE : View.VISIBLE);
        if (mLayout.getVisibility() == View.VISIBLE) {
            mLayout.setVisibility(View.GONE);
        } else {
            if (Flags.hideRestrictedActions()) {
                // Reconfigure the shortcut list in case the set of restricted actions has changed.
                mA11yMenuViewPager.configureViewPagerAndFooter(
                        mLayout, createShortcutList(), getPageIndex());
                updateViewLayout();
            }
            mLayout.setVisibility(View.VISIBLE);
        }
    }

    /** Shows hint text on a minimal Snackbar-like text view. */
+0 −2
Original line number Diff line number Diff line
@@ -542,8 +542,6 @@ public class AccessibilityMenuServiceTest {
        final Context context = sInstrumentation.getTargetContext();
        final UserManager userManager = context.getSystemService(UserManager.class);
        userManager.setUserRestriction(restriction, isRestricted);
        // Re-enable the service for the restriction to take effect.
        enableA11yMenuService(context);
    }

    private static void unlockSignal() throws IOException {