Fix KCM key mapping cloning
ag/23792288 tried to fix a security issue by cloning the key mappings, but unfortunately the parcel was not being rewinded. Bug: 274058082 Test: Confirmed change works in newer Android versions Merged-In: I745008a0a8ea30830660c45dcebee917b3913d13 Change-Id: I6f75b9202e20d82ebf81a35a2916e653ee1b8372
This commit is contained in:
@@ -53,6 +53,7 @@ jobject android_view_InputDevice_create(JNIEnv* env, const InputDeviceInfo& devi
|
||||
if (map != nullptr) {
|
||||
Parcel parcel;
|
||||
map->writeToParcel(&parcel);
|
||||
parcel.setDataPosition(0);
|
||||
map = map->readFromParcel(&parcel);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user