Skip to content
Snippets Groups Projects
Commit 2da17761 authored by Siarhei Vishniakou's avatar Siarhei Vishniakou
Browse files

Update usage of PropertyMap::load

Now that PropertyMap returns an owned object, update the usage in
validatekeymaps.

Bug: 163171599
Test: presubmit
Change-Id: I75b9abe3fa1d418951a8c23a624771046a89b3f8
parent a67b86d0
No related branches found
No related tags found
No related merge requests found
......@@ -11,6 +11,7 @@ clang_format = --commit ${PREUPLOAD_COMMIT} --style file --extensions c,h,cc,cpp
libs/input/
services/core/jni/
services/incremental/
tools/
[Hook Scripts]
checkstyle_hook = ${REPO_ROOT}/prebuilts/checkstyle/checkstyle.py --sha ${PREUPLOAD_COMMIT}
......
......@@ -115,13 +115,13 @@ static bool validateFile(const char* filename) {
}
case FILETYPE_INPUTDEVICECONFIGURATION: {
PropertyMap* map;
status_t status = PropertyMap::load(String8(filename), &map);
if (status) {
error("Error %d parsing input device configuration file.\n\n", status);
android::base::Result<std::unique_ptr<PropertyMap>> propertyMap =
PropertyMap::load(String8(filename));
if (!propertyMap.ok()) {
error("Error %d parsing input device configuration file.\n\n",
propertyMap.error().code());
return false;
}
delete map;
break;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment