From 3ab3247f820e0f3b0ae984d05f571ef15502da8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=AE=8F=E5=AE=87?= Date: Fri, 29 Oct 2021 10:18:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20#3002=20java.io.FileNotFou?= =?UTF-8?q?ndException=20res/drawable-xhdpi-v4/ic=5Fdaily=5F00028.png?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit com.mogo.module.apps.anim.OthersAnim$1.handleMessage(OthersAnim.java:44) https://bugly.qq.com/v2/crash-reporting/crashes/ac71228f85/3002?pid=1 Signed-off-by: 董宏宇 --- .idea/misc.xml | 8 +++ .../com/mogo/module/apps/anim/OthersAnim.java | 56 ++++++++++--------- 2 files changed, 38 insertions(+), 26 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index 0a4b372510..0acef90ee0 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -25,6 +25,14 @@ + + + + + + + + diff --git a/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/anim/OthersAnim.java b/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/anim/OthersAnim.java index a41054d775..083710a47f 100644 --- a/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/anim/OthersAnim.java +++ b/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/anim/OthersAnim.java @@ -32,34 +32,38 @@ public class OthersAnim implements Anim { @Override public void handleMessage( Message msg ) { super.handleMessage( msg ); - switch ( msg.what ) { - case MSG_LOOP: - if ( mStarted ) { - if ( AnimRes.sRes.length == 0 ) { - return; + try { + switch ( msg.what ) { + case MSG_LOOP: + if ( mStarted ) { + if ( AnimRes.sRes.length == 0 ) { + return; + } + if ( mStartIndex >= AnimRes.sRes.length - 1 ) { + mStartIndex = mKeyPoint; + } + mImageView.setImageResource( AnimRes.sRes[mStartIndex++ % AnimRes.sRes.length] ); + mHandler.sendEmptyMessageDelayed( MSG_LOOP, FRAME_INTERVAL ); } - if ( mStartIndex >= AnimRes.sRes.length - 1 ) { - mStartIndex = mKeyPoint; + break; + case MSG_CHANGE: + if ( mLastType == AnimRes.EmojiType.Others ) { + boolean start = mStarted; + stop(); + mEmojiIndex++; + AnimRes.sRes = AnimRes.sAll[mEmojiIndex % AnimRes.sAll.length]; + mKeyPoint = AnimRes.sKeyPoint[mEmojiIndex % AnimRes.sKeyPoint.length]; + mBkg.setImageResource( AnimRes.sBkgRes[mEmojiIndex % AnimRes.sBkgRes.length] ); + mStartIndex = 0; + if ( start ) { + start(); + } + mHandler.sendEmptyMessageDelayed( MSG_CHANGE, ANIM_INTERVAL ); } - mImageView.setImageResource( AnimRes.sRes[mStartIndex++ % AnimRes.sRes.length] ); - mHandler.sendEmptyMessageDelayed( MSG_LOOP, FRAME_INTERVAL ); - } - break; - case MSG_CHANGE: - if ( mLastType == AnimRes.EmojiType.Others ) { - boolean start = mStarted; - stop(); - mEmojiIndex++; - AnimRes.sRes = AnimRes.sAll[mEmojiIndex % AnimRes.sAll.length]; - mKeyPoint = AnimRes.sKeyPoint[mEmojiIndex % AnimRes.sKeyPoint.length]; - mBkg.setImageResource( AnimRes.sBkgRes[mEmojiIndex % AnimRes.sBkgRes.length] ); - mStartIndex = 0; - if ( start ) { - start(); - } - mHandler.sendEmptyMessageDelayed( MSG_CHANGE, ANIM_INTERVAL ); - } - break; + break; + } + } catch (Exception e) { + e.printStackTrace(); } } };