//我已经安装了应用列表但是如何获得预先安装的应用启用/禁用列表?
PackageManager packageManager = getPackageManager();
List<PackageInfo> packageList = packageManager.getInstalledPackages(PackageManager.GET_PERMISSIONS);
String installedAppName=null;
String installedAppPackageName=null;
String installedVersion=null;
for(int i=0;i<packageList.size();i++){
PackageInfo packageInfo = (PackageInfo) packageList.get(i);
installedAppName = (String) getPackageManager().getApplicationLabel( packageInfo.applicationInfo);
installedAppPackageName = packageInfo.packageName;
installedVersion = packageInfo.versionName;
if(installedAppPackageName.equals("com.android.chrome")){
Log.i("installedAppPackageName", installedAppPackageName);
Log.i("installedVersion", installedVersion);
Log.i("Found", "FOUND");
break;
}
}