Add a hidden API to check if ambient display is suppressed for a token.

Added 1 method:
boolean isAmbientDisplaySuppressedForTokenByApp(String token, int appUid)

The Settings team is working on adding a string to the AOD settings page when ambient display is suppressed by Bedtime mode: b/168790245.

The current PowerManager#isAmbientDisplaySuppressedForToken(String token) method will only work if the calling app is also the app that suppressed the ambient display. That is, if Digital Wellbeing called suppressAmbientDisplay("winddown"), then isAmbientDisplaySuppressedForToken("winddown") will only return true for Digital Wellbeing. It will return false for Settings app

This CL adds a hidden API PowerManager#isAmbientDisplaySuppressedForTokenByApp(String token, int appUid) that will return true if the given app is suppressing ambient display with the given token. Settings can then call isAmbientDisplaySuppressedForTokenByApp("winddown", digitalWellbeingUid) to get whether ambient display is suppressed by Bedtime mode.

Test: atest FrameworksServicesTests:PowerManagerServiceTest
Bug: 169241595, 168790245
Change-Id: Idcd5fd44d187a73d7a6493845f1da69eb649726e
diff --git a/bridge/src/com/android/layoutlib/bridge/android/ b/bridge/src/com/android/layoutlib/bridge/android/
index 584e8c2..92d7fdb 100644
--- a/bridge/src/com/android/layoutlib/bridge/android/
+++ b/bridge/src/com/android/layoutlib/bridge/android/
@@ -237,6 +237,11 @@
+    public boolean isAmbientDisplaySuppressedForTokenByApp(String token, int appUid) {
+        return false;
+    }
+    @Override
     public boolean isAmbientDisplaySuppressed() {
         return false;