diff options
author | satok <satok@google.com> | 2011-07-18 20:43:24 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-07-18 20:43:24 -0700 |
commit | 35be3dee17fed3036ad40b9dd2ea3ee7504b3dc3 (patch) | |
tree | c295ad2d59001728269dfac6ff67be4e29aa62f0 /services/java/com | |
parent | 4273ed652ae9ea2af0a77b6d59a183ebce53a680 (diff) | |
parent | f90a33e92a7c8d4040c0e660a62336eb7293d785 (diff) | |
download | frameworks_base-35be3dee17fed3036ad40b9dd2ea3ee7504b3dc3.zip frameworks_base-35be3dee17fed3036ad40b9dd2ea3ee7504b3dc3.tar.gz frameworks_base-35be3dee17fed3036ad40b9dd2ea3ee7504b3dc3.tar.bz2 |
Merge "Hide "Configure input method" button when the screen is locked."
Diffstat (limited to 'services/java/com')
-rw-r--r-- | services/java/com/android/server/InputMethodManagerService.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/services/java/com/android/server/InputMethodManagerService.java b/services/java/com/android/server/InputMethodManagerService.java index 1a2cecd..2597978 100644 --- a/services/java/com/android/server/InputMethodManagerService.java +++ b/services/java/com/android/server/InputMethodManagerService.java @@ -35,6 +35,7 @@ import org.xmlpull.v1.XmlSerializer; import android.app.ActivityManagerNative; import android.app.AlertDialog; +import android.app.KeyguardManager; import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; @@ -161,6 +162,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub // Ongoing notification private final NotificationManager mNotificationManager; + private final KeyguardManager mKeyguardManager; private final Notification mImeSwitcherNotification; private final PendingIntent mImeSwitchPendingIntent; private final boolean mShowOngoingImeSwitcherForPhones; @@ -521,6 +523,8 @@ public class InputMethodManagerService extends IInputMethodManager.Stub } }); + mKeyguardManager = (KeyguardManager) + mContext.getSystemService(Context.KEYGUARD_SERVICE); mNotificationManager = (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE); mImeSwitcherNotification = new Notification(); @@ -2127,7 +2131,8 @@ public class InputMethodManagerService extends IInputMethodManager.Stub } }); - if (showSubtypes) { + if (showSubtypes && !(mKeyguardManager.isKeyguardLocked() + && mKeyguardManager.isKeyguardSecure())) { mDialogBuilder.setPositiveButton( com.android.internal.R.string.configure_input_methods, new DialogInterface.OnClickListener() { |