mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-25 11:20:47 +01:00
Remove unnecessary code now that minSdk is 21.
This commit is contained in:
committed by
Cody Henthorne
parent
8cfd02aff2
commit
3e7dc79fe8
@@ -4,7 +4,6 @@ import android.animation.Animator
|
||||
import android.animation.Animator.AnimatorListener
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.os.Build
|
||||
import android.util.AttributeSet
|
||||
import android.view.MotionEvent
|
||||
import android.view.animation.PathInterpolator
|
||||
@@ -162,9 +161,7 @@ class AnimatedInOutImageButton @JvmOverloads constructor(
|
||||
.scaleX(1f)
|
||||
.scaleY(1f)
|
||||
|
||||
if (Build.VERSION.SDK_INT >= 21) {
|
||||
animator.interpolator = PathInterpolator(0.4f, 0.0f, 0.2f, 1f)
|
||||
}
|
||||
animator.interpolator = PathInterpolator(0.4f, 0.0f, 0.2f, 1f)
|
||||
|
||||
animator.start()
|
||||
}
|
||||
@@ -178,9 +175,7 @@ class AnimatedInOutImageButton @JvmOverloads constructor(
|
||||
.scaleY(0.5f)
|
||||
.withEndAction(endAction)
|
||||
|
||||
if (Build.VERSION.SDK_INT >= 21) {
|
||||
animator.interpolator = PathInterpolator(0.4f, 0.0f, 0.2f, 1f)
|
||||
}
|
||||
animator.interpolator = PathInterpolator(0.4f, 0.0f, 0.2f, 1f)
|
||||
animator.start()
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package org.thoughtcrime.securesms.mediapreview
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import androidx.appcompat.app.AppCompatDelegate
|
||||
import androidx.core.content.ContextCompat
|
||||
@@ -26,11 +25,10 @@ class MediaPreviewV2Activity : PassphraseRequiredActivity(), VoiceNoteMediaContr
|
||||
setContentView(R.layout.activity_mediapreview_v2)
|
||||
voiceNoteMediaController = VoiceNoteMediaController(this)
|
||||
|
||||
if (Build.VERSION.SDK_INT >= 21) {
|
||||
val systemBarColor = ContextCompat.getColor(this, R.color.signal_dark_colorSurface)
|
||||
window.statusBarColor = systemBarColor
|
||||
window.navigationBarColor = systemBarColor
|
||||
}
|
||||
val systemBarColor = ContextCompat.getColor(this, R.color.signal_dark_colorSurface)
|
||||
window.statusBarColor = systemBarColor
|
||||
window.navigationBarColor = systemBarColor
|
||||
|
||||
if (savedInstanceState == null) {
|
||||
val bundle = Bundle()
|
||||
val args = MediaIntentFactory.requireArguments(intent.extras!!)
|
||||
|
||||
@@ -8,7 +8,6 @@ import android.content.DialogInterface
|
||||
import android.content.Intent
|
||||
import android.graphics.PorterDuff
|
||||
import android.graphics.PorterDuffColorFilter
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.text.SpannableStringBuilder
|
||||
import android.view.LayoutInflater
|
||||
@@ -351,9 +350,7 @@ class MediaPreviewV2Fragment : LoggingFragment(R.layout.fragment_media_preview_v
|
||||
scrollAlbumRailToCurrentAdapterPosition()
|
||||
}
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= 21) {
|
||||
viewPropertyAnimator.interpolator = PathInterpolator(0.17f, 0.17f, 0f, 1f)
|
||||
}
|
||||
viewPropertyAnimator.interpolator = PathInterpolator(0.17f, 0.17f, 0f, 1f)
|
||||
viewPropertyAnimator.start()
|
||||
true
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user