Implement camera-first capture flow.

This allows you to take a photo, then choose the recipients after. This
also makes it so we only upload the attachment once.
This commit is contained in:
Greyson Parrelli
2019-07-03 15:07:00 -04:00
parent 4fbb87b5b7
commit beaa86389d
44 changed files with 1672 additions and 125 deletions

View File

@@ -185,6 +185,8 @@ public class TextSecurePreferences {
private static final String REVEALABLE_MESSAGE_DEFAULT = "pref_revealable_message_default";
private static final String SEEN_CAMERA_FIRST_TOOLTIP = "pref_seen_camera_first_tooltip";
public static boolean isScreenLockEnabled(@NonNull Context context) {
return getBooleanPreference(context, SCREEN_LOCK, false);
}
@@ -1108,6 +1110,14 @@ public class TextSecurePreferences {
return getBooleanPreference(context, REVEALABLE_MESSAGE_DEFAULT, false);
}
public static void setHasSeenCameraFirstTooltip(Context context, boolean value) {
setBooleanPreference(context, SEEN_CAMERA_FIRST_TOOLTIP, value);
}
public static boolean hasSeendCameraFirstTooltip(Context context) {
return getBooleanPreference(context, SEEN_CAMERA_FIRST_TOOLTIP, false);
}
public static void setBooleanPreference(Context context, String key, boolean value) {
PreferenceManager.getDefaultSharedPreferences(context).edit().putBoolean(key, value).apply();
}