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

Commit 13853bb7 authored by Kun Liang's avatar Kun Liang Committed by Shashank Mittal
Browse files

Statusbar: Show wifi icon on wifi enabled

Currently wifi icon is shown on status bar only when device is connected
to an AP but not just when wifi is enabled.

Add support to show wifi icon on enable even with no wifi connection.

Change-Id: I23a8c99147236d75180b04cbada0f8f087235e1c
parent 9207f1b9
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@

package com.android.systemui.statusbar.policy;

import android.app.AppOpsManager;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
@@ -63,6 +64,8 @@ public class NetworkController extends BroadcastReceiver implements DemoMode {

    private static final int FLIGHT_MODE_ICON = R.drawable.stat_sys_signal_flightmode;

    boolean mAppOpsStrictEnabled = false;

    // telephony
    boolean mHspaDataDistinguishable;
    private TelephonyManager mPhone;
@@ -301,7 +304,7 @@ public class NetworkController extends BroadcastReceiver implements DemoMode {
        if (mDemoMode) return;
        cluster.setWifiIndicators(
                // only show wifi in the cluster if connected or if wifi-only
                mWifiEnabled && (mWifiConnected || !mHasMobileDataFeature),
                mWifiEnabled && (mWifiConnected || !mHasMobileDataFeature || mAppOpsStrictEnabled),
                mWifiIconId,
                mContentDescriptionWifi);

@@ -912,6 +915,7 @@ public class NetworkController extends BroadcastReceiver implements DemoMode {
    }

    protected void updateWifiIcons() {
        mAppOpsStrictEnabled = AppOpsManager.isStrictEnable();
        if (mWifiConnected) {
            mWifiIconId = WifiIcons.WIFI_SIGNAL_STRENGTH[mInetCondition][mWifiLevel];
            mQSWifiIconId = WifiIcons.QS_WIFI_SIGNAL_STRENGTH[mInetCondition][mWifiLevel];