blob: b8c062e176455d29bb2012137758095354a2f207 [file] [log] [blame]
Amith Yamasani52c489c2012-03-28 11:42:42 -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
17package com.android.internal.widget;
18
Adrian Roosb5e47222015-08-14 15:53:06 -070019import android.app.trust.IStrongAuthTracker;
Jorim Jaggie8fde5d2016-06-30 23:41:37 -070020import com.android.internal.widget.ICheckCredentialProgressCallback;
Andres Morales23974272015-05-14 22:42:26 -070021import com.android.internal.widget.VerifyCredentialResponse;
22
Amith Yamasani52c489c2012-03-28 11:42:42 -070023/** {@hide} */
24interface ILockSettings {
25 void setBoolean(in String key, in boolean value, in int userId);
26 void setLong(in String key, in long value, in int userId);
27 void setString(in String key, in String value, in int userId);
28 boolean getBoolean(in String key, in boolean defaultValue, in int userId);
29 long getLong(in String key, in long defaultValue, in int userId);
30 String getString(in String key, in String defaultValue, in int userId);
Rubin Xu1de89b32016-11-30 20:03:13 +000031 void setLockCredential(in String credential, int type, in String savedCredential, int userId);
Ricky Wai4613fe42016-05-24 11:11:42 +010032 void resetKeyStore(int userId);
Rubin Xu1de89b32016-11-30 20:03:13 +000033 VerifyCredentialResponse checkCredential(in String credential, int type, int userId,
Jorim Jaggie8fde5d2016-06-30 23:41:37 -070034 in ICheckCredentialProgressCallback progressCallback);
Rubin Xu1de89b32016-11-30 20:03:13 +000035 VerifyCredentialResponse verifyCredential(in String credential, int type, long challenge, int userId);
36 VerifyCredentialResponse verifyTiedProfileChallenge(String credential, int type, long challenge, int userId);
Paul Lawrence945490c2014-03-27 16:37:28 +000037 boolean checkVoldPassword(int userId);
Amith Yamasani52c489c2012-03-28 11:42:42 -070038 boolean havePattern(int userId);
39 boolean havePassword(int userId);
Ricky Waidc283a82016-03-24 19:55:08 +000040 void setSeparateProfileChallengeEnabled(int userId, boolean enabled, String managedUserPassword);
41 boolean getSeparateProfileChallengeEnabled(int userId);
Adrian Roosb5e47222015-08-14 15:53:06 -070042 void registerStrongAuthTracker(in IStrongAuthTracker tracker);
43 void unregisterStrongAuthTracker(in IStrongAuthTracker tracker);
44 void requireStrongAuth(int strongAuthReason, int userId);
Jim Miller4f93c582016-01-27 19:05:43 -080045 void systemReady();
Adrian Roos4ab7e592016-04-13 15:38:13 -070046 void userPresent(int userId);
Victor Changa0940d32016-05-16 19:36:08 +010047 int getStrongAuthForUser(int userId);
Rubin Xuf095f832017-01-31 15:23:34 +000048
49 long addEscrowToken(in byte[] token, int userId);
50 boolean removeEscrowToken(long handle, int userId);
51 boolean isEscrowTokenActive(long handle, int userId);
52 boolean setLockCredentialWithToken(String credential, int type, long tokenHandle, in byte[] token, int userId);
53 void unlockUserWithToken(long tokenHandle, in byte[] token, int userId);
Amith Yamasani52c489c2012-03-28 11:42:42 -070054}