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

Commit d281f55c authored by Cam Bickel's avatar Cam Bickel Committed by Camden Bickel
Browse files

Cleanup flag "hide_restricted_actions"

Bug: b/347269196
Test: presubmit
Flag: EXEMPT flag cleanup

Change-Id: I9d2b08c7b67ff1c3204da77a6ddcfd4baafc886d
parent 40c99aa5
Loading
Loading
Loading
Loading
+5 −9
Original line number Diff line number Diff line
@@ -220,9 +220,6 @@ public class A11yMenuOverlayLayout {

    @SuppressLint("MissingPermission")
    private boolean isShortcutRestricted(int shortcutId) {
        if (!Flags.hideRestrictedActions()) {
            return false;
        }
        final UserManager userManager = mService.getSystemService(UserManager.class);
        if (userManager == null) {
            return false;
@@ -366,12 +363,11 @@ public class A11yMenuOverlayLayout {
        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);
        }
    }
+0 −10
Original line number Diff line number Diff line
@@ -46,9 +46,6 @@ import android.hardware.display.DisplayManager;
import android.media.AudioManager;
import android.os.PowerManager;
import android.os.UserManager;
import android.platform.test.annotations.RequiresFlagsEnabled;
import android.platform.test.flag.junit.CheckFlagsRule;
import android.platform.test.flag.junit.DeviceFlagsValueProvider;
import android.platform.uiautomator_helpers.WaitUtils;
import android.provider.Settings;
import android.util.Log;
@@ -63,7 +60,6 @@ import androidx.test.uiautomator.Configurator;
import androidx.test.uiautomator.UiDevice;

import com.android.compatibility.common.util.TestUtils;
import com.android.systemui.accessibility.accessibilitymenu.Flags;
import com.android.systemui.accessibility.accessibilitymenu.model.A11yMenuShortcut.ShortcutId;

import org.junit.After;
@@ -71,7 +67,6 @@ import org.junit.AfterClass;
import org.junit.Assume;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;

@@ -82,9 +77,6 @@ import java.util.concurrent.atomic.AtomicInteger;

@RunWith(AndroidJUnit4.class)
public class AccessibilityMenuServiceTest {
    @Rule
    public final CheckFlagsRule mCheckFlagsRule = DeviceFlagsValueProvider.createCheckFlagsRule();

    private static final String TAG = "A11yMenuServiceTest";
    private static final int CLICK_ID = AccessibilityNodeInfo.ACTION_CLICK;

@@ -499,7 +491,6 @@ public class AccessibilityMenuServiceTest {
    }

    @Test
    @RequiresFlagsEnabled(Flags.FLAG_HIDE_RESTRICTED_ACTIONS)
    public void testRestrictedActions_BrightnessNotAvailable() throws Throwable {
        try {
            setUserRestriction(UserManager.DISALLOW_CONFIG_BRIGHTNESS, true);
@@ -519,7 +510,6 @@ public class AccessibilityMenuServiceTest {
    }

    @Test
    @RequiresFlagsEnabled(Flags.FLAG_HIDE_RESTRICTED_ACTIONS)
    public void testRestrictedActions_VolumeNotAvailable() throws Throwable {
        try {
            setUserRestriction(UserManager.DISALLOW_ADJUST_VOLUME, true);