Merge "Give slightly more descriptive error messages when you can't find resource IDs" am: ae00bbfdd9 am: be2d8803a2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2254479 Change-Id: I973128877a048f396fd85872b96a86c6ea9e6a2f Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -580,7 +580,7 @@ base::expected<FindEntryResult, NullOrIOError> AssetManager2::FindEntry(
|
|||||||
|
|
||||||
// Retrieve the package group from the package id of the resource id.
|
// Retrieve the package group from the package id of the resource id.
|
||||||
if (UNLIKELY(!is_valid_resid(resid))) {
|
if (UNLIKELY(!is_valid_resid(resid))) {
|
||||||
LOG(ERROR) << base::StringPrintf("Invalid ID 0x%08x.", resid);
|
LOG(ERROR) << base::StringPrintf("Invalid resource ID 0x%08x.", resid);
|
||||||
return base::unexpected(std::nullopt);
|
return base::unexpected(std::nullopt);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -589,7 +589,7 @@ base::expected<FindEntryResult, NullOrIOError> AssetManager2::FindEntry(
|
|||||||
const uint16_t entry_idx = get_entry_id(resid);
|
const uint16_t entry_idx = get_entry_id(resid);
|
||||||
uint8_t package_idx = package_ids_[package_id];
|
uint8_t package_idx = package_ids_[package_id];
|
||||||
if (UNLIKELY(package_idx == 0xff)) {
|
if (UNLIKELY(package_idx == 0xff)) {
|
||||||
ANDROID_LOG(ERROR) << base::StringPrintf("No package ID %02x found for ID 0x%08x.",
|
ANDROID_LOG(ERROR) << base::StringPrintf("No package ID %02x found for resource ID 0x%08x.",
|
||||||
package_id, resid);
|
package_id, resid);
|
||||||
return base::unexpected(std::nullopt);
|
return base::unexpected(std::nullopt);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user