public boolean getUninatllApkInfo(Context context, String filePath) {
boolean result = false;
try {
PackageManager pm = context.getPackageManager();
DMLog.HFLogD("archiveFilePath", filePath);
PackageInfo info = pm.getPackageArchiveInfo(filePath,
PackageManager.GET_ACTIVITIES);
DMLog.HFLogD(TAG, "1");
if (info != null) {
result = true;// 完整
DMLog.HFLogD(TAG, "完整");
}else{
result = false;
DMLog.HFLogD(TAG, "不完整");
}
} catch (Exception e) {
DMLog.HFLogD(TAG, "不完整");
result = false;// 不完整
}
return result;
}
转载于:https://blog.51cto.com/3287316/1264602