Browse Source

Fix uninitialized preferences in MainApp

Fixes #3728

Signed-off-by: Chris Narkiewicz <hello@ezaquarii.com>
Chris Narkiewicz 6 years ago
parent
commit
4429af9189
1 changed files with 1 additions and 1 deletions
  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();
         DisplayUtils.useCompatVectorIfNeeded();
 
 
         sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
         sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
-
+        preferences = PreferenceManager.fromContext(this);
         fixStoragePath();
         fixStoragePath();
 
 
         MainApp.storagePath = sharedPreferences.getString(SettingsActivity.PreferenceKeys.STORAGE_PATH,
         MainApp.storagePath = sharedPreferences.getString(SettingsActivity.PreferenceKeys.STORAGE_PATH,