commit | 29cd7f19625a2a2a8528469e55f3aa495107b9e7 | [log] [tgz] |
---|---|---|
author | Dianne Hackborn <hackbod@google.com> | Thu Jan 08 10:37:05 2015 -0800 |
committer | Dianne Hackborn <hackbod@google.com> | Thu Jan 08 10:58:45 2015 -0800 |
tree | 2e9a23cd99a705d486c55a88b93bd0039c32b717 | |
parent | 9d4b7963399045395799dcb7df5d8c84d9b12884 [diff] |
Fix issue #18827122: system server crashed on broadcasting... ...an intent with invalid or null package uri Also tweak battery stats to record in the history when we shut down, to understand when restarts are due to clean shutdowns or crashes. Change-Id: I6443dafc23e356be9f569906f6081152d4f92d2b
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java index 9607755..02cacd9 100644 --- a/services/core/java/com/android/server/notification/NotificationManagerService.java +++ b/services/core/java/com/android/server/notification/NotificationManagerService.java
@@ -683,6 +683,9 @@ @Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); + if (action == null) { + return; + } boolean queryRestart = false; boolean queryRemove = false;
diff --git a/services/core/java/com/android/server/pm/UserManagerService.java b/services/core/java/com/android/server/pm/UserManagerService.java index be3251c..d484b8f 100644 --- a/services/core/java/com/android/server/pm/UserManagerService.java +++ b/services/core/java/com/android/server/pm/UserManagerService.java
@@ -320,6 +320,9 @@ checkManageUsersPermission("get the profile parent"); synchronized (mPackagesLock) { UserInfo profile = getUserInfoLocked(userHandle); + if (profile == null) { + return null; + } int parentUserId = profile.profileGroupId; if (parentUserId == UserInfo.NO_PROFILE_GROUP_ID) { return null;