From ab57d20f83de51edef5621ca1454d1faa3a00295 Mon Sep 17 00:00:00 2001 From: zale <1433317488@qq.com> Date: Tue, 24 Jan 2017 14:47:02 +0800 Subject: [PATCH] vivo mobile phones eat the NotFoundException //fix for Vivo mobile phones rom that don't throw NotFoundException when the resources not found --- .../main/java/cn/feng/skin/manager/loader/SkinManager.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/android-skin-loader-lib/src/main/java/cn/feng/skin/manager/loader/SkinManager.java b/android-skin-loader-lib/src/main/java/cn/feng/skin/manager/loader/SkinManager.java index fb5f7c7..2b60fc0 100644 --- a/android-skin-loader-lib/src/main/java/cn/feng/skin/manager/loader/SkinManager.java +++ b/android-skin-loader-lib/src/main/java/cn/feng/skin/manager/loader/SkinManager.java @@ -265,6 +265,11 @@ public Drawable getDrawable(int resId){ trueDrawable = originDrawable; } + //fix for Vivo mobile phones rom that don't throw NotFoundException when the resources not found + if(trueDrawable == null){ + trueDrawable = originDrawable; + } + return trueDrawable; } @@ -323,4 +328,4 @@ public ColorStateList convertToColorStateList(int resId) { int[][] states = new int[1][1]; return new ColorStateList(states, new int[] { context.getResources().getColor(resId) }); } -} \ No newline at end of file +}