Merge "Restarting the device must be triggered even in the airplane mode"
diff --git a/src/java/com/android/internal/telephony/uicc/UiccSlot.java b/src/java/com/android/internal/telephony/uicc/UiccSlot.java
index 11478e6..77278d1 100644
--- a/src/java/com/android/internal/telephony/uicc/UiccSlot.java
+++ b/src/java/com/android/internal/telephony/uicc/UiccSlot.java
@@ -105,9 +105,9 @@
// 2. The latest mCardState is not ABSENT, but there is no UiccCard instance.
} else if ((oldState == null || oldState == CardState.CARDSTATE_ABSENT
|| mUiccCard == null) && mCardState != CardState.CARDSTATE_ABSENT) {
- // No notifications while radio is off or we just powering up
- if (radioState == TelephonyManager.RADIO_POWER_ON
- && mLastRadioState == TelephonyManager.RADIO_POWER_ON) {
+ // No notification while we are just powering up
+ if (radioState != TelephonyManager.RADIO_POWER_UNAVAILABLE
+ && mLastRadioState != TelephonyManager.RADIO_POWER_UNAVAILABLE) {
if (DBG) log("update: notify card added");
sendMessage(obtainMessage(EVENT_CARD_ADDED, null));
}
@@ -183,9 +183,9 @@
private void updateCardStateAbsent() {
int radioState =
(mCi == null) ? TelephonyManager.RADIO_POWER_UNAVAILABLE : mCi.getRadioState();
- // No notifications while radio is off or we just powering up
- if (radioState == TelephonyManager.RADIO_POWER_ON
- && mLastRadioState == TelephonyManager.RADIO_POWER_ON) {
+ // No notification while we are just powering up
+ if (radioState != TelephonyManager.RADIO_POWER_UNAVAILABLE
+ && mLastRadioState != TelephonyManager.RADIO_POWER_UNAVAILABLE) {
if (DBG) log("update: notify card removed");
sendMessage(obtainMessage(EVENT_CARD_REMOVED, null));
}