OSDN Git Service

Bug fix: support tab doesn't show offline UI initially.
authorFan Zhang <zhfan@google.com>
Thu, 23 Jun 2016 15:38:00 +0000 (08:38 -0700)
committerFan Zhang <zhfan@google.com>
Thu, 23 Jun 2016 15:38:00 +0000 (08:38 -0700)
Bug: 29601818

The support UI correctly monitors network state change after being
displayed, but it fails to set initial hasInternet flag. So we
manually refresh this flag as part of onResume.

Change-Id: Icbf3cca708a961390073cfa77ec08bec7dd4d82f

src/com/android/settings/dashboard/SupportFragment.java

index 5e9a623..b4447cc 100644 (file)
@@ -117,6 +117,7 @@ public final class SupportFragment extends InstrumentedFragment implements View.
                         .addCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET)
                         .build(),
                 mNetworkCallback);
+        mSupportItemAdapter.setHasInternet(hasInternet());
     }
 
     @Override