summaryrefslogtreecommitdiffstats
path: root/services/appwidget
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2014-09-04 23:35:54 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-09-04 23:36:00 +0000
commit9ce72731f22caa07d90dcd016c6441bfeb90225c (patch)
treeebf7e6ee6d6e988c58245ff90595f7b596a6bbe5 /services/appwidget
parent8d223eb3f92a521f22acc4639a6d1999f7fe26ba (diff)
parent75d8c0b8bc28f61658c62b870ae8705e0be191cb (diff)
downloadframeworks_base-9ce72731f22caa07d90dcd016c6441bfeb90225c.zip
frameworks_base-9ce72731f22caa07d90dcd016c6441bfeb90225c.tar.gz
frameworks_base-9ce72731f22caa07d90dcd016c6441bfeb90225c.tar.bz2
Merge "AppWidgetServiceImpl: Use enforceCallingOrSelfPermission for checking DUMP" into lmp-dev
Diffstat (limited to 'services/appwidget')
-rw-r--r--services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java12
1 files changed, 5 insertions, 7 deletions
diff --git a/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java b/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
index 2ef806f..d05de69 100644
--- a/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
+++ b/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
@@ -440,12 +440,10 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
@Override
public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
- if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.DUMP)
- != PackageManager.PERMISSION_GRANTED) {
- throw new SecurityException("Permission Denial: can't dump from from pid="
- + Binder.getCallingPid()
- + ", uid=" + Binder.getCallingUid());
- }
+ mContext.enforceCallingOrSelfPermission(android.Manifest.permission.DUMP,
+ "Permission Denial: can't dump from from pid="
+ + Binder.getCallingPid()
+ + ", uid=" + Binder.getCallingUid());
synchronized (mLock) {
int N = mProviders.size();
@@ -4038,4 +4036,4 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
}
}
}
-} \ No newline at end of file
+}