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

Commit f5f93a37 authored by Michael Groover's avatar Michael Groover Committed by Android (Google) Code Review
Browse files

Merge "Allow AMS fgs notification rate limit with ALLOWLIST permission" into main

parents d118d938 29a9ab42
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -864,7 +864,8 @@ interface IActivityManager {

    /**
     * Suppress or reenable the rate limit on foreground service notification deferral.
     * This is for use within CTS and is protected by android.permission.WRITE_DEVICE_CONFIG.
     * This is for use within CTS and is protected by android.permission.WRITE_DEVICE_CONFIG
     * and WRITE_ALLOWLISTED_DEVICE_CONFIG.
     *
     * @param enable false to suppress rate-limit policy; true to reenable it.
     */
+7 −2
Original line number Diff line number Diff line
@@ -19070,8 +19070,13 @@ public class ActivityManagerService extends IActivityManager.Stub
     */
    @Override
    public boolean enableFgsNotificationRateLimit(boolean enable) {
        if (android.security.Flags.protectDeviceConfigFlags()) {
            enforceCallingHasAtLeastOnePermission("enableFgsNotificationRateLimit",
                    permission.WRITE_DEVICE_CONFIG, permission.WRITE_ALLOWLISTED_DEVICE_CONFIG);
        } else {
            enforceCallingPermission(permission.WRITE_DEVICE_CONFIG,
                    "enableFgsNotificationRateLimit");
        }
        synchronized (this) {
            return mServices.enableFgsNotificationRateLimitLocked(enable);
        }