Debian Codegraph @

core/java/android/os/IUserManager.aidl

raw
1 /*
2 **
3 ** Copyright 2012, 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.os;
19
20 import android.os.Bundle;
21 import android.os.IUserRestrictionsListener;
22 import android.os.PersistableBundle;
23 import android.os.UserHandle;
24 import android.os.UserManager;
25 import android.content.pm.UserInfo;
26 import android.content.IntentSender;
27 import android.content.RestrictionEntry;
28 import android.graphics.Bitmap;
29 import android.os.ParcelFileDescriptor;
30
31 /**
32 * {@hide}
33 */
34 interface IUserManager {
35
36 /*
37 * DO NOT MOVE - UserManager.h depends on the ordering of this function.
38 */
39 int getCredentialOwnerProfile(int userId);
40 int getProfileParentId(int userId);
41 /*
42 * END OF DO NOT MOVE
43 */
44
45 UserInfo createUserWithThrow(in String name, in String userType, int flags);
46 UserInfo preCreateUserWithThrow(in String userType);
47 UserInfo createProfileForUserWithThrow(in String name, in String userType, int flags, int userId,
48 in String[] disallowedPackages);
49 UserInfo createRestrictedProfileWithThrow(String name, int parentUserHandle);
50 String[] getPreInstallableSystemPackages(in String userType);
51 void setUserEnabled(int userId);
52 void setUserAdmin(int userId);
53 void evictCredentialEncryptionKey(int userId);
54 boolean removeUser(int userId);
55 boolean removeUserEvenWhenDisallowed(int userId);
56 void setUserName(int userId, String name);
57 void setUserIcon(int userId, in Bitmap icon);
58 ParcelFileDescriptor getUserIcon(int userId);
59 UserInfo getPrimaryUser();
60 List<UserInfo> getUsers(boolean excludePartial, boolean excludeDying, boolean excludePreCreated);
61 List<UserInfo> getProfiles(int userId, boolean enabledOnly);
62 int[] getProfileIds(int userId, boolean enabledOnly);
63 boolean isUserTypeEnabled(in String userType);
64 boolean canAddMoreUsersOfType(in String userType);
65 int getRemainingCreatableUserCount(in String userType);
66 int getRemainingCreatableProfileCount(in String userType, int userId);
67 boolean canAddMoreProfilesToUser(in String userType, int userId, boolean allowedToRemoveOne);
68 boolean canAddMoreManagedProfiles(int userId, boolean allowedToRemoveOne);
69 UserInfo getProfileParent(int userId);
70 boolean isSameProfileGroup(int userId, int otherUserHandle);
71 boolean isUserOfType(int userId, in String userType);
72 @UnsupportedAppUsage
73 UserInfo getUserInfo(int userId);
74 String getUserAccount(int userId);
75 void setUserAccount(int userId, String accountName);
76 long getUserCreationTime(int userId);
77 boolean isUserSwitcherEnabled(int mUserId);
78 boolean isRestricted(int userId);
79 boolean canHaveRestrictedProfile(int userId);
80 int getUserSerialNumber(int userId);
81 int getUserHandle(int userSerialNumber);
82 int getUserRestrictionSource(String restrictionKey, int userId);
83 List<UserManager.EnforcingUser> getUserRestrictionSources(String restrictionKey, int userId);
84 Bundle getUserRestrictions(int userId);
85 boolean hasBaseUserRestriction(String restrictionKey, int userId);
86 boolean hasUserRestriction(in String restrictionKey, int userId);
87 boolean hasUserRestrictionOnAnyUser(in String restrictionKey);
88 boolean isSettingRestrictedForUser(in String setting, int userId, in String value, int callingUid);
89 void addUserRestrictionsListener(IUserRestrictionsListener listener);
90 void setUserRestriction(String key, boolean value, int userId);
91 void setApplicationRestrictions(in String packageName, in Bundle restrictions, int userId);
92 Bundle getApplicationRestrictions(in String packageName);
93 Bundle getApplicationRestrictionsForUser(in String packageName, int userId);
94 void setDefaultGuestRestrictions(in Bundle restrictions);
95 Bundle getDefaultGuestRestrictions();
96 int removeUserWhenPossible(int userId, boolean overrideDevicePolicy);
97 boolean markGuestForDeletion(int userId);
98 UserInfo findCurrentGuestUser();
99 boolean isQuietModeEnabled(int userId);
100 UserHandle createUserWithAttributes(in String userName, in String userType, int flags,
101 in Bitmap userIcon,
102 in String accountName, in String accountType, in PersistableBundle accountOptions);
103 void setSeedAccountData(int userId, in String accountName,
104 in String accountType, in PersistableBundle accountOptions, boolean persist);
105 String getSeedAccountName(int userId);
106 String getSeedAccountType(int userId);
107 PersistableBundle getSeedAccountOptions(int userId);
108 void clearSeedAccountData(int userId);
109 boolean someUserHasSeedAccount(in String accountName, in String accountType);
110 boolean someUserHasAccount(in String accountName, in String accountType);
111 String getProfileType(int userId);
112 boolean isMediaSharedWithParent(int userId);
113 boolean isCredentialSharableWithParent(int userId);
114 boolean isDemoUser(int userId);
115 boolean isPreCreated(int userId);
116 UserInfo createProfileForUserEvenWhenDisallowedWithThrow(in String name, in String userType, int flags,
117 int userId, in String[] disallowedPackages);
118 boolean isUserUnlockingOrUnlocked(int userId);
119 int getUserIconBadgeResId(int userId);
120 int getUserBadgeResId(int userId);
121 int getUserBadgeNoBackgroundResId(int userId);
122 int getUserBadgeLabelResId(int userId);
123 int getUserBadgeColorResId(int userId);
124 int getUserBadgeDarkColorResId(int userId);
125 boolean hasBadge(int userId);
126 boolean isUserUnlocked(int userId);
127 boolean isUserRunning(int userId);
128 boolean isUserForeground(int userId);
129 boolean isUserNameSet(int userId);
130 boolean hasRestrictedProfiles(int userId);
131 boolean requestQuietModeEnabled(String callingPackage, boolean enableQuietMode, int userId, in IntentSender target, int flags);
132 String getUserName();
133 long getUserStartRealtime();
134 long getUserUnlockRealtime();
135 boolean setUserEphemeral(int userId, boolean enableEphemeral);
136 }