From ec8f725bcc099ae63c95a5d725f3ccd63eb4ebe3 Mon Sep 17 00:00:00 2001 From: Siarhei Vishniakou Date: Fri, 6 Jul 2018 11:19:32 +0100 Subject: Prefer std::string over String8 String8 is deprecated, so use proper C++ std::string instead. Change DisplayViewport.uniqueId to std::string. The current usage of String8 in DisplayViewport hinders refactoring of the code to use viewport types inside the viewports themselves. Most of the dependency on String8 is now removed. Once the xml for properties patch is added, almost all String8 should be gone from the input system. Test: atest libinput_tests inputflinger_tests Bug: 111108021 Change-Id: I580dc27b0449e664a7c9db2cdec1a0c18bf71a09 --- libs/input/KeyLayoutMap.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libs/input/KeyLayoutMap.cpp') diff --git a/libs/input/KeyLayoutMap.cpp b/libs/input/KeyLayoutMap.cpp index c440078666..88cb0dbdb4 100644 --- a/libs/input/KeyLayoutMap.cpp +++ b/libs/input/KeyLayoutMap.cpp @@ -49,13 +49,13 @@ KeyLayoutMap::KeyLayoutMap() { KeyLayoutMap::~KeyLayoutMap() { } -status_t KeyLayoutMap::load(const String8& filename, sp* outMap) { +status_t KeyLayoutMap::load(const std::string& filename, sp* outMap) { outMap->clear(); Tokenizer* tokenizer; - status_t status = Tokenizer::open(filename, &tokenizer); + status_t status = Tokenizer::open(String8(filename.c_str()), &tokenizer); if (status) { - ALOGE("Error %d opening key layout map file %s.", status, filename.string()); + ALOGE("Error %d opening key layout map file %s.", status, filename.c_str()); } else { sp map = new KeyLayoutMap(); if (!map.get()) { -- cgit v1.2.3-59-g8ed1b