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

Commit 18d02e31 authored by Zach Johnson's avatar Zach Johnson
Browse files

Move dump permission check to the binder

Bug: 145171640
Test: compile & run
Change-Id: I512ecd80417041f288bbbb454d2e8932e8dfd9bc
parent d4f0e93e
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -2129,6 +2129,9 @@ public class AdapterService extends Service {
            if (service == null) {
                return;
            }

            enforceDumpPermission(service);

            service.dump(fd, writer, args);
            writer.close();
        }
@@ -2935,8 +2938,6 @@ public class AdapterService extends Service {

    @Override
    protected void dump(FileDescriptor fd, PrintWriter writer, String[] args) {
        enforceDumpPermission(this);

        if (args.length == 0) {
            writer.println("Skipping dump in APP SERVICES, see bluetooth_manager section.");
            writer.println("Use --print argument for dumpsys direct from AdapterService.");