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
0100a49b
Commit
0100a49b
authored
10 years ago
by
Ken Wakasa
Committed by
Android (Google) Code Review
10 years ago
Browse files
Options
Downloads
Plain Diff
Merge "[HW5] Make the word composer package private."
parents
b10ca308
28ebbd48
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
java/src/com/android/inputmethod/latin/LatinIME.java
+1
-10
1 addition, 10 deletions
java/src/com/android/inputmethod/latin/LatinIME.java
java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
+19
-1
19 additions, 1 deletion
.../com/android/inputmethod/latin/inputlogic/InputLogic.java
with
20 additions
and
11 deletions
java/src/com/android/inputmethod/latin/LatinIME.java
+
1
−
10
View file @
0100a49b
...
@@ -686,16 +686,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
...
@@ -686,16 +686,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
final
SettingsValues
settingsValues
=
mSettings
.
getCurrent
();
final
SettingsValues
settingsValues
=
mSettings
.
getCurrent
();
if
(
settingsValues
.
mDisplayOrientation
!=
conf
.
orientation
)
{
if
(
settingsValues
.
mDisplayOrientation
!=
conf
.
orientation
)
{
mHandler
.
startOrientationChanging
();
mHandler
.
startOrientationChanging
();
// If !isComposingWord, #commitTyped() is a no-op, but still, it's better to avoid
mInputLogic
.
onOrientationChange
(
mSettings
.
getCurrent
());
// the useless IPC of {begin,end}BatchEdit.
if
(
mInputLogic
.
mWordComposer
.
isComposingWord
())
{
mInputLogic
.
mConnection
.
beginBatchEdit
();
// If we had a composition in progress, we need to commit the word so that the
// suggestionsSpan will be added. This will allow resuming on the same suggestions
// after rotation is finished.
mInputLogic
.
commitTyped
(
mSettings
.
getCurrent
(),
LastComposedWord
.
NOT_A_SEPARATOR
);
mInputLogic
.
mConnection
.
endBatchEdit
();
}
}
}
// TODO: Remove this test.
// TODO: Remove this test.
if
(!
conf
.
locale
.
equals
(
mPersonalizationDictionaryUpdater
.
getLocale
()))
{
if
(!
conf
.
locale
.
equals
(
mPersonalizationDictionaryUpdater
.
getLocale
()))
{
...
...
This diff is collapsed.
Click to expand it.
java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
+
19
−
1
View file @
0100a49b
...
@@ -80,7 +80,8 @@ public final class InputLogic {
...
@@ -80,7 +80,8 @@ public final class InputLogic {
private
final
DictionaryFacilitator
mDictionaryFacilitator
;
private
final
DictionaryFacilitator
mDictionaryFacilitator
;
public
LastComposedWord
mLastComposedWord
=
LastComposedWord
.
NOT_A_COMPOSED_WORD
;
public
LastComposedWord
mLastComposedWord
=
LastComposedWord
.
NOT_A_COMPOSED_WORD
;
public
final
WordComposer
mWordComposer
;
// This has package visibility so it can be accessed from InputLogicHandler.
/* package */
final
WordComposer
mWordComposer
;
public
final
RichInputConnection
mConnection
;
public
final
RichInputConnection
mConnection
;
private
final
RecapitalizeStatus
mRecapitalizeStatus
=
new
RecapitalizeStatus
();
private
final
RecapitalizeStatus
mRecapitalizeStatus
=
new
RecapitalizeStatus
();
...
@@ -151,6 +152,23 @@ public final class InputLogic {
...
@@ -151,6 +152,23 @@ public final class InputLogic {
startInput
(
combiningSpec
);
startInput
(
combiningSpec
);
}
}
/**
* Call this when the orientation changes.
* @param settingsValues the current values of the settings.
*/
public
void
onOrientationChange
(
final
SettingsValues
settingsValues
)
{
// If !isComposingWord, #commitTyped() is a no-op, but still, it's better to avoid
// the useless IPC of {begin,end}BatchEdit.
if
(
mWordComposer
.
isComposingWord
())
{
mConnection
.
beginBatchEdit
();
// If we had a composition in progress, we need to commit the word so that the
// suggestionsSpan will be added. This will allow resuming on the same suggestions
// after rotation is finished.
commitTyped
(
settingsValues
,
LastComposedWord
.
NOT_A_SEPARATOR
);
mConnection
.
endBatchEdit
();
}
}
/**
/**
* Clean up the input logic after input is finished.
* Clean up the input logic after input is finished.
*/
*/
...
...
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