Compare commits

...

10 Commits

Author SHA1 Message Date
681e2cd4ee build: 添加 3.7.0 版本的 sentry plugin 缓存
Signed-off-by: chenjuntao <chenjuntao@ghzhushou.com>
2024-10-24 10:15:39 +08:00
883dad8f06 build: 添加 3.7.0 版本的 sentry plugin 缓存
Signed-off-by: chenjuntao <chenjuntao@ghzhushou.com>
2024-10-23 15:51:23 +08:00
0d650d2d00 build: 添加 3.7.0 版本的 sentry plugin 缓存
Signed-off-by: chenjuntao <chenjuntao@ghzhushou.com>
2024-10-23 15:50:47 +08:00
8f8ac99dae chore: 版本更新至 5.38.2
Signed-off-by: chenjuntao <chenjuntao@ghzhushou.com>
2024-10-23 12:37:29 +08:00
0be7db94ad Merge branch 'hotfix/v5.38.1-1111/crashes' into 'release'
修复 5.38.1 的部分闪退问题

See merge request halo/android/assistant-android!1947
2024-10-23 11:52:09 +08:00
ae80359b48 Merge branch 'fix/catch_view_lifecycle_owner_crash' into 'release'
fix: 捕获加载图片时获取ViewLifecycleOwner出现的闪退问题

See merge request halo/android/assistant-android!1946
2024-10-23 11:47:53 +08:00
81281855a1 fix: 修复继续下载 VA 插件异常时的闪退问题(遇到异常尝试重下) https://sentry.shanqu.cc/organizations/lightgame/issues/416793
Signed-off-by: chenjuntao <chenjuntao@ghzhushou.com>
2024-10-23 11:28:58 +08:00
a5174c6931 fix: 捕获加载图片时获取ViewLifecycleOwner出现的闪退问题 2024-10-23 11:16:36 +08:00
a3cc74afb3 fix: 修复部分位置在处理图片选择回调时处理不合理造成的闪退问题 https://sentry.shanqu.cc/organizations/lightgame/issues/416811
Signed-off-by: chenjuntao <chenjuntao@ghzhushou.com>
2024-10-23 10:13:39 +08:00
84e78de6fc fix: 当 PackageName 为空时的闪退问题 https://sentry.shanqu.cc/organizations/lightgame/issues/416770
Signed-off-by: chenjuntao <chenjuntao@ghzhushou.com>
2024-10-23 09:54:50 +08:00
8 changed files with 48 additions and 10 deletions

View File

@ -72,6 +72,7 @@ android_build:
only:
- dev
- release
- pack/update_sentry_plugin_cache
# 代码检查
sonarqube_analysis:
@ -157,3 +158,4 @@ oss-upload&send-email:
only:
- dev
- release
- pack/update_sentry_plugin_cache

View File

@ -47,6 +47,8 @@ public class InstallUtils {
if (installMap != null && installMap.size() != 0) {
ArrayList<String> keys = new ArrayList<>();
for (String packageName : installMap.keySet()) {
if (TextUtils.isEmpty(packageName)) continue;
long time = installMap.get(packageName);
if (System.currentTimeMillis() - time >= MAX_TIME) {
keys.add(packageName);
@ -98,6 +100,8 @@ public class InstallUtils {
}
public void addInstall(String packageName) {
if (TextUtils.isEmpty(packageName)) return;
if (installMap == null) {
installMap = Collections.synchronizedMap(new HashMap<String, Long>());
}

View File

@ -27,12 +27,24 @@ object SimpleDownloadManager {
val downloadStatus = mDownloadQueue.getStatus(config.uniqueId)
if (downloadStatus != DownloadStatus.PAUSED) {
ExecutorProvider.getInstance().backgroundExecutor.execute {
DownloadMessageHandler.insertDownloadToDatabase(getDownloadEntity(config))
mDownloadQueue.submitNewTask(config)
}
createNewTaskAndDownload(config)
} else {
resume(config.uniqueId)
try {
resume(config.uniqueId)
} catch (e: IllegalArgumentException) {
createNewTaskAndDownload(config)
}
}
}
/**
* 创建新任务并下载
*/
private fun createNewTaskAndDownload(config: DownloadConfig) {
ExecutorProvider.getInstance().backgroundExecutor.execute {
mDownloadQueue.cancel(config.uniqueId)
DownloadMessageHandler.insertDownloadToDatabase(getDownloadEntity(config))
mDownloadQueue.submitNewTask(config)
}
}

View File

@ -145,7 +145,7 @@ class WebFragment : LazyFragment(), IScrollable {
}
} else if (requestCode == REQUEST_PICK_IMAGE) {
if (mSelectPicCallback == null && mSelectPicCallbackAboveL == null) return
if (resultCode == Activity.RESULT_OK) {
if (resultCode == Activity.RESULT_OK && data != null) {
val uriList = Matisse.obtainResult(data)
if (uriList.size == 0) return
if (mSelectPicCallbackAboveL != null) {

View File

@ -7,8 +7,8 @@ ext {
targetSdkVersion = 30
// application info (每个大版本之间的 versionCode 增加 20)
versionCode = 1111
versionName = "5.38.1"
versionCode = 1112
versionName = "5.38.2"
applicationId = "com.gh.gamecenter"
applicationIdGat = "com.gh.gamecenter.intl"

View File

@ -480,6 +480,8 @@ open class SuggestAppFragment : ToolbarFragment() {
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
if (data == null) return
if (requestCode == MEDIA_STORE_REQUEST || requestCode == MEDIA_STORE_CREDENTIALS_REQUEST || requestCode == MEDIA_STORE_SCREENSHOT_REQUEST) {
val selectedPaths = Matisse.obtainResult(data) ?: return
val picturePath = PathUtils.getPath(requireContext(), selectedPaths[0])

View File

@ -438,7 +438,13 @@ object ImageUtils {
controllerListener: BaseControllerListener<ImageInfo>? = null,
) {
val lifecycleObserver = view?.getTag(R.id.lifecycle_observer) as? LifecycleObserver
val lifecycle = if (lifecycleObserver != null) view.findFragment()?.viewLifecycleOwner?.lifecycle else null
val lifecycle = if (lifecycleObserver != null) {
try {
view.findFragment()?.viewLifecycleOwner?.lifecycle
} catch (e: Exception) {
null
}
} else null
lifecycleObserver?.let {
lifecycle?.removeObserver(it)
view.setTag(R.id.lifecycle_observer, null)
@ -487,7 +493,12 @@ object ImageUtils {
super.onFinalImageSet(id, imageInfo, animatable)
controllerListener?.onFinalImageSet(id, imageInfo, animatable)
animatable?.let {
(lifecycle ?: view?.findFragment()?.viewLifecycleOwner?.lifecycle)?.run {
val viewLifecycle = try {
lifecycle ?: view?.findFragment()?.viewLifecycleOwner?.lifecycle
} catch (e: Exception) {
null
}
viewLifecycle?.run {
val observer = object : DefaultLifecycleObserver {
override fun onPause(owner: LifecycleOwner) {
super.onPause(owner)

View File

@ -9,6 +9,13 @@ build_time_without_divider=$(TZ=Asia/Shanghai date +'%Y%m%d%H%M')L
post_init_script=init.internal.gradle
# 开启 mapping 上传
if [[ "$OSTYPE" == "darwin"* ]]; then
sed -i '' '1 a plugins { id "io.sentry.android.gradle" version "3.7.0" } ' app/build.gradle
else
sed -i '1 a plugins { id "io.sentry.android.gradle" version "3.7.0" }' app/build.gradle
fi
git checkout module_common/build.gradle
git checkout gradle.properties