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
18e15a1e
Commit
18e15a1e
authored
14 years ago
by
Ken Wakasa
Browse files
Options
Downloads
Patches
Plain Diff
Fix null token error
bug: 3499746 Change-Id: I76bd745b0623f4736c6b0aaf0ab42fd4b7c4f349
parent
8ba2ceea
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
+4
-1
4 additions, 1 deletion
java/src/com/android/inputmethod/latin/LatinIME.java
with
4 additions
and
1 deletion
java/src/com/android/inputmethod/latin/LatinIME.java
+
4
−
1
View file @
18e15a1e
...
...
@@ -39,6 +39,7 @@ import android.media.AudioManager;
import
android.net.ConnectivityManager
;
import
android.os.Debug
;
import
android.os.Handler
;
import
android.os.IBinder
;
import
android.os.Message
;
import
android.os.SystemClock
;
import
android.os.Vibrator
;
...
...
@@ -2263,6 +2264,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
private
void
showOptionsMenuInternal
(
CharSequence
title
,
CharSequence
[]
items
,
DialogInterface
.
OnClickListener
listener
)
{
final
IBinder
windowToken
=
mKeyboardSwitcher
.
getInputView
().
getWindowToken
();
if
(
windowToken
==
null
)
return
;
AlertDialog
.
Builder
builder
=
new
AlertDialog
.
Builder
(
this
);
builder
.
setCancelable
(
true
);
builder
.
setIcon
(
R
.
drawable
.
ic_dialog_keyboard
);
...
...
@@ -2273,7 +2276,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
mOptionsDialog
.
setCanceledOnTouchOutside
(
true
);
Window
window
=
mOptionsDialog
.
getWindow
();
WindowManager
.
LayoutParams
lp
=
window
.
getAttributes
();
lp
.
token
=
mKeyboardSwitcher
.
getInputView
().
getW
indowToken
()
;
lp
.
token
=
w
indowToken
;
lp
.
type
=
WindowManager
.
LayoutParams
.
TYPE_APPLICATION_ATTACHED_DIALOG
;
window
.
setAttributes
(
lp
);
window
.
addFlags
(
WindowManager
.
LayoutParams
.
FLAG_ALT_FOCUSABLE_IM
);
...
...
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