From 2da17761f9545b9427a1bc4ef8b2ecf3a337b950 Mon Sep 17 00:00:00 2001 From: Siarhei Vishniakou Date: Tue, 8 Sep 2020 22:43:35 -0500 Subject: Update usage of PropertyMap::load Now that PropertyMap returns an owned object, update the usage in validatekeymaps. Bug: 163171599 Test: presubmit Change-Id: I75b9abe3fa1d418951a8c23a624771046a89b3f8 --- tools/validatekeymaps/Main.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tools/validatekeymaps/Main.cpp') diff --git a/tools/validatekeymaps/Main.cpp b/tools/validatekeymaps/Main.cpp index 7c150f9c8db9..0af6266d1642 100644 --- a/tools/validatekeymaps/Main.cpp +++ b/tools/validatekeymaps/Main.cpp @@ -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> 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; } -- cgit v1.2.3-59-g8ed1b