Rename LatinKeyboardBaseView to LatinKeyboardView
Bug: 5182291 Change-Id: I5089a14902b9f4ff1ab4f34e3f7a42aca5040d3e
This commit is contained in:
parent
32572948d7
commit
c84bc3460d
8 changed files with 26 additions and 26 deletions
|
@ -35,7 +35,7 @@ import com.android.inputmethod.compat.InputTypeCompatUtils;
|
||||||
import com.android.inputmethod.compat.MotionEventCompatUtils;
|
import com.android.inputmethod.compat.MotionEventCompatUtils;
|
||||||
import com.android.inputmethod.keyboard.Key;
|
import com.android.inputmethod.keyboard.Key;
|
||||||
import com.android.inputmethod.keyboard.KeyDetector;
|
import com.android.inputmethod.keyboard.KeyDetector;
|
||||||
import com.android.inputmethod.keyboard.LatinKeyboardBaseView;
|
import com.android.inputmethod.keyboard.LatinKeyboardView;
|
||||||
import com.android.inputmethod.keyboard.PointerTracker;
|
import com.android.inputmethod.keyboard.PointerTracker;
|
||||||
|
|
||||||
public class AccessibleKeyboardViewProxy {
|
public class AccessibleKeyboardViewProxy {
|
||||||
|
@ -47,7 +47,7 @@ public class AccessibleKeyboardViewProxy {
|
||||||
|
|
||||||
private InputMethodService mInputMethod;
|
private InputMethodService mInputMethod;
|
||||||
private FlickGestureDetector mGestureDetector;
|
private FlickGestureDetector mGestureDetector;
|
||||||
private LatinKeyboardBaseView mView;
|
private LatinKeyboardView mView;
|
||||||
private AccessibleKeyboardActionListener mListener;
|
private AccessibleKeyboardActionListener mListener;
|
||||||
private AudioManagerCompatWrapper mAudioManager;
|
private AudioManagerCompatWrapper mAudioManager;
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ public class AccessibleKeyboardViewProxy {
|
||||||
return sInstance;
|
return sInstance;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setView(LatinKeyboardBaseView view) {
|
public static void setView(LatinKeyboardView view) {
|
||||||
sInstance.mView = view;
|
sInstance.mView = view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
|
||||||
private SharedPreferences mPrefs;
|
private SharedPreferences mPrefs;
|
||||||
|
|
||||||
private View mCurrentInputView;
|
private View mCurrentInputView;
|
||||||
private LatinKeyboardBaseView mKeyboardView;
|
private LatinKeyboardView mKeyboardView;
|
||||||
private LatinIME mInputMethodService;
|
private LatinIME mInputMethodService;
|
||||||
private String mPackageName;
|
private String mPackageName;
|
||||||
private Resources mResources;
|
private Resources mResources;
|
||||||
|
@ -745,7 +745,7 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public LatinKeyboardBaseView getKeyboardView() {
|
public LatinKeyboardView getKeyboardView() {
|
||||||
return mKeyboardView;
|
return mKeyboardView;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -781,7 +781,7 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mKeyboardView = (LatinKeyboardBaseView) mCurrentInputView.findViewById(R.id.keyboard_view);
|
mKeyboardView = (LatinKeyboardView) mCurrentInputView.findViewById(R.id.keyboard_view);
|
||||||
mKeyboardView.setKeyboardActionListener(mInputMethodService);
|
mKeyboardView.setKeyboardActionListener(mInputMethodService);
|
||||||
|
|
||||||
// This always needs to be set since the accessibility state can
|
// This always needs to be set since the accessibility state can
|
||||||
|
@ -819,7 +819,7 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
|
||||||
final LatinKeyboard keyboard = getLatinKeyboard();
|
final LatinKeyboard keyboard = getLatinKeyboard();
|
||||||
if (keyboard != null && keyboard.needsAutoCorrectionSpacebarLed()) {
|
if (keyboard != null && keyboard.needsAutoCorrectionSpacebarLed()) {
|
||||||
final Key invalidatedKey = keyboard.onAutoCorrectionStateChanged(isAutoCorrection);
|
final Key invalidatedKey = keyboard.onAutoCorrectionStateChanged(isAutoCorrection);
|
||||||
final LatinKeyboardBaseView keyboardView = getKeyboardView();
|
final LatinKeyboardView keyboardView = getKeyboardView();
|
||||||
if (keyboardView != null)
|
if (keyboardView != null)
|
||||||
keyboardView.invalidateKey(invalidatedKey);
|
keyboardView.invalidateKey(invalidatedKey);
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,7 +141,7 @@ public class LatinKeyboard extends Keyboard {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSpacebarTextFadeFactor(float fadeFactor, LatinKeyboardBaseView view) {
|
public void setSpacebarTextFadeFactor(float fadeFactor, LatinKeyboardView view) {
|
||||||
mSpacebarTextFadeFactor = fadeFactor;
|
mSpacebarTextFadeFactor = fadeFactor;
|
||||||
updateSpacebarForLocale(false);
|
updateSpacebarForLocale(false);
|
||||||
if (view != null)
|
if (view != null)
|
||||||
|
@ -154,7 +154,7 @@ public class LatinKeyboard extends Keyboard {
|
||||||
return newColor;
|
return newColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateShortcutKey(boolean available, LatinKeyboardBaseView view) {
|
public void updateShortcutKey(boolean available, LatinKeyboardView view) {
|
||||||
if (mShortcutKey == null)
|
if (mShortcutKey == null)
|
||||||
return;
|
return;
|
||||||
mShortcutKey.setEnabled(available);
|
mShortcutKey.setEnabled(available);
|
||||||
|
|
|
@ -52,9 +52,9 @@ import java.util.WeakHashMap;
|
||||||
* @attr ref R.styleable#KeyboardView_verticalCorrection
|
* @attr ref R.styleable#KeyboardView_verticalCorrection
|
||||||
* @attr ref R.styleable#KeyboardView_popupLayout
|
* @attr ref R.styleable#KeyboardView_popupLayout
|
||||||
*/
|
*/
|
||||||
public class LatinKeyboardBaseView extends KeyboardView implements PointerTracker.KeyEventHandler,
|
public class LatinKeyboardView extends KeyboardView implements PointerTracker.KeyEventHandler,
|
||||||
SuddenJumpingTouchEventHandler.ProcessMotionEvent {
|
SuddenJumpingTouchEventHandler.ProcessMotionEvent {
|
||||||
private static final String TAG = LatinKeyboardBaseView.class.getSimpleName();
|
private static final String TAG = LatinKeyboardView.class.getSimpleName();
|
||||||
|
|
||||||
private static final boolean ENABLE_CAPSLOCK_BY_DOUBLETAP = true;
|
private static final boolean ENABLE_CAPSLOCK_BY_DOUBLETAP = true;
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ public class LatinKeyboardBaseView extends KeyboardView implements PointerTracke
|
||||||
|
|
||||||
private final KeyTimerHandler mKeyTimerHandler = new KeyTimerHandler(this);
|
private final KeyTimerHandler mKeyTimerHandler = new KeyTimerHandler(this);
|
||||||
|
|
||||||
private static class KeyTimerHandler extends StaticInnerHandlerWrapper<LatinKeyboardBaseView>
|
private static class KeyTimerHandler extends StaticInnerHandlerWrapper<LatinKeyboardView>
|
||||||
implements TimerProxy {
|
implements TimerProxy {
|
||||||
private static final int MSG_REPEAT_KEY = 1;
|
private static final int MSG_REPEAT_KEY = 1;
|
||||||
private static final int MSG_LONGPRESS_KEY = 2;
|
private static final int MSG_LONGPRESS_KEY = 2;
|
||||||
|
@ -96,13 +96,13 @@ public class LatinKeyboardBaseView extends KeyboardView implements PointerTracke
|
||||||
|
|
||||||
private boolean mInKeyRepeat;
|
private boolean mInKeyRepeat;
|
||||||
|
|
||||||
public KeyTimerHandler(LatinKeyboardBaseView outerInstance) {
|
public KeyTimerHandler(LatinKeyboardView outerInstance) {
|
||||||
super(outerInstance);
|
super(outerInstance);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handleMessage(Message msg) {
|
public void handleMessage(Message msg) {
|
||||||
final LatinKeyboardBaseView keyboardView = getOuterInstance();
|
final LatinKeyboardView keyboardView = getOuterInstance();
|
||||||
final PointerTracker tracker = (PointerTracker) msg.obj;
|
final PointerTracker tracker = (PointerTracker) msg.obj;
|
||||||
switch (msg.what) {
|
switch (msg.what) {
|
||||||
case MSG_REPEAT_KEY:
|
case MSG_REPEAT_KEY:
|
||||||
|
@ -208,11 +208,11 @@ public class LatinKeyboardBaseView extends KeyboardView implements PointerTracke
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public LatinKeyboardBaseView(Context context, AttributeSet attrs) {
|
public LatinKeyboardView(Context context, AttributeSet attrs) {
|
||||||
this(context, attrs, R.attr.keyboardViewStyle);
|
this(context, attrs, R.attr.keyboardViewStyle);
|
||||||
}
|
}
|
||||||
|
|
||||||
public LatinKeyboardBaseView(Context context, AttributeSet attrs, int defStyle) {
|
public LatinKeyboardView(Context context, AttributeSet attrs, int defStyle) {
|
||||||
super(context, attrs, defStyle);
|
super(context, attrs, defStyle);
|
||||||
|
|
||||||
mTouchScreenRegulator = new SuddenJumpingTouchEventHandler(getContext(), this);
|
mTouchScreenRegulator = new SuddenJumpingTouchEventHandler(getContext(), this);
|
|
@ -41,7 +41,7 @@ public class PopupMiniKeyboardView extends KeyboardView implements PopupPanel {
|
||||||
private final KeyDetector mKeyDetector;
|
private final KeyDetector mKeyDetector;
|
||||||
private final int mVerticalCorrection;
|
private final int mVerticalCorrection;
|
||||||
|
|
||||||
private LatinKeyboardBaseView mParentKeyboardView;
|
private LatinKeyboardView mParentKeyboardView;
|
||||||
private int mOriginX;
|
private int mOriginX;
|
||||||
private int mOriginY;
|
private int mOriginY;
|
||||||
|
|
||||||
|
@ -200,7 +200,7 @@ public class PopupMiniKeyboardView extends KeyboardView implements PopupPanel {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void showPopupPanel(LatinKeyboardBaseView parentKeyboardView, Key parentKey,
|
public void showPopupPanel(LatinKeyboardView parentKeyboardView, Key parentKey,
|
||||||
PointerTracker tracker, PopupWindow window) {
|
PointerTracker tracker, PopupWindow window) {
|
||||||
mParentKeyboardView = parentKeyboardView;
|
mParentKeyboardView = parentKeyboardView;
|
||||||
final View container = (View)getParent();
|
final View container = (View)getParent();
|
||||||
|
|
|
@ -26,7 +26,7 @@ public interface PopupPanel extends PointerTracker.KeyEventHandler {
|
||||||
* @param tracker the pointer tracker that pressesd the parent key
|
* @param tracker the pointer tracker that pressesd the parent key
|
||||||
* @param window PopupWindow to be used to show this popup panel
|
* @param window PopupWindow to be used to show this popup panel
|
||||||
*/
|
*/
|
||||||
public void showPopupPanel(LatinKeyboardBaseView parentKeyboardView, Key parentKey,
|
public void showPopupPanel(LatinKeyboardView parentKeyboardView, Key parentKey,
|
||||||
PointerTracker tracker, PopupWindow window);
|
PointerTracker tracker, PopupWindow window);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -78,7 +78,7 @@ public class SuddenJumpingTouchEventHandler {
|
||||||
* the sudden moves subside, a DOWN event is simulated for the second key.
|
* the sudden moves subside, a DOWN event is simulated for the second key.
|
||||||
* @param me the motion event
|
* @param me the motion event
|
||||||
* @return true if the event was consumed, so that it doesn't continue to be handled by
|
* @return true if the event was consumed, so that it doesn't continue to be handled by
|
||||||
* {@link LatinKeyboardBaseView}.
|
* {@link LatinKeyboardView}.
|
||||||
*/
|
*/
|
||||||
private boolean handleSuddenJumping(MotionEvent me) {
|
private boolean handleSuddenJumping(MotionEvent me) {
|
||||||
if (!mNeedsSuddenJumpingHack)
|
if (!mNeedsSuddenJumpingHack)
|
||||||
|
|
|
@ -67,7 +67,7 @@ import com.android.inputmethod.keyboard.KeyboardSwitcher;
|
||||||
import com.android.inputmethod.keyboard.KeyboardSwitcher.KeyboardLayoutState;
|
import com.android.inputmethod.keyboard.KeyboardSwitcher.KeyboardLayoutState;
|
||||||
import com.android.inputmethod.keyboard.KeyboardView;
|
import com.android.inputmethod.keyboard.KeyboardView;
|
||||||
import com.android.inputmethod.keyboard.LatinKeyboard;
|
import com.android.inputmethod.keyboard.LatinKeyboard;
|
||||||
import com.android.inputmethod.keyboard.LatinKeyboardBaseView;
|
import com.android.inputmethod.keyboard.LatinKeyboardView;
|
||||||
|
|
||||||
import java.io.FileDescriptor;
|
import java.io.FileDescriptor;
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
|
@ -229,7 +229,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
|
||||||
public void handleMessage(Message msg) {
|
public void handleMessage(Message msg) {
|
||||||
final LatinIME latinIme = getOuterInstance();
|
final LatinIME latinIme = getOuterInstance();
|
||||||
final KeyboardSwitcher switcher = latinIme.mKeyboardSwitcher;
|
final KeyboardSwitcher switcher = latinIme.mKeyboardSwitcher;
|
||||||
final LatinKeyboardBaseView inputView = switcher.getKeyboardView();
|
final LatinKeyboardView inputView = switcher.getKeyboardView();
|
||||||
switch (msg.what) {
|
switch (msg.what) {
|
||||||
case MSG_UPDATE_SUGGESTIONS:
|
case MSG_UPDATE_SUGGESTIONS:
|
||||||
latinIme.updateSuggestions();
|
latinIme.updateSuggestions();
|
||||||
|
@ -330,7 +330,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
|
||||||
final LatinIME latinIme = getOuterInstance();
|
final LatinIME latinIme = getOuterInstance();
|
||||||
removeMessages(MSG_FADEOUT_LANGUAGE_ON_SPACEBAR);
|
removeMessages(MSG_FADEOUT_LANGUAGE_ON_SPACEBAR);
|
||||||
removeMessages(MSG_DISMISS_LANGUAGE_ON_SPACEBAR);
|
removeMessages(MSG_DISMISS_LANGUAGE_ON_SPACEBAR);
|
||||||
final LatinKeyboardBaseView inputView = latinIme.mKeyboardSwitcher.getKeyboardView();
|
final LatinKeyboardView inputView = latinIme.mKeyboardSwitcher.getKeyboardView();
|
||||||
if (inputView != null) {
|
if (inputView != null) {
|
||||||
final LatinKeyboard keyboard = latinIme.mKeyboardSwitcher.getLatinKeyboard();
|
final LatinKeyboard keyboard = latinIme.mKeyboardSwitcher.getLatinKeyboard();
|
||||||
// The language is always displayed when the delay is negative.
|
// The language is always displayed when the delay is negative.
|
||||||
|
@ -610,7 +610,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
|
||||||
}
|
}
|
||||||
|
|
||||||
final KeyboardSwitcher switcher = mKeyboardSwitcher;
|
final KeyboardSwitcher switcher = mKeyboardSwitcher;
|
||||||
LatinKeyboardBaseView inputView = switcher.getKeyboardView();
|
LatinKeyboardView inputView = switcher.getKeyboardView();
|
||||||
|
|
||||||
if (DEBUG) {
|
if (DEBUG) {
|
||||||
Log.d(TAG, "onStartInputView: attribute:" + ((attribute == null) ? "none"
|
Log.d(TAG, "onStartInputView: attribute:" + ((attribute == null) ? "none"
|
||||||
|
@ -1498,7 +1498,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
|
||||||
commitTyped(getCurrentInputConnection());
|
commitTyped(getCurrentInputConnection());
|
||||||
mVoiceProxy.handleClose();
|
mVoiceProxy.handleClose();
|
||||||
requestHideSelf(0);
|
requestHideSelf(0);
|
||||||
LatinKeyboardBaseView inputView = mKeyboardSwitcher.getKeyboardView();
|
LatinKeyboardView inputView = mKeyboardSwitcher.getKeyboardView();
|
||||||
if (inputView != null)
|
if (inputView != null)
|
||||||
inputView.closing();
|
inputView.closing();
|
||||||
}
|
}
|
||||||
|
@ -2070,7 +2070,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
|
||||||
if (!mSettingsValues.mVibrateOn) {
|
if (!mSettingsValues.mVibrateOn) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
LatinKeyboardBaseView inputView = mKeyboardSwitcher.getKeyboardView();
|
LatinKeyboardView inputView = mKeyboardSwitcher.getKeyboardView();
|
||||||
if (inputView != null) {
|
if (inputView != null) {
|
||||||
inputView.performHapticFeedback(
|
inputView.performHapticFeedback(
|
||||||
HapticFeedbackConstants.KEYBOARD_TAP,
|
HapticFeedbackConstants.KEYBOARD_TAP,
|
||||||
|
|
Loading…
Reference in a new issue