IDevicePolicyManager.aidl revision 1b8737ee18f5d80adda41eafca6143a046a47a13
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
18package android.app.admin;
19
20import android.content.ComponentName;
21import android.content.Intent;
22import android.content.IntentFilter;
23import android.os.Bundle;
24import android.os.RemoteCallback;
25import android.os.UserHandle;
26
27/**
28 * Internal IPC interface to the device policy service.
29 * {@hide}
30 */
31interface IDevicePolicyManager {
32    void setPasswordQuality(in ComponentName who, int quality, int userHandle);
33    int getPasswordQuality(in ComponentName who, int userHandle);
34
35    void setPasswordMinimumLength(in ComponentName who, int length, int userHandle);
36    int getPasswordMinimumLength(in ComponentName who, int userHandle);
37
38    void setPasswordMinimumUpperCase(in ComponentName who, int length, int userHandle);
39    int getPasswordMinimumUpperCase(in ComponentName who, int userHandle);
40
41    void setPasswordMinimumLowerCase(in ComponentName who, int length, int userHandle);
42    int getPasswordMinimumLowerCase(in ComponentName who, int userHandle);
43
44    void setPasswordMinimumLetters(in ComponentName who, int length, int userHandle);
45    int getPasswordMinimumLetters(in ComponentName who, int userHandle);
46
47    void setPasswordMinimumNumeric(in ComponentName who, int length, int userHandle);
48    int getPasswordMinimumNumeric(in ComponentName who, int userHandle);
49
50    void setPasswordMinimumSymbols(in ComponentName who, int length, int userHandle);
51    int getPasswordMinimumSymbols(in ComponentName who, int userHandle);
52
53    void setPasswordMinimumNonLetter(in ComponentName who, int length, int userHandle);
54    int getPasswordMinimumNonLetter(in ComponentName who, int userHandle);
55
56    void setPasswordHistoryLength(in ComponentName who, int length, int userHandle);
57    int getPasswordHistoryLength(in ComponentName who, int userHandle);
58
59    void setPasswordExpirationTimeout(in ComponentName who, long expiration, int userHandle);
60    long getPasswordExpirationTimeout(in ComponentName who, int userHandle);
61
62    long getPasswordExpiration(in ComponentName who, int userHandle);
63
64    boolean isActivePasswordSufficient(int userHandle);
65    int getCurrentFailedPasswordAttempts(int userHandle);
66
67    void setMaximumFailedPasswordsForWipe(in ComponentName admin, int num, int userHandle);
68    int getMaximumFailedPasswordsForWipe(in ComponentName admin, int userHandle);
69
70    boolean resetPassword(String password, int flags, int userHandle);
71
72    void setMaximumTimeToLock(in ComponentName who, long timeMs, int userHandle);
73    long getMaximumTimeToLock(in ComponentName who, int userHandle);
74
75    void lockNow();
76
77    void wipeData(int flags, int userHandle);
78
79    ComponentName setGlobalProxy(in ComponentName admin, String proxySpec, String exclusionList, int userHandle);
80    ComponentName getGlobalProxyAdmin(int userHandle);
81
82    int setStorageEncryption(in ComponentName who, boolean encrypt, int userHandle);
83    boolean getStorageEncryption(in ComponentName who, int userHandle);
84    int getStorageEncryptionStatus(int userHandle);
85
86    void setCameraDisabled(in ComponentName who, boolean disabled, int userHandle);
87    boolean getCameraDisabled(in ComponentName who, int userHandle);
88
89    void setKeyguardDisabledFeatures(in ComponentName who, int which, int userHandle);
90    int getKeyguardDisabledFeatures(in ComponentName who, int userHandle);
91
92    void setActiveAdmin(in ComponentName policyReceiver, boolean refreshing, int userHandle);
93    boolean isAdminActive(in ComponentName policyReceiver, int userHandle);
94    List<ComponentName> getActiveAdmins(int userHandle);
95    boolean packageHasActiveAdmins(String packageName, int userHandle);
96    void getRemoveWarning(in ComponentName policyReceiver, in RemoteCallback result, int userHandle);
97    void removeActiveAdmin(in ComponentName policyReceiver, int userHandle);
98    boolean hasGrantedPolicy(in ComponentName policyReceiver, int usesPolicy, int userHandle);
99
100    void setActivePasswordState(int quality, int length, int letters, int uppercase, int lowercase,
101        int numbers, int symbols, int nonletter, int userHandle);
102    void reportFailedPasswordAttempt(int userHandle);
103    void reportSuccessfulPasswordAttempt(int userHandle);
104
105    boolean setDeviceOwner(String packageName, String ownerName);
106    boolean isDeviceOwner(String packageName);
107    String getDeviceOwner();
108    String getDeviceOwnerName();
109
110    boolean setProfileOwner(String packageName, String ownerName, int userHandle);
111    String getProfileOwner(int userHandle);
112    String getProfileOwnerName(int userHandle);
113    void setProfileEnabled(in ComponentName who);
114
115    boolean installCaCert(in byte[] certBuffer);
116    void uninstallCaCert(in byte[] certBuffer);
117
118    void addPersistentPreferredActivity(in ComponentName admin, in IntentFilter filter, in ComponentName activity);
119    void clearPackagePersistentPreferredActivities(in ComponentName admin, String packageName);
120
121    void setApplicationRestrictions(in ComponentName who, in String packageName, in Bundle settings);
122    Bundle getApplicationRestrictions(in ComponentName who, in String packageName);
123
124    void setRestrictionsProvider(in ComponentName who, in ComponentName provider);
125    ComponentName getRestrictionsProvider(int userHandle);
126
127    void setUserRestriction(in ComponentName who, in String key, boolean enable);
128    void addCrossProfileIntentFilter(in ComponentName admin, in IntentFilter filter, int flags);
129    void clearCrossProfileIntentFilters(in ComponentName admin);
130
131    boolean setApplicationBlocked(in ComponentName admin, in String packageName, boolean blocked);
132    int setApplicationsBlocked(in ComponentName admin, in Intent intent, boolean blocked);
133    boolean isApplicationBlocked(in ComponentName admin, in String packageName);
134
135    UserHandle createUser(in ComponentName who, in String name);
136    boolean removeUser(in ComponentName who, in UserHandle userHandle);
137
138    void setAccountManagementDisabled(in ComponentName who, in String accountType, in boolean disabled);
139    String[] getAccountTypesWithManagementDisabled();
140
141    void setLockTaskComponents(in ComponentName[] components);
142    ComponentName[] getLockTaskComponents();
143    boolean isLockTaskPermitted(in ComponentName component);
144
145    void setGlobalSetting(in ComponentName who, in String setting, in String value);
146    void setSecureSetting(in ComponentName who, in String setting, in String value);
147}
148