diff options
author | KalimochoAz <calimochoazucarado@gmail.com> | 2012-05-01 22:17:10 +0200 |
---|---|---|
committer | KalimochoAz <calimochoazucarado@gmail.com> | 2012-05-01 22:17:10 +0200 |
commit | 5ed4ae346ee91e1f58bb604355ecef74dd33cb01 (patch) | |
tree | 8ba57dc61b41f5a969f00cf6b630663b145d9c0f /GNexusParts/src/com/cyanogenmod/settings/device | |
parent | 3fa94b46cae3746795f58fd64a1f06e58df7a1a1 (diff) | |
download | device_samsung_tuna-5ed4ae346ee91e1f58bb604355ecef74dd33cb01.zip device_samsung_tuna-5ed4ae346ee91e1f58bb604355ecef74dd33cb01.tar.gz device_samsung_tuna-5ed4ae346ee91e1f58bb604355ecef74dd33cb01.tar.bz2 |
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
Diffstat (limited to 'GNexusParts/src/com/cyanogenmod/settings/device')
-rw-r--r-- | GNexusParts/src/com/cyanogenmod/settings/device/DeviceSettings.java | 1 | ||||
-rw-r--r-- | GNexusParts/src/com/cyanogenmod/settings/device/GeneralFragmentActivity.java | 22 |
2 files changed, 0 insertions, 23 deletions
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))); - } } } |