Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f2e10290 authored by Christine Franks's avatar Christine Franks
Browse files

Move color transform check to ColorDisplayManager

Bug: 111215474
Test: make RunSettingsRoboTests
Change-Id: I71c92b3f06382248923ac48be956515b0502d684
parent de324b9b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ import android.content.pm.ResolveInfo;
import android.content.pm.ServiceInfo;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.hardware.display.ColorDisplayManager;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
@@ -652,7 +653,7 @@ public class AccessibilitySettings extends SettingsPreferenceFragment implements
    protected void updateSystemPreferences() {
        // Move color inversion and color correction preferences to Display category if device
        // supports HWC hardware-accelerated color transform.
        if (isColorTransformAccelerated(getContext())) {
        if (ColorDisplayManager.isColorTransformAccelerated(getContext())) {
            PreferenceCategory experimentalCategory =
                    mCategoryToPrefCategoryMap.get(CATEGORY_EXPERIMENTAL);
            PreferenceCategory displayCategory =
+2 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.settings.accessibility;

import android.content.Context;
import android.hardware.display.ColorDisplayManager;
import android.os.Bundle;
import android.provider.SearchIndexableResource;
import android.provider.Settings;
@@ -61,7 +62,7 @@ public class ToggleDaltonizerPreferenceFragment extends ToggleFeaturePreferenceF

        mType = (ListPreference) findPreference("type");

        if (!AccessibilitySettings.isColorTransformAccelerated(getActivity())) {
        if (!ColorDisplayManager.isColorTransformAccelerated(getActivity())) {
            mFooterPreferenceMixin.createFooterPreference().setTitle(
                    R.string.accessibility_display_daltonizer_preference_subtitle);
        }