author | Ting Li <ting.li@amlogic.com> | 2013-09-27 07:37:44 (GMT) |
---|---|---|
committer | Ting Li <ting.li@amlogic.com> | 2013-09-27 07:37:44 (GMT) |
commit | b9e5d77f4dff66b13a3a4c2bb78550b89d63a791 (patch) | |
tree | dceae17c7f41b0dce619986b528519a03cdcd41c | |
parent | 8c28f3bf78299061fb25099d622948e9d94d6585 (diff) | |
download | RemoteIME-b9e5d77f4dff66b13a3a4c2bb78550b89d63a791.zip RemoteIME-b9e5d77f4dff66b13a3a4c2bb78550b89d63a791.tar.gz RemoteIME-b9e5d77f4dff66b13a3a4c2bb78550b89d63a791.tar.bz2 |
pd#80092 keyboard which cannot display well when 1080p
-rwxr-xr-x | src/com/amlogic/inputmethod/remote/Environment.java | 5 | ||||
-rwxr-xr-x | src/com/amlogic/inputmethod/remote/RemoteIME.java | 10 |
2 files changed, 14 insertions, 1 deletions
diff --git a/src/com/amlogic/inputmethod/remote/Environment.java b/src/com/amlogic/inputmethod/remote/Environment.java index 0a7040b..ebb248c 100755 --- a/src/com/amlogic/inputmethod/remote/Environment.java +++ b/src/com/amlogic/inputmethod/remote/Environment.java @@ -20,6 +20,7 @@ import android.content.Context; import android.content.res.Configuration; import android.view.Display; import android.view.WindowManager; +import android.app.SystemWriteManager; /** * Global environment configurations for showing soft keyboard and candidate @@ -115,7 +116,9 @@ public class Environment { } public void onConfigurationChanged(Configuration newConfig, Context context) { - if (mConfig.orientation != newConfig.orientation) { + //density and display-size will be change when switch outputmode between 1080 and 720, need to update configuration + SystemWriteManager sw = (SystemWriteManager) context.getSystemService("system_write"); + if ((mConfig.orientation != newConfig.orientation)||(sw.getPropertyBoolean("ro.platform.has.realoutputmode", false))) { WindowManager wm = (WindowManager) context .getSystemService(Context.WINDOW_SERVICE); Display d = wm.getDefaultDisplay(); diff --git a/src/com/amlogic/inputmethod/remote/RemoteIME.java b/src/com/amlogic/inputmethod/remote/RemoteIME.java index b30479a..a44d741 100755 --- a/src/com/amlogic/inputmethod/remote/RemoteIME.java +++ b/src/com/amlogic/inputmethod/remote/RemoteIME.java @@ -52,6 +52,7 @@ import android.widget.PopupWindow; import java.util.ArrayList; import java.util.List; import java.util.Vector; +import android.app.SystemWriteManager; /** * Main class of the Pinyin input method. @@ -174,6 +175,7 @@ public class RemoteIME extends InputMethodService { private Boolean mEnterEnabled; private Boolean mShiftTag = false; + private SystemWriteManager sw = null; // receive ringer mode changes private BroadcastReceiver mReceiver = new BroadcastReceiver() { @Override @@ -207,6 +209,8 @@ public class RemoteIME extends InputMethodService { mEnvironment.onConfigurationChanged(getResources().getConfiguration(), this); + + sw = (SystemWriteManager) getSystemService("system_write"); } @Override @@ -243,6 +247,12 @@ public class RemoteIME extends InputMethodService { if(newConfig.diff(env.getConfiguration()) != 0) super.onConfigurationChanged(newConfig); + + //density and display-size will be change when switch outputmode between 1080 and 720, need to update configuration + if(sw.getPropertyBoolean("ro.platform.has.realoutputmode", false)) + { + super.onConfigurationChanged(newConfig); + } resetToIdleState(false); } |