Skip to content
Snippets Groups Projects
Commit a6ca53ff authored by akwizgran's avatar akwizgran
Browse files

Use protected apps intent for protectedAppsNeedsToBeShown().

parent f13f385a
No related branches found
No related tags found
1 merge request!2Use protected apps intent for protectedAppsNeedsToBeShown()
Pipeline #10636 passed
...@@ -39,7 +39,7 @@ public object HuaweiUtils { ...@@ -39,7 +39,7 @@ public object HuaweiUtils {
// "Protected apps" no longer exists on Huawei EMUI 5.0 (Android 7.0) // "Protected apps" no longer exists on Huawei EMUI 5.0 (Android 7.0)
if (SDK_INT >= 24) return false if (SDK_INT >= 24) return false
val pm = context.packageManager val pm = context.packageManager
val resolveInfos = pm.queryIntentActivities(huaweiPowerManagerIntent, MATCH_DEFAULT_ONLY) val resolveInfos = pm.queryIntentActivities(huaweiProtectedAppsIntent, MATCH_DEFAULT_ONLY)
return resolveInfos.isNotEmpty() return resolveInfos.isNotEmpty()
} }
......
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