Merge "Fix null pointer dereference when security exception occurs"

This commit is contained in:
Olawale Ogunwale
2015-06-01 14:45:27 +00:00
committed by Gerrit Code Review

View File

@@ -509,7 +509,7 @@ public final class ActiveServices {
// r.record is null if findServiceLocked() failed the caller permission check // r.record is null if findServiceLocked() failed the caller permission check
if (r.record == null) { if (r.record == null) {
throw new SecurityException( throw new SecurityException(
"Permission Denial: Accessing service " + r.record.name "Permission Denial: Accessing service"
+ " from pid=" + Binder.getCallingPid() + " from pid=" + Binder.getCallingPid()
+ ", uid=" + Binder.getCallingUid() + ", uid=" + Binder.getCallingUid()
+ " requires " + r.permission); + " requires " + r.permission);