Move KeyLayoutMap from RefBase to shared_ptr.
Move KeyLayoutMap from inheriting RefBase and use shared_ptr to store in owner class like KeyMap. Bug: 160010896 Test: atest inputflinger, atest libinput_tests Change-Id: I5caca94bfc4a7e038729479a53f09a89d97a1c23
This commit is contained in:
@@ -96,10 +96,9 @@ static bool validateFile(const char* filename) {
|
||||
return false;
|
||||
|
||||
case FILETYPE_KEYLAYOUT: {
|
||||
sp<KeyLayoutMap> map;
|
||||
status_t status = KeyLayoutMap::load(filename, &map);
|
||||
if (status) {
|
||||
error("Error %d parsing key layout file.\n\n", status);
|
||||
base::Result<std::shared_ptr<KeyLayoutMap>> ret = KeyLayoutMap::load(filename);
|
||||
if (!ret) {
|
||||
error("Error %s parsing key layout file.\n\n", ret.error().message().c_str());
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user