From 40cf6058260a0180546c29afb8a768b9f22501b1 Mon Sep 17 00:00:00 2001 From: caneleex Date: Wed, 21 Apr 2021 19:56:30 +0200 Subject: [PATCH 1/2] remove thread check from PlayerController.setCurrentVideoId --- app/src/main/java/pl/jakubweg/PlayerController.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/src/main/java/pl/jakubweg/PlayerController.java b/app/src/main/java/pl/jakubweg/PlayerController.java index 4019d456..eb5ad8f3 100644 --- a/app/src/main/java/pl/jakubweg/PlayerController.java +++ b/app/src/main/java/pl/jakubweg/PlayerController.java @@ -65,9 +65,6 @@ public class PlayerController { return; } - if (Looper.myLooper() != Looper.getMainLooper()) // check if thread is not main - return; - if (videoId.equals(currentVideoId)) return; From e22146a8e38dc9a69a266efbcd6c2a55987310eb Mon Sep 17 00:00:00 2001 From: caneleex Date: Wed, 21 Apr 2021 22:55:40 +0200 Subject: [PATCH 2/2] remove unused imports --- app/src/main/java/pl/jakubweg/PlayerController.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/src/main/java/pl/jakubweg/PlayerController.java b/app/src/main/java/pl/jakubweg/PlayerController.java index eb5ad8f3..157053f3 100644 --- a/app/src/main/java/pl/jakubweg/PlayerController.java +++ b/app/src/main/java/pl/jakubweg/PlayerController.java @@ -2,7 +2,6 @@ package pl.jakubweg; import android.annotation.SuppressLint; import android.app.Activity; -import android.content.Context; import android.graphics.Canvas; import android.graphics.Rect; import android.os.Handler; @@ -10,7 +9,6 @@ import android.os.Looper; import android.util.Log; import android.view.View; import android.view.ViewGroup; -import android.widget.Toast; import java.lang.ref.WeakReference; import java.lang.reflect.Method;