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