summaryrefslogtreecommitdiff
path: root/services/java/com/android/server/InputMethodManagerService.java
diff options
context:
space:
mode:
authorsatok <satok@google.com>2011-07-19 11:55:52 +0900
committersatok <satok@google.com>2011-07-19 12:21:39 +0900
commitf90a33e92a7c8d4040c0e660a62336eb7293d785 (patch)
tree68f2cb87cd35d7f4a4a08ad538ff67926cd3272d /services/java/com/android/server/InputMethodManagerService.java
parentbd029f64f2c695d49ea169f4c5c107e8172a1de5 (diff)
Hide "Configure input method" button when the screen is locked.
Bug: 5022109 Change-Id: I5c6b59044d03b3f0335de1f602d1c3749b038c75
Diffstat (limited to 'services/java/com/android/server/InputMethodManagerService.java')
-rw-r--r--services/java/com/android/server/InputMethodManagerService.java7
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 18d393fde2f7..93ece705cd95 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;
@@ -160,6 +161,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;
@@ -520,6 +522,8 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
}
});
+ mKeyguardManager = (KeyguardManager)
+ mContext.getSystemService(Context.KEYGUARD_SERVICE);
mNotificationManager = (NotificationManager)
mContext.getSystemService(Context.NOTIFICATION_SERVICE);
mImeSwitcherNotification = new Notification();
@@ -2118,7 +2122,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() {