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