Optimize code

Pop a toast instead of crash when creating user failed
Add popToast function
Update READMEs
This commit is contained in:
BinTianqi
2025-08-21 09:11:36 +08:00
parent b3d746083f
commit c745eb25a9
13 changed files with 97 additions and 81 deletions

View File

@@ -57,15 +57,13 @@ java.lang.IllegalStateException: Not allowed to set the device owner because the
> [!NOTE]
> 一些系统有应用克隆、儿童空间等功能,它们通常是用户。
### MIUI
### MIUI & HyperOS
```text
java.lang.SecurityException: Neither user 2000 nor current process has android.permission.MANAGE_DEVICE_ADMINS.
```
解决办法:
- 在开发者设置中打开`USB调试安全设置`
- 在root命令行中执行激活命令
解决办法: 在开发者设置中打开`USB调试安全设置`或在root命令行中执行激活命令。
### ColorOS
@@ -75,6 +73,14 @@ java.lang.IllegalStateException: Unexpected @ProvisioningPreCondition
解决办法:使用 OwnDroid testkey 版本
### 三星
```text
user limit reached
```
三星限制了多用户功能,暂无解决办法。
## API
| ID | Extra | 最小安卓版本 |