summaryrefslogtreecommitdiff
path: root/core/java/android/inputmethodservice/InputMethodService.java
diff options
context:
space:
mode:
authorSatoshi Kataoka <satok@google.com>2012-11-08 15:55:59 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2012-11-08 15:55:59 -0800
commit350d4cbec1c3006710c6544299f994cf2a72c166 (patch)
tree9e6c8856da05818ff8b9fce845de727c775464fa /core/java/android/inputmethodservice/InputMethodService.java
parentd088145839c902b5b54d313e4e9f224eed7f8f40 (diff)
parentae41ba156364f5625280c4229169899adea965d5 (diff)
am ae41ba15: am 4424951f: am 1e29e49c: Merge "Reduce jankiness of the transition between a text field with FLAG_NO_FULLSCREEN and a text field with FLAG_NO_EXTRACT_UI" into jb-mr1.1-dev
* commit 'ae41ba156364f5625280c4229169899adea965d5': Reduce jankiness of the transition between a text field with FLAG_NO_FULLSCREEN and a text field with FLAG_NO_EXTRACT_UI
Diffstat (limited to 'core/java/android/inputmethodservice/InputMethodService.java')
-rw-r--r--core/java/android/inputmethodservice/InputMethodService.java15
1 files changed, 9 insertions, 6 deletions
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java
index 7271b8e14dad..99624cc817fc 100644
--- a/core/java/android/inputmethodservice/InputMethodService.java
+++ b/core/java/android/inputmethodservice/InputMethodService.java
@@ -930,11 +930,13 @@ public class InputMethodService extends AbstractInputMethodService {
*/
public void onConfigureWindow(Window win, boolean isFullscreen,
boolean isCandidatesOnly) {
- if (isFullscreen) {
- mWindow.getWindow().setLayout(MATCH_PARENT, MATCH_PARENT);
- } else {
- mWindow.getWindow().setLayout(MATCH_PARENT, WRAP_CONTENT);
+ final int currentHeight = mWindow.getWindow().getAttributes().height;
+ final int newHeight = isFullscreen ? MATCH_PARENT : WRAP_CONTENT;
+ if (mIsInputViewShown && currentHeight != newHeight) {
+ Log.w(TAG, "Window size has been changed. This may cause jankiness of resizing window: "
+ + currentHeight + " -> " + newHeight);
}
+ mWindow.getWindow().setLayout(MATCH_PARENT, newHeight);
}
/**
@@ -997,10 +999,11 @@ public class InputMethodService extends AbstractInputMethodService {
}
void updateExtractFrameVisibility() {
- int vis;
+ final int vis;
if (isFullscreenMode()) {
vis = mExtractViewHidden ? View.INVISIBLE : View.VISIBLE;
- mExtractFrame.setVisibility(View.VISIBLE);
+ // "vis" should be applied for the extract frame as well in the fullscreen mode.
+ mExtractFrame.setVisibility(vis);
} else {
vis = View.VISIBLE;
mExtractFrame.setVisibility(View.GONE);