From 9feac1425c02d2da91e500e7c2f6b7d87a4f3d44 Mon Sep 17 00:00:00 2001 From: Makoto Onuki Date: Tue, 23 Jun 2015 14:29:25 -0700 Subject: [PATCH] Remove default activity title to prevent talkback from... reading the wrong title. We get a title from DocumentProvider with an async task, and by the time we get it, it's *usually* too late and talkback end up reading the default title. Bug 20041072 Change-Id: I7686fe4ae4c157ebfc07bd8b895c4cfdf99c057a --- .../src/com/android/documentsui/DocumentsActivity.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java b/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java index fe148daf8f740..c541bca9c3985 100644 --- a/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java +++ b/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java @@ -186,6 +186,9 @@ public class DocumentsActivity extends BaseActivity { } if (!mState.restored) { + // In this case, we set the activity title in AsyncTask.onPostExecute(). To prevent + // talkback from reading aloud the default title, we clear it here. + setTitle(""); if (mState.action == ACTION_MANAGE || mState.action == ACTION_BROWSE) { final Uri rootUri = getIntent().getData(); new RestoreRootTask(rootUri).executeOnExecutor(getCurrentExecutor());