diff options
author | Tyler Gunn <tgunn@google.com> | 2018-06-04 08:31:42 -0700 |
---|---|---|
committer | Ryan Longair <rlongair@google.com> | 2018-06-12 11:25:21 -0700 |
commit | e64fcc2a26a0e4b08c0cad4466af997c447e3661 (patch) | |
tree | 47ea6d77a33f427e2a8a38db25be9805fc33b37b | |
parent | 7c4c00e621bcc0b51132707dfc8bfb82cbc26d01 (diff) | |
download | Telephony-security-oc-release.tar.gz |
Fix potential NPE in EmergencyCallbackModeExitDialog.android-8.0.0_r49android-8.0.0_r48android-8.0.0_r47android-8.0.0_r46android-8.0.0_r45android-8.0.0_r44android-8.0.0_r43android-8.0.0_r42android-8.0.0_r41android-8.0.0_r40android-8.0.0_r39android-8.0.0_r38android-8.0.0_r37security-oc-release
Ensure NPE will not crash com.android.phone process.
Test: Manual using test app provided in bug
Bug: 79995313
Change-Id: I83a5e94acdae4287e6a62558cffb586d35930b47
Merged-In: I8b899023b0977e4a8963cc536602ced4f7e43769
(cherry picked from commit 00f0c43dc4dd37d13ef614e84492783a9a6e981b)
-rw-r--r-- | src/com/android/phone/EmergencyCallbackModeExitDialog.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/com/android/phone/EmergencyCallbackModeExitDialog.java b/src/com/android/phone/EmergencyCallbackModeExitDialog.java index f5509b932..07d518f22 100644 --- a/src/com/android/phone/EmergencyCallbackModeExitDialog.java +++ b/src/com/android/phone/EmergencyCallbackModeExitDialog.java @@ -80,9 +80,11 @@ public class EmergencyCallbackModeExitDialog extends Activity implements OnDismi mPhone = PhoneGlobals.getInstance().getPhoneInEcm(); // Check if phone is in Emergency Callback Mode. If not, exit. - final boolean isInEcm = mPhone.isInEcm(); - Log.i(TAG, "ECMModeExitDialog launched - isInEcm: " + isInEcm + " phone:" + mPhone); - if (mPhone == null || !isInEcm) { + if (mPhone == null || !mPhone.isInEcm()) { + if (mPhone == null) { + android.util.EventLog.writeEvent(0x534e4554, "79995313", -1, ""); + } + Log.i(TAG, "ECMModeExitDialog launched - isInEcm: false" + " phone:" + mPhone); finish(); return; } |