From c84b3e15df74382ffd00cfd8eff24b1c7948e614 Mon Sep 17 00:00:00 2001 From: Wilson Wu Date: Fri, 16 Apr 2021 14:37:12 +0800 Subject: Make IInputMethodPrivilegedOperations to async (3/N) -. Remove VoidResultCallback of reportFullscreenMode and let it be truly asynchronous. -. Rename this method to reportFullscreenModeAsync. Bug: 183587528 Test: atest CtsInputMethodTestCases Test: Manually verified as follows. 1. Build flame-userdebug and flash it. 2. Make sure that the screen rotation is enabled. 3. make -j SoftKeyboard 4. adb install -r $OUT/system/app/SoftKeyboard/SoftKeyboard.apk 5. adb shell ime enable com.example.android.softkeyboard/.SoftKeyboard 6. adb shell ime set com.example.android.softkeyboard/.SoftKeyboard 7. make -j EditTextVariations 8. adb install -r $ANDROID_TARGET_OUT_TESTCASES/EditTextVariations/arm64/EditTextVariations.apk 9. adb shell am start -n com.android.inputmethod.tools.edittextvariations/.EditTextVariations 10. Make sure that the device is in the landscape mode, and the SoftKeyboard sample IME is not yet shown. 11. adb shell dumpsys input_method | grep mFullscreenMode Then make sure the mFullscreenMode is "false" 12. Tap the first edit field then make sure that SoftKeyboard sample IME becomes visible in the fullscreen mode. 13. adb shell dumpsys input_method | grep mFullscreenMode Then make sure the mFullscreenMode is "true" 14. Tap the down button on the navbar to hide the SoftKeyboard sample IME. 15. adb shell dumpsys input_method | grep mFullscreenMode Then make sure the mFullscreenMode is "false" Change-Id: I92e8b0d420be3dd16cc4f3ba29e0bde5f12ab2ce --- core/java/android/inputmethodservice/InputMethodService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/java/android/inputmethodservice/InputMethodService.java') diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java index 4ee5383a56be..ad5c21295e15 100644 --- a/core/java/android/inputmethodservice/InputMethodService.java +++ b/core/java/android/inputmethodservice/InputMethodService.java @@ -1628,7 +1628,7 @@ public class InputMethodService extends AbstractInputMethodService { } private void reportFullscreenMode() { - mPrivOps.reportFullscreenMode(mIsFullscreen); + mPrivOps.reportFullscreenModeAsync(mIsFullscreen); } /** -- cgit v1.2.3