blob: 367a7bd4aed70c43faca6bcd3aab414c0e0987d0 [file] [log] [blame]
Jim Millerdcb3d842012-08-23 19:18:12 -07001/*
2 * Copyright (C) 2012 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Jim Miller5ecd8112013-01-09 18:50:26 -080017package com.android.keyguard;
Jim Millerdcb3d842012-08-23 19:18:12 -070018
Wink Savilleb896b9f2013-10-23 15:44:26 -070019import android.app.AlertDialog;
20import android.app.AlertDialog.Builder;
Jim Millerdcb3d842012-08-23 19:18:12 -070021import android.app.Dialog;
22import android.app.ProgressDialog;
Gus Prevasab336792018-11-14 13:52:20 -050023import android.content.Context;
24import android.content.res.ColorStateList;
25import android.content.res.Configuration;
26import android.content.res.Resources;
Lucas Dupin2e838ac2019-04-17 16:50:58 -070027import android.content.res.TypedArray;
Jorim Jaggid05064b2014-11-20 21:35:33 +010028import android.graphics.Color;
Jim Millerdcb3d842012-08-23 19:18:12 -070029import android.os.RemoteException;
30import android.os.ServiceManager;
Jim Miller52a61332014-11-12 19:29:51 -080031import android.telephony.SubscriptionInfo;
32import android.telephony.SubscriptionManager;
33import android.telephony.TelephonyManager;
Jim Millerdcb3d842012-08-23 19:18:12 -070034import android.util.AttributeSet;
Wink Savilleb896b9f2013-10-23 15:44:26 -070035import android.util.Log;
qingxi12f2de42017-05-24 15:33:13 -070036import android.view.View;
Jim Millerdcb3d842012-08-23 19:18:12 -070037import android.view.WindowManager;
Jorim Jaggid05064b2014-11-20 21:35:33 +010038import android.widget.ImageView;
Jim Millerdcb3d842012-08-23 19:18:12 -070039
Gus Prevasab336792018-11-14 13:52:20 -050040import com.android.internal.telephony.ITelephony;
41import com.android.internal.telephony.IccCardConstants;
42import com.android.internal.telephony.IccCardConstants.State;
43import com.android.internal.telephony.PhoneConstants;
Sunny Goyal87fccf02019-08-13 17:39:10 -070044import com.android.systemui.R;
Gus Prevasab336792018-11-14 13:52:20 -050045
Jim Millerdcb3d842012-08-23 19:18:12 -070046/**
Daniel Sandler53149e62012-11-01 22:00:07 -040047 * Displays a PIN pad for unlocking.
Jim Millerdcb3d842012-08-23 19:18:12 -070048 */
Selim Cinek4e8b9ed2014-06-20 16:37:04 -070049public class KeyguardSimPinView extends KeyguardPinBasedInputView {
Wink Savilleb896b9f2013-10-23 15:44:26 -070050 private static final String LOG_TAG = "KeyguardSimPinView";
Jim Miller52a61332014-11-12 19:29:51 -080051 private static final boolean DEBUG = KeyguardConstants.DEBUG_SIM_STATES;
Jim Miller4fc2b012013-11-04 16:47:48 -080052 public static final String TAG = "KeyguardSimPinView";
Jim Millerdcb3d842012-08-23 19:18:12 -070053
Jim Millerd6c48842012-11-01 21:40:47 -070054 private ProgressDialog mSimUnlockProgressDialog = null;
Jim Miller4fc2b012013-11-04 16:47:48 -080055 private CheckSimPin mCheckSimPinThread;
Jim Millerd6c48842012-11-01 21:40:47 -070056
Ruthwar Kumar Ambeer118e5742017-03-09 18:46:17 +053057 // Below flag is set to true during power-up or when a new SIM card inserted on device.
58 // When this is true and when SIM card is PIN locked state, on PIN lock screen, message would
59 // be displayed to inform user about the number of remaining PIN attempts left.
60 private boolean mShowDefaultMessage = true;
61 private int mRemainingAttempts = -1;
Wink Savilleb896b9f2013-10-23 15:44:26 -070062 private AlertDialog mRemainingAttemptsDialog;
Ruthwar Kumar Ambeer118e5742017-03-09 18:46:17 +053063 private int mSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID;
Jorim Jaggid05064b2014-11-20 21:35:33 +010064 private ImageView mSimImageView;
Jim Miller52a61332014-11-12 19:29:51 -080065
66 KeyguardUpdateMonitorCallback mUpdateMonitorCallback = new KeyguardUpdateMonitorCallback() {
67 @Override
68 public void onSimStateChanged(int subId, int slotId, State simState) {
Brad Ebinger4cd3bdc2017-08-21 14:58:52 -070069 if (DEBUG) Log.v(TAG, "onSimStateChanged(subId=" + subId + ",state=" + simState + ")");
70 switch(simState) {
felkachangb48c1b42018-04-10 12:47:29 +080071 case READY: {
72 mRemainingAttempts = -1;
73 resetState();
74 break;
75 }
Brad Ebinger4cd3bdc2017-08-21 14:58:52 -070076 default:
77 resetState();
78 }
79 }
Jim Miller52a61332014-11-12 19:29:51 -080080 };
Wink Savilleb896b9f2013-10-23 15:44:26 -070081
Jim Millerd6c48842012-11-01 21:40:47 -070082 public KeyguardSimPinView(Context context) {
Jim Millerdcb3d842012-08-23 19:18:12 -070083 this(context, null);
84 }
85
86 public KeyguardSimPinView(Context context, AttributeSet attrs) {
87 super(context, attrs);
Jim Millerdcb3d842012-08-23 19:18:12 -070088 }
89
Jim Miller4db942c2016-05-16 18:06:50 -070090 @Override
Daniel Sandler53149e62012-11-01 22:00:07 -040091 public void resetState() {
Selim Cinek4e8b9ed2014-06-20 16:37:04 -070092 super.resetState();
Jim Miller52a61332014-11-12 19:29:51 -080093 if (DEBUG) Log.v(TAG, "Resetting state");
Ruthwar Kumar Ambeer118e5742017-03-09 18:46:17 +053094 handleSubInfoChangeIfNeeded();
95 if (mShowDefaultMessage) {
96 showDefaultMessage();
Jim Miller52a61332014-11-12 19:29:51 -080097 }
Ruthwar Kumar Ambeer118e5742017-03-09 18:46:17 +053098 boolean isEsimLocked = KeyguardEsimArea.isEsimLocked(mContext, mSubId);
99
qingxi12f2de42017-05-24 15:33:13 -0700100 KeyguardEsimArea esimButton = findViewById(R.id.keyguard_esim_area);
101 esimButton.setVisibility(isEsimLocked ? View.VISIBLE : View.GONE);
Daniel Sandler53149e62012-11-01 22:00:07 -0400102 }
103
Fabian Kozynski50df58d2019-03-05 10:45:59 -0500104 private void setLockedSimMessage() {
Ruthwar Kumar Ambeer118e5742017-03-09 18:46:17 +0530105 boolean isEsimLocked = KeyguardEsimArea.isEsimLocked(mContext, mSubId);
106 int count = TelephonyManager.getDefault().getSimCount();
107 Resources rez = getResources();
108 String msg;
Lucas Dupin2e838ac2019-04-17 16:50:58 -0700109 TypedArray array = mContext.obtainStyledAttributes(new int[] { R.attr.wallpaperTextColor });
110 int color = array.getColor(0, Color.WHITE);
111 array.recycle();
Ruthwar Kumar Ambeer118e5742017-03-09 18:46:17 +0530112 if (count < 2) {
113 msg = rez.getString(R.string.kg_sim_pin_instructions);
114 } else {
115 SubscriptionInfo info = KeyguardUpdateMonitor.getInstance(mContext).
116 getSubscriptionInfoForSubId(mSubId);
117 CharSequence displayName = info != null ? info.getDisplayName() : ""; // don't crash
118 msg = rez.getString(R.string.kg_sim_pin_instructions_multi, displayName);
119 if (info != null) {
120 color = info.getIconTint();
121 }
122 }
Ruthwar Kumar Ambeer118e5742017-03-09 18:46:17 +0530123 if (isEsimLocked) {
Qingxi Li2febffb2018-01-23 16:16:35 -0800124 msg = rez.getString(R.string.kg_sim_lock_esim_instructions, msg);
Ruthwar Kumar Ambeer118e5742017-03-09 18:46:17 +0530125 }
126
Lucas Dupin00ce73a2019-07-31 16:36:43 -0700127 if (mSecurityMessageDisplay != null && getVisibility() == VISIBLE) {
Lucas Dupin2e838ac2019-04-17 16:50:58 -0700128 mSecurityMessageDisplay.setMessage(msg);
129 }
Ruthwar Kumar Ambeer118e5742017-03-09 18:46:17 +0530130 mSimImageView.setImageTintList(ColorStateList.valueOf(color));
Fabian Kozynski50df58d2019-03-05 10:45:59 -0500131 }
132
133 private void showDefaultMessage() {
134 setLockedSimMessage();
135 if (mRemainingAttempts >= 0) {
136 return;
137 }
138
Ruthwar Kumar Ambeer118e5742017-03-09 18:46:17 +0530139 // Sending empty PIN here to query the number of remaining PIN attempts
140 new CheckSimPin("", mSubId) {
141 void onSimCheckResponse(final int result, final int attemptsRemaining) {
142 Log.d(LOG_TAG, "onSimCheckResponse " + " dummy One result" + result +
143 " attemptsRemaining=" + attemptsRemaining);
144 if (attemptsRemaining >= 0) {
145 mRemainingAttempts = attemptsRemaining;
Fabian Kozynski50df58d2019-03-05 10:45:59 -0500146 setLockedSimMessage();
Ruthwar Kumar Ambeer118e5742017-03-09 18:46:17 +0530147 }
148 }
149 }.start();
150 }
151
152 private void handleSubInfoChangeIfNeeded() {
153 KeyguardUpdateMonitor monitor = KeyguardUpdateMonitor.getInstance(mContext);
154 int subId = monitor.getNextSubIdForState(IccCardConstants.State.PIN_REQUIRED);
155 if (subId != mSubId && SubscriptionManager.isValidSubscriptionId(subId)) {
156 mSubId = subId;
157 mShowDefaultMessage = true;
158 mRemainingAttempts = -1;
159 }
160 }
161
Selim Cinek3122fa82015-06-18 01:38:59 -0700162 @Override
Jorim Jaggiad371b22015-09-23 11:52:12 -0700163 protected void onConfigurationChanged(Configuration newConfig) {
164 super.onConfigurationChanged(newConfig);
165 resetState();
166 }
167
168 @Override
Lucas Dupinc80c67e2017-12-04 14:29:10 -0800169 protected int getPromptReasonStringRes(int reason) {
Selim Cinek3122fa82015-06-18 01:38:59 -0700170 // No message on SIM Pin
171 return 0;
172 }
173
Ruthwar Kumar Ambeer118e5742017-03-09 18:46:17 +0530174 private String getPinPasswordErrorMessage(int attemptsRemaining, boolean isDefault) {
Wink Savilleb896b9f2013-10-23 15:44:26 -0700175 String displayMessage;
Ruthwar Kumar Ambeer118e5742017-03-09 18:46:17 +0530176 int msgId;
Wink Savilleb896b9f2013-10-23 15:44:26 -0700177 if (attemptsRemaining == 0) {
178 displayMessage = getContext().getString(R.string.kg_password_wrong_pin_code_pukked);
179 } else if (attemptsRemaining > 0) {
Ruthwar Kumar Ambeer118e5742017-03-09 18:46:17 +0530180 msgId = isDefault ? R.plurals.kg_password_default_pin_message :
181 R.plurals.kg_password_wrong_pin_code;
Wink Savilleb896b9f2013-10-23 15:44:26 -0700182 displayMessage = getContext().getResources()
Ruthwar Kumar Ambeer118e5742017-03-09 18:46:17 +0530183 .getQuantityString(msgId, attemptsRemaining, attemptsRemaining);
Wink Savilleb896b9f2013-10-23 15:44:26 -0700184 } else {
Ruthwar Kumar Ambeer118e5742017-03-09 18:46:17 +0530185 msgId = isDefault ? R.string.kg_sim_pin_instructions : R.string.kg_password_pin_failed;
186 displayMessage = getContext().getString(msgId);
Wink Savilleb896b9f2013-10-23 15:44:26 -0700187 }
Qingxi Li2febffb2018-01-23 16:16:35 -0800188 if (KeyguardEsimArea.isEsimLocked(mContext, mSubId)) {
189 displayMessage = getResources()
190 .getString(R.string.kg_sim_lock_esim_instructions, displayMessage);
191 }
Wink Savilleb896b9f2013-10-23 15:44:26 -0700192 if (DEBUG) Log.d(LOG_TAG, "getPinPasswordErrorMessage:"
193 + " attemptsRemaining=" + attemptsRemaining + " displayMessage=" + displayMessage);
194 return displayMessage;
195 }
196
Daniel Sandler53149e62012-11-01 22:00:07 -0400197 @Override
Jim Miller7d5e00a2013-10-11 22:45:57 -0700198 protected boolean shouldLockout(long deadline) {
199 // SIM PIN doesn't have a timed lockout
200 return false;
201 }
202
203 @Override
Daniel Sandler53149e62012-11-01 22:00:07 -0400204 protected int getPasswordTextViewId() {
Jorim Jaggifa9189f2014-04-17 20:17:30 +0200205 return R.id.simPinEntry;
Jim Millerdcb3d842012-08-23 19:18:12 -0700206 }
207
208 @Override
209 protected void onFinishInflate() {
210 super.onFinishInflate();
211
Jorim Jaggi40a0b382014-05-27 21:12:27 +0200212 if (mEcaView instanceof EmergencyCarrierArea) {
213 ((EmergencyCarrierArea) mEcaView).setCarrierTextVisible(true);
214 }
Alan Viverette51efddb2017-04-05 10:00:01 -0400215 mSimImageView = findViewById(R.id.keyguard_sim);
Jim Millerdcb3d842012-08-23 19:18:12 -0700216 }
217
Adam Cohen6fb841f2012-10-24 13:15:38 -0700218 @Override
Lucas Dupind1d60c32019-04-19 15:03:51 -0700219 public void showUsabilityHint() {
220
221 }
222
223 @Override
224 public void onResume(int reason) {
225 super.onResume(reason);
Jim Miller52a61332014-11-12 19:29:51 -0800226 KeyguardUpdateMonitor.getInstance(mContext).registerCallback(mUpdateMonitorCallback);
Lucas Dupin2e838ac2019-04-17 16:50:58 -0700227 resetState();
Jim Miller52a61332014-11-12 19:29:51 -0800228 }
229
230 @Override
Daniel Sandler53149e62012-11-01 22:00:07 -0400231 public void onPause() {
Jim Millerdcb3d842012-08-23 19:18:12 -0700232 // dismiss the dialog.
233 if (mSimUnlockProgressDialog != null) {
234 mSimUnlockProgressDialog.dismiss();
235 mSimUnlockProgressDialog = null;
236 }
Lucas Dupind1d60c32019-04-19 15:03:51 -0700237 KeyguardUpdateMonitor.getInstance(mContext).removeCallback(mUpdateMonitorCallback);
Jim Millerdcb3d842012-08-23 19:18:12 -0700238 }
239
240 /**
241 * Since the IPC can block, we want to run the request in a separate thread
242 * with a callback.
243 */
244 private abstract class CheckSimPin extends Thread {
245 private final String mPin;
Jim Miller52a61332014-11-12 19:29:51 -0800246 private int mSubId;
Jim Millerdcb3d842012-08-23 19:18:12 -0700247
Jim Miller52a61332014-11-12 19:29:51 -0800248 protected CheckSimPin(String pin, int subId) {
Jim Millerdcb3d842012-08-23 19:18:12 -0700249 mPin = pin;
Jim Miller52a61332014-11-12 19:29:51 -0800250 mSubId = subId;
Jim Millerdcb3d842012-08-23 19:18:12 -0700251 }
252
Wink Savilleb896b9f2013-10-23 15:44:26 -0700253 abstract void onSimCheckResponse(final int result, final int attemptsRemaining);
Jim Millerdcb3d842012-08-23 19:18:12 -0700254
255 @Override
256 public void run() {
257 try {
Jim Miller52a61332014-11-12 19:29:51 -0800258 if (DEBUG) {
259 Log.v(TAG, "call supplyPinReportResultForSubscriber(subid=" + mSubId + ")");
260 }
Wink Savilleb896b9f2013-10-23 15:44:26 -0700261 final int[] result = ITelephony.Stub.asInterface(ServiceManager
Jim Miller52a61332014-11-12 19:29:51 -0800262 .checkService("phone")).supplyPinReportResultForSubscriber(mSubId, mPin);
263 if (DEBUG) {
264 Log.v(TAG, "supplyPinReportResult returned: " + result[0] + " " + result[1]);
265 }
Jim Millerdcb3d842012-08-23 19:18:12 -0700266 post(new Runnable() {
Jim Miller4db942c2016-05-16 18:06:50 -0700267 @Override
Jim Millerdcb3d842012-08-23 19:18:12 -0700268 public void run() {
Wink Savilleb896b9f2013-10-23 15:44:26 -0700269 onSimCheckResponse(result[0], result[1]);
Jim Millerdcb3d842012-08-23 19:18:12 -0700270 }
271 });
272 } catch (RemoteException e) {
Jim Miller4fc2b012013-11-04 16:47:48 -0800273 Log.e(TAG, "RemoteException for supplyPinReportResult:", e);
Jim Millerdcb3d842012-08-23 19:18:12 -0700274 post(new Runnable() {
Jim Miller4db942c2016-05-16 18:06:50 -0700275 @Override
Jim Millerdcb3d842012-08-23 19:18:12 -0700276 public void run() {
Wink Savilleb896b9f2013-10-23 15:44:26 -0700277 onSimCheckResponse(PhoneConstants.PIN_GENERAL_FAILURE, -1);
Jim Millerdcb3d842012-08-23 19:18:12 -0700278 }
279 });
280 }
281 }
282 }
283
Jim Millerdcb3d842012-08-23 19:18:12 -0700284 private Dialog getSimUnlockProgressDialog() {
285 if (mSimUnlockProgressDialog == null) {
286 mSimUnlockProgressDialog = new ProgressDialog(mContext);
287 mSimUnlockProgressDialog.setMessage(
288 mContext.getString(R.string.kg_sim_unlock_progress_dialog_message));
289 mSimUnlockProgressDialog.setIndeterminate(true);
290 mSimUnlockProgressDialog.setCancelable(false);
Wink Savilleb896b9f2013-10-23 15:44:26 -0700291 mSimUnlockProgressDialog.getWindow().setType(
292 WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG);
Jim Millerdcb3d842012-08-23 19:18:12 -0700293 }
294 return mSimUnlockProgressDialog;
295 }
296
Wink Savilleb896b9f2013-10-23 15:44:26 -0700297 private Dialog getSimRemainingAttemptsDialog(int remaining) {
Ruthwar Kumar Ambeer118e5742017-03-09 18:46:17 +0530298 String msg = getPinPasswordErrorMessage(remaining, false);
Wink Savilleb896b9f2013-10-23 15:44:26 -0700299 if (mRemainingAttemptsDialog == null) {
300 Builder builder = new AlertDialog.Builder(mContext);
301 builder.setMessage(msg);
302 builder.setCancelable(false);
303 builder.setNeutralButton(R.string.ok, null);
304 mRemainingAttemptsDialog = builder.create();
305 mRemainingAttemptsDialog.getWindow().setType(
306 WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG);
307 } else {
308 mRemainingAttemptsDialog.setMessage(msg);
309 }
310 return mRemainingAttemptsDialog;
311 }
312
Daniel Sandler53149e62012-11-01 22:00:07 -0400313 @Override
314 protected void verifyPasswordAndUnlock() {
Selim Cinek4e8b9ed2014-06-20 16:37:04 -0700315 String entry = mPasswordEntry.getText();
Jim Miller7d5e00a2013-10-11 22:45:57 -0700316
Daniel Sandler53149e62012-11-01 22:00:07 -0400317 if (entry.length() < 4) {
Jim Millerdcb3d842012-08-23 19:18:12 -0700318 // otherwise, display a message to the user, and don't submit.
Adrian Roosdb327e92016-10-12 16:41:28 -0700319 mSecurityMessageDisplay.setMessage(R.string.kg_invalid_sim_pin_hint);
Jim Miller4db942c2016-05-16 18:06:50 -0700320 resetPasswordText(true /* animate */, true /* announce */);
Jorim Jaggib690f0d2014-07-03 23:25:44 +0200321 mCallback.userActivity();
Jim Millerdcb3d842012-08-23 19:18:12 -0700322 return;
323 }
324
325 getSimUnlockProgressDialog().show();
326
Jim Miller4fc2b012013-11-04 16:47:48 -0800327 if (mCheckSimPinThread == null) {
Jim Miller52a61332014-11-12 19:29:51 -0800328 mCheckSimPinThread = new CheckSimPin(mPasswordEntry.getText(), mSubId) {
Jim Miller4db942c2016-05-16 18:06:50 -0700329 @Override
Wink Savilleb896b9f2013-10-23 15:44:26 -0700330 void onSimCheckResponse(final int result, final int attemptsRemaining) {
Jim Miller4b09dd32012-09-04 14:27:25 -0700331 post(new Runnable() {
Jim Miller4db942c2016-05-16 18:06:50 -0700332 @Override
Jim Miller4b09dd32012-09-04 14:27:25 -0700333 public void run() {
Ruthwar Kumar Ambeer118e5742017-03-09 18:46:17 +0530334 mRemainingAttempts = attemptsRemaining;
Jim Miller4b09dd32012-09-04 14:27:25 -0700335 if (mSimUnlockProgressDialog != null) {
336 mSimUnlockProgressDialog.hide();
337 }
Jim Miller4db942c2016-05-16 18:06:50 -0700338 resetPasswordText(true /* animate */,
339 result != PhoneConstants.PIN_RESULT_SUCCESS /* announce */);
Wink Savilleb896b9f2013-10-23 15:44:26 -0700340 if (result == PhoneConstants.PIN_RESULT_SUCCESS) {
Jim Miller52a61332014-11-12 19:29:51 -0800341 KeyguardUpdateMonitor.getInstance(getContext())
342 .reportSimUnlocked(mSubId);
Ruthwar Kumar Ambeer118e5742017-03-09 18:46:17 +0530343 mRemainingAttempts = -1;
344 mShowDefaultMessage = true;
345 if (mCallback != null) {
346 mCallback.dismiss(true, KeyguardUpdateMonitor.getCurrentUser());
347 }
Jim Miller4b09dd32012-09-04 14:27:25 -0700348 } else {
Ruthwar Kumar Ambeer118e5742017-03-09 18:46:17 +0530349 mShowDefaultMessage = false;
Wink Savilleb896b9f2013-10-23 15:44:26 -0700350 if (result == PhoneConstants.PIN_PASSWORD_INCORRECT) {
351 if (attemptsRemaining <= 2) {
352 // this is getting critical - show dialog
353 getSimRemainingAttemptsDialog(attemptsRemaining).show();
354 } else {
355 // show message
356 mSecurityMessageDisplay.setMessage(
Ruthwar Kumar Ambeer118e5742017-03-09 18:46:17 +0530357 getPinPasswordErrorMessage(attemptsRemaining, false));
Wink Savilleb896b9f2013-10-23 15:44:26 -0700358 }
359 } else {
360 // "PIN operation failed!" - no idea what this was and no way to
361 // find out. :/
362 mSecurityMessageDisplay.setMessage(getContext().getString(
Adrian Roosdb327e92016-10-12 16:41:28 -0700363 R.string.kg_password_pin_failed));
Wink Savilleb896b9f2013-10-23 15:44:26 -0700364 }
365 if (DEBUG) Log.d(LOG_TAG, "verifyPasswordAndUnlock "
366 + " CheckSimPin.onSimCheckResponse: " + result
367 + " attemptsRemaining=" + attemptsRemaining);
Jim Miller4b09dd32012-09-04 14:27:25 -0700368 }
Jorim Jaggib690f0d2014-07-03 23:25:44 +0200369 mCallback.userActivity();
Jim Miller4fc2b012013-11-04 16:47:48 -0800370 mCheckSimPinThread = null;
Jim Millerdcb3d842012-08-23 19:18:12 -0700371 }
Jim Miller4b09dd32012-09-04 14:27:25 -0700372 });
373 }
Jim Miller4fc2b012013-11-04 16:47:48 -0800374 };
375 mCheckSimPinThread.start();
Jim Miller4b09dd32012-09-04 14:27:25 -0700376 }
Jim Millerdcb3d842012-08-23 19:18:12 -0700377 }
Jorim Jaggic14f8292014-05-27 02:25:45 +0200378
379 @Override
380 public void startAppearAnimation() {
381 // noop.
382 }
Jorim Jaggi76a16232014-08-08 17:00:47 +0200383
384 @Override
385 public boolean startDisappearAnimation(Runnable finishRunnable) {
386 return false;
387 }
Phil Weaver7d847b02018-02-13 16:02:35 -0800388
389 @Override
390 public CharSequence getTitle() {
391 return getContext().getString(
392 com.android.internal.R.string.keyguard_accessibility_sim_pin_unlock);
393 }
Jim Millerdcb3d842012-08-23 19:18:12 -0700394}
Daniel Sandler53149e62012-11-01 22:00:07 -0400395