警报到期后屏幕未唤醒(Screen is not waking up after alarm expiry)

"
BSPA-202675 [SD6490][Nazare] - Screen is not waking up after alarm expiry
#Description: Screen is not waking up after alarm expiry
#Solution: Add USE_FULL_SCREEN_INTENT permission and set notification category to CATEGORY_ALARM
#Commit Reason: S/W bug fixed.
#Function Area: F_Others
#Function Tag: Others_Others
"
修改的code如下:
packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmNotifications.java
packages/apps/DeskClock/AndroidManifest.xml



 

diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 03258fd..99a17a5 100755
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -33,6 +33,8 @@
     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
     <uses-permission android:name="org.codeaurora.permission.POWER_OFF_ALARM" />
     <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
+    <!--BSPA-202675 Screen is not waking up after alarm expiry-->
+    <uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT"/>
 
     <!-- WRITE_SETTINGS is required to record the upcoming alarm prior to L -->
     <uses-permission
diff --git a/src/com/android/deskclock/alarms/AlarmNotifications.java b/src/com/android/deskclock/alarms/AlarmNotifications.java
index d0dc7c4..9b2db32 100755
--- a/src/com/android/deskclock/alarms/AlarmNotifications.java
+++ b/src/com/android/deskclock/alarms/AlarmNotifications.java
@@ -575,6 +575,10 @@
                 ALARM_FIRING_NOTIFICATION_ID, fullScreenIntent, PendingIntent.FLAG_UPDATE_CURRENT),
                 true);
         notification.setPriority(NotificationCompat.PRIORITY_MAX);
+        //BSPA-202675 Screen is not waking up after alarm expiry
+        if(ZebraUtils.isZebra().orElse(false)) {
+            notification.setCategory(NotificationCompat.CATEGORY_ALARM);
+        }
 
         clearNotification(service, instance);
         service.startForeground(ALARM_FIRING_NOTIFICATION_ID, notification.build());