fix(HCT):Ensure HCT Notification ID does not conflict in the Settings app

The current HCT notification uses NOTIFICATION_ID=1. The Settings app has a few other notifications also use NOTIFICATION_ID=1 like Bluetooth and Sim etc. When using the same NOTIFICATION_ID for a notification, it updates the existing notification, causing the original one to disappear. To avoid this, we use a unique NOTIFICATION_ID.

Bug: 388530317
Flag: EXEMPT resource only update
Test: manual
Test: atest HighContrastTextMigrationReceiverTest
Change-Id: Ieda6836190726b14cd3522f61e7992e5a5698231
This commit is contained in:
chenjean
2025-01-15 18:15:38 +08:00
parent e61a297e85
commit ea305dc01e

View File

@@ -57,7 +57,7 @@ public class HighContrastTextMigrationReceiver extends BroadcastReceiver {
static final String ACTION_OPEN_SETTINGS =
"com.android.settings.accessibility.ACTION_OPEN_HIGH_CONTRAST_TEXT_SETTINGS";
@VisibleForTesting
static final int NOTIFICATION_ID = 1;
static final int NOTIFICATION_ID = R.string.accessibility_notification_high_contrast_text_title;
@Retention(RetentionPolicy.SOURCE)
@IntDef({