Don't show the QuickSetting tooltip when we stopped auto add qs tile for
the user Bug: 348110750 Test: atest ReduceBrightColorsPreferenceControllerTest Test: manual - Go to Settings > Accessibility - Turn on Extra dim for the first time - Verify the QS tooltip prompt doesn't show up Flag: android.view.accessibility.a11y_qs_shortcut Change-Id: I6fecb818df3bb865ba81cbcda94149a98d8255ab
This commit is contained in:
@@ -21,6 +21,7 @@ import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.preference.PreferenceScreen;
|
||||
|
||||
import com.android.settings.R;
|
||||
@@ -42,6 +43,7 @@ public abstract class AccessibilityQuickSettingsPrimarySwitchPreferenceControlle
|
||||
private boolean mNeedsQSTooltipReshow = false;
|
||||
|
||||
/** Returns the accessibility tile component name. */
|
||||
@Nullable
|
||||
abstract ComponentName getTileComponentName();
|
||||
|
||||
/** Returns the accessibility tile tooltip content. */
|
||||
|
||||
@@ -29,6 +29,7 @@ import android.os.UserHandle;
|
||||
import android.provider.Settings;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceScreen;
|
||||
|
||||
@@ -125,9 +126,14 @@ public class ReduceBrightColorsPreferenceController
|
||||
mContext.getContentResolver().unregisterContentObserver(mSettingsContentObserver);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
protected ComponentName getTileComponentName() {
|
||||
return REDUCE_BRIGHT_COLORS_TILE_SERVICE_COMPONENT_NAME;
|
||||
// TODO: When clean up the feature flag, change the parent class from
|
||||
// AccessibilityQuickSettingsPrimarySwitchPreferenceController to
|
||||
// TogglePreferenceController
|
||||
return android.view.accessibility.Flags.a11yQsShortcut()
|
||||
? null : REDUCE_BRIGHT_COLORS_TILE_SERVICE_COMPONENT_NAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user