Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 152b8791 authored by Sudheer Shanka's avatar Sudheer Shanka Committed by Android (Google) Code Review
Browse files

Merge "Promote delivery group policy related APIs to @SystemApi."

parents 98784526 cade7263
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -775,11 +775,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[]);
@@ -788,6 +791,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 {
+22 −1
Original line number Diff line number Diff line
@@ -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