Clean up pre-Lollipop checks
This commit is contained in:
parent
7cb137ae8d
commit
99104fc11d
73 changed files with 59 additions and 425 deletions
|
|
@ -21,7 +21,6 @@ package org.schabi.newpipe.views;
|
|||
|
||||
import android.animation.ValueAnimator;
|
||||
import android.content.Context;
|
||||
import android.os.Build;
|
||||
import android.os.Parcelable;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
|
|
@ -29,7 +28,6 @@ import android.widget.LinearLayout;
|
|||
|
||||
import androidx.annotation.IntDef;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
|
||||
import org.schabi.newpipe.ktx.ViewUtils;
|
||||
|
||||
|
|
@ -76,7 +74,6 @@ public class CollapsibleView extends LinearLayout {
|
|||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
|
||||
public CollapsibleView(final Context context, final AttributeSet attrs, final int defStyleAttr,
|
||||
final int defStyleRes) {
|
||||
super(context, attrs, defStyleAttr, defStyleRes);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package org.schabi.newpipe.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Build;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.SurfaceView;
|
||||
|
||||
|
|
@ -45,10 +44,7 @@ public class ExpandableSurfaceView extends SurfaceView {
|
|||
scaleX = 1.0f;
|
||||
scaleY = 1.0f;
|
||||
|
||||
if (resizeMode == RESIZE_MODE_FIT
|
||||
// KitKat doesn't work well when a view has a scale like needed for ZOOM
|
||||
|| (resizeMode == RESIZE_MODE_ZOOM
|
||||
&& Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP)) {
|
||||
if (resizeMode == RESIZE_MODE_FIT) {
|
||||
if (aspectDeformation > 0) {
|
||||
height = (int) (width / videoAspectRatio);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -17,10 +17,8 @@
|
|||
*/
|
||||
package org.schabi.newpipe.views;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.content.Context;
|
||||
import android.graphics.Rect;
|
||||
import android.os.Build;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
|
@ -74,7 +72,6 @@ public final class FocusAwareCoordinator extends CoordinatorLayout {
|
|||
* Makes possible for multiple fragments to co-exist. Without this code
|
||||
* the first ViewGroup who consumes will be the last who receive the insets
|
||||
*/
|
||||
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
@Override
|
||||
public WindowInsets dispatchApplyWindowInsets(final WindowInsets insets) {
|
||||
boolean consumed = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue