Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 52801aae authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Protect more service dump() methods.

Bug: 6406965
Change-Id: Ia45a580c1e6f403308e7e540f18f2c0505af0f29
parent d86a532c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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++) {
+2 −0
Original line number Diff line number Diff line
@@ -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, "  ");