summaryrefslogtreecommitdiff
path: root/include/input/KeyCharacterMap.h
diff options
context:
space:
mode:
author Siarhei Vishniakou <svv@google.com> 2018-07-06 11:19:32 +0100
committer Siarhei Vishniakou <svv@google.com> 2018-09-05 09:27:25 -0700
commitec8f725bcc099ae63c95a5d725f3ccd63eb4ebe3 (patch)
tree889412e90feec46767f5c3bd6f54558ccf8d66b1 /include/input/KeyCharacterMap.h
parent24d971f469272b59b45490487247f7c4d876c0ab (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 'include/input/KeyCharacterMap.h')
-rw-r--r--include/input/KeyCharacterMap.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/include/input/KeyCharacterMap.h b/include/input/KeyCharacterMap.h
index 33d2757ec8..9f4559f53c 100644
--- a/include/input/KeyCharacterMap.h
+++ b/include/input/KeyCharacterMap.h
@@ -27,7 +27,6 @@
#include <utils/Errors.h>
#include <utils/KeyedVector.h>
#include <utils/Tokenizer.h>
-#include <utils/String8.h>
#include <utils/Unicode.h>
#include <utils/RefBase.h>
@@ -75,10 +74,10 @@ public:
};
/* Loads a key character map from a file. */
- static status_t load(const String8& filename, Format format, sp<KeyCharacterMap>* outMap);
+ static status_t load(const std::string& filename, Format format, sp<KeyCharacterMap>* outMap);
/* Loads a key character map from its string contents. */
- static status_t loadContents(const String8& filename,
+ static status_t loadContents(const std::string& filename,
const char* contents, Format format, sp<KeyCharacterMap>* outMap);
/* Combines a base key character map and an overlay. */
@@ -221,7 +220,7 @@ private:
status_t parseKey();
status_t parseKeyProperty();
status_t finishKey(Key* key);
- status_t parseModifier(const String8& token, int32_t* outMetaState);
+ status_t parseModifier(const std::string& token, int32_t* outMetaState);
status_t parseCharacterLiteral(char16_t* outCharacter);
};