소스 검색

use apply() instead of commit()

AndyScherzinger 8 년 전
부모
커밋
086e18d377
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      src/main/java/com/owncloud/android/ui/activity/Preferences.java

+ 3 - 3
src/main/java/com/owncloud/android/ui/activity/Preferences.java

@@ -869,7 +869,7 @@ public class Preferences extends PreferenceActivity
         MainApp.setStoragePath(mStoragePath);
         SharedPreferences.Editor editor = appPrefs.edit();
         editor.putString(PreferenceKeys.STORAGE_PATH, mStoragePath);
-        editor.commit();
+        editor.apply();
         String storageDescription = DataStorageProvider.getInstance().getStorageDescriptionByPath(mStoragePath);
         mPrefStoragePath.setSummary(storageDescription);
         mPrefStoragePath.setValue(newStoragePath);
@@ -895,7 +895,7 @@ public class Preferences extends PreferenceActivity
                 PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
         SharedPreferences.Editor editor = appPrefs.edit();
         editor.putString(PreferenceKeys.INSTANT_UPLOAD_PATH, mUploadPath);
-        editor.commit();
+        editor.apply();
     }
 
     /**
@@ -916,7 +916,7 @@ public class Preferences extends PreferenceActivity
                 PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
         SharedPreferences.Editor editor = appPrefs.edit();
         editor.putString(PreferenceKeys.INSTANT_VIDEO_UPLOAD_PATH, mUploadVideoPath);
-        editor.commit();
+        editor.apply();
     }
 
     @Override