Loading
Block private space creation based on device conditions
This change adds logic to disable private space creation when the below mentioned device conditions are met: - Device has low RAM (based on ActivityManager.isLowRamDevice) - Device is a TV, Automotive devices, or a Watch - The parent user has retriciton DISALLOW_ADD_PRIVATE_PROFILE - The parent user is non-system user The change also adds a hidden API (canAddPrivateProfile) that checks for all the above mentioned conditions. This API can be used by callers to check if the private space creation is supported on the device and parent user. Test: atest UserManagerServiceTest atest UserManagerTest Bug: 290333800 Change-Id: Iea123c2e4646980eca6253b2f063799d92320b1a