summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorJohn Spurlock <jspurlock@google.com>2013-08-14 09:46:52 -0400
committerJohn Spurlock <jspurlock@google.com>2013-08-14 09:49:02 -0400
commitda5b6f2dc4ba23b6b70209f9b34fb39c93a51fc4 (patch)
treef84ee769a365f4b646613ba7ac7f90b61b2b50c2 /services
parenta5c81e8636c4b7bc68713f1b2988026b275ae329 (diff)
downloadframeworks_base-da5b6f2dc4ba23b6b70209f9b34fb39c93a51fc4.zip
frameworks_base-da5b6f2dc4ba23b6b70209f9b34fb39c93a51fc4.tar.gz
frameworks_base-da5b6f2dc4ba23b6b70209f9b34fb39c93a51fc4.tar.bz2
Normalize dream service dump check with other services.
Bug:10310128 Change-Id: Ieeeccc01832b569cf7fb3d1633d7dde60fceb7b2
Diffstat (limited to 'services')
-rw-r--r--services/java/com/android/server/dreams/DreamManagerService.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/services/java/com/android/server/dreams/DreamManagerService.java b/services/java/com/android/server/dreams/DreamManagerService.java
index 21e54fe..b6e7781 100644
--- a/services/java/com/android/server/dreams/DreamManagerService.java
+++ b/services/java/com/android/server/dreams/DreamManagerService.java
@@ -86,7 +86,13 @@ public final class DreamManagerService extends IDreamManager.Stub {
@Override
protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
- mContext.enforceCallingOrSelfPermission(android.Manifest.permission.DUMP, TAG);
+ if (mContext.checkCallingOrSelfPermission("android.permission.DUMP")
+ != PackageManager.PERMISSION_GRANTED) {
+ pw.println("Permission Denial: can't dump DreamManager from pid="
+ + Binder.getCallingPid()
+ + ", uid=" + Binder.getCallingUid());
+ return;
+ }
pw.println("DREAM MANAGER (dumpsys dreams)");
pw.println();