Merge "Protect more service dump() methods." into jb-mr1-dev

This commit is contained in:
Jeff Sharkey
2012-10-15 14:01:57 -07:00
committed by Android (Google) Code Review
2 changed files with 4 additions and 0 deletions

View File

@@ -283,6 +283,8 @@ public class SearchManagerService extends ISearchManager.Stub {
@Override
public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
mContext.enforceCallingOrSelfPermission(android.Manifest.permission.DUMP, TAG);
IndentingPrintWriter ipw = new IndentingPrintWriter(pw, " ");
synchronized (mSearchables) {
for (int i = 0; i < mSearchables.size(); i++) {

View File

@@ -304,6 +304,8 @@ class AppWidgetService extends IAppWidgetService.Stub
@Override
public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
mContext.enforceCallingOrSelfPermission(android.Manifest.permission.DUMP, TAG);
// Dump the state of all the app widget providers
synchronized (mAppWidgetServices) {
IndentingPrintWriter ipw = new IndentingPrintWriter(pw, " ");