• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.PersistableBundle;
22 import android.os.UserManager;
23 import android.content.pm.UserInfo;
24 import android.content.IntentSender;
25 import android.content.RestrictionEntry;
26 import android.graphics.Bitmap;
27 import android.os.ParcelFileDescriptor;
28 
29 /**
30  *  {@hide}
31  */
32 interface IUserManager {
33 
34     /*
35      * DO NOT MOVE - UserManager.h depends on the ordering of this function.
36      */
getCredentialOwnerProfile(int userHandle)37     int getCredentialOwnerProfile(int userHandle);
getProfileParentId(int userHandle)38     int getProfileParentId(int userHandle);
39     /*
40      * END OF DO NOT MOVE
41      */
42 
createUser(in String name, int flags)43     UserInfo createUser(in String name, int flags);
createProfileForUser(in String name, int flags, int userHandle, in String[] disallowedPackages)44     UserInfo createProfileForUser(in String name, int flags, int userHandle,
45             in String[] disallowedPackages);
createRestrictedProfile(String name, int parentUserHandle)46     UserInfo createRestrictedProfile(String name, int parentUserHandle);
setUserEnabled(int userHandle)47     void setUserEnabled(int userHandle);
setUserAdmin(int userId)48     void setUserAdmin(int userId);
evictCredentialEncryptionKey(int userHandle)49     void evictCredentialEncryptionKey(int userHandle);
removeUser(int userHandle)50     boolean removeUser(int userHandle);
removeUserEvenWhenDisallowed(int userHandle)51     boolean removeUserEvenWhenDisallowed(int userHandle);
setUserName(int userHandle, String name)52     void setUserName(int userHandle, String name);
setUserIcon(int userHandle, in Bitmap icon)53     void setUserIcon(int userHandle, in Bitmap icon);
getUserIcon(int userHandle)54     ParcelFileDescriptor getUserIcon(int userHandle);
getPrimaryUser()55     UserInfo getPrimaryUser();
getUsers(boolean excludeDying)56     List<UserInfo> getUsers(boolean excludeDying);
getProfiles(int userHandle, boolean enabledOnly)57     List<UserInfo> getProfiles(int userHandle, boolean enabledOnly);
getProfileIds(int userId, boolean enabledOnly)58     int[] getProfileIds(int userId, boolean enabledOnly);
canAddMoreManagedProfiles(int userHandle, boolean allowedToRemoveOne)59     boolean canAddMoreManagedProfiles(int userHandle, boolean allowedToRemoveOne);
getProfileParent(int userHandle)60     UserInfo getProfileParent(int userHandle);
isSameProfileGroup(int userHandle, int otherUserHandle)61     boolean isSameProfileGroup(int userHandle, int otherUserHandle);
62     @UnsupportedAppUsage
getUserInfo(int userHandle)63     UserInfo getUserInfo(int userHandle);
getUserAccount(int userHandle)64     String getUserAccount(int userHandle);
setUserAccount(int userHandle, String accountName)65     void setUserAccount(int userHandle, String accountName);
getUserCreationTime(int userHandle)66     long getUserCreationTime(int userHandle);
isRestricted()67     boolean isRestricted();
canHaveRestrictedProfile(int userHandle)68     boolean canHaveRestrictedProfile(int userHandle);
getUserSerialNumber(int userHandle)69     int getUserSerialNumber(int userHandle);
getUserHandle(int userSerialNumber)70     int getUserHandle(int userSerialNumber);
getUserRestrictionSource(String restrictionKey, int userHandle)71     int getUserRestrictionSource(String restrictionKey, int userHandle);
getUserRestrictionSources(String restrictionKey, int userHandle)72     List<UserManager.EnforcingUser> getUserRestrictionSources(String restrictionKey, int userHandle);
getUserRestrictions(int userHandle)73     Bundle getUserRestrictions(int userHandle);
hasBaseUserRestriction(String restrictionKey, int userHandle)74     boolean hasBaseUserRestriction(String restrictionKey, int userHandle);
hasUserRestriction(in String restrictionKey, int userHandle)75     boolean hasUserRestriction(in String restrictionKey, int userHandle);
hasUserRestrictionOnAnyUser(in String restrictionKey)76     boolean hasUserRestrictionOnAnyUser(in String restrictionKey);
setUserRestriction(String key, boolean value, int userHandle)77     void setUserRestriction(String key, boolean value, int userHandle);
setApplicationRestrictions(in String packageName, in Bundle restrictions, int userHandle)78     void setApplicationRestrictions(in String packageName, in Bundle restrictions,
79             int userHandle);
getApplicationRestrictions(in String packageName)80     Bundle getApplicationRestrictions(in String packageName);
getApplicationRestrictionsForUser(in String packageName, int userHandle)81     Bundle getApplicationRestrictionsForUser(in String packageName, int userHandle);
setDefaultGuestRestrictions(in Bundle restrictions)82     void setDefaultGuestRestrictions(in Bundle restrictions);
getDefaultGuestRestrictions()83     Bundle getDefaultGuestRestrictions();
markGuestForDeletion(int userHandle)84     boolean markGuestForDeletion(int userHandle);
isQuietModeEnabled(int userHandle)85     boolean isQuietModeEnabled(int userHandle);
setSeedAccountData(int userHandle, in String accountName, in String accountType, in PersistableBundle accountOptions, boolean persist)86     void setSeedAccountData(int userHandle, in String accountName,
87             in String accountType, in PersistableBundle accountOptions, boolean persist);
getSeedAccountName()88     String getSeedAccountName();
getSeedAccountType()89     String getSeedAccountType();
getSeedAccountOptions()90     PersistableBundle getSeedAccountOptions();
clearSeedAccountData()91     void clearSeedAccountData();
someUserHasSeedAccount(in String accountName, in String accountType)92     boolean someUserHasSeedAccount(in String accountName, in String accountType);
isManagedProfile(int userId)93     boolean isManagedProfile(int userId);
isDemoUser(int userId)94     boolean isDemoUser(int userId);
createProfileForUserEvenWhenDisallowed(in String name, int flags, int userHandle, in String[] disallowedPackages)95     UserInfo createProfileForUserEvenWhenDisallowed(in String name, int flags, int userHandle,
96             in String[] disallowedPackages);
isUserUnlockingOrUnlocked(int userId)97     boolean isUserUnlockingOrUnlocked(int userId);
getManagedProfileBadge(int userId)98     int getManagedProfileBadge(int userId);
isUserUnlocked(int userId)99     boolean isUserUnlocked(int userId);
isUserRunning(int userId)100     boolean isUserRunning(int userId);
isUserNameSet(int userHandle)101     boolean isUserNameSet(int userHandle);
hasRestrictedProfiles()102     boolean hasRestrictedProfiles();
requestQuietModeEnabled(String callingPackage, boolean enableQuietMode, int userHandle, in IntentSender target)103     boolean requestQuietModeEnabled(String callingPackage, boolean enableQuietMode, int userHandle, in IntentSender target);
getUserName()104     String getUserName();
getUserStartRealtime()105     long getUserStartRealtime();
getUserUnlockRealtime()106     long getUserUnlockRealtime();
107 }
108