summaryrefslogtreecommitdiff
authorlyra.lee <lyra.lee@amlogic.com>2011-07-28 13:54:47 (GMT)
committer lyra.lee <lyra.lee@amlogic.com>2011-07-28 13:54:47 (GMT)
commitdcaf35da4268b1a6f3968dcf548f51d59f20abf1 (patch)
tree879fdbc3f18d3e163ce3d08ddc03b05cb876d261
parentf6e35a4970cb6a90ab2565320335677ef3c7b09e (diff)
downloadRemoteIME-dcaf35da4268b1a6f3968dcf548f51d59f20abf1.zip
RemoteIME-dcaf35da4268b1a6f3968dcf548f51d59f20abf1.tar.gz
RemoteIME-dcaf35da4268b1a6f3968dcf548f51d59f20abf1.tar.bz2
remove changes in ime pos and size for skyworth
Diffstat
-rwxr-xr-xsrc/com/amlogic/inputmethod/remote/Environment.java46
-rwxr-xr-xsrc/com/amlogic/inputmethod/remote/RemoteIME.java15
-rwxr-xr-xsrc/com/amlogic/inputmethod/remote/SkbContainer.java4
3 files changed, 9 insertions, 56 deletions
diff --git a/src/com/amlogic/inputmethod/remote/Environment.java b/src/com/amlogic/inputmethod/remote/Environment.java
index 45ad425..d9598df 100755
--- a/src/com/amlogic/inputmethod/remote/Environment.java
+++ b/src/com/amlogic/inputmethod/remote/Environment.java
@@ -16,19 +16,10 @@
package com.amlogic.inputmethod.remote;
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-
import android.content.Context;
import android.content.res.Configuration;
-import android.os.SystemProperties;
-import android.util.Log;
import android.view.Display;
-import android.view.ViewGroup;
import android.view.WindowManager;
-import android.widget.FrameLayout;
/**
* Global environment configurations for showing soft keyboard and candidate
@@ -124,22 +115,12 @@ public class Environment {
}
public void onConfigurationChanged(Configuration newConfig, Context context) {
- // if (mConfig.orientation != newConfig.orientation) {
- Log.d("InputMethodService",
- "onConfigurationChange: isM1 = "+SystemProperties.get("ro.product.device", "m1ref").equals("m1ref")
- + ", is720p = "+is720P());
-
- if (SystemProperties.get("ro.product.device", "m1ref").equals("m1ref") && is720P()){
- mScreenWidth = 1280;
- mScreenHeight = 720;
- }
- else {
- WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
- Display d = wm.getDefaultDisplay();
- mScreenWidth = d.getWidth();
- mScreenHeight = d.getHeight();
- }
-
+ if (mConfig.orientation != newConfig.orientation) {
+ WindowManager wm = (WindowManager) context
+ .getSystemService(Context.WINDOW_SERVICE);
+ Display d = wm.getDefaultDisplay();
+ mScreenWidth = d.getWidth();
+ mScreenHeight = d.getHeight();
int scale;
if (mScreenHeight > mScreenWidth) {
@@ -157,7 +138,7 @@ public class Environment {
mFunctionBalloonTextSize = (int) (scale * FUNCTION_BALLOON_TEXT_SIZE_RATIO);
mKeyBalloonWidthPlus = (int) (scale * KEY_BALLOON_WIDTH_PLUS_RATIO);
mKeyBalloonHeightPlus = (int) (scale * KEY_BALLOON_HEIGHT_PLUS_RATIO);
- // }
+ }
mConfig.updateFrom(newConfig);
}
@@ -237,17 +218,4 @@ public class Environment {
public boolean needDebug() {
return mDebug;
}
-
- public static boolean is720P() {
- try {
- File f = new File("/sys/class/display/mode");
- BufferedReader buf = new BufferedReader(new FileReader(f) );
- String str = buf.readLine();
- buf.close();
- return "720p".equals(str);
- } catch (IOException e){
- e.printStackTrace();
- }
- return false;
- }
}
diff --git a/src/com/amlogic/inputmethod/remote/RemoteIME.java b/src/com/amlogic/inputmethod/remote/RemoteIME.java
index 8505c2e..b58a362 100755
--- a/src/com/amlogic/inputmethod/remote/RemoteIME.java
+++ b/src/com/amlogic/inputmethod/remote/RemoteIME.java
@@ -30,7 +30,6 @@ import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
import android.os.RemoteException;
-import android.os.SystemProperties;
import android.preference.PreferenceManager;
import android.util.Log;
import android.view.Gravity;
@@ -1223,23 +1222,9 @@ public class RemoteIME extends InputMethodService {
+ String.valueOf(editorInfo.inputType) + " Restarting:"
+ String.valueOf(restarting));
}
- onConfigureWindow(getWindow().getWindow(), false, false);
- mEnvironment.onConfigurationChanged(getResources().getConfiguration(),this);
- mSkbContainer.updateSkbLayout();
updateIcon(mInputModeSwitcher.requestInputWithSkb(editorInfo));
resetToIdleState(false);
mSkbContainer.updateInputMode();
-
- Log.d("InputMethodService",
- "onStartInputView: isM1 = "+SystemProperties.get("ro.product.device", "m1ref").equals("m1ref")
- + ", is720p = "+Environment.is720P());
-
- if (SystemProperties.get("ro.product.device", "m1ref").equals("m1ref")
- && Environment.is720P()){
- mSkbContainer.setPadding(0, 0, 0, 180);
- }
- else
- mSkbContainer.setPadding(0, 0, 0, 0);
setCandidatesViewShown(false);
mSkbContainer.requestFocus();
mSkbContainer.clearKeyFocus();
diff --git a/src/com/amlogic/inputmethod/remote/SkbContainer.java b/src/com/amlogic/inputmethod/remote/SkbContainer.java
index 5d59e4d..b10e7ec 100755
--- a/src/com/amlogic/inputmethod/remote/SkbContainer.java
+++ b/src/com/amlogic/inputmethod/remote/SkbContainer.java
@@ -266,7 +266,7 @@ public class SkbContainer extends RelativeLayout implements OnTouchListener {
return;
}
- public void updateSkbLayout() {
+ private void updateSkbLayout() {
int screenWidth = mEnvironment.getScreenWidth();
int keyHeight = mEnvironment.getKeyHeight();
int skbHeight = mEnvironment.getSkbHeight();
@@ -421,7 +421,7 @@ public class SkbContainer extends RelativeLayout implements OnTouchListener {
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
Environment env = Environment.getInstance();
int measuredWidth = env.getScreenWidth();
- int measuredHeight = getPaddingTop() + getPaddingBottom();
+ int measuredHeight = getPaddingTop();
measuredHeight += env.getSkbHeight();
widthMeasureSpec = MeasureSpec.makeMeasureSpec(measuredWidth,
MeasureSpec.EXACTLY);