KeyguardManager.java revision d7d2d43b4967bb907b61180aa9d12ca51aaa15e2
19066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project/* 29066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Copyright (C) 2007 The Android Open Source Project 39066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * 49066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Licensed under the Apache License, Version 2.0 (the "License"); 59066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * you may not use this file except in compliance with the License. 69066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * You may obtain a copy of the License at 79066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * 89066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * http://www.apache.org/licenses/LICENSE-2.0 99066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * 109066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Unless required by applicable law or agreed to in writing, software 119066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * distributed under the License is distributed on an "AS IS" BASIS, 129066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 139066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * See the License for the specific language governing permissions and 149066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * limitations under the License. 159066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 169066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 179066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectpackage android.app; 189066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 199066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectimport android.os.Binder; 209066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectimport android.os.RemoteException; 219066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectimport android.os.IBinder; 229066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectimport android.view.IWindowManager; 239066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectimport android.view.IOnKeyguardExitResult; 2498365d7663cbd82979a5700faf0050220b01084dJeff Brownimport android.view.WindowManagerGlobal; 259066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 269066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project/** 279066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Class that can be used to lock and unlock the keyboard. Get an instance of this 289066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * class by calling {@link android.content.Context#getSystemService(java.lang.String)} 299066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * with argument {@link android.content.Context#KEYGUARD_SERVICE}. The 3037fde0aca01fcfcd8483df70a4e82f622e15fda2Jean-Michel Trivi * actual class to control the keyboard locking is 319066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * {@link android.app.KeyguardManager.KeyguardLock}. 329066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 339066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectpublic class KeyguardManager { 349066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project private IWindowManager mWM; 359066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 369066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 379567a66a5e6f49dd8495fb5f6e2efb9f32e84b35Dianne Hackborn * @deprecated Use {@link android.view.WindowManager.LayoutParams#FLAG_DISMISS_KEYGUARD} 389567a66a5e6f49dd8495fb5f6e2efb9f32e84b35Dianne Hackborn * and/or {@link android.view.WindowManager.LayoutParams#FLAG_SHOW_WHEN_LOCKED} 399567a66a5e6f49dd8495fb5f6e2efb9f32e84b35Dianne Hackborn * instead; this allows you to seamlessly hide the keyguard as your application 409567a66a5e6f49dd8495fb5f6e2efb9f32e84b35Dianne Hackborn * moves in and out of the foreground and does not require that any special 419567a66a5e6f49dd8495fb5f6e2efb9f32e84b35Dianne Hackborn * permissions be requested. 429567a66a5e6f49dd8495fb5f6e2efb9f32e84b35Dianne Hackborn * 439066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Handle returned by {@link KeyguardManager#newKeyguardLock} that allows 449066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * you to disable / reenable the keyguard. 459066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 469066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public class KeyguardLock { 47d7d2d43b4967bb907b61180aa9d12ca51aaa15e2Kenny Root private final IBinder mToken = new Binder(); 48d7d2d43b4967bb907b61180aa9d12ca51aaa15e2Kenny Root private final String mTag; 499066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 509066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project KeyguardLock(String tag) { 519066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project mTag = tag; 529066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 539066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 549066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 559066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Disable the keyguard from showing. If the keyguard is currently 569066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * showing, hide it. The keyguard will be prevented from showing again 579066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * until {@link #reenableKeyguard()} is called. 589066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * 599066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * A good place to call this is from {@link android.app.Activity#onResume()} 609066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * 61cb52cb52253c3832ccc7f5f1dbb4d8a0bd8178c0Jim Miller * Note: This call has no effect while any {@link android.app.admin.DevicePolicyManager} 62cb52cb52253c3832ccc7f5f1dbb4d8a0bd8178c0Jim Miller * is enabled that requires a password. 63d6b5705e188e55a3b9dbb07954b16564b1a31b9fJim Miller * 649530e3a22d5ffa2019d1a5177b6a441d4d6d048bNicolas Falliere * <p>This method requires the caller to hold the permission 659530e3a22d5ffa2019d1a5177b6a441d4d6d048bNicolas Falliere * {@link android.Manifest.permission#DISABLE_KEYGUARD}. 669530e3a22d5ffa2019d1a5177b6a441d4d6d048bNicolas Falliere * 679066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * @see #reenableKeyguard() 689066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 699066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public void disableKeyguard() { 709066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project try { 719066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project mWM.disableKeyguard(mToken, mTag); 729066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } catch (RemoteException ex) { 739066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 749066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 759066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 769066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 779066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Reenable the keyguard. The keyguard will reappear if the previous 7837fde0aca01fcfcd8483df70a4e82f622e15fda2Jean-Michel Trivi * call to {@link #disableKeyguard()} caused it to be hidden. 799066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * 80d6b5705e188e55a3b9dbb07954b16564b1a31b9fJim Miller * A good place to call this is from {@link android.app.Activity#onPause()} 81d6b5705e188e55a3b9dbb07954b16564b1a31b9fJim Miller * 82cb52cb52253c3832ccc7f5f1dbb4d8a0bd8178c0Jim Miller * Note: This call has no effect while any {@link android.app.admin.DevicePolicyManager} 83cb52cb52253c3832ccc7f5f1dbb4d8a0bd8178c0Jim Miller * is enabled that requires a password. 849066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * 859530e3a22d5ffa2019d1a5177b6a441d4d6d048bNicolas Falliere * <p>This method requires the caller to hold the permission 869530e3a22d5ffa2019d1a5177b6a441d4d6d048bNicolas Falliere * {@link android.Manifest.permission#DISABLE_KEYGUARD}. 879530e3a22d5ffa2019d1a5177b6a441d4d6d048bNicolas Falliere * 889066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * @see #disableKeyguard() 899066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 909066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public void reenableKeyguard() { 919066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project try { 929066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project mWM.reenableKeyguard(mToken); 939066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } catch (RemoteException ex) { 949066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 959066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 969066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 979066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 989066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 999066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Callback passed to {@link KeyguardManager#exitKeyguardSecurely} to notify 1009066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * caller of result. 1019066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 1029066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public interface OnKeyguardExitResult { 1039066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 1049066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 1059066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * @param success True if the user was able to authenticate, false if 1069066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * not. 1079066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 1089066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project void onKeyguardExitResult(boolean success); 1099066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 1109066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 1119066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 1129066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project KeyguardManager() { 11398365d7663cbd82979a5700faf0050220b01084dJeff Brown mWM = WindowManagerGlobal.getWindowManagerService(); 1149066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 1159066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 1169066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 1179567a66a5e6f49dd8495fb5f6e2efb9f32e84b35Dianne Hackborn * @deprecated Use {@link android.view.WindowManager.LayoutParams#FLAG_DISMISS_KEYGUARD} 1189567a66a5e6f49dd8495fb5f6e2efb9f32e84b35Dianne Hackborn * and/or {@link android.view.WindowManager.LayoutParams#FLAG_SHOW_WHEN_LOCKED} 1199567a66a5e6f49dd8495fb5f6e2efb9f32e84b35Dianne Hackborn * instead; this allows you to seamlessly hide the keyguard as your application 1209567a66a5e6f49dd8495fb5f6e2efb9f32e84b35Dianne Hackborn * moves in and out of the foreground and does not require that any special 1219567a66a5e6f49dd8495fb5f6e2efb9f32e84b35Dianne Hackborn * permissions be requested. 1229567a66a5e6f49dd8495fb5f6e2efb9f32e84b35Dianne Hackborn * 1239066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Enables you to lock or unlock the keyboard. Get an instance of this class by 1249066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * calling {@link android.content.Context#getSystemService(java.lang.String) Context.getSystemService()}. 1259066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * This class is wrapped by {@link android.app.KeyguardManager KeyguardManager}. 1269066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * @param tag A tag that informally identifies who you are (for debugging who 1279066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * is disabling he keyguard). 1289066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * 1299066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * @return A {@link KeyguardLock} handle to use to disable and reenable the 1309066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * keyguard. 1319066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 1329567a66a5e6f49dd8495fb5f6e2efb9f32e84b35Dianne Hackborn @Deprecated 1339066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public KeyguardLock newKeyguardLock(String tag) { 1349066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project return new KeyguardLock(tag); 1359066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 1369066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 1379066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 138520d8bc1d840966b5519195aaa514597a662c053Mike Lockwood * Return whether the keyguard is currently locked. 139520d8bc1d840966b5519195aaa514597a662c053Mike Lockwood * 14037fde0aca01fcfcd8483df70a4e82f622e15fda2Jean-Michel Trivi * @return true if keyguard is locked. 141520d8bc1d840966b5519195aaa514597a662c053Mike Lockwood */ 142520d8bc1d840966b5519195aaa514597a662c053Mike Lockwood public boolean isKeyguardLocked() { 143520d8bc1d840966b5519195aaa514597a662c053Mike Lockwood try { 144505312482782a600e997c91712f03f83c7a70428Mike Lockwood return mWM.isKeyguardLocked(); 145520d8bc1d840966b5519195aaa514597a662c053Mike Lockwood } catch (RemoteException ex) { 146520d8bc1d840966b5519195aaa514597a662c053Mike Lockwood return false; 147520d8bc1d840966b5519195aaa514597a662c053Mike Lockwood } 148520d8bc1d840966b5519195aaa514597a662c053Mike Lockwood } 149520d8bc1d840966b5519195aaa514597a662c053Mike Lockwood 150520d8bc1d840966b5519195aaa514597a662c053Mike Lockwood /** 151520d8bc1d840966b5519195aaa514597a662c053Mike Lockwood * Return whether the keyguard requires a password to unlock. 152520d8bc1d840966b5519195aaa514597a662c053Mike Lockwood * 15337fde0aca01fcfcd8483df70a4e82f622e15fda2Jean-Michel Trivi * @return true if keyguard is secure. 154520d8bc1d840966b5519195aaa514597a662c053Mike Lockwood */ 155520d8bc1d840966b5519195aaa514597a662c053Mike Lockwood public boolean isKeyguardSecure() { 156520d8bc1d840966b5519195aaa514597a662c053Mike Lockwood try { 157520d8bc1d840966b5519195aaa514597a662c053Mike Lockwood return mWM.isKeyguardSecure(); 158520d8bc1d840966b5519195aaa514597a662c053Mike Lockwood } catch (RemoteException ex) { 159520d8bc1d840966b5519195aaa514597a662c053Mike Lockwood return false; 160520d8bc1d840966b5519195aaa514597a662c053Mike Lockwood } 161520d8bc1d840966b5519195aaa514597a662c053Mike Lockwood } 162520d8bc1d840966b5519195aaa514597a662c053Mike Lockwood 163520d8bc1d840966b5519195aaa514597a662c053Mike Lockwood /** 1649066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * If keyguard screen is showing or in restricted key input mode (i.e. in 1659066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * keyguard password emergency screen). When in such mode, certain keys, 1669066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * such as the Home key and the right soft keys, don't work. 1679066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * 1689066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * @return true if in keyguard restricted input mode. 1699066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * 1709066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * @see android.view.WindowManagerPolicy#inKeyguardRestrictedKeyInputMode 1719066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 1729066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public boolean inKeyguardRestrictedInputMode() { 1739066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project try { 1749066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project return mWM.inKeyguardRestrictedInputMode(); 1759066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } catch (RemoteException ex) { 1769066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project return false; 1779066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 1789066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 1799066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 1809066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 1819567a66a5e6f49dd8495fb5f6e2efb9f32e84b35Dianne Hackborn * @deprecated Use {@link android.view.WindowManager.LayoutParams#FLAG_DISMISS_KEYGUARD} 1829567a66a5e6f49dd8495fb5f6e2efb9f32e84b35Dianne Hackborn * and/or {@link android.view.WindowManager.LayoutParams#FLAG_SHOW_WHEN_LOCKED} 1839567a66a5e6f49dd8495fb5f6e2efb9f32e84b35Dianne Hackborn * instead; this allows you to seamlessly hide the keyguard as your application 1849567a66a5e6f49dd8495fb5f6e2efb9f32e84b35Dianne Hackborn * moves in and out of the foreground and does not require that any special 1859567a66a5e6f49dd8495fb5f6e2efb9f32e84b35Dianne Hackborn * permissions be requested. 1869567a66a5e6f49dd8495fb5f6e2efb9f32e84b35Dianne Hackborn * 1879066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Exit the keyguard securely. The use case for this api is that, after 1889066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * disabling the keyguard, your app, which was granted permission to 1899066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * disable the keyguard and show a limited amount of information deemed 1909066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * safe without the user getting past the keyguard, needs to navigate to 1919066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * something that is not safe to view without getting past the keyguard. 1929066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * 1939066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * This will, if the keyguard is secure, bring up the unlock screen of 1949066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * the keyguard. 1959066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * 1969530e3a22d5ffa2019d1a5177b6a441d4d6d048bNicolas Falliere * <p>This method requires the caller to hold the permission 1979530e3a22d5ffa2019d1a5177b6a441d4d6d048bNicolas Falliere * {@link android.Manifest.permission#DISABLE_KEYGUARD}. 1989530e3a22d5ffa2019d1a5177b6a441d4d6d048bNicolas Falliere * 1999066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * @param callback Let's you know whether the operation was succesful and 2009066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * it is safe to launch anything that would normally be considered safe 2019066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * once the user has gotten past the keyguard. 2029066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 2039567a66a5e6f49dd8495fb5f6e2efb9f32e84b35Dianne Hackborn @Deprecated 2049066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public void exitKeyguardSecurely(final OnKeyguardExitResult callback) { 2059066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project try { 2069066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project mWM.exitKeyguardSecurely(new IOnKeyguardExitResult.Stub() { 2079066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public void onKeyguardExitResult(boolean success) throws RemoteException { 208a999d463c1f72fc7d9fcb21e850b78ec77793730Jim Miller if (callback != null) { 209a999d463c1f72fc7d9fcb21e850b78ec77793730Jim Miller callback.onKeyguardExitResult(success); 210a999d463c1f72fc7d9fcb21e850b78ec77793730Jim Miller } 2119066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 2129066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project }); 2139066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } catch (RemoteException e) { 2149066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 2159066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 2169066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 2179066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project} 218