Merge branch 'feature/v1.0.3' of gitlab.zhidaoauto.com:ecos/yycp-service/Launcher into feature/v1.0.3
This commit is contained in:
@@ -3,6 +3,7 @@ apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlin-android-extensions'
|
||||
apply plugin: 'com.alibaba.arouter'
|
||||
apply plugin: 'kotlin-kapt'
|
||||
apply plugin: 'android-aspectjx'
|
||||
|
||||
android {
|
||||
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
||||
@@ -50,6 +51,7 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.androidxviewpager2
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
kapt rootProject.ext.dependencies.aroutercompiler
|
||||
implementation rootProject.ext.dependencies.aspectj
|
||||
|
||||
if (Boolean.valueOf(RELEASE)) {
|
||||
implementation rootProject.ext.dependencies.mogoutils
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.mogo.module.guide.util.SharedPreferenceUtil.setGuideFinish
|
||||
import com.mogo.service.IMogoServiceApis
|
||||
import com.mogo.service.MogoServicePaths
|
||||
import com.mogo.service.fragmentmanager.FragmentDescriptor
|
||||
import com.mogo.utils.UiThreadHandler
|
||||
import com.mogo.utils.logger.Logger
|
||||
|
||||
object GuideBizManager {
|
||||
@@ -48,11 +49,14 @@ object GuideBizManager {
|
||||
}
|
||||
|
||||
fun invokeAuthorize() {
|
||||
val authorizeInvoke = ARouter.getInstance().build(AuthorizeConstant.PROVIDER_MODULE).navigation()
|
||||
if (authorizeInvoke is IMogoAuthorizeModuleManager) {
|
||||
if (authorizeInvoke.needAuthorize(AUTHORIZE_TYPE_LAUNCHER_MAIN)) {
|
||||
authorizeInvoke.invokeAuthorizeForShow()
|
||||
UiThreadHandler.postDelayed({
|
||||
val authorizeInvoke = ARouter.getInstance().build(AuthorizeConstant.PROVIDER_MODULE).navigation()
|
||||
if (authorizeInvoke is IMogoAuthorizeModuleManager) {
|
||||
if (authorizeInvoke.needAuthorize(AUTHORIZE_TYPE_LAUNCHER_MAIN)) {
|
||||
authorizeInvoke.invokeAuthorizeForShow()
|
||||
}
|
||||
}
|
||||
}
|
||||
}, 3000L)
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.mogo.module.authorize.aspectj
|
||||
|
||||
import com.mogo.module.guide.util.SharedPreferenceUtil
|
||||
import com.mogo.utils.logger.Logger
|
||||
import org.aspectj.lang.ProceedingJoinPoint
|
||||
import org.aspectj.lang.annotation.Aspect
|
||||
import org.aspectj.lang.annotation.Before
|
||||
import org.aspectj.lang.annotation.Pointcut
|
||||
|
||||
@Aspect
|
||||
class VoiceForbiddenWhenGuide {
|
||||
|
||||
companion object {
|
||||
const val TAG = "VoiceForbiddenWhenGuide"
|
||||
}
|
||||
|
||||
@Pointcut("within(@com.mogo.commons.voice.VoiceTrack *)")
|
||||
fun withinAuthorizeClass() {
|
||||
}
|
||||
|
||||
@Pointcut("execution(!synthetic * *(..))&& withinAuthorizeClass()")
|
||||
fun methodInsideAuthorize() {
|
||||
}
|
||||
|
||||
@Pointcut("execution(@com.mogo.commons.voice.VoiceTrack * *(..))|| methodInsideAuthorize()")
|
||||
fun authorizeTrackPoint() {
|
||||
}
|
||||
|
||||
@Before("authorizeTrackPoint()")
|
||||
fun trackVoiceWhenAuthorize(joinPoint: ProceedingJoinPoint) {
|
||||
Logger.d(TAG, "trackVoiceWhenAuthorize")
|
||||
val msg = joinPoint.args[0] as String
|
||||
if (SharedPreferenceUtil.hasGuide()) {
|
||||
Logger.d(TAG, "proceed,no interception")
|
||||
joinPoint.proceed()
|
||||
} else {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -52,4 +52,9 @@ class GuideFragment : MvpFragment<GuideConstract.View, GuidePresenter>(), GuideC
|
||||
private fun invokeAuthorize() {
|
||||
GuideBizManager.invokeAuthorize()
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
invokeAuthorize()
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 322 KiB After Width: | Height: | Size: 323 KiB |
Reference in New Issue
Block a user