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

Commit dd915a50 authored by Chun-Ku Lin's avatar Chun-Ku Lin
Browse files

Clean up usages of flag remove_qs_tooltip_in_suw

This bug-fixing flag has been in Trunkfood in two months.

Test: existing presubmit (no functional change)
Bug: 294560581
Change-Id: I05282f1f7ee6b1bb4e4bf873771d80ae68204b4c
parent f18d1f60
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -210,8 +210,7 @@ abstract class PreviewSizeSeekBarController extends BasePreferenceController imp
            return;
        }

        if (Flags.removeQsTooltipInSuw()
                && mContext instanceof Activity
        if (mContext instanceof Activity
                && WizardManagerHelper.isAnySetupWizard(((Activity) mContext).getIntent())) {
            // Don't show QuickSettingsTooltip in Setup Wizard
            return;
+1 −3
Original line number Diff line number Diff line
@@ -931,9 +931,7 @@ public abstract class ToggleFeaturePreferenceFragment extends DashboardFragment
        }

        Activity activity = getActivity();
        if (com.android.settings.accessibility.Flags.removeQsTooltipInSuw()
                && activity != null
                && WizardManagerHelper.isAnySetupWizard(activity.getIntent())) {
        if (activity != null && WizardManagerHelper.isAnySetupWizard(activity.getIntent())) {
            // Don't show QuickSettingsTooltip in Setup Wizard
            return;
        }
+0 −7
Original line number Diff line number Diff line
@@ -30,9 +30,6 @@ import android.app.Activity;
import android.content.ComponentName;
import android.content.Intent;
import android.os.Bundle;
import android.platform.test.annotations.RequiresFlagsEnabled;
import android.platform.test.flag.junit.CheckFlagsRule;
import android.platform.test.flag.junit.DeviceFlagsValueProvider;
import android.view.LayoutInflater;
import android.widget.PopupWindow;
import android.widget.SeekBar;
@@ -72,9 +69,6 @@ import org.robolectric.shadows.ShadowLooper;
@Config(shadows = {ShadowInteractionJankMonitor.class})
public class PreviewSizeSeekBarControllerTest {

    @Rule
    public final CheckFlagsRule mCheckFlagsRule = DeviceFlagsValueProvider.createCheckFlagsRule();

    @Rule
    public ActivityScenarioRule<EmptyFragmentActivity> rule =
            new ActivityScenarioRule<>(EmptyFragmentActivity.class);
@@ -213,7 +207,6 @@ public class PreviewSizeSeekBarControllerTest {
    }

    @Test
    @RequiresFlagsEnabled(Flags.FLAG_REMOVE_QS_TOOLTIP_IN_SUW)
    public void onProgressChanged_inSuw_toolTipShouldNotShown() {
        Intent intent = mContext.getIntent();
        intent.putExtra(WizardManagerHelper.EXTRA_IS_SETUP_FLOW, true);
+0 −1
Original line number Diff line number Diff line
@@ -339,7 +339,6 @@ public class ToggleFeaturePreferenceFragmentTest {
    }

    @Test
    @EnableFlags(com.android.settings.accessibility.Flags.FLAG_REMOVE_QS_TOOLTIP_IN_SUW)
    @Config(shadows = ShadowFragment.class)
    public void onPreferenceToggledOnEnabledService_inSuw_toolTipViewShouldNotShow() {
        Intent suwIntent = new Intent();