bug 876689 - Virtual keyboard does not invoke on text input field focus if 'Don't keep activities' is enabled r=jchen

This commit is contained in:
Brad Lassey
2013-06-06 14:05:06 -04:00
parent d0ca57bbdc
commit 18b50b54a9
6 changed files with 11 additions and 23 deletions

View File

@@ -43,12 +43,9 @@ class TextSelectionHandle extends ImageView implements View.OnTouchListener {
private static final int IMAGE_LEVEL_LTR = 0;
private static final int IMAGE_LEVEL_RTL = 1;
private GeckoApp mActivity;
public TextSelectionHandle(Context context, AttributeSet attrs) {
super(context, attrs);
setOnTouchListener(this);
mActivity = (GeckoApp) context;
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.TextSelectionHandle);
int handleType = a.getInt(R.styleable.TextSelectionHandle_handleType, 0x01);
@@ -76,7 +73,7 @@ class TextSelectionHandle extends ImageView implements View.OnTouchListener {
mTouchStartY = event.getY();
int[] rect = new int[2];
mActivity.getLayerView().getLocationOnScreen(rect);
GeckoAppShell.getLayerView().getLocationOnScreen(rect);
mLayerViewX = rect[0];
mLayerViewY = rect[1];
break;
@@ -111,7 +108,7 @@ class TextSelectionHandle extends ImageView implements View.OnTouchListener {
mLeft = newX - mLayerViewX - mTouchStartX;
mTop = newY - mLayerViewY - mTouchStartY;
LayerView layerView = mActivity.getLayerView();
LayerView layerView = GeckoAppShell.getLayerView();
if (layerView == null) {
Log.e(LOGTAG, "Can't move selection because layerView is null");
return;
@@ -142,7 +139,7 @@ class TextSelectionHandle extends ImageView implements View.OnTouchListener {
}
void positionFromGecko(int left, int top, boolean rtl) {
LayerView layerView = mActivity.getLayerView();
LayerView layerView = GeckoAppShell.getLayerView();
if (layerView == null) {
Log.e(LOGTAG, "Can't position handle because layerView is null");
return;