diff options
author | Michael W <baddaemon87@gmail.com> | 2016-05-31 10:40:39 +0200 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2016-06-07 03:52:09 -0700 |
commit | 1b2a1509c841aee49d607b2994d7402fe3116381 (patch) | |
tree | 7d194cd586e127e808d37111ac6288614e0fa1e5 /packages | |
parent | 3d98dae969b917d34efe85dbf45b67a6c8237304 (diff) | |
download | frameworks_base-1b2a1509c841aee49d607b2994d7402fe3116381.zip frameworks_base-1b2a1509c841aee49d607b2994d7402fe3116381.tar.gz frameworks_base-1b2a1509c841aee49d607b2994d7402fe3116381.tar.bz2 |
isRoaming: fix possible NPE
Looks like isRoaming() is called with
mServiceState being null sometimes
Check for non null as well
(Reference:
BugReport 13-20160520-26 L #36)
Change-Id: I90a7feb2f5b72a4b94bbb4e7a5c4f486b416143b
Diffstat (limited to 'packages')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java index e883383..81a30c0 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java @@ -279,13 +279,15 @@ public class MobileSignalController extends SignalController< } private boolean isRoaming() { - if (isCdma()) { + if (mServiceState == null) { + return false; + } else if (isCdma()) { final int iconMode = mServiceState.getCdmaEriIconMode(); return mServiceState.getCdmaEriIconIndex() != EriInfo.ROAMING_INDICATOR_OFF && (iconMode == EriInfo.ROAMING_ICON_MODE_NORMAL || iconMode == EriInfo.ROAMING_ICON_MODE_FLASH); } else { - return mServiceState != null && mServiceState.getRoaming(); + return mServiceState.getRoaming(); } } |