diff options
author | Hung-ying Tyan <tyanh@google.com> | 2009-07-18 10:20:10 +0800 |
---|---|---|
committer | Hung-ying Tyan <tyanh@google.com> | 2009-07-18 10:20:10 +0800 |
commit | 000c3ff943781e1535fd110e59bdca539c91ccf5 (patch) | |
tree | 4a788ecdf989a5b5a5fa089b639c9e7e4853d7da | |
parent | 8e3c3f6461b53dc587ba92b3fe8cfbeb985f8514 (diff) | |
download | frameworks_base-000c3ff943781e1535fd110e59bdca539c91ccf5.zip frameworks_base-000c3ff943781e1535fd110e59bdca539c91ccf5.tar.gz frameworks_base-000c3ff943781e1535fd110e59bdca539c91ccf5.tar.bz2 |
Fix NullPointer in VpnServiceBinder.checkStatus().
-rw-r--r-- | packages/VpnServices/src/com/android/server/vpn/VpnServiceBinder.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/packages/VpnServices/src/com/android/server/vpn/VpnServiceBinder.java b/packages/VpnServices/src/com/android/server/vpn/VpnServiceBinder.java index cf153e3..7eb3287 100644 --- a/packages/VpnServices/src/com/android/server/vpn/VpnServiceBinder.java +++ b/packages/VpnServices/src/com/android/server/vpn/VpnServiceBinder.java @@ -71,9 +71,8 @@ public class VpnServiceBinder extends Service { } private synchronized void checkStatus(VpnProfile p) { - if (mService == null) broadcastConnectivity(p.getName(), VpnState.IDLE); - - if (!p.getName().equals(mService.mProfile.getName())) { + if ((mService == null) + || (!p.getName().equals(mService.mProfile.getName()))) { broadcastConnectivity(p.getName(), VpnState.IDLE); } else { broadcastConnectivity(p.getName(), mService.getState()); |