Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8b1e5d9d authored by Jason Chiu's avatar Jason Chiu Committed by Android (Google) Code Review
Browse files

Revert "Remove FLAG_ACTIVITY_FORWARD_RESULT in 2-pane flow"

This reverts commit ea1580f9.

Reason for revert:
1. Search result trampoline should have that result sent back to the
reply target of the original activity.
2. To leverage the behavior of handheld's deep link case, large
screen's deep link should forward the result.

Change-Id: I55303070e35fc9430063655e0a9a0fd72e0823ac
parent ea1580f9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -415,6 +415,7 @@ public class SettingsActivity extends SettingsBaseActivity

        trampolineIntent.putExtra(EXTRA_SETTINGS_EMBEDDED_DEEP_LINK_HIGHLIGHT_MENU_KEY,
                highlightMenuKey);
        trampolineIntent.addFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT);
        return trampolineIntent;
    }

+2 −0
Original line number Diff line number Diff line
@@ -173,6 +173,7 @@ public class SettingsHomepageActivity extends FragmentActivity implements
            if (userInfo.isManagedProfile()) {
                final Intent intent = new Intent(getIntent())
                        .setClass(this, DeepLinkHomepageActivityInternal.class)
                        .addFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT)
                        .putExtra(EXTRA_USER_HANDLE, getUser());
                intent.removeFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                startActivityAsUser(intent, um.getPrimaryUser().getUserHandle());
@@ -450,6 +451,7 @@ public class SettingsHomepageActivity extends FragmentActivity implements
        intent.setAction(null);

        targetIntent.removeFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_NEW_DOCUMENT);
        targetIntent.addFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT);

        // Sender of intent may want to send intent extra data to the destination of targetIntent.
        targetIntent.replaceExtras(intent);
+2 −0
Original line number Diff line number Diff line
@@ -95,6 +95,8 @@ public class SearchResultTrampoline extends Activity {
            }
        }

        intent.addFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT);

        if (!ActivityEmbeddingUtils.isEmbeddingActivityEnabled(this)) {
            startActivity(intent);
        } else if (isSettingsIntelligence(callingActivity)) {