summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
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 7197ad7..ac9cdf9 100644
--- a/libs/utils/ResourceTypes.cpp
+++ b/libs/utils/ResourceTypes.cpp
@@ -2424,7 +2424,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] : '-',
@@ -2437,7 +2437,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));
@@ -3758,8 +3760,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,
@@ -3786,7 +3790,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)) {
@@ -4067,7 +4075,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] : '-',
@@ -4081,7 +4090,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),
@@ -4444,6 +4455,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));
}