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
f8b39f39
Commit
f8b39f39
authored
13 years ago
by
Jean Chalard
Committed by
Android (Google) Code Review
13 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Remove a useless class (B4)"
parents
4b656a3f
f773ef19
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/ComposingStateManager.java
+0
-68
0 additions, 68 deletions
.../com/android/inputmethod/latin/ComposingStateManager.java
java/src/com/android/inputmethod/latin/LatinIME.java
+0
-10
0 additions, 10 deletions
java/src/com/android/inputmethod/latin/LatinIME.java
with
0 additions
and
78 deletions
java/src/com/android/inputmethod/latin/ComposingStateManager.java
deleted
100644 → 0
+
0
−
68
View file @
4b656a3f
/**
* Copyright (C) 2011 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package
com.android.inputmethod.latin
;
import
android.util.Log
;
public
class
ComposingStateManager
{
private
static
final
String
TAG
=
ComposingStateManager
.
class
.
getSimpleName
();
private
static
final
ComposingStateManager
sInstance
=
new
ComposingStateManager
();
private
boolean
mAutoCorrectionIndicatorOn
;
private
boolean
mIsComposing
;
public
static
ComposingStateManager
getInstance
()
{
return
sInstance
;
}
private
ComposingStateManager
()
{
mAutoCorrectionIndicatorOn
=
false
;
mIsComposing
=
false
;
}
public
synchronized
void
onStartComposingText
()
{
if
(!
mIsComposing
)
{
if
(
LatinImeLogger
.
sDBG
)
{
Log
.
i
(
TAG
,
"Start composing text."
);
}
mAutoCorrectionIndicatorOn
=
false
;
mIsComposing
=
true
;
}
}
public
synchronized
void
onFinishComposingText
()
{
if
(
mIsComposing
)
{
if
(
LatinImeLogger
.
sDBG
)
{
Log
.
i
(
TAG
,
"Finish composing text."
);
}
mAutoCorrectionIndicatorOn
=
false
;
mIsComposing
=
false
;
}
}
public
synchronized
boolean
isAutoCorrectionIndicatorOn
()
{
return
mAutoCorrectionIndicatorOn
;
}
public
synchronized
void
setAutoCorrectionIndicatorOn
(
boolean
on
)
{
// Auto-correction indicator should be specified only when the current state is "composing".
if
(!
mIsComposing
)
return
;
if
(
LatinImeLogger
.
sDBG
)
{
Log
.
i
(
TAG
,
"Set auto correction Indicator: "
+
on
);
}
mAutoCorrectionIndicatorOn
=
on
;
}
}
This diff is collapsed.
Click to expand it.
java/src/com/android/inputmethod/latin/LatinIME.java
+
0
−
10
View file @
f8b39f39
...
...
@@ -238,8 +238,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
// Keeps track of most recently inserted text (multi-character key) for reverting
private
CharSequence
mEnteredText
;
private
final
ComposingStateManager
mComposingStateManager
=
ComposingStateManager
.
getInstance
();
private
boolean
mIsAutoCorrectionIndicatorOn
;
public
final
UIHandler
mHandler
=
new
UIHandler
(
this
);
...
...
@@ -658,7 +656,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
@Override
public
void
onConfigurationChanged
(
Configuration
conf
)
{
mSubtypeSwitcher
.
onConfigurationChanged
(
conf
);
mComposingStateManager
.
onFinishComposingText
();
// If orientation changed while predicting, commit the change
if
(
mDisplayOrientation
!=
conf
.
orientation
)
{
mDisplayOrientation
=
conf
.
orientation
;
...
...
@@ -1149,7 +1146,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
// and the composingStateManager about it.
private
void
resetEntireInputState
()
{
resetComposingState
(
true
/* alsoResetLastComposedWord */
);
mComposingStateManager
.
onFinishComposingText
();
updateSuggestions
();
final
InputConnection
ic
=
getCurrentInputConnection
();
if
(
ic
!=
null
)
{
...
...
@@ -1590,7 +1586,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
// it entirely and resume suggestions on the previous word, we'd like to still
// have touch coordinates for it.
resetComposingState
(
false
/* alsoResetLastComposedWord */
);
mComposingStateManager
.
onFinishComposingText
();
clearSuggestions
();
}
}
...
...
@@ -1601,7 +1596,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
// If it's the first letter, make note of auto-caps state
if
(
mWordComposer
.
size
()
==
1
)
{
mWordComposer
.
setAutoCapitalized
(
getCurrentAutoCapsState
());
mComposingStateManager
.
onStartComposingText
();
}
ic
.
setComposingText
(
getTextWithUnderline
(
mWordComposer
.
getTypedWord
()),
1
);
}
...
...
@@ -1633,7 +1627,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
private
boolean
handleSeparator
(
final
int
primaryCode
,
final
int
x
,
final
int
y
,
final
int
spaceState
)
{
mVoiceProxy
.
handleSeparator
();
mComposingStateManager
.
onFinishComposingText
();
// Should dismiss the "Touch again to save" message when handling separator
if
(
mSuggestionsView
!=
null
&&
mSuggestionsView
.
dismissAddToDictionaryHint
())
{
...
...
@@ -1937,7 +1930,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
@Override
public
void
pickSuggestionManually
(
final
int
index
,
final
CharSequence
suggestion
)
{
mComposingStateManager
.
onFinishComposingText
();
final
SuggestedWords
suggestedWords
=
mSuggestionsView
.
getSuggestions
();
mVoiceProxy
.
flushAndLogAllTextModificationCounters
(
index
,
suggestion
,
mSettingsValues
.
mWordSeparators
);
...
...
@@ -2208,7 +2200,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
private
void
restartSuggestionsOnWordBeforeCursor
(
final
InputConnection
ic
,
final
CharSequence
word
)
{
mWordComposer
.
setComposingWord
(
word
,
mKeyboardSwitcher
.
getKeyboard
());
mComposingStateManager
.
onStartComposingText
();
ic
.
deleteSurroundingText
(
word
.
length
(),
0
);
ic
.
setComposingText
(
word
,
1
);
mHandler
.
postUpdateSuggestions
();
...
...
@@ -2240,7 +2231,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
// This is the case when we cancel a manual pick.
// We should restart suggestion on the word right away.
mWordComposer
.
resumeSuggestionOnLastComposedWord
(
mLastComposedWord
);
mComposingStateManager
.
onStartComposingText
();
ic
.
setComposingText
(
originallyTypedWord
,
1
);
}
else
{
ic
.
commitText
(
originallyTypedWord
,
1
);
...
...
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