Simplify IME policy and enforce in binder calls.

Revert the overly complicated bc7b6fc2a4b701596a2c8eecc4aeef522abeeafa.

Since setImeWindowStatus can be called externally, enforce similar keyguard
policy so that this is not a backdoor for IMEs bound under the keyguard to
drive IME visibility.

Policy is simplified, we keep track of whether the keyguard is locked
when the current IME switches.

This fixes b/7498792 (activity under lockscreen drives IME visibility
when lockscreen is rotated) and does not break b/11186297 (IME visible
when BT keyboard is attached).

Bug:7498792
Change-Id: Idd335cc8259c3532fa869449a9048b420f286e6d
1 file changed