Merge remote-tracking branch 'origin/dev' into dev-5.28.0

This commit is contained in:
chenjuntao
2023-06-19 09:51:15 +08:00
29 changed files with 123 additions and 170 deletions

Binary file not shown.

View File

@ -5,8 +5,7 @@ import com.kwai.monitor.log.TurboAgent
import com.kwai.monitor.log.TurboConfig
object KuaishouHelper {
private val mAppId by lazy { BuildConfig.KUAI_SHOU_APP_ID.ifEmpty { "80655" } }
private val mAppId by lazy { BuildConfig.KUAI_SHOU_APP_ID.ifEmpty { "81537" } }
private val mAppName by lazy { BuildConfig.KUAI_SHOU_APP_NAME.ifEmpty { "guanghuanzhushou_1" } }
@JvmStatic

Binary file not shown.

View File

@ -165,9 +165,11 @@ class SplashScreenActivity : BaseActivity() {
val signatureHash = packageUtilsConfig?.getApkSignatureByPackageName(this, packageName)?.get(0)
val sideLoadInfo = packageUtilsConfig?.getSideLoadedInfo()
val trackEvent = JSONObject()
// 是否首次使用神策
val isFirstTime = SPUtils.getBoolean(Constants.SP_SENSORS_IS_FIRST_TIME, true)
tryCatchInRelease {
trackEvent.run {
put("\$is_first_time", SPUtils.getBoolean(Constants.SP_SENSORS_IS_FIRST_TIME, true))
put("\$is_first_time", isFirstTime)
put("is_side_loaded", sideLoadInfo?.get("is_side_loaded").toBoolean())
put("installer_store", sideLoadInfo?.get("installer_store") ?: "")
put("package_name", packageName)
@ -177,6 +179,10 @@ class SplashScreenActivity : BaseActivity() {
}
}
SensorsBridge.trackEvent("AppLaunch", trackEvent)
if (!isFirstTime && HaloApp.getInstance().isBrandNewInstall) {
// 神策不是第一次使用,但是全局标志为全新安装,有问题,上报数据供后续确认
SentryHelper.onEvent("WRONG_LAUNCH_LOG", "a_id", MetaUtil.getBase64EncodedAndroidId())
}
SPUtils.setBoolean(Constants.SP_SENSORS_IS_FIRST_TIME, false)
}

View File

@ -1264,6 +1264,8 @@ class HomeSearchToolWrapperFragment : SearchToolWrapperFragment() {
tabViewBinding.titleTv.visibility = View.GONE
tabViewBinding.invisibleTitleTv.visibility = View.GONE
tabViewBinding.titleIv.setFixedHeight(16)
// 部分设备加载图片时会获取到错误的最小宽度,这里为它做个 64DP 的保底尺寸
tabViewBinding.titleIv.setTag(ImageUtils.TAG_TARGET_WIDTH, 64F.dip2px())
tabViewBinding.titleIv.display(tabEntity.img)
tabViewBinding.titleIv.registerLoadingCallback(object : WrapContentDraweeView.LoadingCallback {
override fun loaded() {

View File

@ -59,14 +59,34 @@ class GameGallerySlideViewHolder(val binding: GameGallerySlideItemBinding) : Bas
binding.cardView.setCardBackgroundColor(R.color.text_FAFAFA.toColor(binding.root.context))
}
/**
* 获取分割好的游戏列表数据
*/
private fun getDividedGameList(): ArrayList<ArrayList<GameEntity>> {
val containerList = arrayListOf<ArrayList<GameEntity>>()
val gameDataList = mCachedSubject!!.data!!
val gameListSize = gameDataList.size
val bestNumber = mCachedSubject!!.data!!.size / 3
// 分割大小
val splitSize = gameDataList.size / 3
containerList.add(ArrayList(mCachedSubject!!.data!!.subList(0, bestNumber - 1)))
containerList.add(ArrayList(mCachedSubject!!.data!!.subList(bestNumber, bestNumber * 2 - 1)))
containerList.add(ArrayList(mCachedSubject!!.data!!.subList(bestNumber * 2, mCachedSubject!!.data!!.size - 1)))
if (splitSize > 1) {
containerList.add(ArrayList(gameDataList.subList(0, splitSize)))
containerList.add(ArrayList(gameDataList.subList(splitSize, splitSize * 2)))
containerList.add(ArrayList(gameDataList.subList(splitSize * 2, gameListSize)))
} else if (splitSize == 1) {
containerList.add(ArrayList(gameDataList.subList(0, 1)))
containerList.add(ArrayList(gameDataList.subList(1, 2)))
containerList.add(ArrayList(gameDataList.subList(2, 3)))
} else {
val tempGameList = arrayListOf<GameEntity>()
if (gameListSize != 0) {
tempGameList.add(gameDataList.first())
}
containerList.add(tempGameList)
containerList.add(tempGameList)
containerList.add(tempGameList)
}
return containerList
}
@ -88,6 +108,8 @@ class GameGallerySlideViewHolder(val binding: GameGallerySlideItemBinding) : Bas
}
override fun onBindViewHolder(holder: GameGallerySlideItemViewHolder, position: Int) {
if (gameList.isEmpty()) return
val gameEntity = gameList[position % gameList.size]
runOnIoThread(true) {

View File

@ -162,18 +162,19 @@ class GameVerticalAdapter(
fun checkResetData(updateData: SubjectEntity) {
var dataIds = ""
mSubjectEntity = updateData
mSubjectEntity.data?.forEach {
dataIds += it.id
}
mSubjectEntity = updateData
if ((countAndKey?.first == updateData.data?.size && countAndKey?.second != dataIds) || mDarkMode != DarkModeUtils.isDarkModeOn(
mContext
)
) { // 数量不变,内容发生改变
if ((countAndKey?.first == updateData.data?.size && countAndKey?.second != dataIds)
|| mDarkMode != DarkModeUtils.isDarkModeOn(mContext)
) {
// 数量不变,内容发生改变
notifyItemRangeChanged(0, itemCount)
mDarkMode = DarkModeUtils.isDarkModeOn(mContext)
} else if (countAndKey?.first != updateData.data?.size) { // 数量发生改变
} else if (countAndKey?.first != updateData.data?.size) {
// 数量发生改变
notifyDataSetChanged()
}

View File

@ -83,6 +83,7 @@ class HomeGameCollectionAdapter(
val gamesCollectionEntity = itemData.gameCollectionItem
root.layoutParams.width = DisplayUtils.getScreenWidth() - 50F.dip2px()
if (gamesCollectionEntity != null) {
poster.setTag(ImageUtils.TAG_TARGET_WIDTH, DisplayUtils.getScreenWidth() - 50F.dip2px())
ImageUtils.display(poster, gamesCollectionEntity.cover)
ImageUtils.display(userIv, gamesCollectionEntity.user?.icon)
titleTv.text = gamesCollectionEntity.title

View File

@ -127,7 +127,12 @@ class HomeItemGameTestV2ViewHolder(
super.onScrollStateChanged(recyclerView, newState)
Utils.log("onScrollStateChanged: newState = $newState")
if (newState == RecyclerView.SCROLL_STATE_IDLE) {
recyclerView.handler.removeCallbacksAndMessages(null)
// 高速滑动时可能触发空指针闪退
try {
recyclerView.handler.removeCallbacksAndMessages(null)
} catch (e: NullPointerException) {
e.printStackTrace()
}
recyclerView.postDelayed(300) { // 解决动画没结束时候条目和时间轴不对应问题
onRecyclerViewChanged(true)
}

View File

@ -5,6 +5,7 @@ import android.app.Activity
import android.app.Dialog
import android.content.Context
import android.content.Intent
import android.os.Build
import android.os.Bundle
import android.util.DisplayMetrics
import android.view.LayoutInflater
@ -13,6 +14,8 @@ import android.view.inputmethod.InputMethodManager
import android.widget.*
import androidx.core.content.ContextCompat
import androidx.core.os.bundleOf
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import androidx.fragment.app.Fragment
import androidx.lifecycle.Observer
import androidx.recyclerview.widget.RecyclerView
@ -305,8 +308,22 @@ open class NewCommentFragment : ListFragment<CommentEntity, NewCommentViewModel>
commentContainer?.layoutParams = layoutParams
}
mKeyboardHeightProvider = KeyboardHeightProvider(activity)
view.post { mKeyboardHeightProvider?.start() }
// 判断是否处于平板的平行视界模式
val configString = requireContext().resources.configuration.toString()
val isMagicMode = configString.contains("magic-window") || configString.contains("window-magic")
// 平板上的导航方式改成按键时,使用 KeyboardHeightProvider 的 PopupWindow 会拦截掉所有的触摸事件
// 根据测试 Android 11 以前的系统用 WindowInsetsCompat.Type.ime()).bottom 获取不到正确的值
// 所以仅在系统为大于 10 且处于平行视界模式时才切换实现
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R && isMagicMode) {
ViewCompat.setOnApplyWindowInsetsListener(requireActivity().window.decorView) { _: View?, insets: WindowInsetsCompat ->
onKeyboardHeightChanged(insets.getInsets(WindowInsetsCompat.Type.ime()).bottom, 0)
insets
}
} else {
mKeyboardHeightProvider = KeyboardHeightProvider(activity)
view.post { mKeyboardHeightProvider?.start() }
}
val emptyHint = mCachedView?.findViewById<TextView>(R.id.reuseNoneDataTv)
emptyHint?.text = "这里还没有人评论噢~"
emptyHint?.setTextColor(R.color.background_white.toColor(requireContext()))

View File

@ -12,6 +12,7 @@ import com.gh.gamecenter.adapter.viewholder.GameViewHolder
import com.gh.gamecenter.common.base.BaseRecyclerViewHolder
import com.gh.gamecenter.common.utils.*
import com.gh.gamecenter.common.view.DrawableView
import com.gh.gamecenter.core.utils.DisplayUtils
import com.gh.gamecenter.core.utils.RandomUtils
import com.gh.gamecenter.core.utils.TimeUtils
import com.gh.gamecenter.databinding.ItemGameServerTestBigImageBinding
@ -31,6 +32,7 @@ class GameBigImageViewHolder(val binding: ItemGameServerTestBigImageBinding) :
) {
holder.bindGameInfo(gameEntity, adapter, exposureEvent, entrance)
holder.binding.gameImage.goneIf(gameEntity.topVideo != null || gameEntity.homeSetting.image.isEmpty()) {
binding.gameImage.setTag(ImageUtils.TAG_TARGET_WIDTH, DisplayUtils.getScreenWidth() - 32F.dip2px())
ImageUtils.display(binding.gameImage, gameEntity.homeSetting.image)
val hierarchy = binding.gameImage.hierarchy
try {
@ -40,6 +42,10 @@ class GameBigImageViewHolder(val binding: ItemGameServerTestBigImageBinding) :
}
}
holder.binding.autoVideoView.goneIf(gameEntity.topVideo == null) {
binding.autoVideoView.thumbImage.setTag(
ImageUtils.TAG_TARGET_WIDTH,
DisplayUtils.getScreenWidth() - 32F.dip2px()
)
if (!holder.binding.autoVideoView.isInPlayingState) {
GSYVideoOptionBuilder()
.setIsTouchWiget(false)

View File

@ -447,8 +447,12 @@ object VHelper {
if (!isInstalled
&& mIsServiceConnected
&& mDelegateManager.isConnectAidlInterface) {
isInstalled = mDelegateManager.checkGameInstalled(packageName)
Utils.log(LOG_TAG, "手动调用 AIDL 获取安装情况 -> $isInstalled")
try {
isInstalled = mDelegateManager.checkGameInstalled(packageName)
Utils.log(LOG_TAG, "手动调用 AIDL 获取安装情况 -> $isInstalled")
} catch (e: RuntimeException) {
Utils.log(LOG_TAG, "手动调用 AIDL 获取安装情况异常 ${e.localizedMessage}")
}
}
return isInstalled

View File

@ -11,6 +11,7 @@ import android.os.Build;
import android.os.StrictMode;
import android.preference.PreferenceManager;
import android.text.TextUtils;
import android.webkit.WebView;
import androidx.annotation.NonNull;
import androidx.collection.ArrayMap;
@ -202,6 +203,19 @@ public class HaloApp extends MultiDexApplication {
mInstance = this;
// 每个进程都用自己的进程名作为后缀的文件夹来存 WebView cache
// https://sentry.shanqu.cc/organizations/lightgame/issues/285063/?project=22&query=is%3Aunresolved
// https://stackoverflow.com/a/61748345/4812571 这个无效
// WebView.disableWebView() 也无效
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
try {
String process = getProcessName();
WebView.setDataDirectorySuffix(process);
} catch (IllegalStateException e) {
e.printStackTrace();
}
}
for (IApplication application : mApplicationList) {
application.onCreate(mInstance);
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

View File

@ -33,10 +33,10 @@
android:layout_width="280dp"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:includeFontPadding="false"
android:lineSpacingExtra="4dp"
android:textColor="@color/text_subtitle"
android:textSize="14sp"
android:includeFontPadding="false"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/bgView"
@ -61,14 +61,15 @@
<ImageView
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@drawable/ic_smooth_feature_snap" />
android:src="@drawable/ic_smooth_feature_speeder" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="8dp"
android:includeFontPadding="false"
android:text="即点即玩"
android:text="@string/speeder"
android:textColor="@color/smooth_feature_font_color"
android:textSize="@dimen/secondary_size" />
@ -83,14 +84,15 @@
<ImageView
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@drawable/ic_smooth_feature_no_password" />
android:src="@drawable/ic_smooth_feature_cloud_archive" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="8dp"
android:includeFontPadding="false"
android:text="免密安装"
android:text="@string/cloud_archive"
android:textColor="@color/smooth_feature_font_color"
android:textSize="@dimen/secondary_size" />
@ -105,14 +107,15 @@
<ImageView
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@drawable/ic_smooth_feature_tool" />
android:src="@drawable/ic_smooth_feature_privacy" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="8dp"
android:includeFontPadding="false"
android:text="游戏工具"
android:text="@string/privacy_protect"
android:textColor="@color/smooth_feature_font_color"
android:textSize="@dimen/secondary_size" />

View File

@ -404,6 +404,10 @@
<string name="game_detail_cloud_archive_list_empty">没有找到相关存档~</string>
<string name="game_detail_cloud_archive_list_empty_desc">换个搜索词试试看吧!</string>
<string name="cloud_archive">云存档</string>
<string name="speeder">变速器</string>
<string name="privacy_protect">隐私保护</string>
<string name="archive_download_fail">存档下载失败,请稍后再试~\n依然无效可反馈至客服</string>
<string name="archive_apply_fail">存档读取失败,请稍后再试~\n依然无效可反馈至客服</string>
<string name="archive_apply">使用</string>

View File

@ -1,106 +0,0 @@
allprojects { project ->
buildscript {
ext.booster_version = '4.9.0'
ext.plugin_version = "0.3.0"
repositories {
mavenLocal()
google()
mavenCentral()
jcenter()
maven { url 'https://oss.sonatype.org/content/repositories/public' }
maven { url "https://artifact.bytedance.com/repository/byteX/" }
maven { url 'https://maven.aliyun.com/repository/public' }
}
dependencies {
// byteX
classpath "com.bytedance.android.byteX:base-plugin:${plugin_version}"
classpath "com.bytedance.android.byteX:const-inline-plugin:${plugin_version}"
classpath "com.bytedance.android.byteX:method-call-opt-plugin:${plugin_version}"
classpath "com.bytedance.android.byteX:field-assign-opt-plugin:${plugin_version}"
// booster
classpath "com.didiglobal.booster:booster-gradle-plugin:$booster_version"
classpath "com.didiglobal.booster:booster-transform-shared-preferences:$booster_version"
classpath "com.didiglobal.booster:booster-transform-r-inline:$booster_version"
classpath "com.didiglobal.booster:booster-transform-finalizer-watchdog-daemon:$booster_version"
classpath "com.didiglobal.booster:booster-transform-res-check:$booster_version"
classpath "com.didiglobal.booster:booster-transform-activity-thread:$booster_version"
}
}
repositories {
mavenLocal()
google()
mavenCentral()
jcenter()
maven { url 'https://oss.sonatype.org/content/repositories/public' }
maven { url "https://artifact.bytedance.com/repository/byteX/" }
maven { url 'https://maven.aliyun.com/repository/public' }
}
project.afterEvaluate {
// apply plugin only with this init script
if (project.name == "app") {
project.apply plugin: 'com.didiglobal.booster'
project.apply plugin: "com.gh.gamecenter.plugin"
project.apply plugin: 'bytex'
project.apply plugin: 'bytex.method_call_opt' // 移除 log https://github.com/bytedance/ByteX/blob/master/method-call-opt-plugin/README-zh.md
project.apply plugin: 'bytex.field_assign_opt' //去除重复的赋值 https://github.com/bytedance/ByteX/blob/master/field-assign-opt-plugin/README-zh.md
//
project.method_call_opt {
enable true
enableInDebug false
logLevel "DEBUG"
//是否在log中显示删除方法调用指令后的方法指令一般调试时使用
showAfterOptInsLog false
//需要删除的方法配置
methodList = [
//下面的每一项配置必须严格按照数据配置,一个地方不对这一项不生效。
//class#method#desc
"android/util/Log#v#(Ljava/lang/String;Ljava/lang/String;)I",
"android/util/Log#v#(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I",
"android/util/Log#d#(Ljava/lang/String;Ljava/lang/String;)I",
"android/util/Log#d#(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I",
"android/util/Log#i#(Ljava/lang/String;Ljava/lang/String;)I",
"android/util/Log#i#(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I",
"android/util/Log#w#(Ljava/lang/String;Ljava/lang/String;)I",
"android/util/Log#w#(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I",
"android/util/Log#e#(Ljava/lang/String;Ljava/lang/String;)I",
"android/util/Log#e#(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I",
"android/util/Log#println#(ILjava/lang/String;Ljava/lang/String;)I",
"java/lang/Throwable#printStackTrace#()V",
"com/google/devtools/build/android/desugar/runtime/ThrowableExtension#printStackTrace#(Ljava/lang/Throwable;)V",
//项目中的方法
"com/lightgame/utils/Utils#log#(Ljava/lang/String;)V",
"com/lightgame/utils/Utils#log#(Ljava/lang/int;Ljava/lang/String;Ljava/lang/String;)V",
"com/lightgame/utils/Utils#log#(Ljava/lang/String;Ljava/lang/String;)V",
"com/lightgame/utils/Utils#log#(Ljava/lang/String;Ljava/lang/Object;)V",
"com/lightgame/utils/Utils#log#(Ljava/lang/Object;)V",
"com/gh/gamecenter/common/util/MtaHelper#onEvent#(Ljava/lang/Object;Ljava/lang/String;)V",
"com/gh/gamecenter/common/util/MtaHelper#onEventWithTime#(Ljava/lang/String;I[Ljava/lang/String;)V",
"com/gh/gamecenter/common/util/MtaHelper#onEventWithBasicDeviceInfo#(Ljava/lang/String;[Ljava/lang/String;)V"
]
onlyCheckList = []
whiteList = []
}
project.field_assign_opt {
enable false
enableInDebug false
logLevel "INFO"
removeLineNumber true // 同时移除赋值对应的行号信息(如果有的话),默认true。
whiteList = [
//白名单ClassName.FieldName 。不支持模式匹配
//"android.support.constraint.solver.ArrayRow.isSimpleDefinition"
]
}
}
}
}

View File

@ -4,16 +4,22 @@ allprojects { project ->
ext.plugin_version = "0.3.0"
repositories {
maven { url 'https://maven.aliyun.com/repository/public' }
mavenLocal()
google()
mavenCentral()
jcenter()
maven { url 'https://oss.sonatype.org/content/repositories/public' }
maven { url "https://artifact.bytedance.com/repository/byteX/" }
maven { url 'https://maven.aliyun.com/repository/public' }
}
dependencies {
// byteX
classpath "com.bytedance.android.byteX:base-plugin:${plugin_version}"
classpath "com.bytedance.android.byteX:const-inline-plugin:${plugin_version}"
classpath "com.bytedance.android.byteX:method-call-opt-plugin:${plugin_version}"
classpath "com.bytedance.android.byteX:field-assign-opt-plugin:${plugin_version}"
// booster
classpath "com.didiglobal.booster:booster-gradle-plugin:$booster_version"
classpath "com.didiglobal.booster:booster-transform-shared-preferences:$booster_version"
@ -21,23 +27,16 @@ allprojects { project ->
classpath "com.didiglobal.booster:booster-transform-finalizer-watchdog-daemon:$booster_version"
classpath "com.didiglobal.booster:booster-transform-res-check:$booster_version"
classpath "com.didiglobal.booster:booster-transform-activity-thread:$booster_version"
// byteX
classpath "com.bytedance.android.byteX:base-plugin:${plugin_version}"
classpath "com.bytedance.android.byteX:const-inline-plugin:${plugin_version}"
classpath "com.bytedance.android.byteX:method-call-opt-plugin:${plugin_version}"
classpath "com.bytedance.android.byteX:access-inline-plugin:${plugin_version}"
classpath "com.bytedance.android.byteX:field-assign-opt-plugin:${plugin_version}"
}
}
repositories {
maven { url 'https://maven.aliyun.com/repository/public' }
mavenLocal()
google()
mavenCentral()
jcenter()
maven { url 'https://oss.sonatype.org/content/repositories/public' }
maven { url "https://artifact.bytedance.com/repository/byteX/" }
maven { url 'https://maven.aliyun.com/repository/public' }
}
project.afterEvaluate {
@ -48,27 +47,9 @@ allprojects { project ->
project.apply plugin: "com.gh.gamecenter.plugin"
project.apply plugin: 'bytex'
project.apply plugin: 'bytex.const_inline' // inline 常量 https://github.com/bytedance/ByteX/blob/master/const-inline-plugin/README-zh.md
project.apply plugin: 'bytex.method_call_opt' // 移除 log https://github.com/bytedance/ByteX/blob/master/method-call-opt-plugin/README-zh.md
project.apply plugin: 'bytex.access_inline'
// inline access https://github.com/bytedance/ByteX/blob/master/access-inline-plugin/README-zh.md
project.apply plugin: 'bytex.field_assign_opt'
//去除重复的赋值 https://github.com/bytedance/ByteX/blob/master/field-assign-opt-plugin/README-zh.md
project.const_inline {
enable true
enableInDebug false
logLevel "INFO"
autoFilterReflectionField = true //使用插件内置的反射检查过滤掉可能的反射常量建议为true
//supposesReflectionWithString = false //使用插件内置字符串匹配可能反射常量建议为false
skipWithRuntimeAnnotation true //过滤掉带有运行时注解的常量推荐true
skipWithAnnotations = [
//过滤掉被注解注释过的常量包含class
"android/support/annotation/Keep",
]
whiteList = []
}
project.apply plugin: 'bytex.field_assign_opt' //去除重复的赋值 https://github.com/bytedance/ByteX/blob/master/field-assign-opt-plugin/README-zh.md
//
project.method_call_opt {
enable true
enableInDebug false
@ -108,12 +89,6 @@ allprojects { project ->
whiteList = []
}
project.access_inline {
enable true
enableInDebug false
logLevel "DEBUG"
}
project.field_assign_opt {
enable false
enableInDebug false

View File

@ -443,7 +443,7 @@ object ImageUtils {
}
val appProvider = ARouter.getInstance().build(RouteConsts.provider.app).navigation() as? IAppProvider
// 低于 2G 运行内存的不加载动图
val loadAsAnimatedImage = url.endsWith(".gif") || url.endsWith(".webp")
val loadAsAnimatedImage = (url.endsWith(".gif") || url.endsWith(".webp"))
&& shouldAutoPlayAnimatedImage
&& (appProvider?.getDeviceRamSize() == 0L || (appProvider?.getDeviceRamSize() ?: 0) > 2500)
&& view?.getTag(R.id.tag_show_animated_image) != false

View File

@ -246,7 +246,7 @@ class AnswerEntity() : Parcelable {
articleEntity.images = images
articleEntity.videos = videos
articleEntity.user = user
articleEntity.time = TimeEntity(time ?: 0)
articleEntity.time = TimeEntity(time = time ?: 0, create = time ?: 0)
articleEntity.count = count
articleEntity.active = active
articleEntity.orderTag = orderTag

View File

@ -41,7 +41,7 @@ do
;;
g)
sed -i '/android:name="android.permission.READ_PHONE_STATE"/{n;s/tools:node="remove" \/>/\/>/;}' app/src/main/AndroidManifest.xml
./gradlew aGR -I init.gradle
./gradlew aGR
mkdir -p release-app/${versionName}_${versionCode}
cp -R app/build/outputs/apk/gdt/release/app-gdt-release.apk release-app/${versionName}_${versionCode}/光环助手_${versionName}_${versionCode}_广点通推广正式包_${git_sha}_${build_time}.apk
exit

View File

@ -26,7 +26,7 @@ git log --pretty=format:'%s' --max-count=20 --no-merges > app/src/main/assets/gi
while getopts "c" arg
do
sed -i '260 a implementation(project(\x27:module_setting_compose\x27)) { exclude group: \x27androidx.swiperefreshlayout\x27 }' app/build.gradle
post_init_script=init.compose.gradle
post_init_script=init.gradle
done
./gradlew rIR -I ${post_init_script}