Loading core/java/android/app/Activity.java +0 −6 Original line number Diff line number Diff line Loading @@ -5183,12 +5183,6 @@ public class Activity extends ContextThemeWrapper * #checkSelfPermission(String)}. * </p> * <p> * Calling this API for permissions already granted to your app would show UI * to the user to decide whether the app can still hold these permissions. This * can be useful if the way your app uses data guarded by the permissions * changes significantly. * </p> * <p> * You cannot request a permission if your activity sets {@link * android.R.styleable#AndroidManifestActivity_noHistory noHistory} to * <code>true</code> because in this case the activity would not receive Loading core/java/android/app/ActivityManagerInternal.java +22 −0 Original line number Diff line number Diff line Loading @@ -377,6 +377,21 @@ public abstract class ActivityManagerInternal { */ public abstract boolean hasRunningForegroundService(int uid, int foregroundServiceType); /** * Returns {@code true} if the given notification channel currently has a * notification associated with a foreground service. This is an AMS check * because that is the source of truth for the FGS state. */ public abstract boolean hasForegroundServiceNotification(String pkg, @UserIdInt int userId, String channelId); /** * If the given app has any FGSs whose notifications are in the given channel, * stop them. */ public abstract void stopForegroundServicesForChannel(String pkg, @UserIdInt int userId, String channelId); /** * Registers the specified {@code processObserver} to be notified of future changes to * process state. Loading Loading @@ -440,4 +455,11 @@ public abstract class ActivityManagerInternal { * @return true if exists, false otherwise. */ public abstract boolean isPendingTopUid(int uid); public abstract void tempAllowWhileInUsePermissionInFgs(int uid, long duration); public abstract boolean isTempAllowlistedForFgsWhileInUse(int uid); public abstract boolean canAllowWhileInUsePermissionInFgs(int pid, int uid, @NonNull String packageName); } core/java/android/app/ActivityThread.java +4 −0 Original line number Diff line number Diff line Loading @@ -4602,6 +4602,10 @@ public final class ActivityThread extends ClientTransactionHandler { } if (r.isTopResumedActivity == onTop) { if (!Build.IS_DEBUGGABLE) { Slog.w(TAG, "Activity top position already set to onTop=" + onTop); return; } throw new IllegalStateException("Activity top position already set to onTop=" + onTop); } Loading core/java/android/app/admin/DevicePolicyManagerInternal.java +7 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.app.admin; import android.annotation.Nullable; import android.annotation.UserIdInt; import android.content.ComponentName; import android.content.Intent; Loading Loading @@ -241,6 +242,7 @@ public abstract class DevicePolicyManagerInternal { /** * Returns the profile owner component for the given user, or {@code null} if there is not one. */ @Nullable public abstract ComponentName getProfileOwnerAsUser(int userHandle); /** Loading @@ -254,4 +256,9 @@ public abstract class DevicePolicyManagerInternal { * {@link #supportsResetOp(int)} is true. */ public abstract void resetOp(int op, String packageName, @UserIdInt int userId); /** * Returns whether the given package is a device owner or a profile owner in the calling user. */ public abstract boolean isDeviceOrProfileOwnerInCallingUser(String packageName); } core/java/android/hardware/display/DisplayManager.java +50 −8 Original line number Diff line number Diff line Loading @@ -62,6 +62,9 @@ public final class DisplayManager { * {@link #EXTRA_WIFI_DISPLAY_STATUS} extra. * </p><p> * This broadcast is only sent to registered receivers and can only be sent by the system. * </p><p> * {@link android.Manifest.permission#ACCESS_FINE_LOCATION} permission is required to * receive this broadcast. * </p> * @hide */ Loading Loading @@ -870,37 +873,76 @@ public final class DisplayManager { public interface DeviceConfig { /** * Key for refresh rate in the zone defined by thresholds. * Key for refresh rate in the low zone defined by thresholds. * * Note that the name and value don't match because they were added before we had a high * zone to consider. * @see android.provider.DeviceConfig#NAMESPACE_DISPLAY_MANAGER * @see android.R.integer#config_defaultZoneBehavior */ String KEY_REFRESH_RATE_IN_ZONE = "refresh_rate_in_zone"; String KEY_REFRESH_RATE_IN_LOW_ZONE = "refresh_rate_in_zone"; /** * Key for accessing the display brightness thresholds for the configured refresh rate zone. * Key for accessing the low display brightness thresholds for the configured refresh * rate zone. * The value will be a pair of comma separated integers representing the minimum and maximum * thresholds of the zone, respectively, in display backlight units (i.e. [0, 255]). * * Note that the name and value don't match because they were added before we had a high * zone to consider. * * @see android.provider.DeviceConfig#NAMESPACE_DISPLAY_MANAGER * @see android.R.array#config_brightnessThresholdsOfPeakRefreshRate * @hide */ String KEY_PEAK_REFRESH_RATE_DISPLAY_BRIGHTNESS_THRESHOLDS = String KEY_FIXED_REFRESH_RATE_LOW_DISPLAY_BRIGHTNESS_THRESHOLDS = "peak_refresh_rate_brightness_thresholds"; /** * Key for accessing the ambient brightness thresholds for the configured refresh rate zone. * The value will be a pair of comma separated integers representing the minimum and maximum * thresholds of the zone, respectively, in lux. * Key for accessing the low ambient brightness thresholds for the configured refresh * rate zone. The value will be a pair of comma separated integers representing the minimum * and maximum thresholds of the zone, respectively, in lux. * * Note that the name and value don't match because they were added before we had a high * zone to consider. * * @see android.provider.DeviceConfig#NAMESPACE_DISPLAY_MANAGER * @see android.R.array#config_ambientThresholdsOfPeakRefreshRate * @hide */ String KEY_PEAK_REFRESH_RATE_AMBIENT_BRIGHTNESS_THRESHOLDS = String KEY_FIXED_REFRESH_RATE_LOW_AMBIENT_BRIGHTNESS_THRESHOLDS = "peak_refresh_rate_ambient_thresholds"; /** * Key for refresh rate in the high zone defined by thresholds. * * @see android.provider.DeviceConfig#NAMESPACE_DISPLAY_MANAGER * @see android.R.integer#config_fixedRefreshRateInHighZone */ String KEY_REFRESH_RATE_IN_HIGH_ZONE = "refresh_rate_in_high_zone"; /** * Key for accessing the display brightness thresholds for the configured refresh rate zone. * The value will be a pair of comma separated integers representing the minimum and maximum * thresholds of the zone, respectively, in display backlight units (i.e. [0, 255]). * * @see android.provider.DeviceConfig#NAMESPACE_DISPLAY_MANAGER * @see android.R.array#config_brightnessHighThresholdsOfFixedRefreshRate * @hide */ String KEY_FIXED_REFRESH_RATE_HIGH_DISPLAY_BRIGHTNESS_THRESHOLDS = "fixed_refresh_rate_high_display_brightness_thresholds"; /** * Key for accessing the ambient brightness thresholds for the configured refresh rate zone. * The value will be a pair of comma separated integers representing the minimum and maximum * thresholds of the zone, respectively, in lux. * * @see android.provider.DeviceConfig#NAMESPACE_DISPLAY_MANAGER * @see android.R.array#config_ambientHighThresholdsOfFixedRefreshRate * @hide */ String KEY_FIXED_REFRESH_RATE_HIGH_AMBIENT_BRIGHTNESS_THRESHOLDS = "fixed_refresh_rate_high_ambient_brightness_thresholds"; /** * Key for default peak refresh rate * Loading Loading
core/java/android/app/Activity.java +0 −6 Original line number Diff line number Diff line Loading @@ -5183,12 +5183,6 @@ public class Activity extends ContextThemeWrapper * #checkSelfPermission(String)}. * </p> * <p> * Calling this API for permissions already granted to your app would show UI * to the user to decide whether the app can still hold these permissions. This * can be useful if the way your app uses data guarded by the permissions * changes significantly. * </p> * <p> * You cannot request a permission if your activity sets {@link * android.R.styleable#AndroidManifestActivity_noHistory noHistory} to * <code>true</code> because in this case the activity would not receive Loading
core/java/android/app/ActivityManagerInternal.java +22 −0 Original line number Diff line number Diff line Loading @@ -377,6 +377,21 @@ public abstract class ActivityManagerInternal { */ public abstract boolean hasRunningForegroundService(int uid, int foregroundServiceType); /** * Returns {@code true} if the given notification channel currently has a * notification associated with a foreground service. This is an AMS check * because that is the source of truth for the FGS state. */ public abstract boolean hasForegroundServiceNotification(String pkg, @UserIdInt int userId, String channelId); /** * If the given app has any FGSs whose notifications are in the given channel, * stop them. */ public abstract void stopForegroundServicesForChannel(String pkg, @UserIdInt int userId, String channelId); /** * Registers the specified {@code processObserver} to be notified of future changes to * process state. Loading Loading @@ -440,4 +455,11 @@ public abstract class ActivityManagerInternal { * @return true if exists, false otherwise. */ public abstract boolean isPendingTopUid(int uid); public abstract void tempAllowWhileInUsePermissionInFgs(int uid, long duration); public abstract boolean isTempAllowlistedForFgsWhileInUse(int uid); public abstract boolean canAllowWhileInUsePermissionInFgs(int pid, int uid, @NonNull String packageName); }
core/java/android/app/ActivityThread.java +4 −0 Original line number Diff line number Diff line Loading @@ -4602,6 +4602,10 @@ public final class ActivityThread extends ClientTransactionHandler { } if (r.isTopResumedActivity == onTop) { if (!Build.IS_DEBUGGABLE) { Slog.w(TAG, "Activity top position already set to onTop=" + onTop); return; } throw new IllegalStateException("Activity top position already set to onTop=" + onTop); } Loading
core/java/android/app/admin/DevicePolicyManagerInternal.java +7 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.app.admin; import android.annotation.Nullable; import android.annotation.UserIdInt; import android.content.ComponentName; import android.content.Intent; Loading Loading @@ -241,6 +242,7 @@ public abstract class DevicePolicyManagerInternal { /** * Returns the profile owner component for the given user, or {@code null} if there is not one. */ @Nullable public abstract ComponentName getProfileOwnerAsUser(int userHandle); /** Loading @@ -254,4 +256,9 @@ public abstract class DevicePolicyManagerInternal { * {@link #supportsResetOp(int)} is true. */ public abstract void resetOp(int op, String packageName, @UserIdInt int userId); /** * Returns whether the given package is a device owner or a profile owner in the calling user. */ public abstract boolean isDeviceOrProfileOwnerInCallingUser(String packageName); }
core/java/android/hardware/display/DisplayManager.java +50 −8 Original line number Diff line number Diff line Loading @@ -62,6 +62,9 @@ public final class DisplayManager { * {@link #EXTRA_WIFI_DISPLAY_STATUS} extra. * </p><p> * This broadcast is only sent to registered receivers and can only be sent by the system. * </p><p> * {@link android.Manifest.permission#ACCESS_FINE_LOCATION} permission is required to * receive this broadcast. * </p> * @hide */ Loading Loading @@ -870,37 +873,76 @@ public final class DisplayManager { public interface DeviceConfig { /** * Key for refresh rate in the zone defined by thresholds. * Key for refresh rate in the low zone defined by thresholds. * * Note that the name and value don't match because they were added before we had a high * zone to consider. * @see android.provider.DeviceConfig#NAMESPACE_DISPLAY_MANAGER * @see android.R.integer#config_defaultZoneBehavior */ String KEY_REFRESH_RATE_IN_ZONE = "refresh_rate_in_zone"; String KEY_REFRESH_RATE_IN_LOW_ZONE = "refresh_rate_in_zone"; /** * Key for accessing the display brightness thresholds for the configured refresh rate zone. * Key for accessing the low display brightness thresholds for the configured refresh * rate zone. * The value will be a pair of comma separated integers representing the minimum and maximum * thresholds of the zone, respectively, in display backlight units (i.e. [0, 255]). * * Note that the name and value don't match because they were added before we had a high * zone to consider. * * @see android.provider.DeviceConfig#NAMESPACE_DISPLAY_MANAGER * @see android.R.array#config_brightnessThresholdsOfPeakRefreshRate * @hide */ String KEY_PEAK_REFRESH_RATE_DISPLAY_BRIGHTNESS_THRESHOLDS = String KEY_FIXED_REFRESH_RATE_LOW_DISPLAY_BRIGHTNESS_THRESHOLDS = "peak_refresh_rate_brightness_thresholds"; /** * Key for accessing the ambient brightness thresholds for the configured refresh rate zone. * The value will be a pair of comma separated integers representing the minimum and maximum * thresholds of the zone, respectively, in lux. * Key for accessing the low ambient brightness thresholds for the configured refresh * rate zone. The value will be a pair of comma separated integers representing the minimum * and maximum thresholds of the zone, respectively, in lux. * * Note that the name and value don't match because they were added before we had a high * zone to consider. * * @see android.provider.DeviceConfig#NAMESPACE_DISPLAY_MANAGER * @see android.R.array#config_ambientThresholdsOfPeakRefreshRate * @hide */ String KEY_PEAK_REFRESH_RATE_AMBIENT_BRIGHTNESS_THRESHOLDS = String KEY_FIXED_REFRESH_RATE_LOW_AMBIENT_BRIGHTNESS_THRESHOLDS = "peak_refresh_rate_ambient_thresholds"; /** * Key for refresh rate in the high zone defined by thresholds. * * @see android.provider.DeviceConfig#NAMESPACE_DISPLAY_MANAGER * @see android.R.integer#config_fixedRefreshRateInHighZone */ String KEY_REFRESH_RATE_IN_HIGH_ZONE = "refresh_rate_in_high_zone"; /** * Key for accessing the display brightness thresholds for the configured refresh rate zone. * The value will be a pair of comma separated integers representing the minimum and maximum * thresholds of the zone, respectively, in display backlight units (i.e. [0, 255]). * * @see android.provider.DeviceConfig#NAMESPACE_DISPLAY_MANAGER * @see android.R.array#config_brightnessHighThresholdsOfFixedRefreshRate * @hide */ String KEY_FIXED_REFRESH_RATE_HIGH_DISPLAY_BRIGHTNESS_THRESHOLDS = "fixed_refresh_rate_high_display_brightness_thresholds"; /** * Key for accessing the ambient brightness thresholds for the configured refresh rate zone. * The value will be a pair of comma separated integers representing the minimum and maximum * thresholds of the zone, respectively, in lux. * * @see android.provider.DeviceConfig#NAMESPACE_DISPLAY_MANAGER * @see android.R.array#config_ambientHighThresholdsOfFixedRefreshRate * @hide */ String KEY_FIXED_REFRESH_RATE_HIGH_AMBIENT_BRIGHTNESS_THRESHOLDS = "fixed_refresh_rate_high_ambient_brightness_thresholds"; /** * Key for default peak refresh rate * Loading