Support extra dim quick settings tooltips when feature on
Bug: 210356011 Test: Manual testing Change-Id: I501d21e00a1599a79f9490a5a6f4bd246c2ec8d4
This commit is contained in:
@@ -16,6 +16,10 @@
|
|||||||
|
|
||||||
package com.android.settings.accessibility;
|
package com.android.settings.accessibility;
|
||||||
|
|
||||||
|
import static com.android.internal.accessibility.AccessibilityShortcutController.REDUCE_BRIGHT_COLORS_COMPONENT_NAME;
|
||||||
|
import static com.android.internal.accessibility.AccessibilityShortcutController.REDUCE_BRIGHT_COLORS_TILE_SERVICE_COMPONENT_NAME;
|
||||||
|
import static com.android.settings.accessibility.AccessibilityStatsLogUtils.logAccessibilityServiceEnabled;
|
||||||
|
|
||||||
import android.app.settings.SettingsEnums;
|
import android.app.settings.SettingsEnums;
|
||||||
import android.content.ComponentName;
|
import android.content.ComponentName;
|
||||||
import android.content.ContentResolver;
|
import android.content.ContentResolver;
|
||||||
@@ -31,7 +35,6 @@ import android.view.ViewGroup;
|
|||||||
import androidx.preference.PreferenceCategory;
|
import androidx.preference.PreferenceCategory;
|
||||||
import androidx.preference.SwitchPreference;
|
import androidx.preference.SwitchPreference;
|
||||||
|
|
||||||
import com.android.internal.accessibility.AccessibilityShortcutController;
|
|
||||||
import com.android.settings.R;
|
import com.android.settings.R;
|
||||||
import com.android.settings.search.BaseSearchIndexProvider;
|
import com.android.settings.search.BaseSearchIndexProvider;
|
||||||
import com.android.settings.widget.SeekBarPreference;
|
import com.android.settings.widget.SeekBarPreference;
|
||||||
@@ -62,7 +65,7 @@ public class ToggleReduceBrightColorsPreferenceFragment extends ToggleFeaturePre
|
|||||||
.authority(getPrefContext().getPackageName())
|
.authority(getPrefContext().getPackageName())
|
||||||
.appendPath(String.valueOf(R.raw.extra_dim_banner))
|
.appendPath(String.valueOf(R.raw.extra_dim_banner))
|
||||||
.build();
|
.build();
|
||||||
mComponentName = AccessibilityShortcutController.REDUCE_BRIGHT_COLORS_COMPONENT_NAME;
|
mComponentName = REDUCE_BRIGHT_COLORS_COMPONENT_NAME;
|
||||||
mPackageName = getText(R.string.reduce_bright_colors_preference_title);
|
mPackageName = getText(R.string.reduce_bright_colors_preference_title);
|
||||||
mHtmlDescription = getText(R.string.reduce_bright_colors_preference_subtitle);
|
mHtmlDescription = getText(R.string.reduce_bright_colors_preference_subtitle);
|
||||||
mRbcIntensityPreferenceController =
|
mRbcIntensityPreferenceController =
|
||||||
@@ -143,7 +146,8 @@ public class ToggleReduceBrightColorsPreferenceFragment extends ToggleFeaturePre
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onPreferenceToggled(String preferenceKey, boolean enabled) {
|
protected void onPreferenceToggled(String preferenceKey, boolean enabled) {
|
||||||
AccessibilityStatsLogUtils.logAccessibilityServiceEnabled(mComponentName, enabled);
|
super.onPreferenceToggled(preferenceKey, enabled);
|
||||||
|
logAccessibilityServiceEnabled(mComponentName, enabled);
|
||||||
mColorDisplayManager.setReduceBrightColorsActivated(enabled);
|
mColorDisplayManager.setReduceBrightColorsActivated(enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -172,12 +176,12 @@ public class ToggleReduceBrightColorsPreferenceFragment extends ToggleFeaturePre
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
ComponentName getTileComponentName() {
|
ComponentName getTileComponentName() {
|
||||||
return null;
|
return REDUCE_BRIGHT_COLORS_TILE_SERVICE_COMPONENT_NAME;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
CharSequence getTileName() {
|
CharSequence getTileName() {
|
||||||
return null;
|
return getText(R.string.reduce_bright_colors_preference_title);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Reference in New Issue
Block a user