47 lines
1.5 KiB
Kotlin
47 lines
1.5 KiB
Kotlin
package com.gh.common.provider
|
|
|
|
import android.content.Context
|
|
import android.content.Intent
|
|
import com.alibaba.android.arouter.facade.annotation.Route
|
|
import com.gh.gamecenter.WebActivity
|
|
import com.gh.gamecenter.common.constant.RouteConsts
|
|
import com.gh.gamecenter.core.provider.IWebProvider
|
|
|
|
@Route(path = RouteConsts.provider.webActivity, name = "WebActivity暴露服务")
|
|
class WebProviderImpl : IWebProvider {
|
|
override fun getIntent(context: Context, url: String, autoCompletionTitle: Boolean): Intent {
|
|
return WebActivity.getIntent(context, url, autoCompletionTitle)
|
|
}
|
|
|
|
override fun getWebIntent(context: Context, title: String, url: String): Intent {
|
|
return WebActivity.getWebIntent(context, title, url)
|
|
}
|
|
|
|
override fun getBindWechatIntent(context: Context): Intent {
|
|
return WebActivity.getBindWechatIntent(context)
|
|
}
|
|
|
|
override fun getQAIntent(
|
|
context: Context?,
|
|
url: String?,
|
|
title: String?,
|
|
isWebPageHandleBackPressed: Boolean,
|
|
qaType: Int
|
|
): Intent {
|
|
return WebActivity.getQAIntent(context, url, title, isWebPageHandleBackPressed, qaType)
|
|
}
|
|
|
|
override fun getIntentByNews(
|
|
context: Context?,
|
|
concernLink: String?,
|
|
concernGameName: String,
|
|
concernId: String?,
|
|
entrance: String?
|
|
): Intent {
|
|
return WebActivity.getIntentByNews(context, concernLink, concernGameName, concernId, entrance)
|
|
}
|
|
|
|
override fun init(context: Context?) {
|
|
// Do nothing
|
|
}
|
|
} |