From 5ed4ae346ee91e1f58bb604355ecef74dd33cb01 Mon Sep 17 00:00:00 2001 From: KalimochoAz Date: Tue, 1 May 2012 22:17:10 +0200 Subject: Revert "Add control for fast USB Charge" This reverts commit 8f1496f742f27fc1fd20852710c9d7146e5fae16. According to an internal team talk we decide to revert this due to the possibility that USB devices that not meet the standards can damage user devices and produce battery issues. It is clear the the problem will be produces by the bad USB device/HUB... but the advantages of this patch compairing with the risk makes us to belive that this is not a good idea --- GNexusParts/res/values-de/strings.xml | 2 +- GNexusParts/res/values-ja/strings.xml | 2 +- GNexusParts/res/values-ru/strings.xml | 1 + GNexusParts/res/values/strings.xml | 6 ++---- GNexusParts/res/xml/general_preferences.xml | 8 ++------ .../settings/device/DeviceSettings.java | 1 - .../settings/device/GeneralFragmentActivity.java | 22 ---------------------- 7 files changed, 7 insertions(+), 35 deletions(-) diff --git a/GNexusParts/res/values-de/strings.xml b/GNexusParts/res/values-de/strings.xml index e5e4826..ed03759 100644 --- a/GNexusParts/res/values-de/strings.xml +++ b/GNexusParts/res/values-de/strings.xml @@ -6,7 +6,7 @@ ALLGEMEIN BILDSCHIRM - System + Prozessor WM8994 Einstellungen ( voodoo ) Farbmultiplikator Farbmultiplikator einstellen diff --git a/GNexusParts/res/values-ja/strings.xml b/GNexusParts/res/values-ja/strings.xml index 6a650f3..357a2d8 100644 --- a/GNexusParts/res/values-ja/strings.xml +++ b/GNexusParts/res/values-ja/strings.xml @@ -6,7 +6,7 @@ 一般 ディスプレイ - SYSTEM + CPU WM8994設定 ( voodoo ) カラーマルチプライヤチューニング 画面の色味を調整する diff --git a/GNexusParts/res/values-ru/strings.xml b/GNexusParts/res/values-ru/strings.xml index 57fc0ca..cd76fca 100644 --- a/GNexusParts/res/values-ru/strings.xml +++ b/GNexusParts/res/values-ru/strings.xml @@ -6,6 +6,7 @@ ОСНОВНЫЕ ДИСПЛЕЙ + ЦП Настройки WM8994 ( voodoo ) Настройка цвета мультипликатора Калибровка цвета мультипликатора diff --git a/GNexusParts/res/values/strings.xml b/GNexusParts/res/values/strings.xml index f06093f..43f27a5 100644 --- a/GNexusParts/res/values/strings.xml +++ b/GNexusParts/res/values/strings.xml @@ -6,7 +6,7 @@ GENERAL DISPLAY - System + CPU WM8994 Settings ( voodoo ) Color Multipliers Tuning Calibrate multipliers screen color @@ -23,8 +23,6 @@ Default CM Sett. Dark Sett. - Fast charge USB - Fast charge when connected to computer USB interface Default. Natural @@ -32,7 +30,7 @@ Warm Dark Cold Cross Proc. - Credits: ale.landra91 cpaixao malycomix + Credits: ale.landra91 cpaixao provolinoo Touch Keys Backlight Notifications diff --git a/GNexusParts/res/xml/general_preferences.xml b/GNexusParts/res/xml/general_preferences.xml index 2bf2c43..fc07c42 100644 --- a/GNexusParts/res/xml/general_preferences.xml +++ b/GNexusParts/res/xml/general_preferences.xml @@ -2,12 +2,8 @@ - - - + diff --git a/GNexusParts/src/com/cyanogenmod/settings/device/DeviceSettings.java b/GNexusParts/src/com/cyanogenmod/settings/device/DeviceSettings.java index d5d7838..e131654 100644 --- a/GNexusParts/src/com/cyanogenmod/settings/device/DeviceSettings.java +++ b/GNexusParts/src/com/cyanogenmod/settings/device/DeviceSettings.java @@ -45,7 +45,6 @@ public class DeviceSettings extends Activity { public static final String KEY_GAMMA_TUNING = "gamma_tuning"; public static final String KEY_CATEGORY_RADIO = "category_radio"; public static final String KEY_HSPA = "hspa"; - public static final String KEY_USB_FAST_CHARGE = "fast_charge_usb"; ViewPager mViewPager; TabsAdapter mTabsAdapter; diff --git a/GNexusParts/src/com/cyanogenmod/settings/device/GeneralFragmentActivity.java b/GNexusParts/src/com/cyanogenmod/settings/device/GeneralFragmentActivity.java index 17644e6..ca1b155 100644 --- a/GNexusParts/src/com/cyanogenmod/settings/device/GeneralFragmentActivity.java +++ b/GNexusParts/src/com/cyanogenmod/settings/device/GeneralFragmentActivity.java @@ -27,7 +27,6 @@ import android.preference.PreferenceFragment; import android.preference.PreferenceManager; import android.preference.PreferenceScreen; import android.util.Log; -import android.view.View; import com.cyanogenmod.settings.device.R; @@ -35,9 +34,6 @@ public class GeneralFragmentActivity extends PreferenceFragment { private static final String PREF_ENABLED = "1"; private static final String TAG = "GNexusParts_General"; - private static final String USB_FAST_CHARGE_FILE = "/sys/kernel/fast_charge/force_fast_charge"; - - private CheckBoxPreference mUSBFastCharge; @Override public void onCreate(Bundle savedInstanceState) { @@ -46,13 +42,6 @@ public class GeneralFragmentActivity extends PreferenceFragment { addPreferencesFromResource(R.xml.general_preferences); PreferenceScreen prefSet = getPreferenceScreen(); - mUSBFastCharge = (CheckBoxPreference) findPreference(DeviceSettings.KEY_USB_FAST_CHARGE); - - if (isSupported(USB_FAST_CHARGE_FILE)) { - mUSBFastCharge.setChecked(PREF_ENABLED.equals(Utils.readOneLine(USB_FAST_CHARGE_FILE))); - } else { - mUSBFastCharge.setEnabled(false); - } } @@ -64,12 +53,6 @@ public class GeneralFragmentActivity extends PreferenceFragment { Log.w(TAG, "key: " + key); - if (key.equals(DeviceSettings.KEY_USB_FAST_CHARGE)) { - final CheckBoxPreference chkPref = (CheckBoxPreference) preference; - boxValue = chkPref.isChecked() ? "1" : "0"; - Utils.writeValue(USB_FAST_CHARGE_FILE, boxValue); - } - return true; } @@ -79,10 +62,5 @@ public class GeneralFragmentActivity extends PreferenceFragment { public static void restore(Context context) { SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context); - if (isSupported(USB_FAST_CHARGE_FILE)) { - String sDefaultValue = Utils.readOneLine(USB_FAST_CHARGE_FILE); - Utils.writeValue(USB_FAST_CHARGE_FILE, sharedPrefs.getBoolean(DeviceSettings.KEY_USB_FAST_CHARGE, - PREF_ENABLED.equals(sDefaultValue))); - } } } -- cgit v1.1