diff options
author | Adam Lesinski <adamlesinski@google.com> | 2014-09-09 23:50:02 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-09-09 23:50:04 +0000 |
commit | 732edf098fe9728238bf3b69a3b3cfcb221edf35 (patch) | |
tree | db8240cb51045529de5734745a1661ef21a33ae6 /services/core/java/com/android/server/am | |
parent | 98ff7bce66f03da14e39fa7e532a7202bde7dce6 (diff) | |
parent | 6590d7c75c1d706f70ebf6a5594d6a7601c080df (diff) | |
download | frameworks_base-732edf098fe9728238bf3b69a3b3cfcb221edf35.zip frameworks_base-732edf098fe9728238bf3b69a3b3cfcb221edf35.tar.gz frameworks_base-732edf098fe9728238bf3b69a3b3cfcb221edf35.tar.bz2 |
Merge changes I79ba54d7,I224fb4b6 into lmp-dev
* changes:
Make UsageStats API default on only for the system
ActivityManager shouldn't return null for getCurrentUser
Diffstat (limited to 'services/core/java/com/android/server/am')
-rwxr-xr-x | services/core/java/com/android/server/am/ActiveServices.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/am/ActiveServices.java b/services/core/java/com/android/server/am/ActiveServices.java index 0bdb964..599c3b9 100755 --- a/services/core/java/com/android/server/am/ActiveServices.java +++ b/services/core/java/com/android/server/am/ActiveServices.java @@ -308,7 +308,14 @@ public final class ActiveServices { return new ComponentName("!", res.permission != null ? res.permission : "private to package"); } + ServiceRecord r = res.record; + + if (!mAm.getUserManagerLocked().exists(r.userId)) { + Slog.d(TAG, "Trying to start service with non-existent user! " + r.userId); + return null; + } + NeededUriGrants neededGrants = mAm.checkGrantUriPermissionFromIntentLocked( callingUid, r.packageName, service, service.getFlags(), null, r.userId); if (unscheduleServiceRestartLocked(r, callingUid, false)) { |