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

Commit 394e962f authored by Ying Xu's avatar Ying Xu Committed by Automerger Merge Worker
Browse files

Merge "Don't refresh the Tile if the airplane mode is not changed" into sc-dev am: 2cb35f16

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14470328

Change-Id: I4c375355752d65caad0941f14a8fb92f2b0c5ab4
parents 46ef77a9 2cb35f16
Loading
Loading
Loading
Loading
+18 −1
Original line number Diff line number Diff line
@@ -319,12 +319,20 @@ public class InternetTile extends QSTileImpl<SignalState> {
                Log.d(TAG, "setIsAirplaneMode: "
                        + "icon = " + (icon == null ? "" : icon.toString()));
            }
            if (mCellularInfo.mAirplaneModeEnabled == icon.visible) {
                return;
            }
            mCellularInfo.mAirplaneModeEnabled = icon.visible;
            mWifiInfo.mAirplaneModeEnabled = icon.visible;
            if (!mSignalCallback.mEthernetInfo.mConnected) {
                if (mWifiInfo.mEnabled && (mWifiInfo.mWifiSignalIconId > 0)
                        && (mWifiInfo.mSsid != null)) {
                    refreshState(mWifiInfo);
                } else {
                    refreshState(mCellularInfo);
                }
            }
        }

        @Override
        public void setConnectivityStatus(boolean noDefaultNetwork, boolean noValidatedNetwork,
@@ -456,6 +464,9 @@ public class InternetTile extends QSTileImpl<SignalState> {
        state.dualLabelContentDescription = r.getString(
                R.string.accessibility_quick_settings_open_settings, getTileLabel());
        state.expandedAccessibilityClassName = Switch.class.getName();
        if (DEBUG) {
            Log.d(TAG, "handleUpdateWifiState: " + "SignalState = " + state.toString());
        }
    }

    private void handleUpdateCellularState(SignalState state, Object arg) {
@@ -496,6 +507,9 @@ public class InternetTile extends QSTileImpl<SignalState> {
        } else {
            state.stateDescription = state.secondaryLabel;
        }
        if (DEBUG) {
            Log.d(TAG, "handleUpdateCellularState: " + "SignalState = " + state.toString());
        }
    }

    private void handleUpdateEthernetState(SignalState state, Object arg) {
@@ -508,6 +522,9 @@ public class InternetTile extends QSTileImpl<SignalState> {
        state.state = Tile.STATE_ACTIVE;
        state.icon = ResourceIcon.get(cb.mEthernetSignalIconId);
        state.secondaryLabel = cb.mEthernetContentDescription;
        if (DEBUG) {
            Log.d(TAG, "handleUpdateEthernetState: " + "SignalState = " + state.toString());
        }
    }

    private CharSequence appendMobileDataType(CharSequence current, CharSequence dataType) {