Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dc275f8c authored by Chris Ye's avatar Chris Ye
Browse files

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
parent da9aee03
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -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;