Loading core/java/android/widget/PopupWindow.java +29 −0 Original line number Diff line number Diff line Loading @@ -208,6 +208,9 @@ public class PopupWindow { private int mGravity = Gravity.NO_GRAVITY; // Title provided to accessibility services private CharSequence mAccessibilityTitle; private static final int[] ABOVE_ANCHOR_STATE_SET = new int[] { com.android.internal.R.attr.state_above_anchor }; Loading Loading @@ -1131,6 +1134,31 @@ public class PopupWindow { return mIsShowing; } /** * Set the title for this window to be reported to accessibility services. If no title is set, * a generic default will be reported. * * @param accessibilityTitle The new title, or {@code null} to specify that the default should * be used. * @hide */ public void setAccessibilityTitle(@Nullable CharSequence accessibilityTitle) { mAccessibilityTitle = accessibilityTitle; } /** * Get the title for this window to be reported to accessibility services. * * @return The current title. * @hide */ public @NonNull CharSequence getAccessibilityTitle() { if (mAccessibilityTitle == null) { mAccessibilityTitle = mContext.getString(R.string.popup_window_default_title); } return mAccessibilityTitle; } /** @hide */ protected final void setShowing(boolean isShowing) { mIsShowing = isShowing; Loading Loading @@ -1496,6 +1524,7 @@ public class PopupWindow { // Used for debugging. p.setTitle("PopupWindow:" + Integer.toHexString(hashCode())); p.accessibilityTitle = getAccessibilityTitle(); return p; } Loading core/res/res/values/strings.xml +3 −0 Original line number Diff line number Diff line Loading @@ -4706,4 +4706,7 @@ <string name="mmcc_imsi_unknown_in_hlr">SIM not provisioned</string> <string name="mmcc_illegal_ms">SIM not allowed</string> <string name="mmcc_illegal_me">Phone not allowed</string> <!-- Popup window default title to be read by a screen reader--> <string name="popup_window_default_title">Popup Window</string> </resources> core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -3049,4 +3049,5 @@ <java-symbol type="array" name="config_batteryPackageTypeSystem" /> <java-symbol type="array" name="config_batteryPackageTypeService" /> <java-symbol type="string" name="popup_window_default_title" /> </resources> Loading
core/java/android/widget/PopupWindow.java +29 −0 Original line number Diff line number Diff line Loading @@ -208,6 +208,9 @@ public class PopupWindow { private int mGravity = Gravity.NO_GRAVITY; // Title provided to accessibility services private CharSequence mAccessibilityTitle; private static final int[] ABOVE_ANCHOR_STATE_SET = new int[] { com.android.internal.R.attr.state_above_anchor }; Loading Loading @@ -1131,6 +1134,31 @@ public class PopupWindow { return mIsShowing; } /** * Set the title for this window to be reported to accessibility services. If no title is set, * a generic default will be reported. * * @param accessibilityTitle The new title, or {@code null} to specify that the default should * be used. * @hide */ public void setAccessibilityTitle(@Nullable CharSequence accessibilityTitle) { mAccessibilityTitle = accessibilityTitle; } /** * Get the title for this window to be reported to accessibility services. * * @return The current title. * @hide */ public @NonNull CharSequence getAccessibilityTitle() { if (mAccessibilityTitle == null) { mAccessibilityTitle = mContext.getString(R.string.popup_window_default_title); } return mAccessibilityTitle; } /** @hide */ protected final void setShowing(boolean isShowing) { mIsShowing = isShowing; Loading Loading @@ -1496,6 +1524,7 @@ public class PopupWindow { // Used for debugging. p.setTitle("PopupWindow:" + Integer.toHexString(hashCode())); p.accessibilityTitle = getAccessibilityTitle(); return p; } Loading
core/res/res/values/strings.xml +3 −0 Original line number Diff line number Diff line Loading @@ -4706,4 +4706,7 @@ <string name="mmcc_imsi_unknown_in_hlr">SIM not provisioned</string> <string name="mmcc_illegal_ms">SIM not allowed</string> <string name="mmcc_illegal_me">Phone not allowed</string> <!-- Popup window default title to be read by a screen reader--> <string name="popup_window_default_title">Popup Window</string> </resources>
core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -3049,4 +3049,5 @@ <java-symbol type="array" name="config_batteryPackageTypeSystem" /> <java-symbol type="array" name="config_batteryPackageTypeService" /> <java-symbol type="string" name="popup_window_default_title" /> </resources>