Merge "Simplify IMMS#reportPerceptibleAsync()"
This commit is contained in:
committed by
Android (Google) Code Review
commit
5242e7a97d
@@ -3424,19 +3424,12 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub
|
||||
public void reportPerceptibleAsync(IBinder windowToken, boolean perceptible) {
|
||||
Objects.requireNonNull(windowToken, "windowToken must not be null");
|
||||
synchronized (ImfLock.class) {
|
||||
if (!calledFromValidUserLocked()) {
|
||||
if (mCurFocusedWindow != windowToken || mCurPerceptible == perceptible) {
|
||||
return;
|
||||
}
|
||||
final long ident = Binder.clearCallingIdentity();
|
||||
try {
|
||||
if (mCurFocusedWindow == windowToken
|
||||
&& mCurPerceptible != perceptible) {
|
||||
mCurPerceptible = perceptible;
|
||||
updateSystemUiLocked(mImeWindowVis, mBackDisposition);
|
||||
}
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(ident);
|
||||
}
|
||||
mCurPerceptible = perceptible;
|
||||
Binder.withCleanCallingIdentity(() ->
|
||||
updateSystemUiLocked(mImeWindowVis, mBackDisposition));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user