commit | b5047da9c81ed5ee593d0fbd05ca29e0e0777629 | [log] [tgz] |
---|---|---|
author | Jay Shrauner <shrauner@google.com> | Sat Nov 01 10:19:49 2014 -0700 |
committer | Jay Shrauner <shrauner@google.com> | Sat Nov 01 10:19:49 2014 -0700 |
tree | 086dfa77d1a2651805a492ea9b75937355b7f9ca | |
parent | d46781c636ef01a38e7aa8e97f0e246958e83d61 [diff] |
Fix NPE when intent is null Bug:18209396 Change-Id: Ia6678f13387471a4865f32b64ca02beedd4d0f2e
diff --git a/src/com/android/contacts/common/location/UpdateCountryService.java b/src/com/android/contacts/common/location/UpdateCountryService.java index e339306..9403187 100644 --- a/src/com/android/contacts/common/location/UpdateCountryService.java +++ b/src/com/android/contacts/common/location/UpdateCountryService.java
@@ -38,6 +38,10 @@ @Override protected void onHandleIntent(Intent intent) { + if (intent == null) { + Log.d(TAG, "onHandleIntent: could not handle null intent"); + return; + } if (ACTION_UPDATE_COUNTRY.equals(intent.getAction())) { final Location location = (Location) intent.getParcelableExtra(KEY_INTENT_LOCATION); final String country = getCountryFromLocation(getApplicationContext(), location);