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