Fix TabLayout's flickering for good

The problem is due us not handling ViewPager's
page change listeners correctly. onPageSelected() can
be called while the ViewPager is still mostly in the
previous page. This means that the next onPageScrolled()
int will not match the selected page.

The fix is to skip updating the selected text, like we already
do with the indicator.

BUG: 22709728
Change-Id: Ic17a136b3352ae5c620f4295f852d5f9e5a53f92
diff --git a/design/src/android/support/design/widget/TabLayout.java b/design/src/android/support/design/widget/TabLayout.java
index 5f38d11..fcf2f74 100755
--- a/design/src/android/support/design/widget/TabLayout.java
+++ b/design/src/android/support/design/widget/TabLayout.java
@@ -844,11 +844,11 @@
                 animateToTab(tab.getPosition());
             }
         } else {
-            final int newPosition = tab != null ? tab.getPosition() : Tab.INVALID_POSITION;
-            if (newPosition != Tab.INVALID_POSITION) {
-                setSelectedTabView(newPosition);
-            }
             if (updateIndicator) {
+                final int newPosition = tab != null ? tab.getPosition() : Tab.INVALID_POSITION;
+                if (newPosition != Tab.INVALID_POSITION) {
+                    setSelectedTabView(newPosition);
+                }
                 if ((mSelectedTab == null || mSelectedTab.getPosition() == Tab.INVALID_POSITION)
                         && newPosition != Tab.INVALID_POSITION) {
                     // If we don't currently have a tab, just draw the indicator