Fix clone method for ActivityOptions
Some flags were lost when the `cloneLaunchingOptions` was used. This breaks some tests when the flag to grant BAL privileges is passed and the default is not to allow BAL anymore. Test: atest android.content.pm.cts.shortcutmanager.ShortcutManagerStartShortcutTest Bug: 265916225 Change-Id: Id65b481eefc341d1c16ccdf06ea4489e109f5fba
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user