通过packagemanager()的queryIntentAActivities(intent,0)的返回list长度来判断 具体代码如下:
PackageManager packageManager = getPackageManager();Listactivities = packageManager.queryIntentActivities(intent, 0);boolean isIntentSafe = activities.size() > 0;
本文共 320 字,大约阅读时间需要 1 分钟。
通过packagemanager()的queryIntentAActivities(intent,0)的返回list长度来判断 具体代码如下:
PackageManager packageManager = getPackageManager();Listactivities = packageManager.queryIntentActivities(intent, 0);boolean isIntentSafe = activities.size() > 0;
转载于:https://www.cnblogs.com/u3shadow/p/4381286.html