Loading core/java/android/inputmethodservice/InputMethodService.java +13 −2 Original line number Original line Diff line number Diff line Loading @@ -481,6 +481,7 @@ public class InputMethodService extends AbstractInputMethodService { boolean mFullscreenApplied; boolean mFullscreenApplied; boolean mIsFullscreen; boolean mIsFullscreen; private boolean mLastWasInFullscreenMode; @UnsupportedAppUsage @UnsupportedAppUsage View mExtractView; View mExtractView; boolean mExtractViewHidden; boolean mExtractViewHidden; Loading Loading @@ -920,9 +921,18 @@ public class InputMethodService extends AbstractInputMethodService { if (mHandler == null) { if (mHandler == null) { mHandler = new Handler(getMainLooper()); mHandler = new Handler(getMainLooper()); } } if (mLastWasInFullscreenMode) { // Caching surface / delaying surface removal can cause mServedView to detach in certain // cases in RecyclerView (b/187772544). // TODO(b/188818557): Re-enable IME surface caching for fullscreen mode once detaching // view issues is resolved in RecyclerView. removeImeSurface(); } else { mImeSurfaceScheduledForRemoval = true; mImeSurfaceScheduledForRemoval = true; mHandler.postDelayed(() -> removeImeSurface(), TIMEOUT_SURFACE_REMOVAL_MILLIS); mHandler.postDelayed(() -> removeImeSurface(), TIMEOUT_SURFACE_REMOVAL_MILLIS); } } } private void removeImeSurface() { private void removeImeSurface() { // hiding a window removes its surface. // hiding a window removes its surface. Loading Loading @@ -2350,6 +2360,7 @@ public class InputMethodService extends AbstractInputMethodService { onWindowHidden(); onWindowHidden(); mDecorViewWasVisible = false; mDecorViewWasVisible = false; } } mLastWasInFullscreenMode = mIsFullscreen; updateFullscreenMode(); updateFullscreenMode(); } } Loading Loading
core/java/android/inputmethodservice/InputMethodService.java +13 −2 Original line number Original line Diff line number Diff line Loading @@ -481,6 +481,7 @@ public class InputMethodService extends AbstractInputMethodService { boolean mFullscreenApplied; boolean mFullscreenApplied; boolean mIsFullscreen; boolean mIsFullscreen; private boolean mLastWasInFullscreenMode; @UnsupportedAppUsage @UnsupportedAppUsage View mExtractView; View mExtractView; boolean mExtractViewHidden; boolean mExtractViewHidden; Loading Loading @@ -920,9 +921,18 @@ public class InputMethodService extends AbstractInputMethodService { if (mHandler == null) { if (mHandler == null) { mHandler = new Handler(getMainLooper()); mHandler = new Handler(getMainLooper()); } } if (mLastWasInFullscreenMode) { // Caching surface / delaying surface removal can cause mServedView to detach in certain // cases in RecyclerView (b/187772544). // TODO(b/188818557): Re-enable IME surface caching for fullscreen mode once detaching // view issues is resolved in RecyclerView. removeImeSurface(); } else { mImeSurfaceScheduledForRemoval = true; mImeSurfaceScheduledForRemoval = true; mHandler.postDelayed(() -> removeImeSurface(), TIMEOUT_SURFACE_REMOVAL_MILLIS); mHandler.postDelayed(() -> removeImeSurface(), TIMEOUT_SURFACE_REMOVAL_MILLIS); } } } private void removeImeSurface() { private void removeImeSurface() { // hiding a window removes its surface. // hiding a window removes its surface. Loading Loading @@ -2350,6 +2360,7 @@ public class InputMethodService extends AbstractInputMethodService { onWindowHidden(); onWindowHidden(); mDecorViewWasVisible = false; mDecorViewWasVisible = false; } } mLastWasInFullscreenMode = mIsFullscreen; updateFullscreenMode(); updateFullscreenMode(); } } Loading