Files
packages_apps_Settings/src/com/android/settings/accessibility/DaltonizerPreferenceController.java
Chun-Ku Lin 0f84b652cc Make ColorAndMotionFragment fully in Catalyst
Bug: 392190782
Test: manual (verify the navigation and the search still works the same)
Test: atest
Flag: com.android.settings.flags.catalyst_accessibility_color_and_motion

Change-Id: I7717390c70246503aec545991fd9a40be5152373
2025-02-17 03:01:36 +00:00

49 lines
1.6 KiB
Java

/*
* Copyright (C) 2019 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.settings.accessibility;
import android.content.Context;
import android.provider.Settings;
import com.android.settings.R;
import com.android.settings.core.BasePreferenceController;
// LINT.IfChange
/** Controller that shows and updates the color correction summary. */
public class DaltonizerPreferenceController extends BasePreferenceController {
private static final String DALTONIZER_ENABLED =
Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED;
public DaltonizerPreferenceController(Context context, String preferenceKey) {
super(context, preferenceKey);
}
@Override
public int getAvailabilityStatus() {
return AVAILABLE;
}
@Override
public CharSequence getSummary() {
return AccessibilityUtil.getSummary(
mContext,
DALTONIZER_ENABLED,
R.string.daltonizer_state_on, R.string.daltonizer_state_off);
}
}
// LINT.ThenChange(/src/com/android/settings/accessibility/DaltonizerPreference.kt)