Loading core/java/android/view/accessibility/AccessibilityWindowInfo.java +1 −3 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package android.view.accessibility; import android.annotation.Nullable; import android.graphics.Rect; import android.os.Parcel; import android.os.Parcelable; Loading Loading @@ -102,9 +101,8 @@ public final class AccessibilityWindowInfo implements Parcelable { /** * Gets the title of the window. * * @return The title of the window, or {@code null} if none is available. * @return The title. */ @Nullable public CharSequence getTitle() { return mTitle; } Loading core/java/com/android/internal/policy/PhoneWindow.java +4 −10 Original line number Diff line number Diff line Loading @@ -528,24 +528,18 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { @Override public void setTitle(CharSequence title) { setTitle(title, true); } public void setTitle(CharSequence title, boolean updateAccessibilityTitle) { if (mTitleView != null) { mTitleView.setText(title); } else if (mDecorContentParent != null) { mDecorContentParent.setWindowTitle(title); } mTitle = title; if (updateAccessibilityTitle) { WindowManager.LayoutParams params = getAttributes(); if (!TextUtils.equals(title, params.accessibilityTitle)) { params.accessibilityTitle = TextUtils.stringOrSpannedString(title); dispatchWindowAttributesChanged(getAttributes()); } } } @Override @Deprecated Loading services/core/java/com/android/server/policy/PhoneWindowManager.java +2 −8 Original line number Diff line number Diff line Loading @@ -2589,15 +2589,8 @@ public class PhoneWindowManager implements WindowManagerPolicy { final PhoneWindow win = new PhoneWindow(context); win.setIsStartingWindow(true); final WindowManager.LayoutParams params = win.getAttributes(); final Resources r = context.getResources(); CharSequence label = r.getText(labelRes); // Only change the accessibility title if the label is localized if (label != null) { win.setTitle(label, true); } else { win.setTitle(nonLocalizedLabel, false); } win.setTitle(r.getText(labelRes, nonLocalizedLabel)); win.setType( WindowManager.LayoutParams.TYPE_APPLICATION_STARTING); Loading Loading @@ -2631,6 +2624,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { win.setLayout(WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.MATCH_PARENT); final WindowManager.LayoutParams params = win.getAttributes(); params.token = appToken; params.packageName = packageName; params.windowAnimations = win.getWindowStyle().getResourceId( Loading services/core/java/com/android/server/wm/AccessibilityController.java +3 −0 Original line number Diff line number Diff line Loading @@ -1203,6 +1203,9 @@ final class AccessibilityController { window.layer = windowState.mLayer; window.token = windowState.mClient.asBinder(); window.title = windowState.mAttrs.accessibilityTitle; if (window.title == null) { window.title = windowState.mAttrs.getTitle(); } window.accessibilityIdOfAnchor = windowState.mAttrs.accessibilityIdOfAnchor; WindowState attachedWindow = windowState.mAttachedWindow; Loading Loading
core/java/android/view/accessibility/AccessibilityWindowInfo.java +1 −3 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package android.view.accessibility; import android.annotation.Nullable; import android.graphics.Rect; import android.os.Parcel; import android.os.Parcelable; Loading Loading @@ -102,9 +101,8 @@ public final class AccessibilityWindowInfo implements Parcelable { /** * Gets the title of the window. * * @return The title of the window, or {@code null} if none is available. * @return The title. */ @Nullable public CharSequence getTitle() { return mTitle; } Loading
core/java/com/android/internal/policy/PhoneWindow.java +4 −10 Original line number Diff line number Diff line Loading @@ -528,24 +528,18 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { @Override public void setTitle(CharSequence title) { setTitle(title, true); } public void setTitle(CharSequence title, boolean updateAccessibilityTitle) { if (mTitleView != null) { mTitleView.setText(title); } else if (mDecorContentParent != null) { mDecorContentParent.setWindowTitle(title); } mTitle = title; if (updateAccessibilityTitle) { WindowManager.LayoutParams params = getAttributes(); if (!TextUtils.equals(title, params.accessibilityTitle)) { params.accessibilityTitle = TextUtils.stringOrSpannedString(title); dispatchWindowAttributesChanged(getAttributes()); } } } @Override @Deprecated Loading
services/core/java/com/android/server/policy/PhoneWindowManager.java +2 −8 Original line number Diff line number Diff line Loading @@ -2589,15 +2589,8 @@ public class PhoneWindowManager implements WindowManagerPolicy { final PhoneWindow win = new PhoneWindow(context); win.setIsStartingWindow(true); final WindowManager.LayoutParams params = win.getAttributes(); final Resources r = context.getResources(); CharSequence label = r.getText(labelRes); // Only change the accessibility title if the label is localized if (label != null) { win.setTitle(label, true); } else { win.setTitle(nonLocalizedLabel, false); } win.setTitle(r.getText(labelRes, nonLocalizedLabel)); win.setType( WindowManager.LayoutParams.TYPE_APPLICATION_STARTING); Loading Loading @@ -2631,6 +2624,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { win.setLayout(WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.MATCH_PARENT); final WindowManager.LayoutParams params = win.getAttributes(); params.token = appToken; params.packageName = packageName; params.windowAnimations = win.getWindowStyle().getResourceId( Loading
services/core/java/com/android/server/wm/AccessibilityController.java +3 −0 Original line number Diff line number Diff line Loading @@ -1203,6 +1203,9 @@ final class AccessibilityController { window.layer = windowState.mLayer; window.token = windowState.mClient.asBinder(); window.title = windowState.mAttrs.accessibilityTitle; if (window.title == null) { window.title = windowState.mAttrs.getTitle(); } window.accessibilityIdOfAnchor = windowState.mAttrs.accessibilityIdOfAnchor; WindowState attachedWindow = windowState.mAttachedWindow; Loading