perf: remove obsolete SDK checks (#174)

This commit is contained in:
Patryk Miś 2022-10-16 13:15:10 +02:00 committed by GitHub
parent 8bd84031d4
commit 1755662a7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 9 deletions

View File

@ -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);
}
}

View File

@ -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) {