Merge "Fix not able to add Settings shortcut widget problem" into sc-v2-dev

This commit is contained in:
TreeHugger Robot
2021-09-23 08:02:23 +00:00
committed by Android (Google) Code Review
2 changed files with 2 additions and 0 deletions

View File

@@ -384,6 +384,7 @@ public class SettingsActivity extends SettingsBaseActivity
trampolineIntent.putExtra( trampolineIntent.putExtra(
android.provider.Settings.EXTRA_SETTINGS_LARGE_SCREEN_DEEP_LINK_INTENT_URI, android.provider.Settings.EXTRA_SETTINGS_LARGE_SCREEN_DEEP_LINK_INTENT_URI,
intent.toUri(Intent.URI_INTENT_SCHEME)); intent.toUri(Intent.URI_INTENT_SCHEME));
trampolineIntent.addFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT);
startActivity(trampolineIntent); startActivity(trampolineIntent);
return true; return true;

View File

@@ -212,6 +212,7 @@ public class SettingsHomepageActivity extends FragmentActivity implements
intent.setAction(null); intent.setAction(null);
targetIntent.setFlags(targetIntent.getFlags() & ~Intent.FLAG_ACTIVITY_NEW_TASK); targetIntent.setFlags(targetIntent.getFlags() & ~Intent.FLAG_ACTIVITY_NEW_TASK);
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);