summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Android Build Coastguard Worker <android-build-coastguard-worker@google.com> 2025-04-30 11:36:51 -0700
committer Android Build Coastguard Worker <android-build-coastguard-worker@google.com> 2025-04-30 11:36:51 -0700
commitdab798923b3c9ed69acf16c3158547997ec556ba (patch)
treebd06a4d8b762e3657fcbf806e9e44c35e553f1fb
parentcca74a405828413607ac8c9539f817d67bf97834 (diff)
parent432471d0c1db04f4b8908dc3c0bc4d6182c7848a (diff)
Merge cherrypicks of ['googleplex-android-review.googlesource.com/33316225', 'googleplex-android-review.googlesource.com/33327509'] into 25Q2-release.
Change-Id: Icd03a150140d8957e96d22ec46d8eec7badb7332
-rw-r--r--packages/EasterEgg/src/com/android/egg/landroid/UniverseProgressNotifier.kt4
-rw-r--r--services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java5
2 files changed, 4 insertions, 5 deletions
diff --git a/packages/EasterEgg/src/com/android/egg/landroid/UniverseProgressNotifier.kt b/packages/EasterEgg/src/com/android/egg/landroid/UniverseProgressNotifier.kt
index 705d9e1cf442..da96c3c45beb 100644
--- a/packages/EasterEgg/src/com/android/egg/landroid/UniverseProgressNotifier.kt
+++ b/packages/EasterEgg/src/com/android/egg/landroid/UniverseProgressNotifier.kt
@@ -39,7 +39,7 @@ fun lerpRange(range: ClosedFloatingPointRange<Float>, x: Float): Float =
class UniverseProgressNotifier(val context: Context, val universe: Universe) {
private val notificationId = universe.randomSeed.toInt()
private val chan =
- NotificationChannel(CHANNEL_ID, CHANNEL_NAME, NotificationManager.IMPORTANCE_DEFAULT)
+ NotificationChannel(CHANNEL_ID, CHANNEL_NAME, NotificationManager.IMPORTANCE_LOW)
.apply { lockscreenVisibility = Notification.VISIBILITY_PUBLIC }
private val noman =
context.getSystemService(NotificationManager::class.java)?.apply {
@@ -83,7 +83,7 @@ class UniverseProgressNotifier(val context: Context, val universe: Universe) {
PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE,
)
)
- .setPriority(Notification.PRIORITY_DEFAULT)
+ .setFlag(Notification.FLAG_ONLY_ALERT_ONCE, true)
.setColorized(true)
.setOngoing(true)
.setColor(Colors.Eigengrau2.toArgb())
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
index 964826d1ee73..64560f7acc05 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -13272,11 +13272,10 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
Set<String> suspendedPackagesBefore = mDevicePolicyEngine.getResolvedPolicy(
PolicyDefinition.PACKAGES_SUSPENDED, caller.getUserId());
- Set<String> currentPackages = mDevicePolicyEngine.getLocalPolicySetByAdmin(
+ Set<String> currentPackages = new ArraySet<>(mDevicePolicyEngine.getLocalPolicySetByAdmin(
PolicyDefinition.PACKAGES_SUSPENDED,
enforcingAdmin,
- caller.getUserId());
- if (currentPackages == null) currentPackages = new ArraySet<>();
+ caller.getUserId()));
if (suspended) {
currentPackages.addAll(packages);
} else {