Merge "Update the permission check for dump"
This commit is contained in:
@@ -2791,6 +2791,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2808,7 +2810,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);
|
||||||
|
|||||||
Reference in New Issue
Block a user