From 64954821d3c1e60ab0b096eaa5de14984046b772 Mon Sep 17 00:00:00 2001 From: Pawan Wagh Date: Tue, 18 Feb 2025 21:56:57 +0000 Subject: [PATCH] Post 16KB notification for all users PageAgnostic mode notification doesn't show up when user switch happens. Post the notification for all users Test: Enable16KB mode and switch users Bug: 397319900 Change-Id: Ia32f42223075eb0d91034f82580c80b0879dda06 --- .../settings/development/PageAgnosticNotificationService.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/com/android/settings/development/PageAgnosticNotificationService.java b/src/com/android/settings/development/PageAgnosticNotificationService.java index 58c26df92e1..c89cbc04af7 100644 --- a/src/com/android/settings/development/PageAgnosticNotificationService.java +++ b/src/com/android/settings/development/PageAgnosticNotificationService.java @@ -23,6 +23,7 @@ import android.app.PendingIntent; import android.app.Service; import android.content.Intent; import android.os.IBinder; +import android.os.UserHandle; import android.provider.Settings; import androidx.annotation.NonNull; @@ -148,7 +149,8 @@ public class PageAgnosticNotificationService extends Service { public int onStartCommand(@Nullable Intent intent, int flags, int startId) { Notification notification = buildNotification(); if (mNotificationManager != null) { - mNotificationManager.notify(NOTIFICATION_ID, notification); + mNotificationManager.notifyAsUser(null, NOTIFICATION_ID, notification, + UserHandle.ALL); } return Service.START_REDELIVER_INTENT; }