Compare commits

...

15 Commits

Author SHA1 Message Date
3c4cc4ff7f tinker-3.7.3-base 2020-01-21 16:03:35 +08:00
150d640977 处理标记下载红点闪退问题 2020-01-21 15:30:45 +08:00
a3599af9d1 修改视频预加载闪退问题 2020-01-21 15:23:53 +08:00
1ac1196b20 处理闪退问题 2020-01-21 14:43:03 +08:00
6c5e863a5b 处理MTA分享事件统计错乱问题 2020-01-21 14:19:35 +08:00
15376a5e13 创建 tinker_3.7.3 标记 2020-01-21 11:13:55 +08:00
eaf5b24044 处理看大图的闪退问题 2020-01-21 10:41:53 +08:00
f05c6540f1 Merge branch '3.7.2-bugfix' of gitlab.ghzhushou.com:halo/assistant-android into 3.7.2-bugfix 2020-01-21 10:18:24 +08:00
25dd3ca4df 完成首页游戏评分显示规则调整 https://gitlab.ghzs.com/pm/halo-app-issues/issues/765 2020-01-21 10:16:51 +08:00
6281b4f510 tinker_base 3.7.2-fix_download 2020-01-20 18:17:33 +08:00
2cbc0b0e17 关闭bugly的Crash处理,统一由AppUncaughtHandler处理 2020-01-20 17:10:25 +08:00
f18a0ef72c Merge branch '3.7.2-bugfix' of gitlab.ghzs.com:halo/assistant-android into 3.7.2-bugfix 2020-01-20 17:04:59 +08:00
98fb4fc412 开启bugly的错误上报 2020-01-20 17:03:52 +08:00
73c995c31f Merge branch '3.7.2-bugfix' of gitlab.ghzhushou.com:halo/assistant-android into 3.7.2-bugfix 2020-01-20 16:28:02 +08:00
60dcafe0c1 处理无参启动 DownloadService 会闪退的问题 2020-01-20 16:27:44 +08:00
11 changed files with 44 additions and 46 deletions

View File

@ -133,9 +133,9 @@ public abstract class BaseActivity extends BaseAppCompatActivity implements Easy
shareSummary,
shareType);
if (shareType == ShareUtils.ShareType.game || shareType == ShareUtils.ShareType.plugin) {
MtaHelper.onEvent("内容分享", shareTitle + shareSummary);
MtaHelper.onEvent("内容分享", "内容分享", shareTitle + shareSummary);
} else {
MtaHelper.onEvent("内容分享", shareTitle);
MtaHelper.onEvent("内容分享", "内容分享", shareTitle);
}
}

View File

