Optimize the Parcel read/write of common window data
The Parcel read/write speed of MergedConfiguration/InsetsSource
becomes 4x+ faster.
Because writeParcelable sends additional type info which is
unnecessary if the type is known on the reading side, replace
the usages to writeTypedObject and well-written readFromParcel.
That saves the time of class lookup and object creation.
Bug: 181025587
Test: vogar --mode app_process --benchmark \
frameworks/base/core/tests/benchmarks/src/android/os/ParcelableBenchmark.java
Change-Id: I29548ce6c2e5886f0e90a5dc70d8e9ecc0fb25a8
8 files changed