Merge "Don't check for null references."

This commit is contained in:
Dan Albert
2014-09-09 16:25:41 +00:00
committed by Gerrit Code Review

View File

@@ -197,14 +197,10 @@ int doList(Bundle* bundle)
} }
const ResTable& res = assets.getResources(false); const ResTable& res = assets.getResources(false);
if (&res == NULL) {
printf("\nNo resource table found.\n");
} else {
#ifndef HAVE_ANDROID_OS #ifndef HAVE_ANDROID_OS
printf("\nResource table:\n"); printf("\nResource table:\n");
res.print(false); res.print(false);
#endif #endif
}
Asset* manifestAsset = assets.openNonAsset("AndroidManifest.xml", Asset* manifestAsset = assets.openNonAsset("AndroidManifest.xml",
Asset::ACCESS_BUFFER); Asset::ACCESS_BUFFER);
@@ -531,11 +527,6 @@ int doDump(Bundle* bundle)
assets.setConfiguration(config); assets.setConfiguration(config);
const ResTable& res = assets.getResources(false); const ResTable& res = assets.getResources(false);
if (&res == NULL) {
fprintf(stderr, "ERROR: dump failed because no resource table was found\n");
goto bail;
}
if (strcmp("resources", option) == 0) { if (strcmp("resources", option) == 0) {
#ifndef HAVE_ANDROID_OS #ifndef HAVE_ANDROID_OS
res.print(bundle->getValues()); res.print(bundle->getValues());