Dianne Hackborn | d684784 | 2010-01-12 18:14:19 -0800 | [diff] [blame] | 1 | /* |
| 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 | |
| 18 | package android.app; |
| 19 | |
| 20 | import android.content.ComponentName; |
Dianne Hackborn | 8ea138c | 2010-01-26 18:01:04 -0800 | [diff] [blame^] | 21 | import android.os.RemoteCallback; |
Dianne Hackborn | d684784 | 2010-01-12 18:14:19 -0800 | [diff] [blame] | 22 | |
| 23 | /** |
| 24 | * Internal IPC interface to the device policy service. |
| 25 | * {@hide} |
| 26 | */ |
| 27 | interface IDevicePolicyManager { |
| 28 | void setPasswordMode(in ComponentName who, int mode); |
| 29 | int getPasswordMode(); |
Dianne Hackborn | d684784 | 2010-01-12 18:14:19 -0800 | [diff] [blame] | 30 | |
| 31 | void setMinimumPasswordLength(in ComponentName who, int length); |
| 32 | int getMinimumPasswordLength(); |
Dianne Hackborn | d684784 | 2010-01-12 18:14:19 -0800 | [diff] [blame] | 33 | |
Dianne Hackborn | df83afa | 2010-01-20 13:37:26 -0800 | [diff] [blame] | 34 | boolean isActivePasswordSufficient(); |
Dianne Hackborn | d684784 | 2010-01-12 18:14:19 -0800 | [diff] [blame] | 35 | int getCurrentFailedPasswordAttempts(); |
Dianne Hackborn | 8ea138c | 2010-01-26 18:01:04 -0800 | [diff] [blame^] | 36 | void setMaximumFailedPasswordsForWipe(in ComponentName admin, int num); |
Dianne Hackborn | d684784 | 2010-01-12 18:14:19 -0800 | [diff] [blame] | 37 | |
Dianne Hackborn | df83afa | 2010-01-20 13:37:26 -0800 | [diff] [blame] | 38 | boolean resetPassword(String password); |
| 39 | |
Dianne Hackborn | d684784 | 2010-01-12 18:14:19 -0800 | [diff] [blame] | 40 | void setMaximumTimeToLock(in ComponentName who, long timeMs); |
| 41 | long getMaximumTimeToLock(); |
| 42 | |
Dianne Hackborn | df83afa | 2010-01-20 13:37:26 -0800 | [diff] [blame] | 43 | void lockNow(); |
| 44 | |
Dianne Hackborn | d684784 | 2010-01-12 18:14:19 -0800 | [diff] [blame] | 45 | void wipeData(int flags); |
| 46 | |
| 47 | void setActiveAdmin(in ComponentName policyReceiver); |
| 48 | ComponentName getActiveAdmin(); |
Dianne Hackborn | 8ea138c | 2010-01-26 18:01:04 -0800 | [diff] [blame^] | 49 | void getRemoveWarning(in ComponentName policyReceiver, in RemoteCallback result); |
Dianne Hackborn | d684784 | 2010-01-12 18:14:19 -0800 | [diff] [blame] | 50 | void removeActiveAdmin(in ComponentName policyReceiver); |
| 51 | |
| 52 | void setActivePasswordState(int mode, int length); |
| 53 | void reportFailedPasswordAttempt(); |
| 54 | void reportSuccessfulPasswordAttempt(); |
| 55 | } |