Merge "Avoid showing emergency calls when not possible" into lmp-mr1-dev

This commit is contained in:
Jason Monk
2015-01-12 14:01:03 +00:00
committed by Android (Google) Code Review
2 changed files with 6 additions and 1 deletions

View File

@@ -184,6 +184,11 @@ public class CellularTile extends QSTile<QSTile.SignalState> {
// Make sure signal gets cleared out when no sims. // Make sure signal gets cleared out when no sims.
mInfo.mobileSignalIconId = 0; mInfo.mobileSignalIconId = 0;
mInfo.dataTypeIconId = 0; mInfo.dataTypeIconId = 0;
// Show a No SIMs description to avoid emergency calls message.
mInfo.enabled = true;
mInfo.enabledDesc = mContext.getString(
R.string.keyguard_missing_sim_message_short);
mInfo.signalContentDescription = mInfo.enabledDesc;
} }
refreshState(mInfo); refreshState(mInfo);
} }

View File

@@ -1194,7 +1194,7 @@ public class NetworkControllerImpl extends BroadcastReceiver
int length = mSignalsChangedCallbacks.size(); int length = mSignalsChangedCallbacks.size();
for (int i = 0; i < length; i++) { for (int i = 0; i < length; i++) {
mSignalsChangedCallbacks.get(i).onMobileDataSignalChanged(mCurrentState.enabled mSignalsChangedCallbacks.get(i).onMobileDataSignalChanged(mCurrentState.enabled
&& !mCurrentState.isEmergency && !mCurrentState.airplaneMode, && !mCurrentState.isEmergency,
getQsCurrentIconId(), contentDescription, getQsCurrentIconId(), contentDescription,
qsTypeIcon, qsTypeIcon,
mCurrentState.dataConnected && mCurrentState.activityIn, mCurrentState.dataConnected && mCurrentState.activityIn,