Browse Source

Merge pull request #3730 from nextcloud/fix-npe-in-main-app-fix-storage-path

Fix uninitialized preferences in MainApp
Andy Scherzinger 6 năm trước cách đây
mục cha
commit
215d51d170
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/main/java/com/owncloud/android/MainApp.java

+ 1 - 1
src/main/java/com/owncloud/android/MainApp.java

@@ -130,7 +130,7 @@ public class MainApp extends MultiDexApplication {
         DisplayUtils.useCompatVectorIfNeeded();
 
         sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
-
+        preferences = PreferenceManager.fromContext(this);
         fixStoragePath();
 
         MainApp.storagePath = sharedPreferences.getString(SettingsActivity.PreferenceKeys.STORAGE_PATH,