From 983396fb44d075b32daea2372b077b9f354c4873 Mon Sep 17 00:00:00 2001 From: Andy McFadden Date: Mon, 8 Jun 2009 10:08:18 -0700 Subject: [PATCH] Add missing system properties to sim. The framework cannot start if certain properties are missing. This adds a couple of properties used by the backup system. Also fixed a trio of printf/size_t warnings. --- simulator/app/PropertyServer.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/simulator/app/PropertyServer.cpp b/simulator/app/PropertyServer.cpp index 4b1aedd68..0047b5dd4 100644 --- a/simulator/app/PropertyServer.cpp +++ b/simulator/app/PropertyServer.cpp @@ -110,6 +110,8 @@ void PropertyServer::SetDefaultProperties(void) { "ro.EMPTY_APP_MEM", "16384" }, { "ro.HOME_APP_ADJ", "4" }, { "ro.HOME_APP_MEM", "4096" }, + { "ro.BACKUP_APP_ADJ", "2" }, + { "ro.BACKUP_APP_MEM", "4096" }, //{ "init.svc.adbd", "running" }, // causes ADB-JDWP { "init.svc.usbd", "running" }, { "init.svc.debuggerd", "running" }, @@ -180,7 +182,7 @@ bool PropertyServer::GetProperty(const char* key, char* valueBuf) if (strlen(prop.value) >= PROPERTY_VALUE_MAX) { fprintf(stderr, "GLITCH: properties table holds '%s' '%s' (len=%d)\n", - prop.key, prop.value, strlen(prop.value)); + prop.key, prop.value, (int) strlen(prop.value)); abort(); } assert(strlen(prop.value) < PROPERTY_VALUE_MAX); @@ -323,7 +325,7 @@ bool PropertyServer::HandleRequest(int fd) if (actual != PROPERTY_KEY_MAX) { fprintf(stderr, "Bad read on get: %d of %d\n", - actual, PROPERTY_KEY_MAX); + (int) actual, PROPERTY_KEY_MAX); return false; } if (GetProperty(reqBuf, valueBuf+1)) @@ -340,7 +342,7 @@ bool PropertyServer::HandleRequest(int fd) actual = read(fd, reqBuf, PROPERTY_KEY_MAX + PROPERTY_VALUE_MAX); if (actual != PROPERTY_KEY_MAX + PROPERTY_VALUE_MAX) { fprintf(stderr, "Bad read on set: %d of %d\n", - actual, PROPERTY_KEY_MAX + PROPERTY_VALUE_MAX); + (int) actual, PROPERTY_KEY_MAX + PROPERTY_VALUE_MAX); return false; } //printf("SET property '%s'\n", reqBuf);