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

Commit a1f49d8b authored by Daniel Sandler's avatar Daniel Sandler Committed by Android Git Automerger
Browse files

am 295eddb9: Merge "Don\'t show emergency calls label unless it\'s a phone." into jb-mr2-dev

* commit '295eddb9':
  Don't show emergency calls label unless it's a phone.
parents 466ceb46 295eddb9
Loading
Loading
Loading
Loading
+15 −11
Original line number Diff line number Diff line
@@ -496,7 +496,10 @@ public class PhoneStatusBar extends BaseStatusBar {
        mNetworkController.addSignalCluster(signalCluster);
        signalCluster.setNetworkController(mNetworkController);

        mEmergencyCallLabel = (TextView)mStatusBarWindow.findViewById(R.id.emergency_calls_only);
        final boolean isAPhone = mNetworkController.hasVoiceCallingFeature();
        if (isAPhone) {
            mEmergencyCallLabel =
                    (TextView) mStatusBarWindow.findViewById(R.id.emergency_calls_only);
            if (mEmergencyCallLabel != null) {
                mNetworkController.addEmergencyLabelView(mEmergencyCallLabel);
                mEmergencyCallLabel.setOnClickListener(new View.OnClickListener() {
@@ -508,6 +511,7 @@ public class PhoneStatusBar extends BaseStatusBar {
                        updateCarrierLabelVisibility(false);
                    }});
            }
        }

        mCarrierLabel = (TextView)mStatusBarWindow.findViewById(R.id.carrier_label);
        mShowCarrierInPanel = (mCarrierLabel != null);
+6 −0
Original line number Diff line number Diff line
@@ -263,6 +263,10 @@ public class NetworkController extends BroadcastReceiver {
        return mHasMobileDataFeature;
    }

    public boolean hasVoiceCallingFeature() {
        return mPhone.getPhoneType() != TelephonyManager.PHONE_TYPE_NONE;
    }

    public boolean isEmergencyOnly() {
        return (mServiceState != null && mServiceState.isEmergencyOnly());
    }
@@ -1377,6 +1381,8 @@ public class NetworkController extends BroadcastReceiver {
                mConnected?"CONNECTED":"DISCONNECTED",
                mConnectedNetworkType, mConnectedNetworkTypeName));
        pw.println("  - telephony ------");
        pw.print("  hasVoiceCallingFeature()=");
        pw.println(hasVoiceCallingFeature());
        pw.print("  hasService()=");
        pw.println(hasService());
        pw.print("  mHspaDataDistinguishable=");