blob: dda513caea71899475e5a07b382453b8a8154828 [file] [log] [blame]
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001/*
2 * Copyright (C) 2008 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 android.accounts;
18
19/**
20 * Central application service that allows querying the list of accounts.
21 */
22interface IAccountsService {
23 /**
24 * Gets the list of Accounts the user has previously logged
25 * in to. Accounts are of the form "username@domain".
26 * <p>
27 * This method will return an empty array if the device doesn't
28 * know about any accounts (yet).
29 *
30 * @return The accounts. The array will be zero-length if the
31 * AccountsService doesn't know about any accounts yet.
32 */
33 String[] getAccounts();
34
35 /**
36 * This is an interim solution for bypassing a forgotten gesture on the
37 * unlock screen (it is hidden, please make sure it stays this way!). This
38 * will be *removed* when the unlock screen design supports additional
39 * authenticators.
40 * <p>
41 * The user will be presented with username and password fields that are
42 * called as parameters to this method. If true is returned, the user is
43 * able to define a new gesture and get back into the system. If false, the
44 * user can try again.
45 *
46 * @param username The username entered.
47 * @param password The password entered.
48 * @return Whether to allow the user to bypass the lock screen and define a
49 * new gesture.
50 * @hide (The package is already hidden, but just in case someone
51 * unhides that, this should not be revealed.)
52 */
53 boolean shouldUnlock(String username, String password);
54}