Android多用户初探
参考博文:Android UserManagerService初始化_qluka的博客-CSDN博客
想限制多用户的行为,但是不知默认配置在哪?所以写写。
默认guest用户被限制的行为:
./frameworks/base/services/core/java/com/android/server/pm/UserTypeFactory.java
private static Bundle getDefaultSecondaryUserRestrictions() {
final Bundle restrictions = new Bundle();
restrictions.putBoolean(UserManager.DISALLOW_OUTGOING_CALLS, true);
restrictions.putBoolean(UserManager.DISALLOW_SMS, true);
return restrictions;
}
private static Bundle getDefaultGuestUserRestrictions() {
// Guest inherits the secondary user's restrictions, plus has some extra ones.
final Bundle restrictions = getDefaultSecondaryUserRestrictions();
restrictions.putBoolean(UserManager.DISALLOW_CONFIG_WIFI, true);
restrictions.putBoolean(UserM