blob: bd2d9ac5ada864663cbc0e824b4b7391410e56a6 [file] [log] [blame]
Amith Yamasani258848d2012-08-10 17:06:33 -07001/*
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
18package android.os;
19
Amith Yamasanie4cf7342012-12-17 11:12:09 -080020import android.os.Bundle;
Amith Yamasani258848d2012-08-10 17:06:33 -070021import android.os.ParcelFileDescriptor;
22import android.content.pm.UserInfo;
Amith Yamasanidf2e92a2013-03-01 17:04:38 -080023import android.content.RestrictionEntry;
Amith Yamasanie928d7d2012-09-17 21:46:51 -070024import android.graphics.Bitmap;
Amith Yamasani258848d2012-08-10 17:06:33 -070025
26/**
27 * {@hide}
28 */
29interface IUserManager {
30 UserInfo createUser(in String name, int flags);
31 boolean removeUser(int userHandle);
32 void setUserName(int userHandle, String name);
Amith Yamasanie928d7d2012-09-17 21:46:51 -070033 void setUserIcon(int userHandle, in Bitmap icon);
34 Bitmap getUserIcon(int userHandle);
Amith Yamasani920ace02012-09-20 22:15:37 -070035 List<UserInfo> getUsers(boolean excludeDying);
Amith Yamasani258848d2012-08-10 17:06:33 -070036 UserInfo getUserInfo(int userHandle);
Amith Yamasani71e6c692013-03-24 17:39:28 -070037 boolean isRestricted();
Amith Yamasani258848d2012-08-10 17:06:33 -070038 void setGuestEnabled(boolean enable);
39 boolean isGuestEnabled();
40 void wipeUser(int userHandle);
Amith Yamasani2a003292012-08-14 18:25:45 -070041 int getUserSerialNumber(int userHandle);
42 int getUserHandle(int userSerialNumber);
Amith Yamasanie4cf7342012-12-17 11:12:09 -080043 Bundle getUserRestrictions(int userHandle);
44 void setUserRestrictions(in Bundle restrictions, int userHandle);
Amith Yamasani7e99bc02013-04-16 18:24:51 -070045 void setApplicationRestrictions(in String packageName, in Bundle restrictions,
Amith Yamasanidf2e92a2013-03-01 17:04:38 -080046 int userHandle);
Amith Yamasani7e99bc02013-04-16 18:24:51 -070047 Bundle getApplicationRestrictions(in String packageName);
48 Bundle getApplicationRestrictionsForUser(in String packageName, int userHandle);
Amith Yamasani655d0e22013-06-12 14:19:10 -070049 boolean changeRestrictionsPin(in String newPin);
50 int checkRestrictionsPin(in String pin);
51 boolean hasRestrictionsPin();
Amith Yamasani1a7472e2013-07-02 11:17:30 -070052 void removeRestrictions();
Amith Yamasani258848d2012-08-10 17:06:33 -070053}