Commit b6f69dae authored by mengcuiguang's avatar mengcuiguang

代码合并

parent 3505d8cb
......@@ -179,14 +179,8 @@ public class VedioAdingManager {
private String getHighWeight() {
isTTVideoAd = !isTTVideoAd;
if (isTTVideoAd) {
if (AppConfig.csjVedioAdCount <= 0) {
return Constant.SDHZ_VEDIO_AD;
}
return Constant.CSJ_VEDIO_AD;
} else {
if (AppConfig.ylhAdCount <= 0) {
return Constant.SDHZ_VEDIO_AD;
}
return Constant.YLH_VEDIO_AD;
}
}
......
......@@ -221,4 +221,6 @@ object Constant {
// 是否是高额任务
const val IS_HIGH_TASK = "is_high_task"
// 高额任务包名
const val PKG_HIGH_TASK = "pkg_high_task"
}
......@@ -31,11 +31,22 @@ object DownloadApkManager {
private var cachePath = ""
private var canOnceInstallApk = false//8.0以上系统 防止首次授权时 未安装apk调用
/**
* 下载apk
*
* url:下载地址
*/
fun downloadApk(url: String) {
apkName = MD5.GetMD5Code(System.currentTimeMillis().toString() + UserManager.getInstance().userID) + ".apk"
this.download(url)
}
/**
* 下载apk
*
* url:下载地址
* name:应用名称
*/
fun downloadApk(url: String, name: String) {
this.apkName = apkName
this.download(url)
......
......@@ -25,7 +25,7 @@ object YlhAdManager {
var YLH_AD_VEDIO_DRINK_POSTID = "2031043750380462" //喝水打卡
var YLH_AD_VEDIO_MAIN_POSTID = "8081940760988417" //我的界面视频
var YLH_AD_VEDIO_ERASE_POSTID = "9061142700180449" //挑战刮刮乐
var YLH_AD_VEDIO_TURNABLE_POSTID = "5051746700185561" //大转盘
var YLH_AD_VEDIO_TURNABLE_POSTID = "7001353223571334" //大转盘
var YLH_AD_VEDIO_MOREDIALOG_POSTID = "9001346780383626" //气泡
var YLH_AD_VEDIO_SIGN_POSTID = "2091354158635490" //签到
var YLH_AD_VEDIO_OFFINELINE_POSTID = "2031954198632389" //离线弹框
......@@ -83,14 +83,14 @@ object YlhAdManager {
// 开屏
YLH_AD_SPLASH_POSTID = "4031840694338658"
// 激励视频
YLH_AD_VEDIO_DRINK_POSTID = "7091944614237712"
YLH_AD_VEDIO_MAIN_POSTID = "7091944614237712"
YLH_AD_VEDIO_ERASE_POSTID = "7091944614237712"
YLH_AD_VEDIO_TURNABLE_POSTID = "7091944614237712"
YLH_AD_VEDIO_MOREDIALOG_POSTID = "7091944614237712"
YLH_AD_VEDIO_SIGN_POSTID = "7091944614237712"
YLH_AD_VEDIO_BLESSINGBAG_POSTID = "7091944614237712"
YLH_AD_VEDIO_OFFINELINE_POSTID = "7091944614237712"
YLH_AD_VEDIO_DRINK_POSTID = "1031552263176415"
YLH_AD_VEDIO_MAIN_POSTID = "1031552263176415"
YLH_AD_VEDIO_ERASE_POSTID = "1031552263176415"
YLH_AD_VEDIO_TURNABLE_POSTID = "1031552263176415"
YLH_AD_VEDIO_MOREDIALOG_POSTID = "1031552263176415"
YLH_AD_VEDIO_SIGN_POSTID = "1031552263176415"
YLH_AD_VEDIO_BLESSINGBAG_POSTID = "1031552263176415"
YLH_AD_VEDIO_OFFINELINE_POSTID = "1031552263176415"
return
}
......@@ -102,7 +102,7 @@ object YlhAdManager {
YLH_AD_VEDIO_DRINK_POSTID = "2031043750380462"
YLH_AD_VEDIO_MAIN_POSTID = "8081940760988417"
YLH_AD_VEDIO_ERASE_POSTID = "9061142700180449"
YLH_AD_VEDIO_TURNABLE_POSTID = "5051746700185561"
YLH_AD_VEDIO_TURNABLE_POSTID = "7001353223571334"
YLH_AD_VEDIO_MOREDIALOG_POSTID = "9001346780383626"
YLH_AD_VEDIO_BLESSINGBAG_POSTID = "1081758148138388"
YLH_AD_VEDIO_SIGN_POSTID = "2091354158635490"
......
......@@ -246,6 +246,7 @@ open class MyPresenter : BasePresenter<MyView>() {
/**
* 设置高额任务状态
*
* value
*/
fun setHighTaskType(value: String) {
val vo = HashMap<String, Any>()
......
......@@ -50,7 +50,11 @@ public class AppInstallService extends Service {
public void onDestroy() {
super.onDestroy();
unregisterReceiver(this.broadcastReceiver);
try {
unregisterReceiver(this.broadcastReceiver);
} catch (Exception e) {
e.printStackTrace();
}
}
public int onStartCommand(Intent paramIntent, int paramInt1, int paramInt2) {
......
......@@ -67,7 +67,12 @@ private val TAG = MyFragment::class.java.simpleName
* 时间:2020/6/4 17:30
*/
@SuppressLint("SetTextI18n")
class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshListener, View.OnClickListener, AdapterView.OnItemClickListener {
class MyFragment : BaseFragment(),
MyView,
OnItemChildClickListener,
OnRefreshListener,
View.OnClickListener,
AdapterView.OnItemClickListener {
private val ps by lazy { AppPreferences(context) }
private val myPresenter by lazy { MyPresenter() }
......@@ -94,6 +99,7 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
// 高额任务
private var mCurrentPkg: String? = null
private var mReceiverBroadcastReceiver: BroadcastReceiver? = null
private var cdaa: CustomDialogAsApple? = null
......@@ -473,7 +479,6 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
highVideoTint(taskBean)
} else {
openAppUsageStats()
return
}
}
1 -> {
......@@ -499,7 +504,6 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
}
}
}
// 跳转首页视频
MainMyAdapter.TO_SHARE_NEWS -> {
if (!UserManager.getInstance().userIsLogin()) {
readyGo(WxLoginActivity::class.java)
......@@ -816,8 +820,6 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
showMissingPermissionDialog("设备")
}
}
}
Constant.HOT_ACTIVITY_SCRAPPAGE -> {
RxPermissions(requireActivity())
......@@ -1219,6 +1221,8 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
* 注册高额任务监听
*/
private fun registerBroad() {
if (mReceiverBroadcastReceiver != null) return
mReceiverBroadcastReceiver = object : BroadcastReceiver() {
override fun onReceive(context: Context?, intent: Intent?) {
if (intent == null) return
......@@ -1240,6 +1244,4 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
intentFilter.addAction(AppInstallService.APP_INSTALL_ACTION)
mContext.registerReceiver(this.mReceiverBroadcastReceiver, intentFilter)
}
private var mReceiverBroadcastReceiver: BroadcastReceiver? = null
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment