Merge "Fix clone method for ActivityOptions"

This commit is contained in:
Achim Thesmann
2023-01-26 17:20:53 +00:00
committed by Android (Google) Code Review
2 changed files with 8 additions and 2 deletions

View File

@@ -1997,10 +1997,12 @@ public class ActivityOptions extends ComponentOptions {
/**
* Sets background activity launch logic won't use pending intent creator foreground state.
*
* @hide
*/
public void setIgnorePendingIntentCreatorForegroundState(boolean state) {
public ActivityOptions setIgnorePendingIntentCreatorForegroundState(boolean state) {
mIgnorePendingIntentCreatorForegroundState = state;
return this;
}
/**

View File

@@ -143,7 +143,11 @@ public class SafeActivityOptions {
.setLaunchTaskDisplayArea(options.getLaunchTaskDisplayArea())
.setLaunchDisplayId(options.getLaunchDisplayId())
.setCallerDisplayId(options.getCallerDisplayId())
.setLaunchRootTask(options.getLaunchRootTask());
.setLaunchRootTask(options.getLaunchRootTask())
.setPendingIntentBackgroundActivityStartMode(
options.getPendingIntentBackgroundActivityStartMode())
.setIgnorePendingIntentCreatorForegroundState(
options.getIgnorePendingIntentCreatorForegroundState());
}
/**