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 | |
Dianne Hackborn | 87bba1e | 2010-02-26 17:25:54 -0800 | [diff] [blame] | 18 | package android.app.admin; |
Dianne Hackborn | d684784 | 2010-01-12 18:14:19 -0800 | [diff] [blame] | 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 { |
Dianne Hackborn | 9327f4f | 2010-01-29 10:38:29 -0800 | [diff] [blame] | 28 | void setPasswordQuality(in ComponentName who, int quality); |
| 29 | int getPasswordQuality(in ComponentName who); |
Konstantin Lopyrev | a15dcfa | 2010-05-24 17:10:56 -0700 | [diff] [blame] | 30 | |
Dianne Hackborn | 254cb44 | 2010-01-27 19:23:59 -0800 | [diff] [blame] | 31 | void setPasswordMinimumLength(in ComponentName who, int length); |
| 32 | int getPasswordMinimumLength(in ComponentName who); |
Konstantin Lopyrev | a15dcfa | 2010-05-24 17:10:56 -0700 | [diff] [blame] | 33 | |
| 34 | void setPasswordMinimumUpperCase(in ComponentName who, int length); |
| 35 | int getPasswordMinimumUpperCase(in ComponentName who); |
| 36 | |
| 37 | void setPasswordMinimumLowerCase(in ComponentName who, int length); |
| 38 | int getPasswordMinimumLowerCase(in ComponentName who); |
| 39 | |
| 40 | void setPasswordMinimumLetters(in ComponentName who, int length); |
| 41 | int getPasswordMinimumLetters(in ComponentName who); |
| 42 | |
| 43 | void setPasswordMinimumNumeric(in ComponentName who, int length); |
| 44 | int getPasswordMinimumNumeric(in ComponentName who); |
| 45 | |
| 46 | void setPasswordMinimumSymbols(in ComponentName who, int length); |
| 47 | int getPasswordMinimumSymbols(in ComponentName who); |
Konstantin Lopyrev | c857740 | 2010-06-04 17:15:02 -0700 | [diff] [blame] | 48 | |
| 49 | void setPasswordMinimumNonLetter(in ComponentName who, int length); |
| 50 | int getPasswordMinimumNonLetter(in ComponentName who); |
Dianne Hackborn | d684784 | 2010-01-12 18:14:19 -0800 | [diff] [blame] | 51 | |
Konstantin Lopyrev | 3255823 | 2010-05-20 16:18:05 -0700 | [diff] [blame] | 52 | void setPasswordHistoryLength(in ComponentName who, int length); |
| 53 | int getPasswordHistoryLength(in ComponentName who); |
| 54 | |
Jim Miller | a4e28d1 | 2010-11-08 16:15:47 -0800 | [diff] [blame] | 55 | void setPasswordExpirationTimeout(in ComponentName who, long expiration); |
| 56 | long getPasswordExpirationTimeout(in ComponentName who); |
| 57 | |
| 58 | long getPasswordExpiration(in ComponentName who); |
| 59 | |
Dianne Hackborn | df83afa | 2010-01-20 13:37:26 -0800 | [diff] [blame] | 60 | boolean isActivePasswordSufficient(); |
Dianne Hackborn | d684784 | 2010-01-12 18:14:19 -0800 | [diff] [blame] | 61 | int getCurrentFailedPasswordAttempts(); |
Dianne Hackborn | 254cb44 | 2010-01-27 19:23:59 -0800 | [diff] [blame] | 62 | |
Dianne Hackborn | 8ea138c | 2010-01-26 18:01:04 -0800 | [diff] [blame] | 63 | void setMaximumFailedPasswordsForWipe(in ComponentName admin, int num); |
Dianne Hackborn | 254cb44 | 2010-01-27 19:23:59 -0800 | [diff] [blame] | 64 | int getMaximumFailedPasswordsForWipe(in ComponentName admin); |
Dianne Hackborn | d684784 | 2010-01-12 18:14:19 -0800 | [diff] [blame] | 65 | |
Dianne Hackborn | 87bba1e | 2010-02-26 17:25:54 -0800 | [diff] [blame] | 66 | boolean resetPassword(String password, int flags); |
Dianne Hackborn | df83afa | 2010-01-20 13:37:26 -0800 | [diff] [blame] | 67 | |
Dianne Hackborn | d684784 | 2010-01-12 18:14:19 -0800 | [diff] [blame] | 68 | void setMaximumTimeToLock(in ComponentName who, long timeMs); |
Dianne Hackborn | 254cb44 | 2010-01-27 19:23:59 -0800 | [diff] [blame] | 69 | long getMaximumTimeToLock(in ComponentName who); |
Dianne Hackborn | d684784 | 2010-01-12 18:14:19 -0800 | [diff] [blame] | 70 | |
Dianne Hackborn | df83afa | 2010-01-20 13:37:26 -0800 | [diff] [blame] | 71 | void lockNow(); |
| 72 | |
Dianne Hackborn | d684784 | 2010-01-12 18:14:19 -0800 | [diff] [blame] | 73 | void wipeData(int flags); |
Oscar Montemayor | 69238c6 | 2010-08-03 10:51:06 -0700 | [diff] [blame] | 74 | |
| 75 | ComponentName setGlobalProxy(in ComponentName admin, String proxySpec, String exclusionList); |
| 76 | ComponentName getGlobalProxyAdmin(); |
Andy Stadler | 7b0f8f0 | 2011-01-12 14:59:52 -0800 | [diff] [blame] | 77 | |
| 78 | int setStorageEncryption(in ComponentName who, boolean encrypt); |
Andy Stadler | 22dbfda | 2011-01-17 12:47:31 -0800 | [diff] [blame] | 79 | boolean getStorageEncryption(in ComponentName who); |
| 80 | int getStorageEncryptionStatus(); |
Andy Stadler | 7b0f8f0 | 2011-01-12 14:59:52 -0800 | [diff] [blame] | 81 | |
Ben Komalo | 2447edd | 2011-05-09 16:05:33 -0700 | [diff] [blame] | 82 | void setCameraDisabled(in ComponentName who, boolean disabled); |
| 83 | boolean getCameraDisabled(in ComponentName who); |
| 84 | |
Andy Stadler | c25f70a | 2010-12-08 15:56:45 -0800 | [diff] [blame] | 85 | void setActiveAdmin(in ComponentName policyReceiver, boolean refreshing); |
Dianne Hackborn | d47c6ed | 2010-01-27 16:21:20 -0800 | [diff] [blame] | 86 | boolean isAdminActive(in ComponentName policyReceiver); |
| 87 | List<ComponentName> getActiveAdmins(); |
Dianne Hackborn | 21f1bd1 | 2010-02-19 17:02:21 -0800 | [diff] [blame] | 88 | boolean packageHasActiveAdmins(String packageName); |
Dianne Hackborn | 8ea138c | 2010-01-26 18:01:04 -0800 | [diff] [blame] | 89 | void getRemoveWarning(in ComponentName policyReceiver, in RemoteCallback result); |
Dianne Hackborn | d684784 | 2010-01-12 18:14:19 -0800 | [diff] [blame] | 90 | void removeActiveAdmin(in ComponentName policyReceiver); |
Andy Stadler | c25f70a | 2010-12-08 15:56:45 -0800 | [diff] [blame] | 91 | boolean hasGrantedPolicy(in ComponentName policyReceiver, int usesPolicy); |
Dianne Hackborn | d684784 | 2010-01-12 18:14:19 -0800 | [diff] [blame] | 92 | |
Konstantin Lopyrev | c857740 | 2010-06-04 17:15:02 -0700 | [diff] [blame] | 93 | void setActivePasswordState(int quality, int length, int letters, int uppercase, int lowercase, |
| 94 | int numbers, int symbols, int nonletter); |
Dianne Hackborn | d684784 | 2010-01-12 18:14:19 -0800 | [diff] [blame] | 95 | void reportFailedPasswordAttempt(); |
| 96 | void reportSuccessfulPasswordAttempt(); |
| 97 | } |