From f6139f934bcd17cbf9c16c34db6b4b8e3752ffde Mon Sep 17 00:00:00 2001 From: Evan Laird Date: Wed, 24 May 2017 16:25:57 -0400 Subject: Fix for wifi detail icon disappearing With Wi-Fi turned off, presenting the QS detail view would initially show the correct view but then after a delay it would disappear. This fixes that Test: visual Change-Id: Id1b697ddb8b3c3c8102d7dddc7691330125312f0 Fixes:62137316 --- .../src/com/android/systemui/qs/tiles/WifiTile.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/WifiTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/WifiTile.java index 1afce64539d2..76f6e7d7d243 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/WifiTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/WifiTile.java @@ -353,13 +353,20 @@ public class WifiTile extends QSTileImpl { private void updateItems() { if (mItems == null) return; - if (mSignalCallback.mInfo.enabled) { - mItems.setEmptyState(R.drawable.ic_qs_wifi_detail_empty, - R.string.quick_settings_wifi_detail_empty_text); - } else { + + // Wi-Fi is off + if (!mSignalCallback.mInfo.enabled) { mItems.setEmptyState(R.drawable.ic_qs_wifi_detail_empty, R.string.wifi_is_off); + mItems.setItems(null); + return; } + + // No available access points + mItems.setEmptyState(R.drawable.ic_qs_wifi_detail_empty, + R.string.quick_settings_wifi_detail_empty_text); + + // Build the list Item[] items = null; if (mAccessPoints != null) { items = new Item[mAccessPoints.length]; -- cgit v1.2.3-59-g8ed1b