Remove a member (B5)
The new call in the test ensures getCurrentInputEditorInfo actually works. Change-Id: I2ee407bd9927d22db537d12f339e2b977a38054amain
parent
64e52051cf
commit
b0561ae980
|
@ -122,7 +122,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
private int mSpaceState;
|
private int mSpaceState;
|
||||||
|
|
||||||
private SettingsValues mCurrentSettings;
|
private SettingsValues mCurrentSettings;
|
||||||
private InputAttributes mInputAttributes;
|
|
||||||
|
|
||||||
private View mExtractArea;
|
private View mExtractArea;
|
||||||
private View mKeyPreviewBackingView;
|
private View mKeyPreviewBackingView;
|
||||||
|
@ -428,10 +427,12 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
// Note that the calling sequence of onCreate() and onCurrentInputMethodSubtypeChanged()
|
// Note that the calling sequence of onCreate() and onCurrentInputMethodSubtypeChanged()
|
||||||
// is not guaranteed. It may even be called at the same time on a different thread.
|
// is not guaranteed. It may even be called at the same time on a different thread.
|
||||||
if (null == mPrefs) mPrefs = PreferenceManager.getDefaultSharedPreferences(this);
|
if (null == mPrefs) mPrefs = PreferenceManager.getDefaultSharedPreferences(this);
|
||||||
|
final InputAttributes inputAttributes =
|
||||||
|
new InputAttributes(getCurrentInputEditorInfo(), isFullscreenMode());
|
||||||
final RunInLocale<SettingsValues> job = new RunInLocale<SettingsValues>() {
|
final RunInLocale<SettingsValues> job = new RunInLocale<SettingsValues>() {
|
||||||
@Override
|
@Override
|
||||||
protected SettingsValues job(Resources res) {
|
protected SettingsValues job(Resources res) {
|
||||||
return new SettingsValues(mPrefs, mInputAttributes, LatinIME.this);
|
return new SettingsValues(mPrefs, inputAttributes, LatinIME.this);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
mCurrentSettings = job.runInLocale(mResources, mSubtypeSwitcher.getCurrentSubtypeLocale());
|
mCurrentSettings = job.runInLocale(mResources, mSubtypeSwitcher.getCurrentSubtypeLocale());
|
||||||
|
@ -674,7 +675,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
updateFullscreenMode();
|
updateFullscreenMode();
|
||||||
mLastSelectionStart = editorInfo.initialSelStart;
|
mLastSelectionStart = editorInfo.initialSelStart;
|
||||||
mLastSelectionEnd = editorInfo.initialSelEnd;
|
mLastSelectionEnd = editorInfo.initialSelEnd;
|
||||||
mInputAttributes = new InputAttributes(editorInfo, isFullscreenMode());
|
|
||||||
mApplicationSpecifiedCompletions = null;
|
mApplicationSpecifiedCompletions = null;
|
||||||
|
|
||||||
inputView.closing();
|
inputView.closing();
|
||||||
|
|
|
@ -130,11 +130,11 @@ public class InputTestsBase extends ServiceTestCase<LatinIME> {
|
||||||
(LayoutInflater)getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
(LayoutInflater)getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||||
final ViewGroup vg = new FrameLayout(getContext());
|
final ViewGroup vg = new FrameLayout(getContext());
|
||||||
final View inputView = inflater.inflate(R.layout.input_view, vg);
|
final View inputView = inflater.inflate(R.layout.input_view, vg);
|
||||||
|
mLatinIME.onCreateInputMethodInterface().startInput(ic, ei);
|
||||||
mLatinIME.setInputView(inputView);
|
mLatinIME.setInputView(inputView);
|
||||||
mLatinIME.onBindInput();
|
mLatinIME.onBindInput();
|
||||||
mLatinIME.onCreateInputView();
|
mLatinIME.onCreateInputView();
|
||||||
mLatinIME.onStartInputView(ei, false);
|
mLatinIME.onStartInputView(ei, false);
|
||||||
mLatinIME.onCreateInputMethodInterface().startInput(ic, ei);
|
|
||||||
mInputConnection = ic;
|
mInputConnection = ic;
|
||||||
mKeyboard = mLatinIME.mKeyboardSwitcher.getKeyboard();
|
mKeyboard = mLatinIME.mKeyboardSwitcher.getKeyboard();
|
||||||
changeLanguage("en_US");
|
changeLanguage("en_US");
|
||||||
|
|
Loading…
Reference in New Issue