Compare commits
9 Commits
delete
...
v5.27.2-89
| Author | SHA1 | Date | |
|---|---|---|---|
| da3948228f | |||
| 2a496b680b | |||
| db535cf281 | |||
| c199582efc | |||
| b53677a118 | |||
| 68006dda38 | |||
| b5cab193be | |||
| bb81d91fd5 | |||
| eb5c55f046 |
@ -57,8 +57,7 @@ public class DataUtils {
|
||||
return;
|
||||
}
|
||||
|
||||
// 初始化 Sentry 约占用 90ms,这里切换到子线程初始化
|
||||
AppExecutor.getIoExecutor().execute(() -> initSentry(context, channel));
|
||||
initSentry(context, channel);
|
||||
}
|
||||
|
||||
private static void initSentry(Context context, String channel) {
|
||||
|
||||
@ -83,7 +83,7 @@ class ForumArticleAskListFragment : LazyListFragment<AnswerEntity, ForumArticleA
|
||||
mListRv.setBackgroundColor(R.color.background_white.toColor(requireContext()))
|
||||
mScrollCalculatorHelper = ForumScrollCalculatorHelper(R.id.horizontalVideoView, R.id.verticalVideoView, 0)
|
||||
|
||||
requireView().setBackgroundColor(R.color.background_white.toColor(requireContext()))
|
||||
view?.setBackgroundColor(R.color.background_white.toColor(requireContext()))
|
||||
|
||||
mSkeletonScreen = Skeleton.bind(mBinding.listSkeleton)
|
||||
.shimmer(true)
|
||||
@ -142,13 +142,16 @@ class ForumArticleAskListFragment : LazyListFragment<AnswerEntity, ForumArticleA
|
||||
|
||||
override fun onLoadRefresh() {
|
||||
super.onLoadRefresh()
|
||||
requireView().setBackgroundColor(R.color.background_white.toColor(requireContext()))
|
||||
// Fix:https://sentry.shanqu.cc/organizations/lightgame/issues/288994/?project=22&query=LazyListFragment&statsPeriod=14d
|
||||
// Fragment在内存泄露的情况下,调用requireView()会触发崩溃,这里替换为getView()方法
|
||||
// TODO 解决Fragment内存泄露的问题
|
||||
view?.setBackgroundColor(R.color.background_white.toColor(requireContext()))
|
||||
}
|
||||
|
||||
override fun onLoadDone() {
|
||||
super.onLoadDone()
|
||||
requireView().setBackgroundColor(Color.TRANSPARENT)
|
||||
AppExecutor.uiExecutor.executeWithDelay(Runnable {
|
||||
view?.setBackgroundColor(Color.TRANSPARENT)
|
||||
mBaseHandler.postDelayed(Runnable {
|
||||
tryCatchInRelease {
|
||||
scroll()
|
||||
mScrollCalculatorHelper?.onScrollStateChanged(mListRv, RecyclerView.SCROLL_STATE_IDLE)
|
||||
@ -158,12 +161,12 @@ class ForumArticleAskListFragment : LazyListFragment<AnswerEntity, ForumArticleA
|
||||
|
||||
override fun onLoadError() {
|
||||
super.onLoadError()
|
||||
requireView().setBackgroundColor(Color.TRANSPARENT)
|
||||
view?.setBackgroundColor(Color.TRANSPARENT)
|
||||
}
|
||||
|
||||
override fun onLoadEmpty() {
|
||||
super.onLoadEmpty()
|
||||
requireView().setBackgroundColor(Color.TRANSPARENT)
|
||||
view?.setBackgroundColor(Color.TRANSPARENT)
|
||||
}
|
||||
|
||||
override fun hideRefreshingLayout() {
|
||||
|
||||
@ -289,6 +289,9 @@ public class HaloApp extends MultiDexApplication {
|
||||
}
|
||||
|
||||
private void postInit(long delay) {
|
||||
// 初始化 sentry
|
||||
DataUtils.init(this, mChannel);
|
||||
|
||||
// 获取/更新 GID 和 读 SP 的操作不需要 delay
|
||||
DataUtils.getGid();
|
||||
|
||||
@ -313,8 +316,6 @@ public class HaloApp extends MultiDexApplication {
|
||||
MainWrapperRepository.Companion.getInstance().getHomeNavBar();
|
||||
|
||||
AppExecutor.getUiExecutor().executeWithDelay(() -> {
|
||||
initThirdPartySdk();
|
||||
|
||||
FixedRateJobHelper.begin();
|
||||
|
||||
RegionSettingHelper.getRegionSetting();
|
||||
@ -382,10 +383,6 @@ public class HaloApp extends MultiDexApplication {
|
||||
});
|
||||
}
|
||||
|
||||
private void initThirdPartySdk() {
|
||||
DataUtils.init(this, mChannel);
|
||||
}
|
||||
|
||||
private void initDataHelper() {
|
||||
VideoRecordUtils.init(this, AppExecutor.getLogExecutor());
|
||||
}
|
||||
|
||||
@ -7,8 +7,8 @@ ext {
|
||||
targetSdkVersion = 28
|
||||
|
||||
// application info (每个大版本之间的 versionCode 增加 20)
|
||||
versionCode = 891
|
||||
versionName = "5.27.1"
|
||||
versionCode = 892
|
||||
versionName = "5.27.2"
|
||||
applicationId = "com.gh.gamecenter"
|
||||
|
||||
// AndroidX
|
||||
|
||||
@ -33,7 +33,14 @@ class OAIDProviderImpl : IOAIDProvider {
|
||||
if (cachedCert.isNotEmpty()) {
|
||||
Utils.log(TAG, "使用缓存的证书来初始化 $cachedCert")
|
||||
|
||||
val result = MdidSdkHelper.InitCert(context, cachedCert)
|
||||
var result = false
|
||||
try {
|
||||
result = MdidSdkHelper.InitCert(context, cachedCert)
|
||||
} catch (e: Throwable) {
|
||||
e.printStackTrace()
|
||||
|
||||
Utils.log(TAG, "初始化证书异常 ${e.localizedMessage}")
|
||||
}
|
||||
|
||||
Utils.log(TAG, "初始化证书结果 $result")
|
||||
|
||||
@ -52,7 +59,15 @@ class OAIDProviderImpl : IOAIDProvider {
|
||||
override fun onSuccess(data: CertEntity) {
|
||||
Utils.log(TAG, "获取到的证书为 ${data.cert}")
|
||||
|
||||
val result = MdidSdkHelper.InitCert(context, data.cert)
|
||||
var result = false
|
||||
try {
|
||||
result = MdidSdkHelper.InitCert(context, data.cert)
|
||||
} catch (e: Throwable) {
|
||||
e.printStackTrace()
|
||||
|
||||
Utils.log(TAG, "初始化证书异常 ${e.localizedMessage}")
|
||||
}
|
||||
|
||||
SPUtils.setString(SP_OAID_CERT, data.cert)
|
||||
|
||||
Utils.log(TAG, "初始化证书结果 $result")
|
||||
@ -68,17 +83,22 @@ class OAIDProviderImpl : IOAIDProvider {
|
||||
}
|
||||
|
||||
private fun getOAIDForReal(context: Context, fromCached: Boolean, callback: (String) -> Unit) {
|
||||
val code = MdidSdkHelper.InitSdk(context, false, true, false, false) { p0 ->
|
||||
p0?.oaid?.let {
|
||||
callback.invoke(it)
|
||||
try {
|
||||
val code = MdidSdkHelper.InitSdk(context, false, true, false, false) { p0 ->
|
||||
p0?.oaid?.let {
|
||||
callback.invoke(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Utils.log(TAG, "获取 OAID 的返回值为 $code")
|
||||
Utils.log(TAG, "获取 OAID 的返回值为 $code")
|
||||
|
||||
// 缓存的证书失效了,访问接口重新获取
|
||||
if (fromCached && code == 1008616) {
|
||||
getCertFromServerThenGetOAID(context, callback)
|
||||
// 缓存的证书失效了,访问接口重新获取
|
||||
if (fromCached && code == 1008616) {
|
||||
getCertFromServerThenGetOAID(context, callback)
|
||||
}
|
||||
} catch (t: Throwable) {
|
||||
t.printStackTrace()
|
||||
Utils.log(TAG, "初始化 OAID 异常")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -45,6 +45,33 @@ android {
|
||||
buildConfigField "String", "DEV_SA_SERVER_URL", "\"${SA_SERVER_URL}\""
|
||||
buildConfigField "String", "SA_SERVER_URL", "\"${SA_SERVER_URL}\""
|
||||
}
|
||||
|
||||
tea {
|
||||
dimension "env"
|
||||
|
||||
manifestPlaceholders.put("SENSORS_SCHEME" , "saf547873a")
|
||||
|
||||
buildConfigField "String", "DEV_SA_SERVER_URL", "\"${SA_SERVER_URL}\""
|
||||
buildConfigField "String", "SA_SERVER_URL", "\"${SA_SERVER_URL}\""
|
||||
}
|
||||
|
||||
kuaishou {
|
||||
dimension "env"
|
||||
|
||||
manifestPlaceholders.put("SENSORS_SCHEME" , "saf547873a")
|
||||
|
||||
buildConfigField "String", "DEV_SA_SERVER_URL", "\"${SA_SERVER_URL}\""
|
||||
buildConfigField "String", "SA_SERVER_URL", "\"${SA_SERVER_URL}\""
|
||||
}
|
||||
|
||||
gdt {
|
||||
dimension "env"
|
||||
|
||||
manifestPlaceholders.put("SENSORS_SCHEME" , "saf547873a")
|
||||
|
||||
buildConfigField "String", "DEV_SA_SERVER_URL", "\"${SA_SERVER_URL}\""
|
||||
buildConfigField "String", "SA_SERVER_URL", "\"${SA_SERVER_URL}\""
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
|
||||
Reference in New Issue
Block a user