It is possible for sensor handles retrieved using
ASensorManager_getDefaultSensor() to become stale if the underlying
binder connection to the sensor service gets reset. This can be
triggered by ASensorManager_createEventQueue(), so any sensor handle
retrieved prior to this call may become stale, resulting in a use-after-
free when the handle is eventually registered with the queue. To avoid
this, the event queue is created before retrieving or registering the
sensor.
Bug: 150225255
Test: No longer crashes with proof-of-concept on Pixel 2 XL.
Change-Id: I243f6c68c734af3eb5488855d965a894b5fb99e5
Modules that can't be built in PDK are disabled when TARGET_BUILD_PDK is
true
Bug: 71361051
Test: lunch aosp_walleye-userdebug
PDK_FUSION_PLATFORM_ZIP=vendor/pdk/walleye/walleye-userdebug/platform/platform.zip m -j
Change-Id: I2cc7ab6d667daab7d3566baf8a9b473cafc4e452