@ -238,18 +238,12 @@ public class DataUtils {
}
public static void onError(Context context, Throwable throwable) {
// MTA主动上传错误
//bugly 作为默认处理异常的类库,已经上报了,此处不重复上报
try {
StatService.reportException(context, throwable);
CrashReport.postCatchedException(throwable);
} catch (Exception e) {
}
// //bugly 作为默认处理异常的类库,已经上报了,此处不重复上报
// try {
// CrashReport.postCatchedException(throwable);
// } catch (Exception e) {
// }
//talkingdata
try {
TCAgent.onError(context, throwable);

View File

@ -12,9 +12,9 @@ import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicReference;
import io.reactivex.Observable;
@ -30,7 +30,7 @@ import okhttp3.Response;
public class CacheManager {
private static final AtomicReference<CacheManager> INSTANCE = new AtomicReference<>();
private volatile HashMap<String, Call> downCalls;
private volatile ConcurrentHashMap<String, Call> downCalls;
private OkHttpClient mClient;
private File cacheDirectory = StorageUtils.getIndividualCacheDirectory(HaloApp.getInstance().getApplication());
private FileNameGenerator generator = new Md5FileNameGenerator();
@ -52,11 +52,11 @@ public class CacheManager {
}
private CacheManager() {
downCalls = new HashMap<>();
downCalls = new ConcurrentHashMap<>();
mClient = new OkHttpClient.Builder().build();
}
private synchronized HashMap<String, Call> getDownCalls() {
private synchronized ConcurrentHashMap<String, Call> getDownCalls() {
return downCalls;
}

View File

@ -25,9 +25,6 @@ import android.view.View;
import android.view.Window;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.lifecycle.ViewModelProviders;
import com.gh.base.AppUncaughtHandler;
import com.gh.base.BaseActivity;
import com.gh.base.fragment.BaseFragment_ViewPager;
@ -130,6 +127,8 @@ import java.util.UUID;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import androidx.annotation.NonNull;
import androidx.lifecycle.ViewModelProviders;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;
import okhttp3.MediaType;
@ -391,23 +390,24 @@ public class MainActivity extends BaseActivity {
//启动app删除视频缓存文件
AppExecutor.getIoExecutor().execute(() -> {
File cacheFileDirectory = StorageUtils.getIndividualCacheDirectory(this);
if (cacheFileDirectory.exists() && cacheFileDirectory.isDirectory()) {
for (File file : cacheFileDirectory.listFiles()) {
FileUtils.deleteFile(file.getPath());
}
}
//创建nomedia文件
File noMediaFile = new File(cacheFileDirectory.getParent(), ".nomedia");
if (!cacheFileDirectory.exists()) {
cacheFileDirectory.mkdirs();
}
try {
File cacheFileDirectory = StorageUtils.getIndividualCacheDirectory(this);
if (cacheFileDirectory.exists() && cacheFileDirectory.isDirectory()) {
for (File file : cacheFileDirectory.listFiles()) {
FileUtils.deleteFile(file.getPath());
}
}
//创建nomedia文件
File noMediaFile = new File(cacheFileDirectory.getParent(), ".nomedia");
if (!cacheFileDirectory.exists()) {
cacheFileDirectory.mkdirs();
}
if (!noMediaFile.exists()) {
noMediaFile.createNewFile();
}
} catch (IOException e) {
} catch (Exception e) {
e.printStackTrace();
}
});

View File

@ -19,12 +19,6 @@ import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.content.ContextCompat;
import androidx.viewpager.widget.PagerAdapter;
import androidx.viewpager.widget.ViewPager.OnPageChangeListener;
import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView;
import com.facebook.drawee.backends.pipeline.Fresco;
import com.facebook.imagepipeline.core.ImagePipeline;
@ -60,6 +54,11 @@ import java.util.HashSet;
import java.util.Locale;
import java.util.Map;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.content.ContextCompat;
import androidx.viewpager.widget.PagerAdapter;
import androidx.viewpager.widget.ViewPager.OnPageChangeListener;
import butterknife.BindView;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;
@ -291,8 +290,13 @@ public class ViewImageActivity extends BaseActivity implements OnPageChangeListe
private void loadImage(String url, final BigImageView imageView) {
// 添加GIF支持
imageView.setImageViewFactory(new FrescoImageViewFactory());
imageView.showImage(Uri.parse(url));
try {
imageView.setImageViewFactory(new FrescoImageViewFactory());
imageView.showImage(Uri.parse(url));
} catch (Exception ignored) {
// parse Uri 可能会有异常 java.lang.NullPointerException
// url 为 null? 暂时不管了,统一捕抓异常
}
}
private class ViewImageAdapter extends PagerAdapter implements OnSingleTapListener {

View File

@ -131,7 +131,7 @@ public class GameDownloadFragment extends BaseFragment implements View.OnClickLi
downloadEntity.getPath()), downloadEntity.getUrl());
// 用户焦点在下载管理页面时有任务完成,直接把所有下载完成的任务标记为已读
DownloadManager.getInstance(requireContext()).markDownloadedTaskAsRead();
DownloadManager.getInstance(HaloApp.getInstance().getApplication()).markDownloadedTaskAsRead();
} else if (DownloadStatus.cancel.equals(downloadEntity.getStatus())) { // 有可能由于网络劫持造成的
adapter.initMap();
adapter.notifyDataSetChanged();

View File

@ -86,7 +86,7 @@
<TextView
android:id="@+id/game_rating"
visibleGone="@{game.commentCount >= 10 &amp;&amp; game.star >= 7}"
visibleGone="@{game.commentCount >= 3 &amp;&amp; game.star >= 7}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/home_game_rating"

View File

@ -144,7 +144,7 @@
<TextView
android:id="@+id/game_rating"
visibleGone="@{data.commentCount >= 10 &amp;&amp; data.star >= 7}"
visibleGone="@{data.commentCount >= 3 &amp;&amp; data.star >= 7}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/home_game_rating"

View File

@ -7,8 +7,8 @@ ext {
targetSdkVersion = 26
// application info
versionCode = 130
versionName = "3.7.2"
versionCode = 131
versionName = "3.7.3"
applicationId = "com.gh.gamecenter"
// AndroidX

View File

@ -54,8 +54,8 @@ DATA_HOST=https\://data.ghzs.com/
# 请不要手动改动下面的值除非你明确需要以某个apk作为基准包需要打包请以scripts/tinker*.sh为准
TINKER_ENABLE=
TINKER_ID=babc557
TINKER_BASE_APK_DIR=app-0119-18-31-04_babc557
TINKER_ID=150d640
TINKER_BASE_APK_DIR=app-0121-15-38-52_150d640
android.useAndroidX=true
android.enableJetifier=true