Merge "Move color transform check to ColorDisplayManager"

This commit is contained in:
Christine Franks
2019-01-18 23:08:37 +00:00
committed by Android (Google) Code Review
2 changed files with 4 additions and 2 deletions

View File

@@ -27,6 +27,7 @@ import android.content.pm.ResolveInfo;
import android.content.pm.ServiceInfo; import android.content.pm.ServiceInfo;
import android.content.res.Resources; import android.content.res.Resources;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.hardware.display.ColorDisplayManager;
import android.net.Uri; import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
@@ -662,7 +663,7 @@ public class AccessibilitySettings extends SettingsPreferenceFragment implements
protected void updateSystemPreferences() { protected void updateSystemPreferences() {
// Move color inversion and color correction preferences to Display category if device // Move color inversion and color correction preferences to Display category if device
// supports HWC hardware-accelerated color transform. // supports HWC hardware-accelerated color transform.
if (isColorTransformAccelerated(getContext())) { if (ColorDisplayManager.isColorTransformAccelerated(getContext())) {
PreferenceCategory experimentalCategory = PreferenceCategory experimentalCategory =
mCategoryToPrefCategoryMap.get(CATEGORY_EXPERIMENTAL); mCategoryToPrefCategoryMap.get(CATEGORY_EXPERIMENTAL);
PreferenceCategory displayCategory = PreferenceCategory displayCategory =

View File

@@ -17,6 +17,7 @@
package com.android.settings.accessibility; package com.android.settings.accessibility;
import android.content.Context; import android.content.Context;
import android.hardware.display.ColorDisplayManager;
import android.os.Bundle; import android.os.Bundle;
import android.provider.SearchIndexableResource; import android.provider.SearchIndexableResource;
import android.provider.Settings; import android.provider.Settings;
@@ -61,7 +62,7 @@ public class ToggleDaltonizerPreferenceFragment extends ToggleFeaturePreferenceF
mType = (ListPreference) findPreference("type"); mType = (ListPreference) findPreference("type");
if (!AccessibilitySettings.isColorTransformAccelerated(getActivity())) { if (!ColorDisplayManager.isColorTransformAccelerated(getActivity())) {
mFooterPreferenceMixin.createFooterPreference().setTitle( mFooterPreferenceMixin.createFooterPreference().setTitle(
R.string.accessibility_display_daltonizer_preference_subtitle); R.string.accessibility_display_daltonizer_preference_subtitle);
} }