1.ADSWindowManager单例中handler会造成内存泄漏进行纠正
2.CategoryApp 删除多余单例再次初始化 3.第三方日志开关和本应用日志为统一一个开关
This commit is contained in:
@@ -3,6 +3,7 @@ package com.ik.mboxlauncher.ui;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
|
||||
import androidx.media3.common.Player;
|
||||
|
||||
@@ -27,7 +28,7 @@ public class ADSWindowManager implements HomeMultiView.MultiViewListener{
|
||||
private int currentADIndex=0;
|
||||
private Context mContext;
|
||||
private static ADSWindowManager mInstance = null;
|
||||
private Handler mHandler= new Handler();
|
||||
private MyHandler mHandler;
|
||||
|
||||
/**广告延迟播放时间*/
|
||||
// private static final long DELAYED_TIME=1000*60*5;
|
||||
@@ -39,6 +40,7 @@ public class ADSWindowManager implements HomeMultiView.MultiViewListener{
|
||||
|
||||
private ADSWindowManager(Context context){
|
||||
this.mContext =context;
|
||||
mHandler=new MyHandler(Looper.getMainLooper());
|
||||
}
|
||||
|
||||
public static void init(Context context){
|
||||
@@ -195,6 +197,10 @@ public class ADSWindowManager implements HomeMultiView.MultiViewListener{
|
||||
};
|
||||
|
||||
|
||||
|
||||
private static class MyHandler extends Handler{
|
||||
private MyHandler(Looper looper){
|
||||
super(looper);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ public class MyApplication extends Application {
|
||||
ADManager.init(getApplicationContext());
|
||||
SharePreUtils.getInstance(getApplicationContext());
|
||||
AdConfig config = new AdConfig.Builder()
|
||||
.isDebug(false)//是否开始 debug 模式,开启会打印更多log,供开发调试
|
||||
.isDebug(LogManager.getmInstance().isReadLog())//是否开始 debug 模式,开启会打印更多log,供开发调试
|
||||
.productName("aike")//正式发版时使用正式的PN
|
||||
.productTag("launcher")//正式发版时使用正式的PT
|
||||
// .productName("test")//仅限开发测试使用
|
||||
|
||||
Reference in New Issue
Block a user