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

Commit 33941d8d authored by Vania Desmonda's avatar Vania Desmonda
Browse files

Use `mContext.getMainLooper()` as the parameter for creating a new

Handler if it's null in `registerCallback()`

Test: refactoring CL only, all tests should pass
Bug: 293436997
Change-Id: I2a0d4735c3324a7c2e8ae9ef432350613562148f
parent 79b37bdb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -109,7 +109,7 @@ public final class MediaProjection {
        try {
            final Callback c = Objects.requireNonNull(callback);
            if (handler == null) {
                handler = new Handler();
                handler = new Handler(mContext.getMainLooper());
            }
            mCallbacks.put(c, new CallbackRecord(c, handler));
        } catch (NullPointerException e) {