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

Commit ec9cc1bc authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Avoid airplane mode labels when Wi-Fi enabled.

When refreshing network views, avoid setting airplane mode icon and
labels when connected to Wi-Fi network.

Bug: 5262367
Change-Id: Ib831ce06bab67fffcc14a8c3b1ba9e437a74761d
parent cc084f1d
Loading
Loading
Loading
Loading
+11 −7
Original line number Diff line number Diff line
@@ -936,16 +936,20 @@ public class NetworkController extends BroadcastReceiver {
        if (mAirplaneMode &&
                (mServiceState == null || (!hasService() && !mServiceState.isEmergencyOnly()))) {
            // Only display the flight-mode icon if not in "emergency calls only" mode.
            label = context.getString(R.string.status_bar_settings_signal_meter_disconnected);
            mContentDescriptionCombinedSignal = mContentDescriptionPhoneSignal
                = mContext.getString(R.string.accessibility_airplane_mode);

            // look again; your radios are now airplanes
            mContentDescriptionPhoneSignal = mContext.getString(
                    R.string.accessibility_airplane_mode);
            mPhoneSignalIconId = mDataSignalIconId = R.drawable.stat_sys_signal_flightmode;
            mDataTypeIconId = 0;

            // combined values from connected wifi take precedence over airplane mode
            if (!mWifiConnected) {
                label = context.getString(R.string.status_bar_settings_signal_meter_disconnected);
                mContentDescriptionCombinedSignal = mContentDescriptionPhoneSignal;
                combinedSignalIconId = mDataSignalIconId;
            }
        }
        else if (!mDataConnected && !mWifiConnected && !mBluetoothTethered && !mWimaxConnected) {
            // pretty much totally disconnected