From 9cad4320b34d6a2adcfe43b22f61e510fda232bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C6=B0ng=20Phan?= Date: Mon, 20 Mar 2023 01:34:36 +0700 Subject: [PATCH] Revert "Cherish: Smart Pixels [2/2]" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 524e9baaafcff4b75a53c82ff1a598bae9ace2b1. Signed-off-by: Hưng Phan --- res/values/cherish_arrays.xml | 45 --------------- res/values/cherish_strings.xml | 12 ---- res/xml/cherish_settings_misc.xml | 7 --- res/xml/cherish_settings_smart_pixels.xml | 56 ------------------ .../settings/fragments/MiscSettings.java | 13 ----- .../settings/fragments/SmartPixels.java | 57 ------------------- 6 files changed, 190 deletions(-) delete mode 100644 res/xml/cherish_settings_smart_pixels.xml delete mode 100644 src/com/cherish/settings/fragments/SmartPixels.java diff --git a/res/values/cherish_arrays.xml b/res/values/cherish_arrays.xml index ef87334..3de2bde 100644 --- a/res/values/cherish_arrays.xml +++ b/res/values/cherish_arrays.xml @@ -510,51 +510,6 @@ 1800000 - - - 12 - 25 - 38 - 50 - 62 - 75 - 88 - - - - 0 - 1 - 2 - 3 - 4 - 5 - 6 - - - - @string/custom_timeout_summary_15secs - @string/custom_timeout_summary_30secs - @string/custom_timeout_summary_1min - @string/custom_timeout_summary_2mins - @string/custom_timeout_summary_5mins - @string/custom_timeout_summary_10mins - @string/custom_timeout_summary_20mins - @string/custom_timeout_summary_30mins - @string/custom_timeout_summary_1hour - - - - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - - @string/pulse_ambient_light_color_mode_notification diff --git a/res/values/cherish_strings.xml b/res/values/cherish_strings.xml index 0ba2086..402e18e 100644 --- a/res/values/cherish_strings.xml +++ b/res/values/cherish_strings.xml @@ -736,18 +736,6 @@ Click to partial screenshot Short click Volume Down and Power to take partial screenshot - - - Smart pixels is a power saving feature. Depending on how many pixels you decide to turn off, you could see improvement in battery life. Note that in some cases it can result in unresponsive areas on touch screen - Smart Pixels - Save battery by shutting off extra pixels - Enable Smart Pixels - Shut off pixels to reduce power consumption - Auto-enable on battery saver - Enable Smart Pixels when battery saver is enabled - Percent of pixels to disable - Burn-in protection - Prevents burn-in on OLED devices by shifting pixels every so often Screen edge lighting diff --git a/res/xml/cherish_settings_misc.xml b/res/xml/cherish_settings_misc.xml index 4fe7932..f811296 100644 --- a/res/xml/cherish_settings_misc.xml +++ b/res/xml/cherish_settings_misc.xml @@ -45,13 +45,6 @@ android:fragment="com.cherish.settings.security.applock.AppLockSettingsFragment" settings:controller="com.cherish.settings.security.applock.AppLockSettingsPreferenceController" /> - - - - - - - - - - - - - - - - diff --git a/src/com/cherish/settings/fragments/MiscSettings.java b/src/com/cherish/settings/fragments/MiscSettings.java index 6511017..df93e23 100644 --- a/src/com/cherish/settings/fragments/MiscSettings.java +++ b/src/com/cherish/settings/fragments/MiscSettings.java @@ -40,7 +40,6 @@ import com.android.settingslib.search.SearchIndexable; import android.provider.SearchIndexableResource; import com.cherish.settings.fragments.SmartCharging; -import com.cherish.settings.fragments.SmartPixels; import java.util.ArrayList; import java.util.List; @@ -54,12 +53,10 @@ public class MiscSettings extends SettingsPreferenceFragment implements private static final String SYS_PHOTOS_SPOOF = "persist.sys.pixelprops.gphotos"; private static final String SMART_CHARGING = "smart_charging"; - private static final String SMART_PIXELS = "smart_pixels"; private SwitchPreference mGamesSpoof; private SwitchPreference mPhotosSpoof; private Preference mSmartCharging; - private Preference mSmartPixels; @Override public void onCreate(Bundle icicle) { @@ -84,12 +81,6 @@ public class MiscSettings extends SettingsPreferenceFragment implements com.android.internal.R.bool.config_smartChargingAvailable); if (!mSmartChargingSupported) prefScreen.removePreference(mSmartCharging); - - mSmartPixels = (Preference) prefScreen.findPreference(SMART_PIXELS); - boolean mSmartPixelsSupported = getResources().getBoolean( - com.android.internal.R.bool.config_supportSmartPixels); - if (!mSmartPixelsSupported) - prefScreen.removePreference(mSmartPixels); } @@ -121,12 +112,8 @@ public class MiscSettings extends SettingsPreferenceFragment implements boolean mSmartChargingSupported = context.getResources().getBoolean( com.android.internal.R.bool.config_smartChargingAvailable); - boolean mSmartPixelsSupported = context.getResources().getBoolean( - com.android.internal.R.bool.config_supportSmartPixels); if (!mSmartChargingSupported) keys.add(SMART_CHARGING); - if (!mSmartPixelsSupported) - keys.add(SMART_PIXELS); return keys; } diff --git a/src/com/cherish/settings/fragments/SmartPixels.java b/src/com/cherish/settings/fragments/SmartPixels.java deleted file mode 100644 index ec303a1..0000000 --- a/src/com/cherish/settings/fragments/SmartPixels.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (C) 2018-2022 crDroid Android 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.cherish.settings.fragments; - -import android.content.Context; -import android.content.ContentResolver; -import android.content.res.Resources; -import android.net.Uri; -import android.os.Bundle; -import android.os.Handler; -import android.os.UserHandle; -import android.provider.Settings; - -import androidx.preference.ListPreference; -import androidx.preference.Preference; -import androidx.preference.PreferenceScreen; -import androidx.preference.Preference.OnPreferenceChangeListener; -import androidx.preference.SwitchPreference; - -import com.android.internal.logging.nano.MetricsProto; -import com.android.settings.R; -import com.android.settings.SettingsPreferenceFragment; - -public class SmartPixels extends SettingsPreferenceFragment { - - private static final String TAG = "SmartPixels"; - - private static final String SMART_PIXELS_FOOTER = "smart_pixels_footer"; - - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - - addPreferencesFromResource(R.xml.cherish_settings_smart_pixels); - - findPreference(SMART_PIXELS_FOOTER).setTitle(R.string.smart_pixels_warning_text); - } - - @Override - public int getMetricsCategory() { - return MetricsProto.MetricsEvent.CHERISH_SETTINGS; - } -}