Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 4e9eb5f7 authored by Jigar Thakkar's avatar Jigar Thakkar
Browse files

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
parent 7f8a7bfd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment