-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New, overhauled data storage management #1954
Changes from all commits
845e85f
d56f53b
ee7d4ed
4c6a98d
66711f2
45f7cb1
f626f58
ffb33a3
1c8d46f
88498e4
59fafc7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,6 +53,7 @@ public abstract class PreferenceManager { | |
private static final String PREF__INSTANT_VIDEO_UPLOAD_PATH_USE_SUBFOLDERS | ||
= "instant_video_upload_path_use_subfolders"; | ||
private static final String PREF__LEGACY_CLEAN = "legacyClean"; | ||
private static final String PREF__KEYS_MIGRATION = "keysMigration"; | ||
private static final String PREF__AUTO_UPLOAD_UPDATE_PATH = "autoUploadPathUpdate"; | ||
private static final String PREF__PUSH_TOKEN = "pushToken"; | ||
private static final String PREF__AUTO_UPLOAD_SPLIT_OUT = "autoUploadEntriesSplitOut"; | ||
|
@@ -286,6 +287,11 @@ public static boolean getLegacyClean(Context context) { | |
return getDefaultSharedPreferences(context).getBoolean(PREF__LEGACY_CLEAN, false); | ||
} | ||
|
||
public static boolean getKeysMigration(Context context) { | ||
return getDefaultSharedPreferences(context).getBoolean(PREF__KEYS_MIGRATION, false); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought we wanted to start using ArbitraryDataProvider for stuff like this instead of shared preferences? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, but later. Not less than a day before RC :P |
||
|
||
|
||
/** | ||
* Gets the auto upload paths flag last set. | ||
* | ||
|
@@ -316,6 +322,10 @@ public static void setLegacyClean(Context context, boolean legacyClean) { | |
saveBooleanPreference(context, PREF__LEGACY_CLEAN, legacyClean); | ||
} | ||
|
||
public static void setKeysMigration(Context context, boolean keysMigration) { | ||
saveBooleanPreference(context, PREF__KEYS_MIGRATION, keysMigration); | ||
} | ||
|
||
public static void setAutoUploadInit(Context context, boolean autoUploadInit) { | ||
saveBooleanPreference(context, PREF__AUTO_UPLOAD_INIT, autoUploadInit); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not a fan of this storage point using context. IMO there should be a method in
MainApp
which directly returns the files dir and use that.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see we use this at a couple other places, so not worried about this much.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would indeed be better to centralize this, but I agree with @mario that this does not need to be done now.