Show toast for invisible systemUI

CarSystemUI is running on u0 and is invisible on display 0, but it
should be able to send out toast.

Bug: 277646621
Test: On car build, enable drive state then click on profile swith panel
Test: atest android.widget.cts.ToastTest
Test: atest 1B151FQGR00060 NotificationManagerServiceTest on bluejay
Change-Id: I29abac50295b6147e8bb3d6a17c4023d7765471e
This commit is contained in:
Calvin Huang
2023-04-06 18:31:47 +00:00
parent 464acc9c28
commit 50727306a5

View File

@@ -3335,7 +3335,7 @@ public class NotificationManagerService extends SystemService {
}
checkCallerIsSameApp(pkg);
final boolean isSystemToast = isCallerSystemOrPhone()
final boolean isSystemToast = isCallerIsSystemOrSystemUi()
|| PackageManagerService.PLATFORM_PACKAGE_NAME.equals(pkg);
boolean isAppRenderedToast = (callback != null);
if (!checkCanEnqueueToast(pkg, callingUid, displayId, isAppRenderedToast,