|
@@ -905,6 +905,7 @@ class MainActivity : BaseActivity<MainViewModel, ActivityMainBinding>(),Download
|
905
|
905
|
try {
|
906
|
906
|
//获得已安装应用列表
|
907
|
907
|
val appList = AppUtils.GetAllAppList(this)
|
|
908
|
+ getAppStoreList()
|
908
|
909
|
try {
|
909
|
910
|
//获得预装应用的包名
|
910
|
911
|
val currentList =
|
|
@@ -915,7 +916,8 @@ class MainActivity : BaseActivity<MainViewModel, ActivityMainBinding>(),Download
|
915
|
916
|
val removeList = arrayListOf<AppInfo>()
|
916
|
917
|
currentList.forEach { pkg ->
|
917
|
918
|
//除了管控之类的我们的app之外的预装都不在统计范围
|
918
|
|
- if (Const.CURRENTAPPPKG != pkg && Const.STOREAPPPKG != pkg) {
|
|
919
|
+ val filter = appStroeList.filter { it.appPackage == pkg }
|
|
920
|
+ if (Const.CURRENTAPPPKG != pkg && Const.STOREAPPPKG != pkg &&filter.size==0) {
|
919
|
921
|
appList.filter { it.packageName == pkg }.forEach {
|
920
|
922
|
removeList.add(it)
|
921
|
923
|
}
|