From df39ed548863c7a87880e58784def76d5afaaa44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ryszard=20Wi=C5=9Bniewski?= Date: Tue, 23 Mar 2010 23:15:54 +0100 Subject: [PATCH] ResResSpec +hasResource() +hasDefaultResource(). --- src/brut/androlib/res/data/ResResSpec.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/brut/androlib/res/data/ResResSpec.java b/src/brut/androlib/res/data/ResResSpec.java index 69a60291..4b9de594 100644 --- a/src/brut/androlib/res/data/ResResSpec.java +++ b/src/brut/androlib/res/data/ResResSpec.java @@ -57,10 +57,22 @@ public class ResResSpec { return res; } + public boolean hasResource(ResConfig config) { + return hasResource(config.getFlags()); + } + + private boolean hasResource(ResConfigFlags flags) { + return mResources.containsKey(flags); + } + public ResResource getDefaultResource() throws AndrolibException { return getResource(new ResConfigFlags()); } + public boolean hasDefaultResource() { + return mResources.containsKey(new ResConfigFlags()); + } + public String getFullName() { return getFullName(false, false); }