Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 46fe04e1 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Mark `HandlerThread` as daemon on Ravenwood." into main

parents 508c5340 3be399d8
Loading
Loading
Loading
Loading
+15 −1
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ public class HandlerThread extends Thread {
    public HandlerThread(String name) {
        super(name);
        mPriority = Process.THREAD_PRIORITY_DEFAULT;
        onCreated();
    }
    
    /**
@@ -46,6 +47,19 @@ public class HandlerThread extends Thread {
    public HandlerThread(String name, int priority) {
        super(name);
        mPriority = priority;
        onCreated();
    }

    /** @hide */
    @android.ravenwood.annotation.RavenwoodReplace
    protected void onCreated() {
    }

    /** @hide */
    protected void onCreated$ravenwood() {
        // Mark ourselves as daemon to enable tests to terminate quickly when finished, despite
        // any HandlerThread instances that may be lingering around
        setDaemon(true);
    }

    /**