Loading src/java/com/android/internal/telephony/ServiceStateTracker.java +16 −1 Original line number Original line Diff line number Diff line Loading @@ -460,6 +460,10 @@ public class ServiceStateTracker extends Handler { public static final int CS_NOTIFICATION = 999; // Id to update and cancel CS restricted public static final int CS_NOTIFICATION = 999; // Id to update and cancel CS restricted public static final int CS_REJECT_CAUSE_NOTIFICATION = 111; // Id to update and cancel MM public static final int CS_REJECT_CAUSE_NOTIFICATION = 111; // Id to update and cancel MM // rejection cause // rejection cause /** To identify whether EVENT_SIM_READY is received or not */ private boolean mIsSimReady = false; private BroadcastReceiver mIntentReceiver = new BroadcastReceiver() { private BroadcastReceiver mIntentReceiver = new BroadcastReceiver() { @Override @Override public void onReceive(Context context, Intent intent) { public void onReceive(Context context, Intent intent) { Loading Loading @@ -1072,6 +1076,11 @@ public class ServiceStateTracker extends Handler { case EVENT_ICC_CHANGED: case EVENT_ICC_CHANGED: onUpdateIccAvailability(); onUpdateIccAvailability(); if (mUiccApplcation != null && mUiccApplcation.getState() != AppState.APPSTATE_READY) { mIsSimReady = false; updateSpnDisplay(); } break; break; case EVENT_GET_CELL_INFO_LIST: { case EVENT_GET_CELL_INFO_LIST: { Loading Loading @@ -1129,6 +1138,7 @@ public class ServiceStateTracker extends Handler { // Reset the mPreviousSubId so we treat a SIM power bounce // Reset the mPreviousSubId so we treat a SIM power bounce // as a first boot. See b/19194287 // as a first boot. See b/19194287 mOnSubscriptionsChangedListener.mPreviousSubId.set(-1); mOnSubscriptionsChangedListener.mPreviousSubId.set(-1); mIsSimReady = true; pollState(); pollState(); // Signal strength polling stops when radio is off // Signal strength polling stops when radio is off queueNextSignalStrengthPoll(); queueNextSignalStrengthPoll(); Loading Loading @@ -2235,7 +2245,12 @@ public class ServiceStateTracker extends Handler { if (combinedRegState == ServiceState.STATE_OUT_OF_SERVICE if (combinedRegState == ServiceState.STATE_OUT_OF_SERVICE || combinedRegState == ServiceState.STATE_EMERGENCY_ONLY) { || combinedRegState == ServiceState.STATE_EMERGENCY_ONLY) { showPlmn = true; showPlmn = true; if (mEmergencyOnly) { // Force display no service final boolean forceDisplayNoService = mPhone.getContext().getResources().getBoolean( com.android.internal.R.bool.config_display_no_service_when_sim_unready) && !mIsSimReady; if (mEmergencyOnly && !forceDisplayNoService) { // No service but emergency call allowed // No service but emergency call allowed plmn = Resources.getSystem(). plmn = Resources.getSystem(). getText(com.android.internal.R.string.emergency_calls_only).toString(); getText(com.android.internal.R.string.emergency_calls_only).toString(); Loading Loading
src/java/com/android/internal/telephony/ServiceStateTracker.java +16 −1 Original line number Original line Diff line number Diff line Loading @@ -460,6 +460,10 @@ public class ServiceStateTracker extends Handler { public static final int CS_NOTIFICATION = 999; // Id to update and cancel CS restricted public static final int CS_NOTIFICATION = 999; // Id to update and cancel CS restricted public static final int CS_REJECT_CAUSE_NOTIFICATION = 111; // Id to update and cancel MM public static final int CS_REJECT_CAUSE_NOTIFICATION = 111; // Id to update and cancel MM // rejection cause // rejection cause /** To identify whether EVENT_SIM_READY is received or not */ private boolean mIsSimReady = false; private BroadcastReceiver mIntentReceiver = new BroadcastReceiver() { private BroadcastReceiver mIntentReceiver = new BroadcastReceiver() { @Override @Override public void onReceive(Context context, Intent intent) { public void onReceive(Context context, Intent intent) { Loading Loading @@ -1072,6 +1076,11 @@ public class ServiceStateTracker extends Handler { case EVENT_ICC_CHANGED: case EVENT_ICC_CHANGED: onUpdateIccAvailability(); onUpdateIccAvailability(); if (mUiccApplcation != null && mUiccApplcation.getState() != AppState.APPSTATE_READY) { mIsSimReady = false; updateSpnDisplay(); } break; break; case EVENT_GET_CELL_INFO_LIST: { case EVENT_GET_CELL_INFO_LIST: { Loading Loading @@ -1129,6 +1138,7 @@ public class ServiceStateTracker extends Handler { // Reset the mPreviousSubId so we treat a SIM power bounce // Reset the mPreviousSubId so we treat a SIM power bounce // as a first boot. See b/19194287 // as a first boot. See b/19194287 mOnSubscriptionsChangedListener.mPreviousSubId.set(-1); mOnSubscriptionsChangedListener.mPreviousSubId.set(-1); mIsSimReady = true; pollState(); pollState(); // Signal strength polling stops when radio is off // Signal strength polling stops when radio is off queueNextSignalStrengthPoll(); queueNextSignalStrengthPoll(); Loading Loading @@ -2235,7 +2245,12 @@ public class ServiceStateTracker extends Handler { if (combinedRegState == ServiceState.STATE_OUT_OF_SERVICE if (combinedRegState == ServiceState.STATE_OUT_OF_SERVICE || combinedRegState == ServiceState.STATE_EMERGENCY_ONLY) { || combinedRegState == ServiceState.STATE_EMERGENCY_ONLY) { showPlmn = true; showPlmn = true; if (mEmergencyOnly) { // Force display no service final boolean forceDisplayNoService = mPhone.getContext().getResources().getBoolean( com.android.internal.R.bool.config_display_no_service_when_sim_unready) && !mIsSimReady; if (mEmergencyOnly && !forceDisplayNoService) { // No service but emergency call allowed // No service but emergency call allowed plmn = Resources.getSystem(). plmn = Resources.getSystem(). getText(com.android.internal.R.string.emergency_calls_only).toString(); getText(com.android.internal.R.string.emergency_calls_only).toString(); Loading