summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSiarhei Vishniakou <svv@google.com>2023-10-23 07:22:01 -0700
committerSiarhei Vishniakou <svv@google.com>2023-10-24 07:19:10 -0700
commitc62948ec5d29035a930c174f2105e8c76581629a (patch)
treeb245fb0a9e70cac723d8f21d9242e7fd2eddc1c4 /include
parenta5ac1e549a5439470971536015aa286eb0e293e3 (diff)
downloadnative-c62948ec5d29035a930c174f2105e8c76581629a.tar.gz
Return unique_ptr from readFromParcel
When KeyCharacterMap is read from parcel, there's no need to force the caller to store the object in a shared pointer. We can return a unique_ptr first, and let the caller decide on how exactly that lifetime should be managed. Bug: 274058082 Test: presubmit Change-Id: I8c5ec1e32a9304f6ad186bc0279f4c7bcbab77d8
Diffstat (limited to 'include')
-rw-r--r--include/input/KeyCharacterMap.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/input/KeyCharacterMap.h b/include/input/KeyCharacterMap.h
index b2e8baade3..dfcf766402 100644
--- a/include/input/KeyCharacterMap.h
+++ b/include/input/KeyCharacterMap.h
@@ -146,7 +146,7 @@ public:
#ifdef __linux__
/* Reads a key map from a parcel. */
- static std::shared_ptr<KeyCharacterMap> readFromParcel(Parcel* parcel);
+ static std::unique_ptr<KeyCharacterMap> readFromParcel(Parcel* parcel);
/* Writes a key map to a parcel. */
void writeToParcel(Parcel* parcel) const;