Skip to content

Commit

Permalink
sync debugMinify flavor's code
Browse files Browse the repository at this point in the history
  • Loading branch information
TuxPaper committed Sep 19, 2023
1 parent 2047271 commit ae455a1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@ public void onCreate() {
builder.detectFileUriExposure();
}
builder.detectLeakedClosableObjects();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
builder.detectLeakedRegistrationObjects();
}
builder.detectLeakedRegistrationObjects();
builder.detectLeakedSqlLiteObjects();
StrictMode.setVmPolicy(builder.build());

Expand Down
17 changes: 14 additions & 3 deletions app/src/debugMinify/java/com/biglybt/android/client/OffThread.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
package com.biglybt.android.client;

import android.app.Activity;
import android.os.Handler;
import android.os.Looper;
import android.os.SystemClock;
import android.os.*;
import android.util.Log;

import androidx.annotation.AnyThread;
Expand All @@ -34,6 +32,19 @@ public class OffThread
{
private static final String TAG = "OffThread";

private static HandlerThread workerThread = new HandlerThread("worker");

private static final Handler workerHandler;

static {
workerThread.start();
workerHandler = new Handler(workerThread.getLooper());
}

public static Handler getWorkerHandler() {
return workerHandler;
}

@AnyThread
public static void runOnUIThread(
@UiThread @NonNull RunnableUIThread runnable) {
Expand Down

0 comments on commit ae455a1

Please sign in to comment.