Merge changes Idfd40156,Ic903fc25
* changes: Make user-switch transitions customizable Add support for custom user-switch UI
This commit is contained in:
@@ -748,6 +748,15 @@ public class UserManager {
|
||||
return SystemProperties.getBoolean("ro.fw.system_user_split", false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Whether guest user is always ephemeral
|
||||
* @hide
|
||||
*/
|
||||
public static boolean isGuestUserEphemeral() {
|
||||
return Resources.getSystem()
|
||||
.getBoolean(com.android.internal.R.bool.config_guestUserEphemeral);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether switching users is currently allowed.
|
||||
* <p>For instance switching users is not allowed if the current user is in a phone call,
|
||||
@@ -870,6 +879,16 @@ public class UserManager {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a user is a guest user.
|
||||
* @return whether user is a guest user.
|
||||
* @hide
|
||||
*/
|
||||
public boolean isGuestUser(int id) {
|
||||
UserInfo user = getUserInfo(id);
|
||||
return user != null && user.isGuest();
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the calling app is running as a guest user.
|
||||
* @return whether the caller is a guest user.
|
||||
|
||||
@@ -210,6 +210,19 @@ interface IWindowManager
|
||||
void dismissKeyguard();
|
||||
void keyguardGoingAway(int flags);
|
||||
|
||||
/**
|
||||
* Called to tell WindowManager whether the keyguard is animating in. While this property
|
||||
* is true, WindowManager won't assume that the keyguard is opaque (eg. WindowAnimator won't
|
||||
* force-hide windows just because keyguard is visible and WallpaperController won't occlude
|
||||
* app windows with the system wallpaper.
|
||||
*
|
||||
* <p>Requires CONTROL_KEYGUARD permission</p>
|
||||
*/
|
||||
void setKeyguardAnimatingIn(boolean animating);
|
||||
|
||||
// Requires INTERACT_ACROSS_USERS_FULL permission
|
||||
void setSwitchingUser(boolean switching);
|
||||
|
||||
void closeSystemDialogs(String reason);
|
||||
|
||||
// These can only be called with the SET_ANIMATON_SCALE permission.
|
||||
|
||||
@@ -1346,6 +1346,15 @@ public interface WindowManagerPolicy {
|
||||
*/
|
||||
public void setCurrentUserLw(int newUserId);
|
||||
|
||||
/**
|
||||
* For a given user-switch operation, this will be called once with switching=true before the
|
||||
* user-switch and once with switching=false afterwards (or if the user-switch was cancelled).
|
||||
* This gives the policy a chance to alter its behavior for the duration of a user-switch.
|
||||
*
|
||||
* @param switching true if a user-switch is in progress
|
||||
*/
|
||||
void setSwitchingUser(boolean switching);
|
||||
|
||||
/**
|
||||
* Print the WindowManagerPolicy's state into the given stream.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user