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
60d880cf
Commit
60d880cf
authored
10 years ago
by
Tadashi G. Takaoka
Browse files
Options
Downloads
Patches
Plain Diff
Remove unnecessary code of CustomInputStylePreference
Change-Id: I68d2c85139e01684d5f0705f621ba223fc5e4425
parent
bb4075bc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
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/CustomInputStylePreference.java
+0
-20
0 additions, 20 deletions
...nputmethod/latin/settings/CustomInputStylePreference.java
with
0 additions
and
20 deletions
java/src/com/android/inputmethod/latin/settings/CustomInputStylePreference.java
+
0
−
20
View file @
60d880cf
...
...
@@ -196,16 +196,6 @@ final class CustomInputStylePreference extends DialogPreference
}
}
private
static
int
getSpinnerPosition
(
final
Spinner
spinner
)
{
if
(
spinner
==
null
)
return
-
1
;
return
spinner
.
getSelectedItemPosition
();
}
private
static
void
setSpinnerPosition
(
final
Spinner
spinner
,
final
int
position
)
{
if
(
spinner
==
null
||
position
<
0
)
return
;
spinner
.
setSelection
(
position
);
}
@Override
protected
Parcelable
onSaveInstanceState
()
{
final
Parcelable
superState
=
super
.
onSaveInstanceState
();
...
...
@@ -216,8 +206,6 @@ final class CustomInputStylePreference extends DialogPreference
final
SavedState
myState
=
new
SavedState
(
superState
);
myState
.
mSubtype
=
mSubtype
;
myState
.
mSubtypeLocaleSelectedPos
=
getSpinnerPosition
(
mSubtypeLocaleSpinner
);
myState
.
mKeyboardLayoutSetSelectedPos
=
getSpinnerPosition
(
mKeyboardLayoutSetSpinner
);
return
myState
;
}
...
...
@@ -230,15 +218,11 @@ final class CustomInputStylePreference extends DialogPreference
final
SavedState
myState
=
(
SavedState
)
state
;
super
.
onRestoreInstanceState
(
myState
.
getSuperState
());
setSpinnerPosition
(
mSubtypeLocaleSpinner
,
myState
.
mSubtypeLocaleSelectedPos
);
setSpinnerPosition
(
mKeyboardLayoutSetSpinner
,
myState
.
mKeyboardLayoutSetSelectedPos
);
setSubtype
(
myState
.
mSubtype
);
}
static
final
class
SavedState
extends
Preference
.
BaseSavedState
{
InputMethodSubtype
mSubtype
;
int
mSubtypeLocaleSelectedPos
;
int
mKeyboardLayoutSetSelectedPos
;
public
SavedState
(
final
Parcelable
superState
)
{
super
(
superState
);
...
...
@@ -247,15 +231,11 @@ final class CustomInputStylePreference extends DialogPreference
@Override
public
void
writeToParcel
(
final
Parcel
dest
,
final
int
flags
)
{
super
.
writeToParcel
(
dest
,
flags
);
dest
.
writeInt
(
mSubtypeLocaleSelectedPos
);
dest
.
writeInt
(
mKeyboardLayoutSetSelectedPos
);
dest
.
writeParcelable
(
mSubtype
,
0
);
}
public
SavedState
(
final
Parcel
source
)
{
super
(
source
);
mSubtypeLocaleSelectedPos
=
source
.
readInt
();
mKeyboardLayoutSetSelectedPos
=
source
.
readInt
();
mSubtype
=
(
InputMethodSubtype
)
source
.
readParcelable
(
null
);
}
...
...
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