Cloud sync: activate

This commit is contained in:
M66B
2023-01-22 12:43:33 +01:00
parent f731796480
commit 0ccc27d55c
6 changed files with 96 additions and 22 deletions

View File

@@ -71,9 +71,21 @@ public class ActivityCompose extends ActivityBase implements FragmentManager.OnB
@Override
public void onBackStackChanged() {
if (getSupportFragmentManager().getBackStackEntryCount() == 0) {
String action = getIntent().getAction();
if (!isShared(action) &&
(action == null || !action.startsWith("widget:"))) {
Intent intent = getIntent();
String action = intent.getAction();
boolean widget = (action != null && action.startsWith("widget:"));
String[] tos = intent.getStringArrayExtra(Intent.EXTRA_EMAIL);
boolean cloud = (tos != null && tos.length == 1 && BuildConfig.CLOUD_EMAIL.equals(tos[0]));
if (cloud) {
Intent setup = new Intent(this, ActivitySetup.class)
.setAction("misc")
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK)
.putExtra("tab", "backup");
startActivity(setup);
} else if (!isShared(action) && !widget) {
Intent parent = getParentActivityIntent();
if (parent != null)
if (shouldUpRecreateTask(parent))