Merge "Remove unnecessary Binder.clearCallingIdentity()"

This commit is contained in:
TreeHugger Robot
2017-02-01 05:10:28 +00:00
committed by Android (Google) Code Review

View File

@@ -2634,20 +2634,15 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
if (!calledFromValidUser()) {
return;
}
final long ident = Binder.clearCallingIdentity();
try {
synchronized (mMethodMap) {
if (!calledWithValidToken(token)) {
final int uid = Binder.getCallingUid();
Slog.e(TAG, "Ignoring clearLastInputMethodWindowForTransition due to an "
+ "invalid token. uid:" + uid + " token:" + token);
return;
}
synchronized (mMethodMap) {
if (!calledWithValidToken(token)) {
final int uid = Binder.getCallingUid();
Slog.e(TAG, "Ignoring clearLastInputMethodWindowForTransition due to an "
+ "invalid token. uid:" + uid + " token:" + token);
return;
}
mWindowManagerInternal.clearLastInputMethodWindowForTransition();
} finally {
Binder.restoreCallingIdentity(ident);
}
mWindowManagerInternal.clearLastInputMethodWindowForTransition();
}
@Override