From 83ba7aab9ae9e4f74552148d886062eccf9d9569 Mon Sep 17 00:00:00 2001 From: sallyyuen Date: Fri, 3 Apr 2020 09:06:11 -0700 Subject: [PATCH] Set the window title in AlertDialog's AlertController AlertDialog.Builder's setTitle() does not set the title of its window, which TalkBack uses for announcements. Make the behavior consistent between the AlertDialog.Builder's setTitle and AlertDialog's setTitle, which does change the window title. Bug: 149755168 Test: Menu titles appear in the node tree debug info and are announced. by TalkBack. App version info in Settings is announced. Change-Id: I49deb98ad294538864e413c6c486b4148e06a2b6 --- core/java/com/android/internal/app/AlertController.java | 1 + 1 file changed, 1 insertion(+) diff --git a/core/java/com/android/internal/app/AlertController.java b/core/java/com/android/internal/app/AlertController.java index 553721d75fd6c..be43e82c3f88f 100644 --- a/core/java/com/android/internal/app/AlertController.java +++ b/core/java/com/android/internal/app/AlertController.java @@ -286,6 +286,7 @@ public class AlertController { if (mTitleView != null) { mTitleView.setText(title); } + mWindow.setTitle(title); } /**