blob: edb8603554ee02d7c86364b00fab0d4f5a3d3864 [file] [log] [blame]
Dianne Hackbornd6847842010-01-12 18:14:19 -08001/*
2**
3** Copyright 2010, The Android Open Source Project
4**
5** Licensed under the Apache License, Version 2.0 (the "License");
6** you may not use this file except in compliance with the License.
7** You may obtain a copy of the License at
8**
9** http://www.apache.org/licenses/LICENSE-2.0
10**
11** Unless required by applicable law or agreed to in writing, software
12** distributed under the License is distributed on an "AS IS" BASIS,
13** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14** See the License for the specific language governing permissions and
15** limitations under the License.
16*/
17
18package android.app;
19
20import android.content.ComponentName;
Dianne Hackborn8ea138c2010-01-26 18:01:04 -080021import android.os.RemoteCallback;
Dianne Hackbornd6847842010-01-12 18:14:19 -080022
23/**
24 * Internal IPC interface to the device policy service.
25 * {@hide}
26 */
27interface IDevicePolicyManager {
28 void setPasswordMode(in ComponentName who, int mode);
29 int getPasswordMode();
Dianne Hackbornd6847842010-01-12 18:14:19 -080030
31 void setMinimumPasswordLength(in ComponentName who, int length);
32 int getMinimumPasswordLength();
Dianne Hackbornd6847842010-01-12 18:14:19 -080033
Dianne Hackborndf83afa2010-01-20 13:37:26 -080034 boolean isActivePasswordSufficient();
Dianne Hackbornd6847842010-01-12 18:14:19 -080035 int getCurrentFailedPasswordAttempts();
Dianne Hackborn8ea138c2010-01-26 18:01:04 -080036 void setMaximumFailedPasswordsForWipe(in ComponentName admin, int num);
Dianne Hackbornd6847842010-01-12 18:14:19 -080037
Dianne Hackborndf83afa2010-01-20 13:37:26 -080038 boolean resetPassword(String password);
39
Dianne Hackbornd6847842010-01-12 18:14:19 -080040 void setMaximumTimeToLock(in ComponentName who, long timeMs);
41 long getMaximumTimeToLock();
42
Dianne Hackborndf83afa2010-01-20 13:37:26 -080043 void lockNow();
44
Dianne Hackbornd6847842010-01-12 18:14:19 -080045 void wipeData(int flags);
46
47 void setActiveAdmin(in ComponentName policyReceiver);
48 ComponentName getActiveAdmin();
Dianne Hackborn8ea138c2010-01-26 18:01:04 -080049 void getRemoveWarning(in ComponentName policyReceiver, in RemoteCallback result);
Dianne Hackbornd6847842010-01-12 18:14:19 -080050 void removeActiveAdmin(in ComponentName policyReceiver);
51
52 void setActivePasswordState(int mode, int length);
53 void reportFailedPasswordAttempt();
54 void reportSuccessfulPasswordAttempt();
55}