Android 打开进入快霸,应用列表还是未显示
/vendor/mediatek/proprietary/packages/apps/DuraSpeed/src/com/mediatek/duraspeed/DatabaseManager.java
public void updateDatabase() {
// Get all the installed app list, exclude white list
PackageManager pm = Utils.getPackageManager(mContext);
int flags = PackageManager.GET_UNINSTALLED_PACKAGES |
PackageManager.GET_DISABLED_COMPONENTS;
List<ApplicationInfo> originalAppList = pm.getInstalledApplications(flags);
for (String data : mInvisibleAppWhitelist) {
Log.i(TAG, "hide list = " + data);
}Intent launchIntent = new Intent(Intent.ACTION_MAIN, null)
.addCategory(Intent.CATEGORY_LAUNCHER);
List<ResolveInfo> intents = pm.queryIntentActivities(
launchIntent, PackageManager.GET_DISABLED_COMPONENTS);
synchronized (sLock) {
// Insert the apps installed before duraspeed app launched.
List<String> originalPkgList = new ArrayList<String>();
for (ApplicationInfo appInfo : originalAppList) {
String pkgName = appInfo.packageName;
originalPkgList.add(pkgName);//把系统app判断移出才能显示
/*/rm system app to duraspeed whitelist
if (!Utils.isSystemApp(appInfo) &&
//*/
if(
//*/
Utils.hasLauncherEntry(pkgName, intents)) {
if (mInvisibleAppWhitelist.contains(pkgName)) {
continue;
}
if (!pkgExistsInCache(pkgName)) {
insert(pkgName);
}
}
}// Delete the apps uninstalled before duraspeed app launched.
Iterator<AppRecord> iter = mAppRecordsCache.iterator();
while (iter.hasNext()) {
String packageName = iter.next().getPkgName();
if (!originalPkgList.contains(packageName)) {
iter.remove();
mDataBaseHelper.delete(packageName);
}
}
originalPkgList.clear();
}
originalAppList.clear();
intents.clear();
}
项目下宏控:
#duraspeed
MTK_DURASPEED_DEFAULT_ON = yes
MTK_DURASPEED_SUPPORT = yes
原文地址:https://blog.csdn.net/qq_46687516/article/details/143675296
免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!