am 87841352: am 7f11d0db: Merge "Clear the caller identity when dumping print system state." into klp-dev

* commit '8784135245567a4f234b2704549215ad65ef092b':
  Clear the caller identity when dumping print system state.
This commit is contained in:
Svetoslav
2013-10-18 13:30:25 -07:00
committed by Android Git Automerger

View File

@@ -361,12 +361,17 @@ public final class PrintManagerService extends IPrintManager.Stub {
} }
synchronized (mLock) { synchronized (mLock) {
pw.println("PRINT MANAGER STATE (dumpsys print)"); final long identity = Binder.clearCallingIdentity();
final int userStateCount = mUserStates.size(); try {
for (int i = 0; i < userStateCount; i++) { pw.println("PRINT MANAGER STATE (dumpsys print)");
UserState userState = mUserStates.get(i); final int userStateCount = mUserStates.size();
userState.dump(fd, pw, ""); for (int i = 0; i < userStateCount; i++) {
pw.println(); UserState userState = mUserStates.get(i);
userState.dump(fd, pw, "");
pw.println();
}
} finally {
Binder.restoreCallingIdentity(identity);
} }
} }
} }