标签:style blog io ar color os sp for on
1 private List<PackageInfo> packageInfos; 2 private List<PackageInfo> userPackageInfos; 3 4 5 packageInfos = getPackageManager().getInstalledPackages(PackageManager.GET_UNINSTALLED_PACKAGES); 6 userPackageInfos = new ArrayList<PackageInfo>(); 7 for(int i=0; i<packageInfos.size();i++) { 8 PackageInfo temp = packageInfos.get(i); 9 ApplicationInfo appInfo = temp.applicationInfo; 10 if((appInfo.flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0) { 11 //updated system App 12 userPackageInfos.add(temp); 13 } 14 else if((appInfo.flags & ApplicationInfo.FLAG_SYSTEM) ==0) { 15 // Non-system App 16 userPackageInfos.add(temp); 17 } 18 }
标签:style blog io ar color os sp for on
原文地址:http://www.cnblogs.com/hixin/p/4122755.html