Promote delivery group policy related APIs to @SystemApi.
Bug: 249160234 Test: atest FrameworksMockingServicesTests:BroadcastQueueTest Test: atest FrameworksMockingServicesTests:BroadcastQueueModernImplTest Change-Id: I2126254028e783004b74e0b39c2c62024c6e9a55
This commit is contained in:
@@ -772,11 +772,14 @@ package android.app {
|
||||
}
|
||||
|
||||
public class BroadcastOptions {
|
||||
method public void clearDeliveryGroupPolicy();
|
||||
method public void clearRequireCompatChange();
|
||||
method public int getDeliveryGroupPolicy();
|
||||
method public boolean isPendingIntentBackgroundActivityLaunchAllowed();
|
||||
method public static android.app.BroadcastOptions makeBasic();
|
||||
method @RequiresPermission(android.Manifest.permission.ACCESS_BROADCAST_RESPONSE_STATS) public void recordResponseEventWhileInBackground(@IntRange(from=0) long);
|
||||
method @RequiresPermission(android.Manifest.permission.START_ACTIVITIES_FROM_BACKGROUND) public void setBackgroundActivityStartsAllowed(boolean);
|
||||
method public void setDeliveryGroupPolicy(int);
|
||||
method public void setDontSendToRestrictedApps(boolean);
|
||||
method public void setPendingIntentBackgroundActivityLaunchAllowed(boolean);
|
||||
method public void setRequireAllOfPermissions(@Nullable String[]);
|
||||
@@ -785,6 +788,8 @@ package android.app {
|
||||
method @RequiresPermission(anyOf={android.Manifest.permission.CHANGE_DEVICE_IDLE_TEMP_WHITELIST, android.Manifest.permission.START_ACTIVITIES_FROM_BACKGROUND, android.Manifest.permission.START_FOREGROUND_SERVICES_FROM_BACKGROUND}) public void setTemporaryAppAllowlist(long, int, int, @Nullable String);
|
||||
method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.CHANGE_DEVICE_IDLE_TEMP_WHITELIST, android.Manifest.permission.START_ACTIVITIES_FROM_BACKGROUND, android.Manifest.permission.START_FOREGROUND_SERVICES_FROM_BACKGROUND}) public void setTemporaryAppWhitelistDuration(long);
|
||||
method public android.os.Bundle toBundle();
|
||||
field public static final int DELIVERY_GROUP_POLICY_ALL = 0; // 0x0
|
||||
field public static final int DELIVERY_GROUP_POLICY_MOST_RECENT = 1; // 0x1
|
||||
}
|
||||
|
||||
public class DownloadManager {
|
||||
|
||||
@@ -235,6 +235,7 @@ public class BroadcastOptions extends ComponentOptions {
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
public static final int DELIVERY_GROUP_POLICY_ALL = 0;
|
||||
|
||||
/**
|
||||
@@ -243,6 +244,7 @@ public class BroadcastOptions extends ComponentOptions {
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
public static final int DELIVERY_GROUP_POLICY_MOST_RECENT = 1;
|
||||
|
||||
public static BroadcastOptions makeBasic() {
|
||||
@@ -724,15 +726,34 @@ public class BroadcastOptions extends ComponentOptions {
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
public void setDeliveryGroupPolicy(@DeliveryGroupPolicy int policy) {
|
||||
mDeliveryGroupPolicy = policy;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
/**
|
||||
* Get the delivery group policy for this broadcast that specifies how multiple broadcasts
|
||||
* belonging to the same delivery group has to be handled.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
public @DeliveryGroupPolicy int getDeliveryGroupPolicy() {
|
||||
return mDeliveryGroupPolicy;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears any previously set delivery group policies using
|
||||
* {@link #setDeliveryGroupKey(String, String)} and resets the delivery group policy to
|
||||
* the default value ({@link #DELIVERY_GROUP_POLICY_ALL}).
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
public void clearDeliveryGroupPolicy() {
|
||||
mDeliveryGroupPolicy = DELIVERY_GROUP_POLICY_ALL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set namespace and key to identify the delivery group that this broadcast belongs to.
|
||||
* If no namespace and key is set, then by default {@link Intent#filterEquals(Intent)} will be
|
||||
|
||||
Reference in New Issue
Block a user