Compare commits
15 Commits
v3.7.2-bug
...
v3.7.3
| Author | SHA1 | Date | |
|---|---|---|---|
| 3c4cc4ff7f | |||
| 150d640977 | |||
| a3599af9d1 | |||
| 1ac1196b20 | |||
| 6c5e863a5b | |||
| 15376a5e13 | |||
| eaf5b24044 | |||
| f05c6540f1 | |||
| 25dd3ca4df | |||
| 6281b4f510 | |||
| 2cbc0b0e17 | |||
| f18a0ef72c | |||
| 98fb4fc412 | |||
| 73c995c31f | |||
| 60dcafe0c1 |
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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();
|
||||
}
|
||||
});
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -86,7 +86,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/game_rating"
|
||||
visibleGone="@{game.commentCount >= 10 && game.star >= 7}"
|
||||
visibleGone="@{game.commentCount >= 3 && game.star >= 7}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/home_game_rating"
|
||||
|
||||
@ -144,7 +144,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/game_rating"
|
||||
visibleGone="@{data.commentCount >= 10 && data.star >= 7}"
|
||||
visibleGone="@{data.commentCount >= 3 && data.star >= 7}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/home_game_rating"
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
Submodule libraries/LGLibrary updated: 6fedc92974...f939aedbc0
Reference in New Issue
Block a user