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
10a93dc8
Commit
10a93dc8
authored
10 years ago
by
Tadashi G. Takaoka
Browse files
Options
Downloads
Patches
Plain Diff
Add info log of custom input styles
Bug: 17622871 Change-Id: Ia97c7bc2f0923417b458b178fbd8776d5cd0758c
parent
dd052f00
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
java/src/com/android/inputmethod/latin/settings/CustomInputStyleSettingsFragment.java
+15
-3
15 additions, 3 deletions
...thod/latin/settings/CustomInputStyleSettingsFragment.java
with
15 additions
and
3 deletions
java/src/com/android/inputmethod/latin/settings/CustomInputStyleSettingsFragment.java
+
15
−
3
View file @
10a93dc8
...
...
@@ -32,6 +32,7 @@ import android.preference.PreferenceFragment;
import
android.preference.PreferenceGroup
;
import
android.support.v4.view.ViewCompat
;
import
android.text.TextUtils
;
import
android.util.Log
;
import
android.util.Pair
;
import
android.view.LayoutInflater
;
import
android.view.Menu
;
...
...
@@ -59,6 +60,12 @@ import java.util.ArrayList;
import
java.util.TreeSet
;
public
final
class
CustomInputStyleSettingsFragment
extends
PreferenceFragment
{
private
static
final
String
TAG
=
CustomInputStyleSettingsFragment
.
class
.
getSimpleName
();
private
static
final
boolean
DEBUG_SUBTYPE_ID
=
false
;
// Note: We would like to turn this debug flag true in order to see what input styles are
// defined in a bug-report.
private
static
final
boolean
DEBUG_CUSTOM_INPUT_STYLES
=
true
;
private
RichInputMethodManager
mRichImm
;
private
SharedPreferences
mPrefs
;
private
SubtypeLocaleAdapter
mSubtypeLocaleAdapter
;
...
...
@@ -96,8 +103,7 @@ public final class CustomInputStyleSettingsFragment extends PreferenceFragment {
}
static
final
class
SubtypeLocaleAdapter
extends
ArrayAdapter
<
SubtypeLocaleItem
>
{
private
static
final
String
TAG
=
SubtypeLocaleAdapter
.
class
.
getSimpleName
();
private
static
final
boolean
DEBUG_SUBTYPE_ID
=
false
;
private
static
final
String
TAG_SUBTYPE
=
SubtypeLocaleAdapter
.
class
.
getSimpleName
();
public
SubtypeLocaleAdapter
(
final
Context
context
)
{
super
(
context
,
android
.
R
.
layout
.
simple_spinner_item
);
...
...
@@ -110,7 +116,7 @@ public final class CustomInputStyleSettingsFragment extends PreferenceFragment {
for
(
int
i
=
0
;
i
<
count
;
i
++)
{
final
InputMethodSubtype
subtype
=
imi
.
getSubtypeAt
(
i
);
if
(
DEBUG_SUBTYPE_ID
)
{
android
.
util
.
Log
.
d
(
TAG
,
String
.
format
(
"%-6s 0x%08x %11d %s"
,
Log
.
d
(
TAG
_SUBTYPE
,
String
.
format
(
"%-6s 0x%08x %11d %s"
,
subtype
.
getLocale
(),
subtype
.
hashCode
(),
subtype
.
hashCode
(),
SubtypeLocaleUtils
.
getSubtypeDisplayNameInSystemLocale
(
subtype
)));
}
...
...
@@ -445,6 +451,9 @@ public final class CustomInputStyleSettingsFragment extends PreferenceFragment {
final
String
prefSubtypes
=
Settings
.
readPrefAdditionalSubtypes
(
mPrefs
,
getResources
());
if
(
DEBUG_CUSTOM_INPUT_STYLES
)
{
Log
.
i
(
TAG
,
"Load custom input styles: "
+
prefSubtypes
);
}
setPrefSubtypes
(
prefSubtypes
,
context
);
mIsAddingNewSubtype
=
(
savedInstanceState
!=
null
)
...
...
@@ -611,6 +620,9 @@ public final class CustomInputStyleSettingsFragment extends PreferenceFragment {
final
String
oldSubtypes
=
Settings
.
readPrefAdditionalSubtypes
(
mPrefs
,
getResources
());
final
InputMethodSubtype
[]
subtypes
=
getSubtypes
();
final
String
prefSubtypes
=
AdditionalSubtypeUtils
.
createPrefSubtypes
(
subtypes
);
if
(
DEBUG_CUSTOM_INPUT_STYLES
)
{
Log
.
i
(
TAG
,
"Save custom input styles: "
+
prefSubtypes
);
}
if
(
prefSubtypes
.
equals
(
oldSubtypes
))
{
return
;
}
...
...
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