Deprecate InputMethodService#getInputMethodWindowRecommendedHeight()

InputMethodService#getInputMethodWindowRecommendedHeight() was added
with an assumption that some IMEs may want to call this API in
InputMethodService#onCreate() to adjust its IME window height to be
the same as the previous IME's window height [1], but in reality for
IME developers this API is quite difficult to use because relying on
this API means user-visible behavior is no longer deterministic.
Basically "Recommended" is too vague to rely on.

Let's deprecate this API before we end up having to define what is the
"recommended" height for more complicated scenarios such as
multi-displays and multi-profiles.

With this CL, IMS##getInputMethodWindowRecommendedHeight() always
returns 0.  Basically doing this would not likely to cause
compatibility issues because the possibility of returning 0 has been
clearly mentioned in the API document.  In practice this must have
returned 0 when the previous IME did not show the software keyboard
(e.g. AOSP keyboard with a hardware keyboard).  Therefore IMEs that
have correctly used this API should be able to fall back to a safe
default behavior even if this API returns 0.

 [1]: I0e920ee79c526c3aea6872b063cf294e2ab081c8
      658c7b896a751b971db1292d86655dbb97f00067

Fix: 116502957
Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Change-Id: Ia2cde031a0e67d45a3631e54226f9b5a0698dd61
2 files changed