Use new apply() instead of commit().
apply() starts an async disk write and doesn't have a return value but is otherwise identical in observable effects. Change-Id: I0f528607319d7eb5136bb11fce0b24d8741ccdf9
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user