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

Commit a8affd9e authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Clear the calling ID in dump()."

parents 10dcfd36 534b6cf9
Loading
Loading
Loading
Loading
+26 −21
Original line number Diff line number Diff line
@@ -874,6 +874,8 @@ public class NetworkScoreService extends INetworkScoreService.Stub {
    @Override
    protected void dump(final FileDescriptor fd, final PrintWriter writer, final String[] args) {
        mContext.enforceCallingOrSelfPermission(permission.DUMP, TAG);
        final long token = Binder.clearCallingIdentity();
        try {
            NetworkScorerAppData currentScorer = mNetworkScorerAppManager.getActiveScorer();
            if (currentScorer == null) {
                writer.println("Scoring is disabled.");
@@ -900,6 +902,9 @@ public class NetworkScoreService extends INetworkScoreService.Stub {
                }
            }
            writer.flush();
        } finally {
            Binder.restoreCallingIdentity(token);
        }
    }

    /**