summaryrefslogtreecommitdiff
path: root/libs/input/PointerController.cpp
diff options
context:
space:
mode:
author Tiger <tigerhuang@google.com> 2022-12-29 22:36:41 +0800
committer Tiger <tigerhuang@google.com> 2023-01-31 19:50:32 +0800
commit98f9d6bfceb8b9b1a1de61466adbdaa19eba4703 (patch)
tree02de92d9f4c6fceb12559018b2c32d69bfe9646e /libs/input/PointerController.cpp
parent04e433caba966eb7f8785804d2c691231edc0d1b (diff)
Enable InsetsState to store sources with discontinuous IDs
This CL uses a SparseArray to store the sources instead of a fixed- length array. In this way, the amount of the sources in the state won't be limited by the amount of the pre-defined IDs (InternalInsetsType). Also, the IDs can be discontinuous integers now. This is a step to remove InternalInsetsType. This CL also fixes the misuses of InsetsState#getSource. In most of cases, they should use peekSource instead. To prevent the caller from creating the source unexpectedly, this CL renames getSource to getOrCreateSource. Bug: 234093736 Test: atest InsetsAnimationControlImplTest InsetsControllerTest InsetsStateTest SurfaceControlViewHostInsetsTest ActivityRecordTests DisplayContentTests DisplayPolicyLayoutTests InsetsPolicyTest InsetsStateControllerTest TaskLaunchParamsModifierTests WindowLayoutTests WindowStateTests Change-Id: I41729a973fbf7f2765b51f4d696cb9be9981fbed
Diffstat (limited to 'libs/input/PointerController.cpp')
0 files changed, 0 insertions, 0 deletions