6.0.1 - Alpha - 增加全局Polyfill及扩展对象

This commit is contained in:
SuperMonster003
2021-12-05 10:40:13 +08:00
parent 99a1d8490f
commit 98cf339cce
34 changed files with 664 additions and 941 deletions

View File

@@ -107,16 +107,14 @@ public final class ResourceMonitor {
if (sHandler == null) {
sHandler = new Handler(Looper.getMainLooper());
}
sHandler.post(new Runnable() {
public final void run() {
UnclosedResourceDetectedException detectedException = new UnclosedResourceDetectedException(exception);
detectedException.fillInStackTrace();
Log.w(LOG_TAG, "UnclosedResourceDetected", detectedException);
if (sUnclosedResourceDetectedHandler != null) {
sUnclosedResourceDetectedHandler.onUnclosedResourceDetected(detectedException);
} else {
throw detectedException;
}
sHandler.post(() -> {
UnclosedResourceDetectedException detectedException = new UnclosedResourceDetectedException(exception);
detectedException.fillInStackTrace();
Log.w(LOG_TAG, "UnclosedResourceDetected", detectedException);
if (sUnclosedResourceDetectedHandler != null) {
sUnclosedResourceDetectedHandler.onUnclosedResourceDetected(detectedException);
} else {
throw detectedException;
}
});
}