DO NOT MERGE Using Activity#setTitle to have TalkBack announce root traversal.

am: ab58b5a3dd

Change-Id: Id9c2e3ff42a2ec8fe554e5d3d830d2d70d107086
This commit is contained in:
Ben Lin
2016-12-13 21:15:15 +00:00
committed by android-build-merger
2 changed files with 7 additions and 1 deletions

View File

@@ -387,6 +387,12 @@ public abstract class BaseActivity extends Activity
}
mNavigator.update();
// Causes talkback to announce the activity's new title
if (mState.stack.isRecents()) {
setTitle(mRoots.getRecentsRoot().title);
} else {
setTitle(mState.stack.getTitle());
}
invalidateOptionsMenu();
}

View File

@@ -192,7 +192,7 @@ public class FilesActivity extends BaseActivity {
Intent intent = getIntent();
return (intent != null && intent.hasExtra(Intent.EXTRA_TITLE))
? intent.getStringExtra(Intent.EXTRA_TITLE)
: getTitle().toString();
: getString(R.string.downloads_label);
}
@Override