Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f6139f93 authored by Evan Laird's avatar Evan Laird
Browse files

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
parent 1ec5d85a
Loading
Loading
Loading
Loading
+11 −4
Original line number Diff line number Diff line
@@ -353,13 +353,20 @@ public class WifiTile extends QSTileImpl<SignalState> {

        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];