fix crash in app manager

close #70
This commit is contained in:
BinTianqi
2024-08-26 09:25:11 +08:00
parent 545eaea2f1
commit 99e02df084
2 changed files with 20 additions and 30 deletions

View File

@@ -242,7 +242,7 @@ private fun HomePage(navCtrl:NavHostController) {
) {
HomePageItem(R.string.work_profile, R.drawable.work_fill0, "ManagedProfile", navCtrl)
}
HomePageItem(R.string.app_manager, R.drawable.apps_fill0, "ApplicationManage", navCtrl)
if(deviceOwner || profileOwner) HomePageItem(R.string.app_manager, R.drawable.apps_fill0, "ApplicationManage", navCtrl)
if(VERSION.SDK_INT >= 24 && (profileOwner || deviceOwner)) {
HomePageItem(R.string.user_restrict, R.drawable.person_off, "UserRestriction", navCtrl)
}