Merge "Announce the existence of magnification settings" into udc-dev

This commit is contained in:
Candice Lo
2023-04-21 01:44:44 +00:00
committed by Android (Google) Code Review

View File

@@ -346,6 +346,15 @@ class WindowMagnificationSettings implements MagnificationGestureDetector.OnGest
setSystemGestureExclusion();
mIsVisible = true;
mCallback.onSettingsPanelVisibilityChanged(/* shown= */ true);
if (resetPosition) {
// We could not put focus on the settings panel automatically
// since it is an inactive window. Therefore, we announce the existence of
// magnification settings for accessibility when it is opened.
mSettingView.announceForAccessibility(
mContext.getResources().getString(
R.string.accessibility_magnification_settings_panel_description));
}
}
mContext.registerReceiver(mScreenOffReceiver, new IntentFilter(Intent.ACTION_SCREEN_OFF));
}