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
This commit is contained in:
Chun-Ku Lin
2024-04-01 20:07:56 +00:00
parent f18d1f60fb
commit dd915a5031
4 changed files with 2 additions and 13 deletions

View File

@@ -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;

View File

@@ -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;
}

View File

@@ -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);

View File

@@ -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();