Revert "Cherish: Smart Pixels [2/2]"

This reverts commit 524e9baaaf.

Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
This commit is contained in:
Hưng Phan
2023-03-20 01:34:36 +07:00
parent a57d28d4a0
commit 9cad4320b3
6 changed files with 0 additions and 190 deletions

View File

@@ -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;
}

View File

@@ -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;
}
}