IUserManager.aidl 4.5 KB

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