mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-05-14 05:52:47 +00:00
Show suggestion strip on password input when paste enabled
This commit is contained in:
parent
31b4a28471
commit
ff7406fb98
2 changed files with 4 additions and 2 deletions
|
@ -1588,10 +1588,11 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
|||
currentSettingsValues.mInputAttributes.mShouldShowSuggestions
|
||||
&& currentSettingsValues.isSuggestionsEnabledPerUserSettings();
|
||||
final boolean shouldShowSuggestionsStripUnlessPassword = currentSettingsValues.mShowsVoiceInputKey
|
||||
|| currentSettingsValues.mShowsPasteKey
|
||||
|| shouldShowSuggestionCandidates
|
||||
|| currentSettingsValues.isApplicationSpecifiedCompletionsOn();
|
||||
final boolean shouldShowSuggestionsStrip = shouldShowSuggestionsStripUnlessPassword
|
||||
&& !currentSettingsValues.mInputAttributes.mIsPasswordField;
|
||||
&& (!currentSettingsValues.mInputAttributes.mIsPasswordField || currentSettingsValues.mShowsPasteKey);
|
||||
mSuggestionStripView.updateVisibility(shouldShowSuggestionsStrip, isFullscreenMode());
|
||||
if (!shouldShowSuggestionsStrip) {
|
||||
return;
|
||||
|
|
|
@ -443,7 +443,8 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
|
|||
}
|
||||
if (view == mPasteKey) {
|
||||
CharSequence selectionSequence = mListener.getSelection();
|
||||
if (selectionSequence != null && selectionSequence.length() > 0) {
|
||||
if (selectionSequence != null && selectionSequence.length() > 0
|
||||
&& !Settings.getInstance().getCurrent().mInputAttributes.mIsPasswordField) {
|
||||
ClipboardManager clipboardManager = (ClipboardManager) getContext().getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
clipboardManager.setPrimaryClip(ClipData.newPlainText(selectionSequence, selectionSequence));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue