summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@android.com>2010-09-14 10:29:35 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-09-14 10:29:35 -0700
commitf8a473c3985d7c818dc24f94330f210e1d56a409 (patch)
tree81e02bf2a937103adc594018bb086deee2133add
parent1647d472a8c04069a0aab22730a54ec374185ea5 (diff)
parentc5c8dad0afb84bda9495a0aa1f7d6a3db28de5cb (diff)
downloadpackages_apps_settings-f8a473c3985d7c818dc24f94330f210e1d56a409.zip
packages_apps_settings-f8a473c3985d7c818dc24f94330f210e1d56a409.tar.gz
packages_apps_settings-f8a473c3985d7c818dc24f94330f210e1d56a409.tar.bz2
am c5c8dad0: Use new apply() instead of commit().
Merge commit 'c5c8dad0afb84bda9495a0aa1f7d6a3db28de5cb' into gingerbread-plus-aosp * commit 'c5c8dad0afb84bda9495a0aa1f7d6a3db28de5cb': Use new apply() instead of commit().
-rw-r--r--src/com/android/settings/bluetooth/BluetoothDiscoverableEnabler.java2
-rw-r--r--src/com/android/settings/bluetooth/BluetoothEventRedirector.java2
-rw-r--r--src/com/android/settings/bluetooth/DockService.java7
-rw-r--r--src/com/android/settings/bluetooth/LocalBluetoothManager.java6
-rw-r--r--src/com/android/settings/bluetooth/RequestPermissionActivity.java2
5 files changed, 9 insertions, 10 deletions
diff --git a/src/com/android/settings/bluetooth/BluetoothDiscoverableEnabler.java b/src/com/android/settings/bluetooth/BluetoothDiscoverableEnabler.java
index eec0ad8..37e48ff 100644
--- a/src/com/android/settings/bluetooth/BluetoothDiscoverableEnabler.java
+++ b/src/com/android/settings/bluetooth/BluetoothDiscoverableEnabler.java
@@ -144,7 +144,7 @@ public class BluetoothDiscoverableEnabler implements Preference.OnPreferenceChan
private void persistDiscoverableEndTimestamp(long endTimestamp) {
SharedPreferences.Editor editor = mLocalManager.getSharedPreferences().edit();
editor.putLong(SHARED_PREFERENCES_KEY_DISCOVERABLE_END_TIMESTAMP, endTimestamp);
- editor.commit();
+ editor.apply();
}
private void handleModeChanged(int mode) {
diff --git a/src/com/android/settings/bluetooth/BluetoothEventRedirector.java b/src/com/android/settings/bluetooth/BluetoothEventRedirector.java
index dbdf6c1..cc3db6e 100644
--- a/src/com/android/settings/bluetooth/BluetoothEventRedirector.java
+++ b/src/com/android/settings/bluetooth/BluetoothEventRedirector.java
@@ -199,6 +199,6 @@ public class BluetoothEventRedirector {
SharedPreferences.Editor editor = mManager.getSharedPreferences().edit();
editor.putLong(LocalBluetoothManager.SHARED_PREFERENCES_KEY_DISCOVERING_TIMESTAMP,
System.currentTimeMillis());
- editor.commit();
+ editor.apply();
}
}
diff --git a/src/com/android/settings/bluetooth/DockService.java b/src/com/android/settings/bluetooth/DockService.java
index d0f8099..db24554 100644
--- a/src/com/android/settings/bluetooth/DockService.java
+++ b/src/com/android/settings/bluetooth/DockService.java
@@ -788,14 +788,14 @@ public class DockService extends Service implements AlertDialog.OnMultiChoiceCli
SharedPreferences.Editor editor = getSharedPreferences(SHARED_PREFERENCES_NAME,
Context.MODE_PRIVATE).edit();
editor.putBoolean(key, bool);
- editor.commit();
+ editor.apply();
}
private void setSettingInt(String key, int value) {
SharedPreferences.Editor editor = getSharedPreferences(SHARED_PREFERENCES_NAME,
Context.MODE_PRIVATE).edit();
editor.putInt(key, value);
- editor.commit();
+ editor.apply();
}
private void removeSetting(String key) {
@@ -803,8 +803,7 @@ public class DockService extends Service implements AlertDialog.OnMultiChoiceCli
Context.MODE_PRIVATE);
SharedPreferences.Editor editor = sharedPref.edit();
editor.remove(key);
- editor.commit();
- return;
+ editor.apply();
}
public synchronized void onServiceConnected() {
diff --git a/src/com/android/settings/bluetooth/LocalBluetoothManager.java b/src/com/android/settings/bluetooth/LocalBluetoothManager.java
index 2ffb139..97e823e 100644
--- a/src/com/android/settings/bluetooth/LocalBluetoothManager.java
+++ b/src/com/android/settings/bluetooth/LocalBluetoothManager.java
@@ -356,7 +356,7 @@ public class LocalBluetoothManager {
deviceAddress);
editor.putLong(LocalBluetoothManager.SHARED_PREFERENCES_KEY_LAST_SELECTED_DEVICE_TIME,
System.currentTimeMillis());
- editor.commit();
+ editor.apply();
}
public boolean hasDockAutoConnectSetting(String addr) {
@@ -371,12 +371,12 @@ public class LocalBluetoothManager {
public void saveDockAutoConnectSetting(String addr, boolean autoConnect) {
SharedPreferences.Editor editor = getSharedPreferences().edit();
editor.putBoolean(SHARED_PREFERENCES_KEY_DOCK_AUTO_CONNECT + addr, autoConnect);
- editor.commit();
+ editor.apply();
}
public void removeDockAutoConnectSetting(String addr) {
SharedPreferences.Editor editor = getSharedPreferences().edit();
editor.remove(SHARED_PREFERENCES_KEY_DOCK_AUTO_CONNECT + addr);
- editor.commit();
+ editor.apply();
}
}
diff --git a/src/com/android/settings/bluetooth/RequestPermissionActivity.java b/src/com/android/settings/bluetooth/RequestPermissionActivity.java
index eca233c..dd802f3 100644
--- a/src/com/android/settings/bluetooth/RequestPermissionActivity.java
+++ b/src/com/android/settings/bluetooth/RequestPermissionActivity.java
@@ -277,7 +277,7 @@ public class RequestPermissionActivity extends Activity implements
editor.putLong(
BluetoothDiscoverableEnabler.SHARED_PREFERENCES_KEY_DISCOVERABLE_END_TIMESTAMP,
endTimestamp);
- editor.commit();
+ editor.apply();
}
@Override