mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-16 20:59:54 +01:00
Merge branch '1291-huawei-protected-apps' into 'master'
Don't show Huawei protected apps button on API 24+ Closes #1291 See merge request akwizgran/briar!823
This commit is contained in:
@@ -16,6 +16,8 @@ import java.util.List;
|
|||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
|
import static android.os.Build.VERSION.SDK_INT;
|
||||||
|
|
||||||
@UiThread
|
@UiThread
|
||||||
@NotNullByDefault
|
@NotNullByDefault
|
||||||
class HuaweiView extends PowerView {
|
class HuaweiView extends PowerView {
|
||||||
@@ -45,6 +47,8 @@ class HuaweiView extends PowerView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean needsToBeShown(Context context) {
|
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();
|
PackageManager pm = context.getPackageManager();
|
||||||
List<ResolveInfo> resolveInfos = pm.queryIntentActivities(getIntent(),
|
List<ResolveInfo> resolveInfos = pm.queryIntentActivities(getIntent(),
|
||||||
PackageManager.MATCH_DEFAULT_ONLY);
|
PackageManager.MATCH_DEFAULT_ONLY);
|
||||||
|
|||||||
Reference in New Issue
Block a user