FinishActivity: Don't crash if exit animation fails somehow
Change-Id: Iaf15de9db82e625ecbbf1cb63d2e9f93b8c1625f
This commit is contained in:
committed by
Michael Bestas
parent
3a5b46f9a0
commit
6d0cc50670
@@ -196,7 +196,14 @@ public class FinishActivity extends BaseSetupWizardActivity {
|
|||||||
final int cx = (mRootView.getLeft() + mRootView.getRight()) / 2;
|
final int cx = (mRootView.getLeft() + mRootView.getRight()) / 2;
|
||||||
final int cy = (mRootView.getTop() + mRootView.getBottom()) / 2;
|
final int cy = (mRootView.getTop() + mRootView.getBottom()) / 2;
|
||||||
final float fullRadius = (float) Math.hypot(cx, cy);
|
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.setDuration(900);
|
||||||
anim.addListener(new AnimatorListenerAdapter() {
|
anim.addListener(new AnimatorListenerAdapter() {
|
||||||
@Override
|
@Override
|
||||||
|
Reference in New Issue
Block a user