summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2011-05-13 11:21:26 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2011-05-13 11:21:26 -0700
commit2e4a3236a7634d17f89288e9739a438ecbea0471 (patch)
tree45e1c4c61f4eb9775572d94a55dd91b071b84916 /libs
parent15f8a6a726658bfb195924bd5d7bb86684a22de0 (diff)
parent46a282f323bc05606e4fe1eba795bd9ac7c99819 (diff)
downloadframeworks_base-2e4a3236a7634d17f89288e9739a438ecbea0471.zip
frameworks_base-2e4a3236a7634d17f89288e9739a438ecbea0471.tar.gz
frameworks_base-2e4a3236a7634d17f89288e9739a438ecbea0471.tar.bz2
am 46a282f3: am 0ed2e845: Merge "DO NOT MERGE. Integrate add new screen width/height in "dp" configs." into honeycomb-mr2
* commit '46a282f323bc05606e4fe1eba795bd9ac7c99819': DO NOT MERGE. Integrate add new screen width/height in "dp" configs.
Diffstat (limited to 'libs')
-rw-r--r--libs/utils/ResourceTypes.cpp31
1 files changed, 24 insertions, 7 deletions
diff --git a/libs/utils/ResourceTypes.cpp b/libs/utils/ResourceTypes.cpp
index a6cdb23..784c9d2 100644
--- a/libs/utils/ResourceTypes.cpp
+++ b/libs/utils/ResourceTypes.cpp
@@ -2588,7 +2588,7 @@ void ResTable::setParameters(const ResTable_config* params)
{
mLock.lock();
TABLE_GETENTRY(LOGI("Setting parameters: imsi:%d/%d lang:%c%c cnt:%c%c "
- "orien:%d touch:%d density:%d key:%d inp:%d nav:%d w:%d h:%d\n",
+ "orien:%d touch:%d density:%d key:%d inp:%d nav:%d sz:%dx%d %ddp x %ddp\n",
params->mcc, params->mnc,
params->language[0] ? params->language[0] : '-',
params->language[1] ? params->language[1] : '-',
@@ -2601,7 +2601,9 @@ void ResTable::setParameters(const ResTable_config* params)
params->inputFlags,
params->navigation,
params->screenWidth,
- params->screenHeight));
+ params->screenHeight,
+ params->screenWidthDp,
+ params->screenHeightDp));
mParams = *params;
for (size_t i=0; i<mPackageGroups.size(); i++) {
TABLE_NOISY(LOGI("CLEARING BAGS FOR GROUP %d!", i));
@@ -3922,8 +3924,10 @@ ssize_t ResTable::getEntry(
ResTable_config thisConfig;
thisConfig.copyFromDtoH(thisType->config);
- TABLE_GETENTRY(LOGI("Match entry 0x%x in type 0x%x (sz 0x%x): imsi:%d/%d=%d/%d lang:%c%c=%c%c cnt:%c%c=%c%c "
- "orien:%d=%d touch:%d=%d density:%d=%d key:%d=%d inp:%d=%d nav:%d=%d w:%d=%d h:%d=%d\n",
+ TABLE_GETENTRY(LOGI("Match entry 0x%x in type 0x%x (sz 0x%x): imsi:%d/%d=%d/%d "
+ "lang:%c%c=%c%c cnt:%c%c=%c%c orien:%d=%d touch:%d=%d "
+ "density:%d=%d key:%d=%d inp:%d=%d nav:%d=%d w:%d=%d h:%d=%d "
+ "wdp:%d=%d hdp:%d=%d\n",
entryIndex, typeIndex+1, dtohl(thisType->config.size),
thisConfig.mcc, thisConfig.mnc,
config ? config->mcc : 0, config ? config->mnc : 0,
@@ -3950,7 +3954,11 @@ ssize_t ResTable::getEntry(
thisConfig.screenWidth,
config ? config->screenWidth : 0,
thisConfig.screenHeight,
- config ? config->screenHeight : 0));
+ config ? config->screenHeight : 0,
+ thisConfig.screenWidthDp,
+ config ? config->screenWidthDp : 0,
+ thisConfig.screenHeightDp,
+ config ? config->screenHeightDp : 0));
// Check to make sure this one is valid for the current parameters.
if (config && !thisConfig.match(*config)) {
@@ -4235,7 +4243,8 @@ status_t ResTable::parsePackage(const ResTable_package* const pkg,
ResTable_config thisConfig;
thisConfig.copyFromDtoH(type->config);
LOGI("Adding config to type %d: imsi:%d/%d lang:%c%c cnt:%c%c "
- "orien:%d touch:%d density:%d key:%d inp:%d nav:%d w:%d h:%d\n",
+ "orien:%d touch:%d density:%d key:%d inp:%d nav:%d w:%d h:%d "
+ "wdp:%d hdp:%d\n",
type->id,
thisConfig.mcc, thisConfig.mnc,
thisConfig.language[0] ? thisConfig.language[0] : '-',
@@ -4249,7 +4258,9 @@ status_t ResTable::parsePackage(const ResTable_package* const pkg,
thisConfig.inputFlags,
thisConfig.navigation,
thisConfig.screenWidth,
- thisConfig.screenHeight));
+ thisConfig.screenHeight,
+ thisConfig.screenWidthDp,
+ thisConfig.screenHeightDp));
t->configs.add(type);
} else {
status_t err = validate_chunk(chunk, sizeof(ResChunk_header),
@@ -4742,6 +4753,12 @@ void ResTable::print(bool inclValues) const
if (type->config.screenHeight != 0) {
printf(" h=%d", dtohs(type->config.screenHeight));
}
+ if (type->config.screenWidthDp != 0) {
+ printf(" wdp=%d", dtohs(type->config.screenWidthDp));
+ }
+ if (type->config.screenHeightDp != 0) {
+ printf(" hdp=%d", dtohs(type->config.screenHeightDp));
+ }
if (type->config.sdkVersion != 0) {
printf(" sdk=%d", dtohs(type->config.sdkVersion));
}