Loading core/java/com/android/internal/notification/SystemNotificationChannels.java +8 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,7 @@ public class SystemNotificationChannels { public static String HEAVY_WEIGHT_APP = "HEAVY_WEIGHT_APP"; public static String SYSTEM_CHANGES = "SYSTEM_CHANGES"; public static String DO_NOT_DISTURB = "DO_NOT_DISTURB"; public static String ACCESSIBILITY_MAGNIFICATION = "ACCESSIBILITY_MAGNIFICATION"; public static void createAll(Context context) { final NotificationManager nm = context.getSystemService(NotificationManager.class); Loading Loading @@ -191,6 +192,13 @@ public class SystemNotificationChannels { NotificationManager.IMPORTANCE_LOW); channelsList.add(dndChanges); final NotificationChannel newFeaturePrompt = new NotificationChannel( ACCESSIBILITY_MAGNIFICATION, context.getString(R.string.notification_channel_accessibility_magnification), NotificationManager.IMPORTANCE_HIGH); newFeaturePrompt.setBlockable(true); channelsList.add(newFeaturePrompt); nm.createNotificationChannels(channelsList); } Loading core/res/res/values/strings.xml +16 −0 Original line number Diff line number Diff line Loading @@ -717,6 +717,10 @@ [CHAR LIMIT=NONE BACKUP_MESSAGE_ID=6665375982962336520] --> <string name="notification_channel_foreground_service">Apps consuming battery</string> <!-- Text shown when viewing channel settings for notifications related to accessibility magnification. [CHAR_LIMIT=NONE]--> <string name="notification_channel_accessibility_magnification">Magnification</string> <!-- Label for foreground service notification when one app is running. [CHAR LIMIT=NONE BACKUP_MESSAGE_ID=6826789589341671842] --> <string name="foreground_service_app_in_background"><xliff:g id="app_name">%1$s</xliff:g> is Loading Loading @@ -5767,4 +5771,16 @@ ul.</string> <string name="config_pdp_reject_service_not_subscribed"></string> <!-- pdp data reject dialog string for cause 55 (MULTI_CONN_TO_SAME_PDN_NOT_ALLOWED) [CHAR LIMIT=100] --> <string name="config_pdp_reject_multi_conn_to_same_pdn_not_allowed"></string> <!-- Window magnification prompt related string. --> <!-- Notification title to prompt the user that new magnification feature is available. [CHAR LIMIT=50] --> <string name="window_magnification_prompt_title">New: Window Magnifier</string> <!-- Notification content to prompt the user that new magnification feature is available. [CHAR LIMIT=50] --> <string name="window_magnification_prompt_content">You can now magnify some or all of your screen</string> <!-- Notification action to bring the user to magnification settings page. [CHAR LIMIT=50] --> <string name="turn_on_magnification_settings_action">Turn on in Settings</string> <!-- Notification action to dismiss. [CHAR LIMIT=50] --> <string name="dismiss_action">Dismiss</string> </resources> core/res/res/values/symbols.xml +7 −0 Original line number Diff line number Diff line Loading @@ -3458,6 +3458,7 @@ <java-symbol type="string" name="notification_channel_heavy_weight_app" /> <java-symbol type="string" name="notification_channel_system_changes" /> <java-symbol type="string" name="notification_channel_do_not_disturb" /> <java-symbol type="string" name="notification_channel_accessibility_magnification" /> <java-symbol type="string" name="config_defaultAutofillService" /> <java-symbol type="string" name="config_defaultTextClassifierPackage" /> <java-symbol type="string" name="config_defaultWellbeingPackage" /> Loading Loading @@ -4096,4 +4097,10 @@ <java-symbol type="dimen" name="config_taskLetterboxAspectRatio" /> <java-symbol type="bool" name="config_hideDisplayCutoutWithDisplayArea" /> <!-- Window magnification prompt --> <java-symbol type="string" name="window_magnification_prompt_title" /> <java-symbol type="string" name="window_magnification_prompt_content" /> <java-symbol type="string" name="turn_on_magnification_settings_action" /> <java-symbol type="string" name="dismiss_action" /> </resources> proto/src/system_messages.proto +4 −0 Original line number Diff line number Diff line Loading @@ -332,5 +332,9 @@ message SystemMessage { // Notify the user that the admin suspended personal apps on the device. // Package: android NOTE_PERSONAL_APPS_SUSPENDED = 1003; // Notify the user that window magnification is available. // package: android NOTE_A11Y_WINDOW_MAGNIFICATION_FEATURE = 1004; } } services/accessibility/java/com/android/server/accessibility/AccessibilityInputFilter.java +4 −2 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ import com.android.server.accessibility.gestures.TouchExplorer; import com.android.server.accessibility.magnification.FullScreenMagnificationGestureHandler; import com.android.server.accessibility.magnification.MagnificationGestureHandler; import com.android.server.accessibility.magnification.WindowMagnificationGestureHandler; import com.android.server.accessibility.magnification.WindowMagnificationPromptController; import com.android.server.policy.WindowManagerPolicy; import java.util.ArrayList; Loading Loading @@ -561,8 +562,9 @@ class AccessibilityInputFilter extends InputFilter implements EventStreamTransfo detectControlGestures, triggerable, displayId); } else { magnificationGestureHandler = new FullScreenMagnificationGestureHandler(displayContext, mAms.getFullScreenMagnificationController(), mAms::onMagnificationScaleChanged, detectControlGestures, triggerable, displayId); mAms.getFullScreenMagnificationController(), mAms::onMagnificationScaleChanged, detectControlGestures, triggerable, new WindowMagnificationPromptController(displayContext, mUserId), displayId); } return magnificationGestureHandler; } Loading Loading
core/java/com/android/internal/notification/SystemNotificationChannels.java +8 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,7 @@ public class SystemNotificationChannels { public static String HEAVY_WEIGHT_APP = "HEAVY_WEIGHT_APP"; public static String SYSTEM_CHANGES = "SYSTEM_CHANGES"; public static String DO_NOT_DISTURB = "DO_NOT_DISTURB"; public static String ACCESSIBILITY_MAGNIFICATION = "ACCESSIBILITY_MAGNIFICATION"; public static void createAll(Context context) { final NotificationManager nm = context.getSystemService(NotificationManager.class); Loading Loading @@ -191,6 +192,13 @@ public class SystemNotificationChannels { NotificationManager.IMPORTANCE_LOW); channelsList.add(dndChanges); final NotificationChannel newFeaturePrompt = new NotificationChannel( ACCESSIBILITY_MAGNIFICATION, context.getString(R.string.notification_channel_accessibility_magnification), NotificationManager.IMPORTANCE_HIGH); newFeaturePrompt.setBlockable(true); channelsList.add(newFeaturePrompt); nm.createNotificationChannels(channelsList); } Loading
core/res/res/values/strings.xml +16 −0 Original line number Diff line number Diff line Loading @@ -717,6 +717,10 @@ [CHAR LIMIT=NONE BACKUP_MESSAGE_ID=6665375982962336520] --> <string name="notification_channel_foreground_service">Apps consuming battery</string> <!-- Text shown when viewing channel settings for notifications related to accessibility magnification. [CHAR_LIMIT=NONE]--> <string name="notification_channel_accessibility_magnification">Magnification</string> <!-- Label for foreground service notification when one app is running. [CHAR LIMIT=NONE BACKUP_MESSAGE_ID=6826789589341671842] --> <string name="foreground_service_app_in_background"><xliff:g id="app_name">%1$s</xliff:g> is Loading Loading @@ -5767,4 +5771,16 @@ ul.</string> <string name="config_pdp_reject_service_not_subscribed"></string> <!-- pdp data reject dialog string for cause 55 (MULTI_CONN_TO_SAME_PDN_NOT_ALLOWED) [CHAR LIMIT=100] --> <string name="config_pdp_reject_multi_conn_to_same_pdn_not_allowed"></string> <!-- Window magnification prompt related string. --> <!-- Notification title to prompt the user that new magnification feature is available. [CHAR LIMIT=50] --> <string name="window_magnification_prompt_title">New: Window Magnifier</string> <!-- Notification content to prompt the user that new magnification feature is available. [CHAR LIMIT=50] --> <string name="window_magnification_prompt_content">You can now magnify some or all of your screen</string> <!-- Notification action to bring the user to magnification settings page. [CHAR LIMIT=50] --> <string name="turn_on_magnification_settings_action">Turn on in Settings</string> <!-- Notification action to dismiss. [CHAR LIMIT=50] --> <string name="dismiss_action">Dismiss</string> </resources>
core/res/res/values/symbols.xml +7 −0 Original line number Diff line number Diff line Loading @@ -3458,6 +3458,7 @@ <java-symbol type="string" name="notification_channel_heavy_weight_app" /> <java-symbol type="string" name="notification_channel_system_changes" /> <java-symbol type="string" name="notification_channel_do_not_disturb" /> <java-symbol type="string" name="notification_channel_accessibility_magnification" /> <java-symbol type="string" name="config_defaultAutofillService" /> <java-symbol type="string" name="config_defaultTextClassifierPackage" /> <java-symbol type="string" name="config_defaultWellbeingPackage" /> Loading Loading @@ -4096,4 +4097,10 @@ <java-symbol type="dimen" name="config_taskLetterboxAspectRatio" /> <java-symbol type="bool" name="config_hideDisplayCutoutWithDisplayArea" /> <!-- Window magnification prompt --> <java-symbol type="string" name="window_magnification_prompt_title" /> <java-symbol type="string" name="window_magnification_prompt_content" /> <java-symbol type="string" name="turn_on_magnification_settings_action" /> <java-symbol type="string" name="dismiss_action" /> </resources>
proto/src/system_messages.proto +4 −0 Original line number Diff line number Diff line Loading @@ -332,5 +332,9 @@ message SystemMessage { // Notify the user that the admin suspended personal apps on the device. // Package: android NOTE_PERSONAL_APPS_SUSPENDED = 1003; // Notify the user that window magnification is available. // package: android NOTE_A11Y_WINDOW_MAGNIFICATION_FEATURE = 1004; } }
services/accessibility/java/com/android/server/accessibility/AccessibilityInputFilter.java +4 −2 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ import com.android.server.accessibility.gestures.TouchExplorer; import com.android.server.accessibility.magnification.FullScreenMagnificationGestureHandler; import com.android.server.accessibility.magnification.MagnificationGestureHandler; import com.android.server.accessibility.magnification.WindowMagnificationGestureHandler; import com.android.server.accessibility.magnification.WindowMagnificationPromptController; import com.android.server.policy.WindowManagerPolicy; import java.util.ArrayList; Loading Loading @@ -561,8 +562,9 @@ class AccessibilityInputFilter extends InputFilter implements EventStreamTransfo detectControlGestures, triggerable, displayId); } else { magnificationGestureHandler = new FullScreenMagnificationGestureHandler(displayContext, mAms.getFullScreenMagnificationController(), mAms::onMagnificationScaleChanged, detectControlGestures, triggerable, displayId); mAms.getFullScreenMagnificationController(), mAms::onMagnificationScaleChanged, detectControlGestures, triggerable, new WindowMagnificationPromptController(displayContext, mUserId), displayId); } return magnificationGestureHandler; } Loading