summaryrefslogtreecommitdiffstats
path: root/include/utils
diff options
context:
space:
mode:
authorKenny Root <kroot@google.com>2010-10-28 14:47:01 -0700
committerKenny Root <kroot@google.com>2010-10-29 12:47:07 -0700
commit55fc850cf992cdcb0993cb109d2f716613c0dbdd (patch)
tree2277f806e14fb8a6b422dde687ac9779176ae83b /include/utils
parent490d7c5deda8d602f916942d7002757082274b9b (diff)
downloadframeworks_base-55fc850cf992cdcb0993cb109d2f716613c0dbdd.zip
frameworks_base-55fc850cf992cdcb0993cb109d2f716613c0dbdd.tar.gz
frameworks_base-55fc850cf992cdcb0993cb109d2f716613c0dbdd.tar.bz2
Add path to get different DPI drawables
Allow a caller to request a different density than their current display allows. This can mean a device displaying mdpi can get a resource that's in hdpi and have it pretend to be in mdpi resolution. If a drawable that's returned is not in the requested density, it will set it at the appropriate density to be scaled up later on. The API for this is hidden currently. Bug: 3134688 Change-Id: I6c3908cbdef4907b8d3f1576df9e3b0e7af1755a
Diffstat (limited to 'include/utils')
-rw-r--r--include/utils/ResourceTypes.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/utils/ResourceTypes.h b/include/utils/ResourceTypes.h
index da86da4..ed7f53d 100644
--- a/include/utils/ResourceTypes.h
+++ b/include/utils/ResourceTypes.h
@@ -1771,12 +1771,14 @@ public:
*
* @return ssize_t Either a >= 0 table index or a negative error code.
*/
- ssize_t getResource(uint32_t resID, Res_value* outValue, bool mayBeBag=false,
- uint32_t* outSpecFlags=NULL, ResTable_config* outConfig=NULL) const;
+ ssize_t getResource(uint32_t resID, Res_value* outValue, bool mayBeBag = false,
+ uint16_t density = 0,
+ uint32_t* outSpecFlags = NULL,
+ ResTable_config* outConfig = NULL) const;
inline ssize_t getResource(const ResTable_ref& res, Res_value* outValue,
uint32_t* outSpecFlags=NULL) const {
- return getResource(res.ident, outValue, false, outSpecFlags, NULL);
+ return getResource(res.ident, outValue, false, 0, outSpecFlags, NULL);
}
ssize_t resolveReference(Res_value* inOutValue,