修复 image wrapper多余release导致崩溃的问题

This commit is contained in:
hyb1996
2018-10-28 09:02:30 +08:00
parent 245d13c377
commit e4a92531c3
8 changed files with 24 additions and 18 deletions

View File

@@ -1 +1 @@
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":434,"versionName":"4.0.4 Alpha5","enabled":true,"outputFile":"commonRelease-4.0.4 Alpha5.apk","fullName":"commonRelease","baseName":"common-release"},"path":"commonRelease-4.0.4 Alpha5.apk","properties":{}}]
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":435,"versionName":"4.0.4 Alpha6","enabled":true,"outputFile":"commonRelease-4.0.4 Alpha6.apk","fullName":"commonRelease","baseName":"common-release"},"path":"commonRelease-4.0.4 Alpha6.apk","properties":{}}]

View File

@@ -13,9 +13,9 @@ public final class ResourceMonitor {
private static final String LOG_TAG = "ResourceMonitor";
private static final ConcurrentHashMap<Class<?>, SparseArray<UnclosedResourceException>> mResources;
private static final ConcurrentHashMap<Class<?>, SparseArray<UnclosedResourceException>> mResources = new ConcurrentHashMap<>();
private static Handler mHandler;
private static boolean mEnabled;
private static boolean mEnabled = false;
public static void onOpen(ResourceMonitor.Resource resource) {
if (!mEnabled) {
@@ -64,11 +64,6 @@ public final class ResourceMonitor {
}
}
static {
mResources = new ConcurrentHashMap<>();
mEnabled = BuildConfig.DEBUG;
}
public static boolean isEnabled() {
return mEnabled;
}