am ec8d1280: am 532c9c45: Merge "Protect more service dump() methods." into jb-mr1-dev

* commit 'ec8d1280ac70245dcc533054b748f794f33f85bd':
  Protect more service dump() methods.
This commit is contained in:
Jeff Sharkey
2012-10-15 14:06:09 -07:00
committed by Android Git Automerger
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, " ");