1.ADManager处理安装apk重启设备安装应用回调不严谨误删安装APK

2.ADManager 处理同一个广告位更新广告数据后未上报前重启未清除之前已上报的信息
3.Manifest 文件application标签添加persistent阻止Launcher轻易被杀死
4.开屏自定义View xml文件属性更正
This commit is contained in:
2025-12-25 15:05:53 +08:00
parent 9fdeb528cc
commit e10fe43759
3 changed files with 12 additions and 2 deletions

View File

@@ -39,6 +39,7 @@
android:label="@string/app_name"
android:largeHeap="true"
android:supportsRtl="false"
android:persistent="true"
android:usesCleartextTraffic="true"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
<activity

View File

@@ -5,7 +5,7 @@
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/bg"
tools:context=".ui.SplashscreenActivity"
tools:context=".ui.Launcher"
tools:ignore="MergeRootFrame">

View File

@@ -181,6 +181,7 @@ public class ADManager implements DownLoadManeger.DownloadListener {
continue;
}
DaoManager.getInstance().update(AdsInfoBean.class,adsInfoBean);
SharePreUtils.savePreference();
analysisResInfo(aDInfo,adsInfoBean);
}else {
LogUtils.loge(aDInfo.getId()+"广告任务已存在");
@@ -400,10 +401,18 @@ public class ADManager implements DownLoadManeger.DownloadListener {
LogUtils.loge("onFinish filePath==>" + bean.getTaskType()+"||"+appInstallPath);
if(bean.getTaskType()==1){
boolean flag = PakageInstallUtil.silentInstall(mContext, appInstallPath);
List<AdsInfoBean> list = DaoManager.getInstance().queryByKeyList(AdsInfoBean.class, "appUrl", bean.getUrl());
AdsInfoBean adsInfoBean=null;
if(list!=null&&list.size()>0){
adsInfoBean=list.get(0);
}else {
LogUtils.loge("onFinish: adsInfoBean table no apk url data");
}
AdsInfoBean finalAdsInfoBean = adsInfoBean;
handler.postDelayed(new Runnable() {
@Override
public void run() {
if (flag) {
if (flag&&finalAdsInfoBean!=null&&PakageInstallUtil.checkAppInstall(mContext, finalAdsInfoBean.getInfo())) {
FileUtil.deleteFile(appInstallPath); //安装成功后删除文件
LogUtils.loge("executeAppInstall==>" + flag + "||" + appInstallPath);
}