diff options
author | 2018-07-06 11:19:32 +0100 | |
---|---|---|
committer | 2018-09-05 09:27:25 -0700 | |
commit | ec8f725bcc099ae63c95a5d725f3ccd63eb4ebe3 (patch) | |
tree | 889412e90feec46767f5c3bd6f54558ccf8d66b1 /libs/input/VirtualKeyMap.cpp | |
parent | 24d971f469272b59b45490487247f7c4d876c0ab (diff) |
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
Diffstat (limited to 'libs/input/VirtualKeyMap.cpp')
-rw-r--r-- | libs/input/VirtualKeyMap.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/input/VirtualKeyMap.cpp b/libs/input/VirtualKeyMap.cpp index 993297319e..3ec53bf5a0 100644 --- a/libs/input/VirtualKeyMap.cpp +++ b/libs/input/VirtualKeyMap.cpp @@ -46,13 +46,13 @@ VirtualKeyMap::VirtualKeyMap() { VirtualKeyMap::~VirtualKeyMap() { } -status_t VirtualKeyMap::load(const String8& filename, VirtualKeyMap** outMap) { +status_t VirtualKeyMap::load(const std::string& filename, VirtualKeyMap** outMap) { *outMap = nullptr; 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 virtual key map file %s.", status, filename.string()); + ALOGE("Error %d opening virtual key map file %s.", status, filename.c_str()); } else { VirtualKeyMap* map = new VirtualKeyMap(); if (!map) { |