Clear SHOW_FORCED flag when the app's targetSdk >= T

As the legacy flag SHOW_FORCED when calling showSoftInput keeps
remaining soft-keyboard visible, even though switching focus to another
application the situation still remains, unless someone calls
hideSoftInputFromWindow explicitly.

In case SHOW_FORCED flag affects the next client to keep IME visible and
hard to handle for the app developer, we introduce a platform
compatibility flag, when enabled, if the current client is leaving due
to the next focused client, in IMMS side will clear mShowForced flag when
the next client's targetSdkVersion is T or higher.

Also, deprecated SHOW_FORCED flag with updating the reason in
the documentation.

Fix: 214016041
Test: atest KeyboardVisibilityControlTest#\
    testShowSoftInputWithShowForcedFlagWhenAppIsLeaving
Change-Id: I47efe5cb02ba69cbe018619e5bdc8f3995a55b4b
5 files changed