diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-10-14 00:16:24 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-10-14 00:16:24 +0000 |
commit | 65aa3b3677537974f2136c702828d70a60fe6361 (patch) | |
tree | f9f525549155f28b9751bbdd4cbff45e730d910a /java/com/android/dialer/app | |
parent | 5fb96c9646db823dfe46d1735cbd62441884f8c9 (diff) | |
parent | 1afe00c0e4eef5170beba7bfe99106a5297b5460 (diff) |
Merge changes Iaf6e217d,Ib22e33de,If9fd6ca9
* changes:
Do not load every DialtactsActivity fragment on app open
Enable Lightbringer upgrades on M
Fixing voicemail notification bug
Diffstat (limited to 'java/com/android/dialer/app')
-rw-r--r-- | java/com/android/dialer/app/calllog/VisualVoicemailUpdateTask.java | 3 | ||||
-rw-r--r-- | java/com/android/dialer/app/list/ListsFragment.java | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/java/com/android/dialer/app/calllog/VisualVoicemailUpdateTask.java b/java/com/android/dialer/app/calllog/VisualVoicemailUpdateTask.java index 25444834d..e30623bb2 100644 --- a/java/com/android/dialer/app/calllog/VisualVoicemailUpdateTask.java +++ b/java/com/android/dialer/app/calllog/VisualVoicemailUpdateTask.java @@ -121,7 +121,8 @@ class VisualVoicemailUpdateTask implements Worker<VisualVoicemailUpdateTask.Inpu if (notification.getId() != VisualVoicemailNotifier.NOTIFICATION_ID) { continue; } - if (!notification.getTag().startsWith(VisualVoicemailNotifier.NOTIFICATION_TAG_PREFIX)) { + if (TextUtils.isEmpty(notification.getTag()) + || !notification.getTag().startsWith(VisualVoicemailNotifier.NOTIFICATION_TAG_PREFIX)) { continue; } String uri = diff --git a/java/com/android/dialer/app/list/ListsFragment.java b/java/com/android/dialer/app/list/ListsFragment.java index 362997a5a..05c647aec 100644 --- a/java/com/android/dialer/app/list/ListsFragment.java +++ b/java/com/android/dialer/app/list/ListsFragment.java @@ -203,7 +203,11 @@ public class ListsFragment extends Fragment implements OnPageChangeListener, Lis mPrefs.getBoolean( VisualVoicemailEnabledChecker.PREF_KEY_HAS_ACTIVE_VOICEMAIL_PROVIDER, false)); mViewPager.setAdapter(mAdapter); - mViewPager.setOffscreenPageLimit(DialtactsPagerAdapter.TAB_COUNT_WITH_VOICEMAIL - 1); + + // This is deliberate. See cl/172018946 for the app startup implications of using 1 here + // versus loading more fragments upfront. + mViewPager.setOffscreenPageLimit(1); + mViewPager.addOnPageChangeListener(this); showTab(DialtactsPagerAdapter.TAB_INDEX_SPEED_DIAL); |