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

Commit cd00e9c9 authored by Chiachang Wang's avatar Chiachang Wang Committed by Automerger Merge Worker
Browse files

Merge "Update the permission check for dump" am: 32032cbf am: 9192f34c am:...

Merge "Update the permission check for dump" am: 32032cbf am: 9192f34c am: 44cc2f04 am: 59fc7fa5

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1678985

Change-Id: Ifd5273d69949e794bde1c9b62d7e6f9ceaa5884f
parents bed89c99 59fc7fa5
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -2810,6 +2810,8 @@ public class ConnectivityService extends IConnectivityManager.Stub
    @Override
    @Override
    protected void dump(@NonNull FileDescriptor fd, @NonNull PrintWriter writer,
    protected void dump(@NonNull FileDescriptor fd, @NonNull PrintWriter writer,
            @Nullable String[] args) {
            @Nullable String[] args) {
        if (!checkDumpPermission(mContext, TAG, writer)) return;

        mPriorityDumper.dump(fd, writer, args);
        mPriorityDumper.dump(fd, writer, args);
    }
    }


@@ -2827,7 +2829,6 @@ public class ConnectivityService extends IConnectivityManager.Stub


    private void doDump(FileDescriptor fd, PrintWriter writer, String[] args) {
    private void doDump(FileDescriptor fd, PrintWriter writer, String[] args) {
        final IndentingPrintWriter pw = new IndentingPrintWriter(writer, "  ");
        final IndentingPrintWriter pw = new IndentingPrintWriter(writer, "  ");
        if (!checkDumpPermission(mContext, TAG, pw)) return;


        if (CollectionUtils.contains(args, DIAG_ARG)) {
        if (CollectionUtils.contains(args, DIAG_ARG)) {
            dumpNetworkDiagnostics(pw);
            dumpNetworkDiagnostics(pw);