Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LatinIME
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
keyboard
LatinIME
Commits
aa906c36
Commit
aa906c36
authored
12 years ago
by
Jean Chalard
Browse files
Options
Downloads
Patches
Plain Diff
Handle correctly the restarting argument
Bug: 6851364 Change-Id: Ie939a43b8527a76aec213b702d3d850717f22a81
parent
e863fb71
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
java/src/com/android/inputmethod/latin/LatinIME.java
+30
-16
30 additions, 16 deletions
java/src/com/android/inputmethod/latin/LatinIME.java
with
30 additions
and
16 deletions
java/src/com/android/inputmethod/latin/LatinIME.java
+
30
−
16
View file @
aa906c36
...
...
@@ -659,35 +659,49 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
accessUtils
.
onStartInputViewInternal
(
editorInfo
,
restarting
);
}
mSubtypeSwitcher
.
updateParametersOnStartInputView
();
if
(!
restarting
)
{
mSubtypeSwitcher
.
updateParametersOnStartInputView
();
}
// The EditorInfo might have a flag that affects fullscreen mode.
// Note: This call should be done by InputMethodService?
updateFullscreenMode
();
mLastSelectionStart
=
editorInfo
.
initialSelStart
;
mLastSelectionEnd
=
editorInfo
.
initialSelEnd
;
mApplicationSpecifiedCompletions
=
null
;
inputView
.
closing
();
mEnteredText
=
null
;
resetComposingState
(
true
/* alsoResetLastComposedWord */
);
mDeleteCount
=
0
;
mSpaceState
=
SPACE_STATE_NONE
;
loadSettings
();
final
boolean
selectionChanged
=
mLastSelectionStart
!=
editorInfo
.
initialSelStart
||
mLastSelectionEnd
!=
editorInfo
.
initialSelEnd
;
if
(!
restarting
||
selectionChanged
)
{
// If the selection changed, we reset the input state. Essentially, we come here with
// restarting == true when the app called setText() or similar. We should reset the
// state if the app set the text to something else, but keep it if it set a suggestion
// or something.
mEnteredText
=
null
;
resetComposingState
(
true
/* alsoResetLastComposedWord */
);
mDeleteCount
=
0
;
mSpaceState
=
SPACE_STATE_NONE
;
if
(
mSuggest
!=
null
&&
mCurrentSettings
.
mCorrectionEnabled
)
{
mSuggest
.
setAutoCorrectionThreshold
(
mCurrentSettings
.
mAutoCorrectionThreshold
);
if
(
mSuggestionStripView
!=
null
)
{
mSuggestionStripView
.
clear
();
}
}
switcher
.
loadKeyboard
(
editorInfo
,
mCurrentSettings
);
updateKeyboardViewGestureHandlingModeByMainDictionaryAvailability
();
if
(!
restarting
)
{
inputView
.
closing
();
loadSettings
();
if
(
mSuggestionStripView
!=
null
)
mSuggestionStripView
.
clear
();
if
(
mSuggest
!=
null
&&
mCurrentSettings
.
mCorrectionEnabled
)
{
mSuggest
.
setAutoCorrectionThreshold
(
mCurrentSettings
.
mAutoCorrectionThreshold
);
}
switcher
.
loadKeyboard
(
editorInfo
,
mCurrentSettings
);
updateKeyboardViewGestureHandlingModeByMainDictionaryAvailability
();
}
setSuggestionStripShownInternal
(
isSuggestionsStripVisible
(),
/* needsInputViewShown */
false
);
mLastSelectionStart
=
editorInfo
.
initialSelStart
;
mLastSelectionEnd
=
editorInfo
.
initialSelEnd
;
mHandler
.
cancelUpdateSuggestionStrip
();
mHandler
.
cancelDoubleSpacesTimer
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment