diff options
author | Wink Saville <wink@google.com> | 2012-09-25 14:06:22 -0700 |
---|---|---|
committer | Wink Saville <wink@google.com> | 2012-09-25 14:06:22 -0700 |
commit | c90b7d250dae1931a603cc052bd90bc34c070f1b (patch) | |
tree | 9ff7b4ca61c580f39d749d6ef5de88ab4f01c25c /src/java/com/android/internal/telephony/gsm | |
parent | f4bfdd2941bdee6927a5300556a5c1d490bbff33 (diff) | |
download | frameworks_opt_telephony-c90b7d250dae1931a603cc052bd90bc34c070f1b.zip frameworks_opt_telephony-c90b7d250dae1931a603cc052bd90bc34c070f1b.tar.gz frameworks_opt_telephony-c90b7d250dae1931a603cc052bd90bc34c070f1b.tar.bz2 |
Telephony: Fix npe when making a call after ejecting card (DO NOT MERGE)
This is already in AOSP and Master, back porting to JB-MR1.
Bug: 6983013
Change-Id: Ibda258e632ecff79f22eebe093df0061ed4cdf4d
Diffstat (limited to 'src/java/com/android/internal/telephony/gsm')
-rw-r--r-- | src/java/com/android/internal/telephony/gsm/GsmConnection.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/java/com/android/internal/telephony/gsm/GsmConnection.java b/src/java/com/android/internal/telephony/gsm/GsmConnection.java index 875b680..59aa12a 100644 --- a/src/java/com/android/internal/telephony/gsm/GsmConnection.java +++ b/src/java/com/android/internal/telephony/gsm/GsmConnection.java @@ -373,10 +373,11 @@ public class GsmConnection extends Connection { default: GSMPhone phone = owner.phone; int serviceState = phone.getServiceState().getState(); - AppState uiccAppState = UiccController + UiccCardApplication cardApp = UiccController .getInstance() - .getUiccCardApplication(UiccController.APP_FAM_3GPP) - .getState(); + .getUiccCardApplication(UiccController.APP_FAM_3GPP); + AppState uiccAppState = (cardApp != null) ? cardApp.getState() : + AppState.APPSTATE_UNKNOWN; if (serviceState == ServiceState.STATE_POWER_OFF) { return DisconnectCause.POWER_OFF; } else if (serviceState == ServiceState.STATE_OUT_OF_SERVICE |