Messaging: Remove compatibility for old android versions

Change-Id: Id9065d60525a509271a0e64c0e349e857cb998e2
This commit is contained in:
Michael W
2024-12-07 21:02:44 +01:00
parent 9bbc7a8f99
commit 7c55a6d56a
104 changed files with 580 additions and 2306 deletions

View File

@@ -15,7 +15,6 @@
*/
package com.android.messaging.ui.animation;
import android.annotation.TargetApi;
import android.app.Activity;
import android.content.Context;
import android.content.res.Resources;
@@ -34,7 +33,6 @@ import android.widget.FrameLayout;
import com.android.messaging.R;
import com.android.messaging.util.ImageUtils;
import com.android.messaging.util.OsUtil;
import com.android.messaging.util.UiUtils;
/**
@@ -69,20 +67,15 @@ public class ViewGroupItemVerticalExplodeAnimation {
*/
public static void startAnimationForView(final ViewGroup container, final View viewToAnimate,
final View animationStagingView, final boolean snapshotView, final int duration) {
if (OsUtil.isAtLeastJB_MR2() && (viewToAnimate.getContext() instanceof Activity)) {
if ((viewToAnimate.getContext() instanceof Activity)) {
new ViewExplodeAnimationJellyBeanMR2(viewToAnimate, container, snapshotView, duration)
.startAnimation();
} else {
// Pre JB_MR2, this animation can cause rendering failures which causes the framework
// to fall back to software rendering where camera preview isn't supported (b/18264647)
// just skip the animation to avoid this case.
}
}
/**
* Implementation class for API level >= 18.
*/
@TargetApi(18)
private static class ViewExplodeAnimationJellyBeanMR2 {
private final View mViewToAnimate;
private final ViewGroup mContainer;