Merge pull request #2931 from NathanaelA/worker-timer-fix-android

Fixes using setTimeout/setInterval in a Android Worker
This commit is contained in:
Vladimir Enchev
2016-10-20 10:37:42 +03:00
committed by GitHub

View File

@@ -7,7 +7,7 @@ var timerId = 0;
function createHandlerAndGetId(): number {
if (!timeoutHandler) {
timeoutHandler = new android.os.Handler(android.os.Looper.getMainLooper());
timeoutHandler = new android.os.Handler(android.os.Looper.myLooper());
}
timerId++;