Commit 4c7c4645 authored by mengcuiguang's avatar mengcuiguang

修改代码名称

parent fc1acc15
......@@ -23,7 +23,7 @@ import com.mints.flowbox.keepalive.NotificationService;
import com.mints.flowbox.keepalive.NotificationUtil;
import com.mints.flowbox.keepalive.OutAppRouter;
import com.mints.flowbox.keepalive.PackageWatch;
import com.mints.flowbox.screen.ScreenLockerObserver;
import com.mints.flowbox.keepalive.screen.ScreenLockerObserver;
import com.mints.flowbox.keepalive.ServiceUtil;
import com.mints.flowbox.keepalive.WifiStateWatch;
import com.mints.flowbox.manager.CsjGroMoreManager;
......
package com.mints.flowbox.screen
package com.mints.flowbox.keepalive.screen
object ScreenLockerConstants {
object ScreenConstant {
const val INTENT_KEY_FLAGS = "kdd1"
const val INTENT_KEY_MARK = "kdd2"
const val INTENT_KEY_REASON = "kdd3"
const val PAGE_SCREEN_LOCKER = "pg_screenlocker"
const val PAGE_SCREEN_LOCKER_MORE_THAN_2_SEC = "pg_screenlocker2"
const val EVENT_SCREEN_LOCKER_RECEIVE = "ev_dd_rcv"
const val EVENT_SCREEN_LOCKER_RECEIVE3 = "ev_dd_rcv3"
const val EVENT_SCREEN_LOCKER_SCREEN_OFF = "ev_dd_scroff"
const val EVENT_SCREEN_LOCKER_POWER_CONNECT = "ev_dd_pwrcon"
const val EVENT_SCREEN_LOCKER_SCREEN_ON = "ev_dd_scron"
const val EVENT_SCREEN_LOCKER_USER_PRESENT = "ev_dd_usrpre"
const val EVENT_SCREEN_LOCKER_START_PREINVOKE = "ev_dd_actst_preinv"
const val EVENT_SCREEN_LOCKER_START_INVOKED = "ev_dd_actst_inv"
const val EVENT_SCREEN_LOCKER_START_SUCCEED = "ev_dd_actst_sec"
const val EVENT_SCREEN_LOCKER_START_RESUMED = "ev_dd_actst_rsm"
const val EVENT_SCREEN_LOCKER_DESTROYED = "ev_dd_actdst"
const val EVENT_SCREEN_LOCKER_INIT = "ev_dd_init"
const val EVENT_SCREEN_LOCKER_INIT_2 = "ev_dd_init_2"
const val SHOW_REASON_UNKNWON = 0
const val SHOW_REASON_SCREEN_OFF = 1
const val SHOW_REASON_RESTART_SELF = 2
const val SHOW_REASON_SCREEN_ON = 3
const val SHOW_REASON_USER_PRESENT = 4
const val SHOW_REASON_CALL_IDLE = 5
const val SHOW_REASON_CHARGE = 6
const val SHOW_REASON_DIRECT_CALL = 7
}
\ No newline at end of file
package com.mints.flowbox.screen
package com.mints.flowbox.keepalive.screen
import android.app.Activity
import java.lang.ref.WeakReference
......@@ -14,29 +14,6 @@ object ScreenLockerContext {
internal var screenOffCalled = false
// fun createBottomAd(@Suppress("UNUSED_PARAMETER") context: Context): AdModule {
// if (context !is Activity) {
// throw IllegalArgumentException()
// }
//
// val hasSystemLockScreen = ScreenLockerUtils.hasSystemLockScreen(context)
// if (BuildConfig.DEBUG) Log.d(TAG, "bottomAd() called with: hasSystemLockScreen = $hasSystemLockScreen, context = [$context]")
//
// val adModule = AdUtils.initAdModuleArray(
// context,
// ScreenLockerAdConfig.AD_NAME_BOTTOM_AD,
// R.array.dd_ad_unit__bottom_ad/*,
// supportDeepLink = !hasSystemLockScreen
// */
// )
//
// adModule.updateConfig {
// it.nativeAdTemplate = R.layout.dd_layout_ad_template
// }
//
// return adModule
// }
private var activityRef: WeakReference<Activity>? = null
fun changeOwnership(activity: Activity) {
......
package com.mints.flowbox.screen
package com.mints.flowbox.keepalive.screen
//import com.squareup.module.feature.FeatureConstants
internal object ScreenLockerEvents {
internal object ScreenEvents {
private const val BASE = 867_0000
const val USER_UNLOCKED = BASE + 1
// const val SCREENLOCKER_UNLOCKED_BY_USER = FeatureConstants.CUSTOM_UNLOCKED
const val SCREENLOCKER_UNLOCKED_BY_USER = 0x00000232
const val CALL_INCOMING = BASE + 3
const val UNLOCK_REQUESTED = BASE + 4
......
package com.mints.flowbox.keepalive.screen
import net.settings.AppSettings
import net.settings.ISettings
object ScreenSettings {
const val KEY_ENABLED = "dd_ena"
const val ENABLED_DEFAULT = ISettings.BOOLEAN_TRUE
fun isEnabledFlag(): Boolean {
return AppSettings.global.readInt(
KEY_ENABLED,
ENABLED_DEFAULT
) == ISettings.BOOLEAN_TRUE
}
}
\ No newline at end of file
package com.mints.flowbox.screen.settings
import net.settings.IRemoteKeys
object ScreenLockerRemoteKeys : IRemoteKeys {
const val KEY_DISMISS_WITH_SYSTEM_KEYGUARD = "ext_dd_dwsk"
const val KEY_AD_EXPIRE_INTERVAL = "ext_dd_aexpint"
const val KEY_AD_POPULATE_INTERVAL = "ext_dd_alint"
const val KEY_RED_PACKET_POPUP_INTERVAL = "ext_dd_rp_ppint"
}
\ No newline at end of file
package com.mints.flowbox.screen.settings
import net.cloud.RemoteProxy
import net.common.minutesMillis
import net.settings.AppSettings
import net.settings.ISettings
object ScreenLockerSettings {
const val KEY_ENABLED = "dd_ena"
const val KEY_RED_PACKET_POPUP_TIME = "dd_rp_pptime"
const val ENABLED_DEFAULT = ISettings.BOOLEAN_TRUE
fun isEnabled(): Boolean {
return AppSettings.global.readInt(
KEY_ENABLED,
ENABLED_DEFAULT
) == ISettings.BOOLEAN_TRUE
}
fun isDismissWithSystemKeyguard(): Boolean {
return RemoteProxy.readInt(ScreenLockerRemoteKeys.KEY_DISMISS_WITH_SYSTEM_KEYGUARD, ISettings.BOOLEAN_FALSE) == ISettings.BOOLEAN_TRUE
}
/**
* 如果广告显示超过一定时长,无论如何我都换一个
*/
fun getAdExpireInterval(): Long {
return RemoteProxy.readLong(ScreenLockerRemoteKeys.KEY_AD_EXPIRE_INTERVAL, 45.minutesMillis())
}
fun getAdPopulateInterval(): Long {
return RemoteProxy.readLong(ScreenLockerRemoteKeys.KEY_AD_POPULATE_INTERVAL, 1.minutesMillis())
}
fun getRedPacketPopupInterval(): Long {
return RemoteProxy.readLong(ScreenLockerRemoteKeys.KEY_RED_PACKET_POPUP_INTERVAL, 30.minutesMillis())
}
var lastRedPacketPopupPopupTime: Long
get() = AppSettings.app.readLong(KEY_RED_PACKET_POPUP_TIME, 0L)
set(value) = AppSettings.app.writeLong(KEY_RED_PACKET_POPUP_TIME, value)
}
\ No newline at end of file
......@@ -35,7 +35,7 @@ class AboutusActivity : BaseActivity(), View.OnClickListener {
iv_left_icon.visibility = View.VISIBLE
iv_left_icon.setImageResource(R.mipmap.ic_arrow_back)
showLoading("加载中...")
// showLoading("加载中...")
ivAboutasIcon.setOnLongClickListener {
ToastUtil.showLong(
......
......@@ -13,8 +13,8 @@ import android.view.WindowManager
import androidx.core.app.ActivityCompat
import com.main.ScreenMonitor
import com.mints.flowbox.R
import com.mints.flowbox.screen.ScreenLockerContext
import com.mints.flowbox.screen.ScreenLockerObserver
import com.mints.flowbox.keepalive.screen.ScreenLockerContext
import com.mints.flowbox.keepalive.screen.ScreenLockerObserver
import com.mints.flowbox.utils.keepalive.ScreenLockerUtils
import com.mints.library.base.BaseSwipeBackCompatActivity
import com.mints.library.net.netstatus.NetUtils
......
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