mirror of
https://github.com/revanced/revanced-integrations.git
synced 2024-12-02 16:52:55 +01:00
perf: remove obsolete SDK checks (#174)
This commit is contained in:
parent
8bd84031d4
commit
1755662a7a
@ -44,13 +44,8 @@ public class VideoHelpers {
|
||||
}
|
||||
|
||||
private static void setClipboard(Context context, String text) {
|
||||
if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.HONEYCOMB) {
|
||||
android.text.ClipboardManager clipboard = (android.text.ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
clipboard.setText(text);
|
||||
} else {
|
||||
android.content.ClipboardManager clipboard = (android.content.ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
android.content.ClipData clip = android.content.ClipData.newPlainText("link", text);
|
||||
clipboard.setPrimaryClip(clip);
|
||||
}
|
||||
android.content.ClipboardManager clipboard = (android.content.ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
android.content.ClipData clip = android.content.ClipData.newPlainText("link", text);
|
||||
clipboard.setPrimaryClip(clip);
|
||||
}
|
||||
}
|
||||
|
@ -116,7 +116,7 @@ public class SkipSponsorButton extends FrameLayout {
|
||||
|
||||
|
||||
public static int getColor(Context context, int arg3) {
|
||||
return Build.VERSION.SDK_INT < 23 ? context.getResources().getColor(arg3) : context.getColor(arg3);
|
||||
return context.getColor(arg3);
|
||||
}
|
||||
|
||||
private int getIdentifier(Context context, String name, String defType) {
|
||||
|
Loading…
Reference in New Issue
Block a user