Skip to content
Snippets Groups Projects
Verified Commit 5e679e7a authored by akwizgran's avatar akwizgran
Browse files

Don't show Huawei protected apps button on API 24+.

parent 834342fd
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,8 @@ import java.util.List;
import javax.annotation.Nullable;
import static android.os.Build.VERSION.SDK_INT;
@UiThread
@NotNullByDefault
class HuaweiView extends PowerView {
......@@ -45,6 +47,8 @@ class HuaweiView extends PowerView {
}
public static boolean needsToBeShown(Context context) {
// "Protected apps" no longer exists on Huawei EMUI 5.0 (Android 7.0)
if (SDK_INT >= 24) return false;
PackageManager pm = context.getPackageManager();
List<ResolveInfo> resolveInfos = pm.queryIntentActivities(getIntent(),
PackageManager.MATCH_DEFAULT_ONLY);
......
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