Procházet zdrojové kódy

Fix uninitialized preferences in MainApp

Fixes #3728

Signed-off-by: Chris Narkiewicz <hello@ezaquarii.com>
Chris Narkiewicz před 6 roky
rodič
revize
4429af9189
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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,