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
1aa547d9
Commit
1aa547d9
authored
12 years ago
by
Tadashi G. Takaoka
Browse files
Options
Downloads
Patches
Plain Diff
Remove unused variables
Change-Id: I508679c2ad21b2624760d37a9503e21733964d4c
parent
95e3008d
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/Settings.java
+0
-2
0 additions, 2 deletions
java/src/com/android/inputmethod/latin/Settings.java
java/src/com/android/inputmethod/latin/SettingsValues.java
+10
-18
10 additions, 18 deletions
java/src/com/android/inputmethod/latin/SettingsValues.java
with
10 additions
and
20 deletions
java/src/com/android/inputmethod/latin/Settings.java
+
0
−
2
View file @
1aa547d9
...
...
@@ -135,7 +135,6 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang
public
static
int
readKeyPreviewPopupDismissDelay
(
final
SharedPreferences
prefs
,
final
Resources
res
)
{
// TODO: use mKeyPreviewPopupDismissDelayRawValue instead of reading it again here.
return
Integer
.
parseInt
(
prefs
.
getString
(
PREF_KEY_PREVIEW_POPUP_DISMISS_DELAY
,
Integer
.
toString
(
res
.
getInteger
(
R
.
integer
.
config_key_preview_linger_timeout
))));
...
...
@@ -186,7 +185,6 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang
}
public
static
boolean
readUsabilityStudyMode
(
final
SharedPreferences
prefs
)
{
// TODO: use mUsabilityStudyMode instead of reading it again here
return
prefs
.
getBoolean
(
DebugSettings
.
PREF_USABILITY_STUDY_MODE
,
true
);
}
...
...
This diff is collapsed.
Click to expand it.
java/src/com/android/inputmethod/latin/SettingsValues.java
+
10
−
18
View file @
1aa547d9
...
...
@@ -51,14 +51,8 @@ public final class SettingsValues {
public
final
boolean
mSoundOn
;
public
final
boolean
mKeyPreviewPopupOn
;
private
final
String
mVoiceMode
;
private
final
String
mAutoCorrectionThresholdRawValue
;
public
final
String
mShowSuggestionsSetting
;
@SuppressWarnings
(
"unused"
)
// TODO: Use this
private
final
boolean
mUsabilityStudyMode
;
public
final
boolean
mIncludesOtherImesInLanguageSwitchList
;
public
final
boolean
mShowsLanguageSwitchKey
;
@SuppressWarnings
(
"unused"
)
// TODO: Use this
private
final
String
mKeyPreviewPopupDismissDelayRawValue
;
public
final
boolean
mUseContactsDict
;
public
final
boolean
mUseDoubleSpacePeriod
;
// Use bigrams to predict the next word when there is no input for it yet
...
...
@@ -122,20 +116,15 @@ public final class SettingsValues {
final
String
voiceModeMain
=
res
.
getString
(
R
.
string
.
voice_mode_main
);
final
String
voiceModeOff
=
res
.
getString
(
R
.
string
.
voice_mode_off
);
mVoiceMode
=
prefs
.
getString
(
Settings
.
PREF_VOICE_MODE
,
voiceModeMain
);
mAutoCorrectionThresholdRawValue
=
prefs
.
getString
(
Settings
.
PREF_AUTO_CORRECTION_THRESHOLD
,
final
String
autoCorrectionThresholdRawValue
=
prefs
.
getString
(
Settings
.
PREF_AUTO_CORRECTION_THRESHOLD
,
res
.
getString
(
R
.
string
.
auto_correction_threshold_mode_index_modest
));
mShowSuggestionsSetting
=
prefs
.
getString
(
Settings
.
PREF_SHOW_SUGGESTIONS_SETTING
,
res
.
getString
(
R
.
string
.
prefs_suggestion_visibility_default_value
));
mUsabilityStudyMode
=
Settings
.
readUsabilityStudyMode
(
prefs
);
mIncludesOtherImesInLanguageSwitchList
=
prefs
.
getBoolean
(
Settings
.
PREF_INCLUDE_OTHER_IMES_IN_LANGUAGE_SWITCH_LIST
,
false
);
mShowsLanguageSwitchKey
=
Settings
.
readShowsLanguageSwitchKey
(
prefs
);
mKeyPreviewPopupDismissDelayRawValue
=
prefs
.
getString
(
Settings
.
PREF_KEY_PREVIEW_POPUP_DISMISS_DELAY
,
Integer
.
toString
(
res
.
getInteger
(
R
.
integer
.
config_key_preview_linger_timeout
)));
mUseContactsDict
=
prefs
.
getBoolean
(
Settings
.
PREF_KEY_USE_CONTACTS_DICT
,
true
);
mUseDoubleSpacePeriod
=
prefs
.
getBoolean
(
Settings
.
PREF_KEY_USE_DOUBLE_SPACE_PERIOD
,
true
);
mAutoCorrectEnabled
=
readAutoCorrectEnabled
(
res
,
mA
utoCorrectionThresholdRawValue
);
mAutoCorrectEnabled
=
readAutoCorrectEnabled
(
res
,
a
utoCorrectionThresholdRawValue
);
mBigramPredictionEnabled
=
readBigramPredictionEnabled
(
prefs
,
res
);
// Compute other readable settings
...
...
@@ -143,7 +132,7 @@ public final class SettingsValues {
mKeypressSoundVolume
=
Settings
.
readKeypressSoundVolume
(
prefs
,
res
);
mKeyPreviewPopupDismissDelay
=
Settings
.
readKeyPreviewPopupDismissDelay
(
prefs
,
res
);
mAutoCorrectionThreshold
=
readAutoCorrectionThreshold
(
res
,
mA
utoCorrectionThresholdRawValue
);
a
utoCorrectionThresholdRawValue
);
mVoiceKeyEnabled
=
mVoiceMode
!=
null
&&
!
mVoiceMode
.
equals
(
voiceModeOff
);
mVoiceKeyOnMain
=
mVoiceMode
!=
null
&&
mVoiceMode
.
equals
(
voiceModeMain
);
final
boolean
gestureInputEnabledByBuildConfig
=
res
.
getBoolean
(
...
...
@@ -154,7 +143,10 @@ public final class SettingsValues {
mGestureFloatingPreviewTextEnabled
=
prefs
.
getBoolean
(
Settings
.
PREF_GESTURE_FLOATING_PREVIEW_TEXT
,
true
);
mCorrectionEnabled
=
mAutoCorrectEnabled
&&
!
mInputAttributes
.
mInputTypeNoAutoCorrect
;
mSuggestionVisibility
=
createSuggestionVisibility
(
res
);
final
String
showSuggestionsSetting
=
prefs
.
getString
(
Settings
.
PREF_SHOW_SUGGESTIONS_SETTING
,
res
.
getString
(
R
.
string
.
prefs_suggestion_visibility_default_value
));
mSuggestionVisibility
=
createSuggestionVisibility
(
res
,
showSuggestionsSetting
);
}
public
boolean
isApplicationSpecifiedCompletionsOn
()
{
...
...
@@ -271,8 +263,8 @@ public final class SettingsValues {
SUGGESTION_VISIBILITY_HIDE_VALUE
};
private
int
createSuggestionVisibility
(
final
Resources
res
)
{
final
String
suggestionVisiblityStr
=
mShowSuggestionsSetting
;
private
static
int
createSuggestionVisibility
(
final
Resources
res
,
final
String
suggestionVisiblityStr
)
{
for
(
int
visibility
:
SUGGESTION_VISIBILITY_VALUE_ARRAY
)
{
if
(
suggestionVisiblityStr
.
equals
(
res
.
getString
(
visibility
)))
{
return
visibility
;
...
...
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