Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6d0cc506 authored by Tommy Webb's avatar Tommy Webb Committed by Michael Bestas
Browse files

FinishActivity: Don't crash if exit animation fails somehow

Change-Id: Iaf15de9db82e625ecbbf1cb63d2e9f93b8c1625f
parent 3a5b46f9
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -196,7 +196,14 @@ public class FinishActivity extends BaseSetupWizardActivity {
        final int cx = (mRootView.getLeft() + mRootView.getRight()) / 2;
        final int cy = (mRootView.getTop() + mRootView.getBottom()) / 2;
        final float fullRadius = (float) Math.hypot(cx, cy);
        Animator anim = ViewAnimationUtils.createCircularReveal(mRootView, cx, cy, fullRadius, 0f);
        Animator anim;
        try {
            anim = ViewAnimationUtils.createCircularReveal(mRootView, cx, cy, fullRadius, 0f);
        } catch (IllegalStateException e) {
            Log.e(TAG, "Failed to create finish animation", e);
            finishAfterAnimation();
            return;
        }
        anim.setDuration(900);
        anim.addListener(new AnimatorListenerAdapter() {
            @Override