mirror of
				https://github.com/TeamNewPipe/NewPipe
				synced 2025-11-04 09:13:00 +00:00 
			
		
		
		
	Remove unnecessary compat method calls.
This commit is contained in:
		@@ -29,7 +29,6 @@ import androidx.appcompat.app.AppCompatActivity;
 | 
			
		||||
import androidx.appcompat.content.res.AppCompatResources;
 | 
			
		||||
import androidx.core.app.NotificationCompat;
 | 
			
		||||
import androidx.core.app.ServiceCompat;
 | 
			
		||||
import androidx.core.widget.TextViewCompat;
 | 
			
		||||
import androidx.fragment.app.FragmentManager;
 | 
			
		||||
import androidx.preference.PreferenceManager;
 | 
			
		||||
 | 
			
		||||
@@ -388,7 +387,7 @@ public class RouterActivity extends AppCompatActivity {
 | 
			
		||||
        for (final AdapterChoiceItem item : choices) {
 | 
			
		||||
            final RadioButton radioButton = ListRadioIconItemBinding.inflate(inflater).getRoot();
 | 
			
		||||
            radioButton.setText(item.description);
 | 
			
		||||
            TextViewCompat.setCompoundDrawablesRelativeWithIntrinsicBounds(radioButton,
 | 
			
		||||
            radioButton.setCompoundDrawablesRelativeWithIntrinsicBounds(
 | 
			
		||||
                    AppCompatResources.getDrawable(themeWrapperContext, item.icon),
 | 
			
		||||
                    null, null, null);
 | 
			
		||||
            radioButton.setChecked(false);
 | 
			
		||||
 
 | 
			
		||||
@@ -88,6 +88,7 @@ import android.provider.Settings;
 | 
			
		||||
import android.util.DisplayMetrics;
 | 
			
		||||
import android.util.Log;
 | 
			
		||||
import android.util.TypedValue;
 | 
			
		||||
import android.view.GestureDetector;
 | 
			
		||||
import android.view.Gravity;
 | 
			
		||||
import android.view.KeyEvent;
 | 
			
		||||
import android.view.LayoutInflater;
 | 
			
		||||
@@ -118,7 +119,6 @@ import androidx.appcompat.widget.PopupMenu;
 | 
			
		||||
import androidx.collection.ArraySet;
 | 
			
		||||
import androidx.core.content.ContextCompat;
 | 
			
		||||
import androidx.core.graphics.Insets;
 | 
			
		||||
import androidx.core.view.GestureDetectorCompat;
 | 
			
		||||
import androidx.core.view.ViewCompat;
 | 
			
		||||
import androidx.core.view.WindowInsetsCompat;
 | 
			
		||||
import androidx.fragment.app.FragmentManager;
 | 
			
		||||
@@ -387,7 +387,7 @@ public final class Player implements
 | 
			
		||||
    private static final float MAX_GESTURE_LENGTH = 0.75f;
 | 
			
		||||
 | 
			
		||||
    private int maxGestureLength; // scaled
 | 
			
		||||
    private GestureDetectorCompat gestureDetector;
 | 
			
		||||
    private GestureDetector gestureDetector;
 | 
			
		||||
    private PlayerGestureListener playerGestureListener;
 | 
			
		||||
 | 
			
		||||
    /*//////////////////////////////////////////////////////////////////////////
 | 
			
		||||
@@ -555,7 +555,7 @@ public final class Player implements
 | 
			
		||||
        binding.playbackLiveSync.setOnClickListener(this);
 | 
			
		||||
 | 
			
		||||
        playerGestureListener = new PlayerGestureListener(this, service);
 | 
			
		||||
        gestureDetector = new GestureDetectorCompat(context, playerGestureListener);
 | 
			
		||||
        gestureDetector = new GestureDetector(context, playerGestureListener);
 | 
			
		||||
        binding.getRoot().setOnTouchListener(playerGestureListener);
 | 
			
		||||
 | 
			
		||||
        binding.queueButton.setOnClickListener(v -> onQueueClicked());
 | 
			
		||||
@@ -4428,7 +4428,7 @@ public final class Player implements
 | 
			
		||||
        return audioReactor;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public GestureDetectorCompat getGestureDetector() {
 | 
			
		||||
    public GestureDetector getGestureDetector() {
 | 
			
		||||
        return gestureDetector;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -21,7 +21,6 @@ import androidx.annotation.Nullable;
 | 
			
		||||
import androidx.appcompat.app.AlertDialog;
 | 
			
		||||
import androidx.appcompat.content.res.AppCompatResources;
 | 
			
		||||
import androidx.core.graphics.drawable.DrawableCompat;
 | 
			
		||||
import androidx.core.widget.TextViewCompat;
 | 
			
		||||
import androidx.preference.Preference;
 | 
			
		||||
import androidx.preference.PreferenceViewHolder;
 | 
			
		||||
 | 
			
		||||
@@ -220,8 +219,8 @@ public class NotificationActionsPreference extends Preference {
 | 
			
		||||
                                android.R.attr.textColorPrimary);
 | 
			
		||||
                        drawable = DrawableCompat.wrap(drawable).mutate();
 | 
			
		||||
                        DrawableCompat.setTint(drawable, color);
 | 
			
		||||
                        TextViewCompat.setCompoundDrawablesRelativeWithIntrinsicBounds(radioButton,
 | 
			
		||||
                                null, null, drawable, null);
 | 
			
		||||
                        radioButton.setCompoundDrawablesRelativeWithIntrinsicBounds(null,
 | 
			
		||||
                                null, drawable, null);
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -29,7 +29,6 @@ import androidx.appcompat.app.AlertDialog;
 | 
			
		||||
import androidx.core.app.NotificationCompat;
 | 
			
		||||
import androidx.core.content.ContextCompat;
 | 
			
		||||
import androidx.core.content.FileProvider;
 | 
			
		||||
import androidx.core.view.ViewCompat;
 | 
			
		||||
import androidx.recyclerview.widget.DiffUtil;
 | 
			
		||||
import androidx.recyclerview.widget.RecyclerView;
 | 
			
		||||
import androidx.recyclerview.widget.RecyclerView.Adapter;
 | 
			
		||||
@@ -871,7 +870,7 @@ public class MissionAdapter extends Adapter<ViewHolder> implements Handler.Callb
 | 
			
		||||
            super(view);
 | 
			
		||||
 | 
			
		||||
            progress = new ProgressDrawable();
 | 
			
		||||
            ViewCompat.setBackground(itemView.findViewById(R.id.item_bkg), progress);
 | 
			
		||||
            itemView.findViewById(R.id.item_bkg).setBackground(progress);
 | 
			
		||||
 | 
			
		||||
            status = itemView.findViewById(R.id.item_status);
 | 
			
		||||
            name = itemView.findViewById(R.id.item_name);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user