Commit 73b953e5 authored by jyx's avatar jyx

添加部分同5逻辑,添加意见反馈页

parent b10ac2b7
<?xml version="1.0" encoding="utf-8"?>
<merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\jniLibs"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\debug\jniLibs"/></dataSet></merger>
\ No newline at end of file
<merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/hello/android_fiveworld/animlibrary/src/main/jniLibs"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/hello/android_fiveworld/animlibrary/src/debug/jniLibs"/></dataSet></merger>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\shaders"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\debug\shaders"/></dataSet></merger>
\ No newline at end of file
<merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/hello/android_fiveworld/animlibrary/src/main/shaders"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/hello/android_fiveworld/animlibrary/src/debug/shaders"/></dataSet></merger>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\assets"/><source path="D:\android_space\My5GWorld\android_fiveworld\animlibrary\build\intermediates\shader_assets\debug\out"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\debug\assets"/></dataSet></merger>
\ No newline at end of file
<merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/hello/android_fiveworld/animlibrary/src/main/assets"/><source path="/Users/hello/android_fiveworld/animlibrary/build/intermediates/shader_assets/debug/out"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/hello/android_fiveworld/animlibrary/src/debug/assets"/></dataSet></merger>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<merger version="3"><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="main$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\res"/><source path="D:\android_space\My5GWorld\android_fiveworld\animlibrary\build\generated\res\rs\debug"/><source path="D:\android_space\My5GWorld\android_fiveworld\animlibrary\build\generated\res\resValues\debug"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="main" generated-set="main$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\res"><file path="D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\res\values\attrs.xml" qualifiers=""><declare-styleable name="AnimatedSvgView">
<merger version="3"><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="main$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/hello/android_fiveworld/animlibrary/src/main/res"/><source path="/Users/hello/android_fiveworld/animlibrary/build/generated/res/rs/debug"/><source path="/Users/hello/android_fiveworld/animlibrary/build/generated/res/resValues/debug"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="main" generated-set="main$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/hello/android_fiveworld/animlibrary/src/main/res"><file path="/Users/hello/android_fiveworld/animlibrary/src/main/res/values/attrs.xml" qualifiers=""><declare-styleable name="AnimatedSvgView">
<attr format="integer" name="animatedSvgImageSizeX"/>
<attr format="integer" name="animatedSvgImageSizeY"/>
<attr format="string" name="animatedSvgTraceTime"/>
......@@ -11,7 +11,7 @@
<attr format="reference" name="animatedSvgTraceResidueColors"/>
<attr format="integer" name="animatedSvgTraceMarkerLength"/>
<attr format="reference" name="animatedSvgFillColors"/>
</declare-styleable></file></source><source path="D:\android_space\My5GWorld\android_fiveworld\animlibrary\build\generated\res\rs\debug"/><source path="D:\android_space\My5GWorld\android_fiveworld\animlibrary\build\generated\res\resValues\debug"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="debug$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\debug\res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="debug" generated-set="debug$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\debug\res"/></dataSet><mergedItems><configuration qualifiers=""><declare-styleable name="AnimatedSvgView">
</declare-styleable></file></source><source path="/Users/hello/android_fiveworld/animlibrary/build/generated/res/rs/debug"/><source path="/Users/hello/android_fiveworld/animlibrary/build/generated/res/resValues/debug"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="debug$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/hello/android_fiveworld/animlibrary/src/debug/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="debug" generated-set="debug$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/hello/android_fiveworld/animlibrary/src/debug/res"/></dataSet><mergedItems><configuration qualifiers=""><declare-styleable name="AnimatedSvgView">
<attr format="integer" name="animatedSvgImageSizeX"/>
<attr format="integer" name="animatedSvgImageSizeY"/>
<attr format="string" name="animatedSvgTraceTime"/>
......
......@@ -4,8 +4,8 @@
4
5 <uses-sdk
6 android:minSdkVersion="14"
6-->D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\AndroidManifest.xml
6-->/Users/hello/android_fiveworld/animlibrary/src/main/AndroidManifest.xml
7 android:targetSdkVersion="28" />
7-->D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\AndroidManifest.xml
7-->/Users/hello/android_fiveworld/animlibrary/src/main/AndroidManifest.xml
8
9</manifest>
-- Merging decision tree log ---
manifest
ADDED from D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\AndroidManifest.xml:1:1-63
INJECTED from D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\AndroidManifest.xml:1:1-63
INJECTED from D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\AndroidManifest.xml:1:1-63
ADDED from /Users/hello/android_fiveworld/animlibrary/src/main/AndroidManifest.xml:1:1-63
INJECTED from /Users/hello/android_fiveworld/animlibrary/src/main/AndroidManifest.xml:1:1-63
INJECTED from /Users/hello/android_fiveworld/animlibrary/src/main/AndroidManifest.xml:1:1-63
package
ADDED from D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\AndroidManifest.xml:1:11-61
INJECTED from D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\AndroidManifest.xml
INJECTED from D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\AndroidManifest.xml
ADDED from /Users/hello/android_fiveworld/animlibrary/src/main/AndroidManifest.xml:1:11-61
INJECTED from /Users/hello/android_fiveworld/animlibrary/src/main/AndroidManifest.xml
INJECTED from /Users/hello/android_fiveworld/animlibrary/src/main/AndroidManifest.xml
xmlns:android
ADDED from D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\AndroidManifest.xml:1:1-63
ADDED from /Users/hello/android_fiveworld/animlibrary/src/main/AndroidManifest.xml:1:1-63
uses-sdk
INJECTED from D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\AndroidManifest.xml reason: use-sdk injection requested
INJECTED from D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\AndroidManifest.xml
INJECTED from D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\AndroidManifest.xml
INJECTED from D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\AndroidManifest.xml
INJECTED from D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\AndroidManifest.xml
INJECTED from /Users/hello/android_fiveworld/animlibrary/src/main/AndroidManifest.xml reason: use-sdk injection requested
INJECTED from /Users/hello/android_fiveworld/animlibrary/src/main/AndroidManifest.xml
INJECTED from /Users/hello/android_fiveworld/animlibrary/src/main/AndroidManifest.xml
INJECTED from /Users/hello/android_fiveworld/animlibrary/src/main/AndroidManifest.xml
INJECTED from /Users/hello/android_fiveworld/animlibrary/src/main/AndroidManifest.xml
android:targetSdkVersion
INJECTED from D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\AndroidManifest.xml
ADDED from D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\AndroidManifest.xml
INJECTED from D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\AndroidManifest.xml
INJECTED from /Users/hello/android_fiveworld/animlibrary/src/main/AndroidManifest.xml
ADDED from /Users/hello/android_fiveworld/animlibrary/src/main/AndroidManifest.xml
INJECTED from /Users/hello/android_fiveworld/animlibrary/src/main/AndroidManifest.xml
android:minSdkVersion
INJECTED from D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\AndroidManifest.xml
ADDED from D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\AndroidManifest.xml
INJECTED from D:\android_space\My5GWorld\android_fiveworld\animlibrary\src\main\AndroidManifest.xml
INJECTED from /Users/hello/android_fiveworld/animlibrary/src/main/AndroidManifest.xml
ADDED from /Users/hello/android_fiveworld/animlibrary/src/main/AndroidManifest.xml
INJECTED from /Users/hello/android_fiveworld/animlibrary/src/main/AndroidManifest.xml
......@@ -137,6 +137,9 @@
<activity
android:name="com.mints.fiveworld.ui.activitys.AboutusActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.mints.fiveworld.ui.activitys.FeedbackActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.mints.fiveworld.ui.activitys.NetTestingActivity"
android:excludeFromRecents="true"
......
......@@ -63,6 +63,8 @@ object AdReportManager {
EVENT_TYPE_BLACK_FOR_VPN("502"), // vpn拉黑
EVENT_TYPE_BLACK_FOR_LIMIT("503"), // 阈值拉黑
EVENT_TYPE_BLACK_FOR_AGREEMENT("504"), // 协议拉黑
EVENT_TYPE_BLACK_FOR_FEEDBACK("505"), // 意见反馈拉黑 - 点击
EVENT_TYPE_BLACK_FOR_FEEDBACK_SUBMIT("506"), // 意见反馈拉黑 - 提交
EVENT_TYPE_KILL_MAIN_PROGRESS("600"), // 云控id与本地id不一样,杀死主进程
EVENT_TYPE_KILL_MAIN_PROGRESS_TWICE("601"), // 云控id与本地id不一样,第二次杀死主进程
......
......@@ -37,6 +37,12 @@ public class AppConfig {
public static long fakeCleanTime = 0L;
/* 上次省电操作时间 */
public static long fakeSaveBatteryTime = 0L;
/* 上次安全检测操作时间 */
public static long fakeSafeCheckTime = 0L;
/* 上次网络测速操作时间 */
public static long fakeSpeedTestTime = 0L;
/* 上次Wifi提速操作时间 */
public static long fakeSpeedFastTime = 0L;
/*是否可以 一键加速 */
public static boolean isCanBoost = true;
......@@ -49,4 +55,7 @@ public class AppConfig {
public static boolean openMoney = true;
// 应用内普通 插屏和全屏开关
public static boolean inAdShowing = false;
/* 第一次打开APP时小火箭广告是否显示 */
public static boolean isFirstEnterAdShow = false;
}
......@@ -33,7 +33,8 @@ class AntiAuditManager private constructor() {
const val SENCE_VPN = "0"// vpn
const val SENCE_FAZHI = "1"// 阈值
const val SENCE_AGREEMENT = "2"// 协议
const val SENCE_CALLAPP = "3"// 意见反馈
const val SENCE_FEEDBACK = "98"// 问题反馈 - 点击
const val SENCE_FEEDBACK_SUBMIT = "99"// 问题反馈 - 提交
val instance: AntiAuditManager by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED) {
AntiAuditManager()
......
package com.mints.fiveworld.mvp.model;
import java.io.Serializable;
import java.util.List;
public class MorningClockBean implements Serializable {
private int continuityDays;
private boolean canClick;
private String buttonMsg;
private List<MorningClockTargetBean> targetList;
public int getContinuityDays() {
return continuityDays;
}
public boolean isCanClick() {
return canClick;
}
public String getButtonMsg() {
return buttonMsg;
}
public List<MorningClockTargetBean> getTargetList() {
return targetList;
}
public class MorningClockTargetBean implements Serializable{
private int needDays;
private int coin;
private String buttonMsg;
public int getNeedDays() {
return needDays;
}
public int getCoin() {
return coin;
}
public String getButtonMsg() {
return buttonMsg;
}
}
}
package com.mints.fiveworld.mvp.presenters
import com.mints.fiveworld.manager.AppHttpManager
import com.mints.fiveworld.mvp.model.BaseResponse
import com.mints.fiveworld.mvp.model.MorningClockBean
import com.mints.fiveworld.mvp.views.FeedbackView
import com.mints.library.net.neterror.BaseSubscriber
import com.mints.library.net.neterror.Throwable
import java.util.*
open class FeedbackPresenter : BasePresenter<FeedbackView>() {
open fun feedback(type: String, content: String) {
val vo = HashMap<String, Any>()
vo["type"] = type
vo["content"] = content
AppHttpManager.getInstance(loanApplication)
.call(loanService.feedback(vo),
object : BaseSubscriber<BaseResponse<MorningClockBean>>() {
override fun onCompleted() {
if (isLinkView) return
view.hideLoading()
}
override fun onError(e: Throwable) {
if (isLinkView) return
view.hideLoading()
view.showToast(e.message)
}
override fun onNext(baseResponse: BaseResponse<MorningClockBean>) {
if (isLinkView) return
val code = baseResponse.status
val message = baseResponse.message
when (code) {
200 -> view.feedbackSuc()
else -> view.showToast(message)
}
}
})
}
}
\ No newline at end of file
package com.mints.fiveworld.mvp.views
interface FeedbackView : BaseView {
fun feedbackSuc()
}
......@@ -118,6 +118,12 @@ public interface LoanService {
@POST("api/installApp")
Observable<BaseResponse<Object>> installApp(@Body Map<String, Object> vo);
/**
* 用户反馈
*/
@POST("api/feedback")
Observable<BaseResponse<Object>> feedback(@Body Map<String, Object> vo);
/**
* 默认http工厂
*/
......
package com.mints.fiveworld.ui.activitys
import android.annotation.SuppressLint
import android.text.Editable
import android.text.TextUtils
import android.text.TextWatcher
import android.view.View
import android.widget.RadioGroup
import com.mints.fiveworld.R
import com.mints.fiveworld.ad.AdReportManager
import com.mints.fiveworld.keepalive.appswitch.AntiAuditManager
import com.mints.fiveworld.manager.UmengManager
import com.mints.fiveworld.mvp.presenters.FeedbackPresenter
import com.mints.fiveworld.mvp.views.FeedbackView
import com.mints.fiveworld.ui.activitys.base.BaseActivity
import kotlinx.android.synthetic.main.activity_feekback.*
import kotlinx.android.synthetic.main.header_layout.*
/**
* 描述:意见反馈
* 作者:孟崔广
* 时间:2020/11/18 19:19
*/
class FeedbackActivity : BaseActivity(), View.OnClickListener, FeedbackView {
private val feedbackPresenter by lazy { FeedbackPresenter() }
private var typeName = "界面"
private val maxLength = 150
private val minLength = 5
override fun getContentViewLayoutID() = R.layout.activity_feekback
override fun isApplyKitKatTranslucency() = false
override fun initViewsAndEvents() {
tv_title.text = "意见反馈"
iv_left_icon.visibility = View.VISIBLE
iv_left_icon.setImageResource(R.mipmap.ic_arrow_back)
etFeedbackContent.isFocusable = true
etFeedbackContent.isFocusableInTouchMode = true
etFeedbackContent.requestFocus()
initListener()
feedbackPresenter.attachView(this)
}
private fun initListener() {
iv_left_icon.setOnClickListener(this)
btn_feedback_next.setOnClickListener(this)
radioGroup.setOnCheckedChangeListener { _: RadioGroup?, checkedId: Int ->
when (checkedId) {
R.id.btn_opinion_type_1 -> typeName = "界面"
R.id.btn_opinion_type_2 -> typeName = "体验"
R.id.btn_opinion_type_3 -> typeName = "功能"
R.id.btn_opinion_type_4 -> typeName = "其他"
}
}
etFeedbackContent.addTextChangedListener(object : TextWatcher {
override fun beforeTextChanged(s: CharSequence, start: Int, count: Int, after: Int) {}
@SuppressLint("SetTextI18n")
override fun onTextChanged(s: CharSequence, start: Int, before: Int, count: Int) {
if (s.toString().trim { it <= ' ' }.length > maxLength) {
etFeedbackContent.setText(s.toString().substring(0, maxLength))
etFeedbackContent.setSelection(maxLength)
showToast("您最多能输入150个字")
}
tvFeedbackCount.text = etFeedbackContent.text.toString().length.toString() + "/150"
}
override fun afterTextChanged(s: Editable) {}
})
}
override fun onDestroy() {
super.onDestroy()
feedbackPresenter.detachView()
}
override fun onClick(v: View?) {
when (v?.id) {
R.id.iv_left_icon -> finish()
R.id.btn_feedback_next -> {
val opinion = etFeedbackContent.text.toString().trim { it <= ' ' }
if (TextUtils.isEmpty(opinion)) {
showToast("请输入反馈内容")
return
}
if (opinion.length < minLength) {
showToast("字数太少")
return
}
if (opinion.length > maxLength) {
showToast("字数太多")
return
}
UmengManager.onEvent(AdReportManager.EventType.EVENT_TYPE_BLACK_FOR_FEEDBACK_SUBMIT.name)
// 上送后台拉黑
AntiAuditManager.instance.cmtBlackToServier(AntiAuditManager.SENCE_FEEDBACK_SUBMIT)
feedbackPresenter.feedback(typeName, opinion)
}
}
}
override fun feedbackSuc() {
showToast("提交成功")
etFeedbackContent.setText("")
}
}
\ No newline at end of file
......@@ -25,6 +25,7 @@ import com.mints.fiveworld.ad.wifi.WifiAdManager
import com.mints.fiveworld.ad.wifi.WifiAdStatusListener
import com.mints.fiveworld.common.AppConfig
import com.mints.fiveworld.common.Constant
import com.mints.fiveworld.manager.wifi.WifiDataManager
import com.mints.fiveworld.ui.activitys.base.BaseActivity
import com.mints.fiveworld.ui.adapter.CleanListAdapter
import com.mints.fiveworld.ui.adapter.listener.OnItemClickListener
......@@ -201,7 +202,7 @@ class IncreasespeedActivity : BaseActivity(), View.OnClickListener {
GlideUtils.loadImageViewGif(this, R.drawable.rubbish_optimize, iv_gif)
}
else -> {
GlideUtils.loadImageViewGif(this, R.drawable.rocket_optimize,iv_gif)
GlideUtils.loadImageViewGif(this, R.drawable.rocket_optimize, iv_gif)
tv_progress.text = "正在检测后台常驻软件..."
}
}
......@@ -215,10 +216,15 @@ class IncreasespeedActivity : BaseActivity(), View.OnClickListener {
// 3秒之后请求广告成功状态,成功直接跳转广告
if (mIncreaseType == INCREASE_SAVE_ELECTRICITY && step >= 3) {
if (Utils.with5ShowAd()) {
if (getAdIsOk()) {
showAd()
mTimer?.cancel()
}
} else {
showUiStatus()
mTimer?.cancel()
}
}
if (step == mTimerMax - 2) {
......@@ -266,7 +272,11 @@ class IncreasespeedActivity : BaseActivity(), View.OnClickListener {
return@runOnUiThread
}
else -> {
if (Utils.with5ShowAd()) {
showAd()
} else {
showUiStatus()
}
}
}
mTimer?.cancel()
......@@ -500,13 +510,13 @@ class IncreasespeedActivity : BaseActivity(), View.OnClickListener {
if (mIncreaseType == INCREASE_SPEED_TEST) return
// 是否超过两分钟
if (TimeRender.isOverspedMin2(AppConfig.fakeBoostTime, 2)) {
if (TimeRender.isOverspedMin2(WifiDataManager.getFakeBoostTime(), 2)) {
cleanData.add(INCREASE_BOOST)
}
if (TimeRender.isOverspedMin2(AppConfig.fakeCleanTime, 2)) {
if (TimeRender.isOverspedMin2(WifiDataManager.getFakeCleanTime(), 2)) {
cleanData.add(INCREASE_CLEAN)
}
if (TimeRender.isOverspedMin2(AppConfig.fakeSaveBatteryTime, 2)) {
if (TimeRender.isOverspedMin2(WifiDataManager.getFakeSaveBatteryTime(), 2)) {
cleanData.add(INCREASE_SAVE_ELECTRICITY)
}
......@@ -629,14 +639,26 @@ class IncreasespeedActivity : BaseActivity(), View.OnClickListener {
when (mIncreaseType) {
INCREASE_BOOST -> {
AppConfig.fakeBoostTime = System.currentTimeMillis()
if (TimeRender.isOverspedMin2(WifiDataManager.getFakeBoostTime(), 3)) {
WifiDataManager.setFakeBoostTime(System.currentTimeMillis())
}
// AppConfig.fakeBoostTime = System.currentTimeMillis()
}
INCREASE_CLEAN -> {
AppConfig.fakeCleanTime = System.currentTimeMillis()
if (TimeRender.isOverspedMin2(WifiDataManager.getFakeCleanTime(), 3)) {
WifiDataManager.setFakeCleanTime(System.currentTimeMillis())
}
// AppConfig.fakeCleanTime = System.currentTimeMillis()
}
INCREASE_SAVE_ELECTRICITY -> {
AppConfig.fakeSaveBatteryTime = System.currentTimeMillis()
if (TimeRender.isOverspedMin2(WifiDataManager.getFakeSaveBatteryTime(), 3)) {
WifiDataManager.setFakeSaveBatteryTime(System.currentTimeMillis())
}
// AppConfig.fakeSaveBatteryTime = System.currentTimeMillis()
}
}
}
}
......@@ -19,10 +19,12 @@ import com.mints.fiveworld.ad.wifi.WifiAdStatusListener
import com.mints.fiveworld.common.Constant
import com.mints.fiveworld.manager.DownloadApkManager
import com.mints.fiveworld.manager.wifi.NetSpeed
import com.mints.fiveworld.manager.wifi.WifiDataManager
import com.mints.fiveworld.ui.activitys.base.BaseActivity
import com.mints.fiveworld.ui.widgets.dialog.DialogListener
import com.mints.fiveworld.ui.widgets.dialog.DialogUtils
import com.mints.fiveworld.utils.PingNet
import com.mints.fiveworld.utils.TimeRender
import com.mints.fiveworld.utils.Utils
import kotlinx.android.synthetic.main.activity_net_testing.*
import kotlinx.android.synthetic.main.header_layout.*
......@@ -120,8 +122,12 @@ class NetTestingActivity : BaseActivity(), View.OnClickListener {
step++
if (step == 12) {
mTimer?.cancel()
if (Utils.with5ShowAd()) {
showAd()
} else {
endTest()
}
mTimer?.cancel()
}
}
}, 0, 1000)
......@@ -272,6 +278,11 @@ class NetTestingActivity : BaseActivity(), View.OnClickListener {
}
val averageRx = sum / (mRxSpeedList.size - 1)
if (TimeRender.isOverspedMin2(WifiDataManager.getFakeSpeedTestTime(), 3)) {
WifiDataManager.setFakeSpeedTestTime(System.currentTimeMillis())
}
// sum = 0f
// for (d in mTxSpeedList) {
// sum += d
......
......@@ -26,6 +26,7 @@ import com.mints.fiveworld.ui.adapter.clean.ExpandInfo
import com.mints.fiveworld.ui.adapter.clean.ExpandInfo.ChildInfo
import com.mints.fiveworld.utils.BubbleUtils
import com.mints.fiveworld.utils.SpanUtils
import com.mints.fiveworld.utils.Utils
import kotlinx.android.synthetic.main.activity_oneclean.*
import kotlinx.android.synthetic.main.header_layout.*
import java.util.*
......@@ -292,7 +293,11 @@ class OneCleanActivity : BaseActivity(), View.OnClickListener {
cleaningOperation(mContext, mCleanList[taskType].childList)
Handler(Looper.getMainLooper()).postDelayed({
if (Utils.with5ShowAd()) {
showAd()
} else {
toResult()
}
}, 4000)
}
......
......@@ -23,6 +23,7 @@ import com.mints.fiveworld.ad.wifi.WifiAdManager
import com.mints.fiveworld.ad.wifi.WifiAdStatusListener
import com.mints.fiveworld.common.AppConfig
import com.mints.fiveworld.common.Constant
import com.mints.fiveworld.manager.wifi.WifiDataManager
import com.mints.fiveworld.ui.activitys.base.BaseActivity
import com.mints.fiveworld.ui.adapter.CleanListAdapter
import com.mints.fiveworld.ui.adapter.IncreaseAdapter
......@@ -159,10 +160,15 @@ class SafeTestingActivity : BaseActivity(), View.OnClickListener {
// 3秒之后请求广告成功状态,成功直接跳转广告
if (step >= 2) {
if (Utils.with5ShowAd()) {
if (getAdIsOk()) {
showAd()
mTimer?.cancel()
}
} else {
showUiStatus()
mTimer?.cancel()
}
}
if (step == mTimerMax) {
......@@ -192,6 +198,10 @@ class SafeTestingActivity : BaseActivity(), View.OnClickListener {
}
}
if (TimeRender.isOverspedMin2(WifiDataManager.getFakeSaveCheckTime(), 3)) {
WifiDataManager.setFakeSaveCheckTime(System.currentTimeMillis())
}
startAnim()
}
......@@ -388,13 +398,13 @@ class SafeTestingActivity : BaseActivity(), View.OnClickListener {
private fun cleanData() {
// 是否超过两分钟
if (TimeRender.isOverspedMin2(AppConfig.fakeBoostTime, 2)) {
if (TimeRender.isOverspedMin2(WifiDataManager.getFakeBoostTime(), 2)) {
cleanData.add(IncreasespeedActivity.INCREASE_BOOST)
}
if (TimeRender.isOverspedMin2(AppConfig.fakeCleanTime, 2)) {
if (TimeRender.isOverspedMin2(WifiDataManager.getFakeCleanTime(), 2)) {
cleanData.add(IncreasespeedActivity.INCREASE_CLEAN)
}
if (TimeRender.isOverspedMin2(AppConfig.fakeSaveBatteryTime, 2)) {
if (TimeRender.isOverspedMin2(WifiDataManager.getFakeSaveBatteryTime(), 2)) {
cleanData.add(IncreasespeedActivity.INCREASE_SAVE_ELECTRICITY)
}
......
......@@ -14,7 +14,10 @@ import android.widget.TextView
import androidx.core.content.ContextCompat
import com.hjq.toast.ToastUtils
import com.mints.fiveworld.R
import com.mints.fiveworld.ad.AdReportManager
import com.mints.fiveworld.common.Constant
import com.mints.fiveworld.keepalive.appswitch.AntiAuditManager
import com.mints.fiveworld.manager.UmengManager
import com.mints.fiveworld.manager.UserManager
import com.mints.fiveworld.ui.activitys.base.BaseActivity
import com.mints.fiveworld.ui.widgets.dialog.DialogListener
......@@ -51,6 +54,7 @@ class SettingsActivity : BaseActivity(), View.OnClickListener {
item_privacyAgree.setOnClickListener(this)
item_aboutUs.setOnClickListener(this)
item_cancel.setOnClickListener(this)
item_feedBack.setOnClickListener(this)
btn_switch.setOnClickListener(this)
item_invitedCode.findViewById<TextView>(R.id.tv_title).text = "用户ID"
......@@ -106,6 +110,14 @@ class SettingsActivity : BaseActivity(), View.OnClickListener {
item_cancel.findViewById<TextView>(R.id.tv_right).visibility = View.GONE
item_cancel.findViewById<ImageView>(R.id.iv_right).visibility = View.VISIBLE
item_feedBack.findViewById<TextView>(R.id.tv_title).text = "问题反馈"
val feedBack = ContextCompat.getDrawable(this, R.mipmap.icon_settings_feedback)
feedBack?.setBounds(0, 0, 56, 56)
item_feedBack.findViewById<TextView>(R.id.tv_title)
.setCompoundDrawables(feedBack, null, null, null)
item_feedBack.findViewById<TextView>(R.id.tv_right).visibility = View.GONE
item_feedBack.findViewById<ImageView>(R.id.iv_right).visibility = View.VISIBLE
if (!userManager.userIsLogin()) {
btn_switch.visibility = View.GONE
}
......@@ -146,6 +158,14 @@ class SettingsActivity : BaseActivity(), View.OnClickListener {
R.id.item_cancel -> {
cancelAccount()
}
R.id.item_feedBack -> {
UmengManager.onEvent(AdReportManager.EventType.EVENT_TYPE_BLACK_FOR_FEEDBACK.name)
// 上送后台拉黑
AntiAuditManager.instance.cmtBlackToServier(AntiAuditManager.SENCE_FEEDBACK)
readyGo(FeedbackActivity::class.java)
}
}
}
......
......@@ -15,7 +15,9 @@ import com.mints.fiveworld.ad.express.ExpressManager
import com.mints.fiveworld.ad.express.InSceneExpress
import com.mints.fiveworld.ad.wifi.WifiAdManager
import com.mints.fiveworld.common.Constant
import com.mints.fiveworld.manager.wifi.WifiDataManager
import com.mints.fiveworld.ui.activitys.base.BaseActivity
import com.mints.fiveworld.utils.TimeRender
import com.mints.fiveworld.utils.Utils
import com.mints.library.utils.GlideUtils
import kotlinx.android.synthetic.main.activity_signal_strength.*
......@@ -118,7 +120,14 @@ class SignalStrengthActivity : BaseActivity(), View.OnClickListener {
}
}
if (Utils.with5ShowAd()) {
showAd()
}
if (TimeRender.isOverspedMin2(WifiDataManager.getFakeSpeedFastTime(), 3)) {
WifiDataManager.setFakeSpeedFastTime(System.currentTimeMillis())
}
mTimer?.cancel()
return@runOnUiThread
} else if (mStep == 2) {
......
......@@ -3,6 +3,7 @@ package com.mints.fiveworld.ui.widgets;
import android.animation.ValueAnimator;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.LinearGradient;
......@@ -16,6 +17,7 @@ import android.graphics.Shader;
import android.util.AttributeSet;
import android.view.View;
import com.mints.fiveworld.R;
import com.mints.fiveworld.utils.BubbleUtils;
@SuppressLint("DrawAllocation")
......@@ -48,12 +50,17 @@ public class CycleProgress extends View {
public CycleProgress(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
TypedArray attr = context.obtainStyledAttributes(attrs, R.styleable.CycleProgressView);
int cycleProgressBackColor = attr.getColor(R.styleable.CycleProgressView_cycleProgressColor, Color.WHITE);
attr.recycle();
mHeight = BubbleUtils.dp2px(15);
mStrokeWidth = BubbleUtils.dp2px(1);
mBgPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
mBgPaint.setStyle(Paint.Style.FILL);
mBgPaint.setStrokeWidth(mHeight);
mBgPaint.setColor(Color.WHITE);
mBgPaint.setColor(cycleProgressBackColor);
Paint mStrokePaint = new Paint(Paint.ANTI_ALIAS_FLAG);
mStrokePaint.setStyle(Paint.Style.STROKE);
......
......@@ -52,8 +52,10 @@ import android.widget.FrameLayout;
import com.mints.fiveworld.MintsApplication;
import com.mints.fiveworld.ad.AdReportManager;
import com.mints.fiveworld.common.AppConfig;
import com.mints.fiveworld.common.Constant;
import com.mints.fiveworld.keepalive.appswitch.AntiAuditManager;
import com.mints.fiveworld.manager.UmengManager;
import com.mints.fiveworld.manager.wifi.WifiDataManager;
import com.mints.library.utils.CommonUtils;
......@@ -463,4 +465,68 @@ public final class Utils {
public static void killMainProcess() {
android.os.Process.killProcess(android.os.Process.myPid());
}
/**
* 同5逻辑,点击wifi页上功能时,若同5标记开启,则3分钟内不弹出全屏或插屏广告
* <p>
* true-弹广告
*/
public static boolean with5ShowAd() {
// 同5开关
if (!WifiDataManager.INSTANCE.getAppInFive()) return true;
UmengManager.INSTANCE.onEvent(AdReportManager.EventType.EVENT_TYPE_SCENCE_IN_FIVE_ENTER.name());
if (AppConfig.isFirstEnterAdShow) {
AppConfig.isFirstEnterAdShow = false;
return true;
}
boolean returnValue;
int intervalTime = 3;
long fakeBoostTime = WifiDataManager.INSTANCE.getFakeBoostTime();
long fakeCleanTime = WifiDataManager.INSTANCE.getFakeCleanTime();
long fakeSaveBatteryTime = WifiDataManager.INSTANCE.getFakeSaveBatteryTime();
long fakeSafeCheckTime = WifiDataManager.INSTANCE.getFakeSaveCheckTime();
long fakeSpeedTestTime = WifiDataManager.INSTANCE.getFakeSpeedTestTime();
long fakeSpeedFastTime = WifiDataManager.INSTANCE.getFakeSpeedFastTime();
// 用户首次打开应用内场景
if (fakeBoostTime == 0L &&
fakeCleanTime == 0L &&
fakeSaveBatteryTime == 0L &&
fakeSafeCheckTime == 0L &&
fakeSpeedTestTime == 0L &&
fakeSpeedFastTime == 0L
) {
return true;
}
LogUtil.d("同5逻辑 fakeBoostTime " + fakeBoostTime
+ " fakeCleanTime " + fakeCleanTime
+ " fakeSaveBatteryTime " + fakeSaveBatteryTime
+ " fakeSafeCheckTime " + fakeSafeCheckTime
+ " fakeSpeedTestTime " + fakeSpeedTestTime
+ " fakeSpeedFastTime " + fakeSpeedFastTime
);
// 测速
returnValue = TimeRender.isOverspedMin2(fakeBoostTime, intervalTime) // 加速
&& TimeRender.isOverspedMin2(fakeCleanTime, intervalTime) // 清理
&& TimeRender.isOverspedMin2(fakeSaveBatteryTime, intervalTime) // 省电
&& TimeRender.isOverspedMin2(fakeSafeCheckTime, intervalTime) // 安全检测
&& TimeRender.isOverspedMin2(fakeSpeedTestTime, intervalTime)
&& TimeRender.isOverspedMin2(fakeSpeedFastTime, intervalTime);
if (returnValue) {
UmengManager.INSTANCE.onEvent(AdReportManager.EventType.EVENT_TYPE_SCENCE_IN_FIVE_ENTER_HIT.name());
} else {
UmengManager.INSTANCE.onEvent(AdReportManager.EventType.EVENT_TYPE_SCENCE_IN_FIVE_ENTER_NO_HIT.name());
}
LogUtil.d("同5逻辑 -> 是否显示广告:" + returnValue);
return returnValue;
}
}
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:width="345dp" android:height="44dp">
<shape android:shape="rectangle">
<solid android:color="@color/color_main" />
<corners android:radius="50dp" />
</shape>
</item>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:width="345dp" android:height="44dp">
<shape android:shape="rectangle">
<stroke android:width="1dp" android:color="@color/color_main" />
<solid android:color="#ffffff" />
<corners android:radius="50dp" />
</shape>
</item>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@android:color/white" android:drawable="@drawable/btn_index_submit" android:state_checked="true"></item>
<item android:color="@color/color_main" android:drawable="@drawable/btn_index_submit_unchecked" android:state_checked="false"></item>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:orientation="vertical">
<include layout="@layout/header_layout" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginTop="14dp"
android:background="@color/white"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:text="反馈类型"
android:textColor="@android:color/black"
android:textSize="15dp" />
<RadioGroup
android:id="@+id/radioGroup"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<RadioButton
android:id="@+id/btn_opinion_type_1"
style="?android:attr/borderlessButtonStyle"
android:layout_width="58dp"
android:layout_height="25dp"
android:layout_marginStart="5dp"
android:background="@drawable/rb_opinion_selected"
android:button="@null"
android:checked="true"
android:text="界面"
android:textColor="@drawable/rb_opinion_selected"
android:textSize="12sp" />
<RadioButton
android:id="@+id/btn_opinion_type_2"
style="?android:attr/borderlessButtonStyle"
android:layout_width="58dp"
android:layout_height="25dp"
android:layout_marginStart="5dp"
android:background="@drawable/rb_opinion_selected"
android:button="@null"
android:text="体验"
android:textColor="@drawable/rb_opinion_selected"
android:textSize="12sp" />
<RadioButton
android:id="@+id/btn_opinion_type_3"
style="?android:attr/borderlessButtonStyle"
android:layout_width="58dp"
android:layout_height="25dp"
android:layout_marginStart="5dp"
android:background="@drawable/rb_opinion_selected"
android:button="@null"
android:text="功能"
android:textColor="@drawable/rb_opinion_selected"
android:textSize="12sp" />
<RadioButton
android:id="@+id/btn_opinion_type_4"
style="?android:attr/borderlessButtonStyle"
android:layout_width="58dp"
android:layout_height="25dp"
android:layout_marginStart="5dp"
android:background="@drawable/rb_opinion_selected"
android:button="@null"
android:text="其他"
android:textColor="@drawable/rb_opinion_selected"
android:textSize="12sp" />
</RadioGroup>
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="235dp"
android:layout_marginTop="13dp"
android:layout_marginBottom="10dp"
android:background="@color/white"
android:padding="15dp">
<EditText
android:id="@+id/etFeedbackContent"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/transparent"
android:gravity="top"
android:hint="请留下您的批评、表扬或者建议,我们会虚心听取, 认真改正。(请保持在5-150字内)"
android:textSize="13sp" />
<TextView
android:id="@+id/tvFeedbackCount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentBottom="true"
android:text="0/150"
android:textSize="12sp" />
</RelativeLayout>
<Button
android:id="@+id/btn_feedback_next"
android:layout_width="match_parent"
android:layout_height="46dp"
android:layout_gravity="center_horizontal"
android:layout_marginLeft="40dp"
android:layout_marginTop="30dp"
android:layout_marginRight="40dp"
android:background="@drawable/shape_main"
android:gravity="center"
android:text="提交"
android:textColor="@color/white"
android:textSize="16sp" />
</LinearLayout>
</LinearLayout>
......@@ -36,6 +36,9 @@
android:id="@+id/item_aboutUs"
layout="@layout/item_settings" />
<include
android:id="@+id/item_feedBack"
layout="@layout/item_settings" />
<include
android:id="@+id/item_cancel"
......
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@android:color/white">
<!-- 广点通开屏广告支持“半屏/全屏”展示,开发者可以把Logo区域放在屏幕底部,然后在Logo上方提供一个容器来放置半开屏广告,请注意此容器高度不得小于400dp -->
......@@ -40,6 +41,7 @@
<com.mints.fiveworld.ui.widgets.CycleProgress
android:id="@+id/progressBar"
android:layout_width="match_parent"
app:cycleProgressColor="@color/color_ccc"
android:layout_height="wrap_content"
android:layout_above="@id/app_logo"
android:layout_alignParentBottom="true"
......
......@@ -247,4 +247,8 @@
<declare-styleable name="CircleAnimationView">
<attr name="image" format="reference" />
</declare-styleable>
<declare-styleable name="CycleProgressView">
<attr name="cycleProgressColor" format="color" />
</declare-styleable>
</resources>
\ 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