Commit dc4f3895 authored by David Maunder's avatar David Maunder Committed by Commit Bot

Only acquire title if Tab is initialized in AccessibilityTabModel

We should only acquire Title if the Tab is initialized. Now with
some attributes such as Title being moved to UserData objects
we enforce this.

Bug: 1114564
Change-Id: I876603c4126a24a1e6e8579f90cf7beb32e9871b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2352511Reviewed-by: default avatarTheresa  <twellington@chromium.org>
Commit-Queue: Theresa  <twellington@chromium.org>
Cr-Commit-Position: refs/heads/master@{#797330}
parent 00297e0b
...@@ -304,7 +304,7 @@ public class AccessibilityTabModelListItem extends FrameLayout implements OnClic ...@@ -304,7 +304,7 @@ public class AccessibilityTabModelListItem extends FrameLayout implements OnClic
private void updateTabText() { private void updateTabText() {
String title = null; String title = null;
String url = null; String url = null;
if (mTab != null) { if (mTab != null && mTab.isInitialized()) {
title = mTab.getTitle(); title = mTab.getTitle();
url = mTab.getUrlString(); url = mTab.getUrlString();
if (TextUtils.isEmpty(title)) title = url; if (TextUtils.isEmpty(title)) title = url;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment