From 75399683a418fff55539e6028341caa2e7572362 Mon Sep 17 00:00:00 2001 From: Gilles Debunne Date: Thu, 19 Aug 2010 11:26:14 -0700 Subject: [PATCH] Fix for a Resource system bug that displayed the wrong name for missing asset. I didn't reproduce the bug and cannot ensure that this will fix it. The monkey with identical parameters stops with an ANR. Bug http://b/issue?id=2931528 Change-Id: I45f156c6a694f2d67fe514e0f0bb367aa017f08e --- core/java/android/content/res/TypedArray.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/java/android/content/res/TypedArray.java b/core/java/android/content/res/TypedArray.java index b0c149d18934c..37fdeb6527428 100644 --- a/core/java/android/content/res/TypedArray.java +++ b/core/java/android/content/res/TypedArray.java @@ -708,9 +708,7 @@ public class TypedArray { outValue.resourceId = data[index+AssetManager.STYLE_RESOURCE_ID]; outValue.changingConfigurations = data[index+AssetManager.STYLE_CHANGING_CONFIGURATIONS]; outValue.density = data[index+AssetManager.STYLE_DENSITY]; - if (type == TypedValue.TYPE_STRING) { - outValue.string = loadStringValueAt(index); - } + outValue.string = (type == TypedValue.TYPE_STRING) ? loadStringValueAt(index) : null; return true; }