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
eebbe541
Commit
eebbe541
authored
14 years ago
by
Ken Wakasa
Committed by
Android (Google) Code Review
14 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Fix password variation check code"
parents
80275c7d
16ee377b
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/LatinIME.java
+21
-7
21 additions, 7 deletions
java/src/com/android/inputmethod/latin/LatinIME.java
with
21 additions
and
7 deletions
java/src/com/android/inputmethod/latin/LatinIME.java
+
21
−
7
View file @
eebbe541
...
@@ -494,10 +494,24 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
...
@@ -494,10 +494,24 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
return
container
;
return
container
;
}
}
private
static
boolean
isPasswordVariation
(
int
variation
)
{
// Please refer to TextView.isPasswordInputType
return
variation
==
InputType
.
TYPE_TEXT_VARIATION_PASSWORD
private
static
boolean
isPasswordInputType
(
int
inputType
)
{
||
variation
==
InputType
.
TYPE_TEXT_VARIATION_VISIBLE_PASSWORD
final
int
variation
=
||
variation
==
InputType
.
TYPE_TEXT_VARIATION_WEB_PASSWORD
;
inputType
&
(
InputType
.
TYPE_MASK_CLASS
|
InputType
.
TYPE_MASK_VARIATION
);
return
(
variation
==
(
InputType
.
TYPE_CLASS_TEXT
|
InputType
.
TYPE_TEXT_VARIATION_PASSWORD
))
||
(
variation
==
(
InputType
.
TYPE_CLASS_TEXT
|
InputType
.
TYPE_TEXT_VARIATION_WEB_PASSWORD
))
||
(
variation
==
(
InputType
.
TYPE_CLASS_NUMBER
|
InputType
.
TYPE_NUMBER_VARIATION_PASSWORD
));
}
// Please refer to TextView.isVisiblePasswordInputType
private
static
boolean
isVisiblePasswordInputType
(
int
inputType
)
{
final
int
variation
=
inputType
&
(
InputType
.
TYPE_MASK_CLASS
|
InputType
.
TYPE_MASK_VARIATION
);
return
variation
==
(
InputType
.
TYPE_CLASS_TEXT
|
InputType
.
TYPE_TEXT_VARIATION_VISIBLE_PASSWORD
);
}
}
private
static
boolean
isEmailVariation
(
int
variation
)
{
private
static
boolean
isEmailVariation
(
int
variation
)
{
...
@@ -525,8 +539,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
...
@@ -525,8 +539,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// Most such things we decide below in initializeInputAttributesAndGetMode, but we need to
// Most such things we decide below in initializeInputAttributesAndGetMode, but we need to
// know now whether this is a password text field, because we need to know now whether we
// know now whether this is a password text field, because we need to know now whether we
// want to enable the voice button.
// want to enable the voice button.
mVoiceConnector
.
resetVoiceStates
(
isPassword
Variation
(
mVoiceConnector
.
resetVoiceStates
(
isPassword
InputType
(
attribute
.
inputType
)
attribute
.
inputType
&
InputType
.
TYPE_MASK_VARIATION
));
||
isVisiblePasswordInputType
(
attribute
.
inputType
));
final
int
mode
=
initializeInputAttributesAndGetMode
(
attribute
.
inputType
);
final
int
mode
=
initializeInputAttributesAndGetMode
(
attribute
.
inputType
);
...
@@ -583,7 +597,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
...
@@ -583,7 +597,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
case
InputType
.
TYPE_CLASS_TEXT
:
case
InputType
.
TYPE_CLASS_TEXT
:
mIsSettingsSuggestionStripOn
=
true
;
mIsSettingsSuggestionStripOn
=
true
;
// Make sure that passwords are not displayed in candidate view
// Make sure that passwords are not displayed in candidate view
if
(
isPassword
Variation
(
variation
))
{
if
(
isPassword
InputType
(
inputType
)
||
isVisiblePasswordInputType
(
inputType
))
{
mIsSettingsSuggestionStripOn
=
false
;
mIsSettingsSuggestionStripOn
=
false
;
}
}
if
(
isEmailVariation
(
variation
)
if
(
isEmailVariation
(
variation
)
...
...
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