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

Commit 44003ad5 authored by Kun Liang's avatar Kun Liang Committed by Linux Build Service Account
Browse files

Statusbar: Show wifi status when wifi enabled

Now, Wifi status is only shown on StatusBar when connected to AP.
To satisfy the security requirement, we need show wifi status when
AppOps enabled.

Change-Id: Iae803025e17fd7fb90931f39e8f9841b659ed8ee
parent 6408959c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -284,7 +284,7 @@ public class MSimNetworkControllerImpl extends NetworkControllerImpl {
    public void refreshSignalCluster(MSimSignalCluster cluster, int phoneId) {
        cluster.setWifiIndicators(
                // only show wifi in the cluster if connected or if wifi-only
                mWifiEnabled && (mWifiConnected || !mHasMobileDataFeature),
                mWifiEnabled && (mWifiConnected || !mHasMobileDataFeature || mAppopsStrictEnabled),
                mWifiIconId,
                mContentDescriptionWifi);
        cluster.setMobileDataIndicators(
+6 −1
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@

package com.android.systemui.statusbar.policy;

import android.app.AppOpsManager;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
@@ -178,6 +179,8 @@ public class NetworkControllerImpl extends BroadcastReceiver

    boolean mDataAndWifiStacked = false;

    protected static boolean mAppopsStrictEnabled = false;

    public interface SignalCluster {
        void setWifiIndicators(boolean visible, int strengthIcon,
		int activityIcon, String contentDescription);
@@ -202,6 +205,8 @@ public class NetworkControllerImpl extends BroadcastReceiver
                Context.CONNECTIVITY_SERVICE);
        mHasMobileDataFeature = cm.isNetworkSupported(ConnectivityManager.TYPE_MOBILE);

        mAppopsStrictEnabled = AppOpsManager.isStrictEnable();

        mShowPhoneRSSIForData = res.getBoolean(R.bool.config_showPhoneRSSIForData);
        mShowAtLeastThreeGees = res.getBoolean(R.bool.config_showMin3G);
        mAlwaysShowCdmaRssi = res.getBoolean(
@@ -434,7 +439,7 @@ public class NetworkControllerImpl extends BroadcastReceiver
        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,
                mWifiActivityIconId,
                mContentDescriptionWifi);