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

Commit abcf240b authored by Bernardo Rufino's avatar Bernardo Rufino Committed by Android (Google) Code Review
Browse files

Merge "Replace "whitelist" wording from BAL's code"

parents de18936d 92927b02
Loading
Loading
Loading
Loading
+4 −5
Original line number Original line Diff line number Diff line
@@ -103,17 +103,16 @@ public abstract class ActivityManagerInternal {
            IBinder whitelistToken, long duration);
            IBinder whitelistToken, long duration);


    /**
    /**
     * Allows for a {@link PendingIntent} to be whitelisted to start activities from background.
     * Allows a {@link PendingIntent} to start activities from background.
     */
     */
    public abstract void setPendingIntentAllowBgActivityStarts(
    public abstract void setPendingIntentAllowBgActivityStarts(
            IIntentSender target, IBinder whitelistToken, int flags);
            IIntentSender target, IBinder allowlistToken, int flags);


    /**
    /**
     * Voids {@link PendingIntent}'s privilege to be whitelisted to start activities from
     * Voids {@link PendingIntent}'s privilege to start activities from background.
     * background.
     */
     */
    public abstract void clearPendingIntentAllowBgActivityStarts(IIntentSender target,
    public abstract void clearPendingIntentAllowBgActivityStarts(IIntentSender target,
            IBinder whitelistToken);
            IBinder allowlistToken);


    /**
    /**
     * Allow DeviceIdleController to tell us about what apps are whitelisted.
     * Allow DeviceIdleController to tell us about what apps are whitelisted.
+4 −4
Original line number Original line Diff line number Diff line
@@ -690,7 +690,7 @@ public final class ActiveServices {
        }
        }


        if (allowBackgroundActivityStarts) {
        if (allowBackgroundActivityStarts) {
            r.whitelistBgActivityStartsOnServiceStart();
            r.allowBgActivityStartsOnServiceStart();
        }
        }
        ComponentName cmp = startServiceInnerLocked(smap, service, r, callerFg, addToStarting);
        ComponentName cmp = startServiceInnerLocked(smap, service, r, callerFg, addToStarting);


@@ -2045,7 +2045,7 @@ public final class ActiveServices {
                s.whitelistManager = true;
                s.whitelistManager = true;
            }
            }
            if ((flags & Context.BIND_ALLOW_BACKGROUND_ACTIVITY_STARTS) != 0) {
            if ((flags & Context.BIND_ALLOW_BACKGROUND_ACTIVITY_STARTS) != 0) {
                s.setHasBindingWhitelistingBgActivityStarts(true);
                s.setAllowedBgActivityStartsByBinding(true);
            }
            }
            if (s.app != null) {
            if (s.app != null) {
                updateServiceClientActivitiesLocked(s.app, c, true);
                updateServiceClientActivitiesLocked(s.app, c, true);
@@ -3457,9 +3457,9 @@ public final class ActiveServices {
                    updateWhitelistManagerLocked(s.app);
                    updateWhitelistManagerLocked(s.app);
                }
                }
            }
            }
            // And do the same for bg activity starts whitelisting.
            // And do the same for bg activity starts ability.
            if ((c.flags & Context.BIND_ALLOW_BACKGROUND_ACTIVITY_STARTS) != 0) {
            if ((c.flags & Context.BIND_ALLOW_BACKGROUND_ACTIVITY_STARTS) != 0) {
                s.updateHasBindingWhitelistingBgActivityStarts();
                s.updateIsAllowedBgActivityStartsByBinding();
            }
            }
            if (s.app != null) {
            if (s.app != null) {
                updateServiceClientActivitiesLocked(s.app, c, true);
                updateServiceClientActivitiesLocked(s.app, c, true);
+2 −1
Original line number Original line Diff line number Diff line
@@ -253,7 +253,8 @@ final class ActivityManagerConstants extends ContentObserver {
    // allowing the next pending start to run.
    // allowing the next pending start to run.
    public long BG_START_TIMEOUT = DEFAULT_BG_START_TIMEOUT;
    public long BG_START_TIMEOUT = DEFAULT_BG_START_TIMEOUT;


    // For how long after a whitelisted service's start its process can start a background activity
    // For a service that has been allowed to start background activities, how long after it started
    // its process can start a background activity.
    public long SERVICE_BG_ACTIVITY_START_TIMEOUT = DEFAULT_SERVICE_BG_ACTIVITY_START_TIMEOUT;
    public long SERVICE_BG_ACTIVITY_START_TIMEOUT = DEFAULT_SERVICE_BG_ACTIVITY_START_TIMEOUT;


    // Initial backoff delay for retrying bound foreground services
    // Initial backoff delay for retrying bound foreground services
+2 −1
Original line number Original line Diff line number Diff line
@@ -62,7 +62,8 @@ public class BroadcastConstants {
    public float DEFERRAL_DECAY_FACTOR = DEFAULT_DEFERRAL_DECAY_FACTOR;
    public float DEFERRAL_DECAY_FACTOR = DEFAULT_DEFERRAL_DECAY_FACTOR;
    // Minimum that the deferral time can decay to until the backlog fully clears
    // Minimum that the deferral time can decay to until the backlog fully clears
    public long DEFERRAL_FLOOR = DEFAULT_DEFERRAL_FLOOR;
    public long DEFERRAL_FLOOR = DEFAULT_DEFERRAL_FLOOR;
    // For how long after a whitelisted receiver's start its process can start a background activity
    // For a receiver that has been allowed to start background activities, how long after it
    // started its process can start a background activity.
    public long ALLOW_BG_ACTIVITY_START_TIMEOUT = DEFAULT_ALLOW_BG_ACTIVITY_START_TIMEOUT;
    public long ALLOW_BG_ACTIVITY_START_TIMEOUT = DEFAULT_ALLOW_BG_ACTIVITY_START_TIMEOUT;


    // Settings override tracking for this instance
    // Settings override tracking for this instance
+2 −2
Original line number Original line Diff line number Diff line
@@ -89,8 +89,8 @@ final class BroadcastRecord extends Binder {
    int manifestSkipCount;  // number of manifest receivers skipped.
    int manifestSkipCount;  // number of manifest receivers skipped.
    BroadcastQueue queue;   // the outbound queue handling this broadcast
    BroadcastQueue queue;   // the outbound queue handling this broadcast


    // if set to true, app's process will be temporarily whitelisted to start activities
    // if set to true, app's process will be temporarily allowed to start activities from background
    // from background for the duration of the broadcast dispatch
    // for the duration of the broadcast dispatch
    final boolean allowBackgroundActivityStarts;
    final boolean allowBackgroundActivityStarts;


    static final int IDLE = 0;
    static final int IDLE = 0;
Loading