resolved conflicts for merge of 75513e51
to master
Change-Id: I058c3e63e5e349b58b2bdd2723cb43fbc24a0425
This commit is contained in:
commit
64176158e7
2 changed files with 24 additions and 24 deletions
|
@ -18,7 +18,6 @@ package com.android.inputmethod.keyboard;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.content.res.Configuration;
|
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
@ -257,13 +256,12 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onToggleEmojiKeyboard() {
|
public void onToggleEmojiKeyboard() {
|
||||||
if (mKeyboardLayoutSet == null) {
|
if (mKeyboardLayoutSet == null || !isShowingEmojiPalettes()) {
|
||||||
return;
|
mLatinIME.startShowingInputView();
|
||||||
}
|
|
||||||
if (isShowingEmojiPalettes()) {
|
|
||||||
setAlphabetKeyboard();
|
|
||||||
} else {
|
|
||||||
setEmojiKeyboard();
|
setEmojiKeyboard();
|
||||||
|
} else {
|
||||||
|
mLatinIME.stopShowingInputView();
|
||||||
|
setAlphabetKeyboard();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,6 @@ import android.view.WindowManager;
|
||||||
import android.view.inputmethod.CompletionInfo;
|
import android.view.inputmethod.CompletionInfo;
|
||||||
import android.view.inputmethod.CursorAnchorInfo;
|
import android.view.inputmethod.CursorAnchorInfo;
|
||||||
import android.view.inputmethod.EditorInfo;
|
import android.view.inputmethod.EditorInfo;
|
||||||
import android.view.inputmethod.InputMethod;
|
|
||||||
import android.view.inputmethod.InputMethodSubtype;
|
import android.view.inputmethod.InputMethodSubtype;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
@ -87,8 +86,8 @@ import com.android.inputmethod.latin.suggestions.SuggestionStripView;
|
||||||
import com.android.inputmethod.latin.suggestions.SuggestionStripViewAccessor;
|
import com.android.inputmethod.latin.suggestions.SuggestionStripViewAccessor;
|
||||||
import com.android.inputmethod.latin.utils.ApplicationUtils;
|
import com.android.inputmethod.latin.utils.ApplicationUtils;
|
||||||
import com.android.inputmethod.latin.utils.CapsModeUtils;
|
import com.android.inputmethod.latin.utils.CapsModeUtils;
|
||||||
import com.android.inputmethod.latin.utils.CursorAnchorInfoUtils;
|
|
||||||
import com.android.inputmethod.latin.utils.CoordinateUtils;
|
import com.android.inputmethod.latin.utils.CoordinateUtils;
|
||||||
|
import com.android.inputmethod.latin.utils.CursorAnchorInfoUtils;
|
||||||
import com.android.inputmethod.latin.utils.DialogUtils;
|
import com.android.inputmethod.latin.utils.DialogUtils;
|
||||||
import com.android.inputmethod.latin.utils.DistracterFilterCheckingExactMatchesAndSuggestions;
|
import com.android.inputmethod.latin.utils.DistracterFilterCheckingExactMatchesAndSuggestions;
|
||||||
import com.android.inputmethod.latin.utils.ImportantNoticeUtils;
|
import com.android.inputmethod.latin.utils.ImportantNoticeUtils;
|
||||||
|
@ -163,6 +162,9 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
private final SubtypeState mSubtypeState = new SubtypeState();
|
private final SubtypeState mSubtypeState = new SubtypeState();
|
||||||
private final SpecialKeyDetector mSpecialKeyDetector;
|
private final SpecialKeyDetector mSpecialKeyDetector;
|
||||||
private StatsUtilsManager mStatsUtilsManager;
|
private StatsUtilsManager mStatsUtilsManager;
|
||||||
|
// Working variable for {@link #startShowingInputView()} and
|
||||||
|
// {@link #onEvaluateInputViewShown()}.
|
||||||
|
private boolean mIsExecutingStartShowingInputView;
|
||||||
|
|
||||||
// Object for reacting to adding/removing a dictionary pack.
|
// Object for reacting to adding/removing a dictionary pack.
|
||||||
private final BroadcastReceiver mDictionaryPackInstallReceiver =
|
private final BroadcastReceiver mDictionaryPackInstallReceiver =
|
||||||
|
@ -1192,22 +1194,24 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
outInsets.visibleTopInsets = visibleTopY;
|
outInsets.visibleTopInsets = visibleTopY;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public void startShowingInputView() {
|
||||||
public boolean onEvaluateInputViewShown() {
|
mIsExecutingStartShowingInputView = true;
|
||||||
// Always show {@link InputView}.
|
// This {@link #showWindow(boolean)} will eventually call back
|
||||||
return true;
|
// {@link #onEvaluateInputViewShown()}.
|
||||||
|
showWindow(true /* showInput */);
|
||||||
|
mIsExecutingStartShowingInputView = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void stopShowingInputView() {
|
||||||
|
showWindow(false /* showInput */);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onShowInputRequested(final int flags, final boolean configChange) {
|
public boolean onEvaluateInputViewShown() {
|
||||||
final SettingsValues settingsValues = mSettings.getCurrent();
|
if (mIsExecutingStartShowingInputView) {
|
||||||
if ((flags & InputMethod.SHOW_EXPLICIT) == 0 && settingsValues.mHasHardwareKeyboard) {
|
|
||||||
// Even when IME is implicitly shown and physical keyboard is connected, we should
|
|
||||||
// show {@link InputView}.
|
|
||||||
// See {@link InputMethodService#onShowInputRequested(int,boolean)}.
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return super.onShowInputRequested(flags, configChange);
|
return super.onEvaluateInputViewShown();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1226,9 +1230,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
// hack for now. Let's get rid of this once the framework gets fixed.
|
// hack for now. Let's get rid of this once the framework gets fixed.
|
||||||
final EditorInfo ei = getCurrentInputEditorInfo();
|
final EditorInfo ei = getCurrentInputEditorInfo();
|
||||||
return !(ei != null && ((ei.imeOptions & EditorInfo.IME_FLAG_NO_EXTRACT_UI) != 0));
|
return !(ei != null && ((ei.imeOptions & EditorInfo.IME_FLAG_NO_EXTRACT_UI) != 0));
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1274,9 +1277,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
if (null == keyboard) {
|
if (null == keyboard) {
|
||||||
return CoordinateUtils.newCoordinateArray(codePoints.length,
|
return CoordinateUtils.newCoordinateArray(codePoints.length,
|
||||||
Constants.NOT_A_COORDINATE, Constants.NOT_A_COORDINATE);
|
Constants.NOT_A_COORDINATE, Constants.NOT_A_COORDINATE);
|
||||||
} else {
|
|
||||||
return keyboard.getCoordinates(codePoints);
|
|
||||||
}
|
}
|
||||||
|
return keyboard.getCoordinates(codePoints);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Callback for the {@link SuggestionStripView}, to call when the "add to dictionary" hint is
|
// Callback for the {@link SuggestionStripView}, to call when the "add to dictionary" hint is
|
||||||
|
|
Loading…
Reference in a new issue