Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
packages_apps_Settings
Commits
ef283b41
Commit
ef283b41
authored
13 years ago
by
satok
Browse files
Options
Download
Email Patches
Plain Diff
Add debug code to spell checker settings
Change-Id: Iab3bee33e4d6bd19c30e20591d6a2f08e1cff157
parent
e36f1c58
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
src/com/android/settings/inputmethod/SingleSpellCheckerPreference.java
...id/settings/inputmethod/SingleSpellCheckerPreference.java
+8
-0
src/com/android/settings/inputmethod/SpellCheckersSettings.java
...m/android/settings/inputmethod/SpellCheckersSettings.java
+8
-0
No files found.
src/com/android/settings/inputmethod/SingleSpellCheckerPreference.java
View file @
ef283b41
...
...
@@ -25,6 +25,7 @@ import android.content.res.Resources;
import
android.preference.Preference
;
import
android.provider.Settings
;
import
android.text.TextUtils
;
import
android.util.Log
;
import
android.view.View
;
import
android.view.View.OnClickListener
;
import
android.view.textservice.SpellCheckerInfo
;
...
...
@@ -36,6 +37,8 @@ import android.widget.TextView;
public
class
SingleSpellCheckerPreference
extends
Preference
{
private
static
final
float
DISABLED_ALPHA
=
0.4f
;
private
static
final
String
TAG
=
SingleSpellCheckerPreference
.
class
.
getSimpleName
();
private
static
final
boolean
DBG
=
false
;
private
final
SpellCheckerInfo
mSpellCheckerInfo
;
...
...
@@ -157,6 +160,11 @@ public class SingleSpellCheckerPreference extends Preference {
}
else
{
mTsm
.
setSpellCheckerSubtype
(
mSpellCheckerInfo
.
getSubtypeAt
(
which
-
1
));
}
if
(
DBG
)
{
final
SpellCheckerSubtype
subtype
=
mTsm
.
getCurrentSpellCheckerSubtype
(
true
);
Log
.
d
(
TAG
,
"Current spell check locale is "
+
subtype
==
null
?
"null"
:
subtype
.
getLocale
());
}
dialog
.
dismiss
();
}
});
...
...
This diff is collapsed.
Click to expand it.
src/com/android/settings/inputmethod/SpellCheckersSettings.java
View file @
ef283b41
...
...
@@ -24,13 +24,17 @@ import android.content.pm.PackageManager;
import
android.os.Bundle
;
import
android.preference.Preference
;
import
android.preference.PreferenceScreen
;
import
android.util.Log
;
import
android.view.textservice.SpellCheckerInfo
;
import
android.view.textservice.SpellCheckerSubtype
;
import
android.view.textservice.TextServicesManager
;
import
java.util.ArrayList
;
public
class
SpellCheckersSettings
extends
SettingsPreferenceFragment
implements
Preference
.
OnPreferenceClickListener
{
private
static
final
String
TAG
=
SpellCheckersSettings
.
class
.
getSimpleName
();
private
static
final
boolean
DBG
=
false
;
private
SpellCheckerInfo
mCurrentSci
;
private
SpellCheckerInfo
[]
mEnabledScis
;
...
...
@@ -98,6 +102,10 @@ public class SpellCheckersSettings extends SettingsPreferenceFragment
mTsm
.
setCurrentSpellChecker
(
scp
.
getSpellCheckerInfo
());
}
}
if
(
DBG
)
{
Log
.
d
(
TAG
,
"Current spell check is "
+
SpellCheckerUtils
.
getCurrentSpellChecker
(
mTsm
).
getId
());
}
updateScreen
();
return
true
;
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment