Merge "Revert "Remove FLAG_ACTIVITY_FORWARD_RESULT in 2-pane flow""

This commit is contained in:
Jason Chiu
2022-12-14 02:49:17 +00:00
committed by Android (Google) Code Review
3 changed files with 5 additions and 0 deletions

View File

@@ -439,6 +439,7 @@ public class SettingsActivity extends SettingsBaseActivity
trampolineIntent.putExtra(EXTRA_SETTINGS_EMBEDDED_DEEP_LINK_HIGHLIGHT_MENU_KEY, trampolineIntent.putExtra(EXTRA_SETTINGS_EMBEDDED_DEEP_LINK_HIGHLIGHT_MENU_KEY,
highlightMenuKey); highlightMenuKey);
trampolineIntent.addFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT);
return trampolineIntent; return trampolineIntent;
} }

View File

@@ -178,6 +178,7 @@ public class SettingsHomepageActivity extends FragmentActivity implements
if (userInfo.isManagedProfile()) { if (userInfo.isManagedProfile()) {
final Intent intent = new Intent(getIntent()) final Intent intent = new Intent(getIntent())
.setClass(this, DeepLinkHomepageActivityInternal.class) .setClass(this, DeepLinkHomepageActivityInternal.class)
.addFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT)
.putExtra(EXTRA_USER_HANDLE, getUser()); .putExtra(EXTRA_USER_HANDLE, getUser());
intent.removeFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.removeFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivityAsUser(intent, um.getPrimaryUser().getUserHandle()); startActivityAsUser(intent, um.getPrimaryUser().getUserHandle());
@@ -496,6 +497,7 @@ public class SettingsHomepageActivity extends FragmentActivity implements
intent.setAction(null); intent.setAction(null);
targetIntent.removeFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_NEW_DOCUMENT); 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. // Sender of intent may want to send intent extra data to the destination of targetIntent.
targetIntent.replaceExtras(intent); targetIntent.replaceExtras(intent);

View File

@@ -100,6 +100,8 @@ public class SearchResultTrampoline extends Activity {
} }
} }
intent.addFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT);
if (!ActivityEmbeddingUtils.isEmbeddingActivityEnabled(this)) { if (!ActivityEmbeddingUtils.isEmbeddingActivityEnabled(this)) {
startActivity(intent); startActivity(intent);
} else if (isSettingsIntelligence(callingActivity)) { } else if (isSettingsIntelligence(callingActivity)) {