11 Commits

Author SHA1 Message Date
Christian Hoffmann
9bead714fa wahoo: folio_daemon: PollOnce instead of PollAll
replace ALooper_pollAll with ALooper_pollOnce :
 * Removed in API 34 as ALooper_pollAll can swallow ALooper_wake calls.
 * Use ALooper_pollOnce instead.
2024-06-08 22:09:10 +08:00
Andrew Lehmer
948ad9c58c folio_daemon: Avoid UAF with stale sensor handle
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
2020-03-30 22:35:46 +00:00
Jiyong Park
56c0900c11 Disable modules that can't be built in PDK
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
2018-03-08 17:50:19 +09:00
Lennart Wieboldt
8f4072e87a wahoo: remove LOCAL_CLANG := true
Clang is the default compiler since nougat.

Change-Id: I565e25f9f688a979eac41de0eee4a88b24099098
Signed-off-by: Lennart Wieboldt <lennart.1997@gmx.de>
2017-11-13 18:00:37 +00:00
Chih-Hung Hsieh
20197b4ece Use -Werror in device/google/wahoo
* Remove unused local variable.

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I96228277b9c81b71e73e4e376d86cdea6cbcb647
2017-11-06 15:06:45 -08:00
Dan Albert
28dfa2c208 Add missing includes.
Change-Id: I74ce25b3b5c918e371140b91f82ec00ff571f9fe
Exempt-From-Owner-Approval: trivial cleanup
Test: mma
Bug: None
2017-10-17 18:03:22 +00:00
Jeff Vander Stoep
d60c59ea43 Move folio_daemon to system in sepolicy
Remove Treble violations.

Bug: 36867326
Bug: 62387246
Test: loaded on taimen, checked dmesg, and tested daemon with magnet
Change-Id: I4662b41206b94cae6ac9843b5dc7e1452003c63c
2017-06-21 11:02:30 -07:00
Andrew Lehmer
518eb90bea folio_daemon: retry slowly on failure
Bug: 38001818
Test: loaded on taimen
Change-Id: I3f5a8cbf0faca3b5d027dcd74f1b16de80fdbee2
2017-05-24 09:52:04 -07:00
Andrew Lehmer
b6cbc1d6c4 folio_daemon: exit when poll returns zero events
Bug: 37402669
Test: loaded on walleye, issued `adb shell stop`, checked `top`
Change-Id: I7d43cab39809b6b156eb26195df2c913991e5c96
2017-04-25 11:47:13 -07:00
Andrew Lehmer
7c58dfb1de folio_daemon: improve logging for debugging
Bug: 37402669
Test: loaded on walleye
Change-Id: I9cfd071158386d3eb15a5b81656b09452c7fed15
2017-04-17 12:19:05 -07:00
Andrew Lehmer
99cbc8d596 Add support for folio cases
Bug: 35243564
Test: Used magnet to wake and lock device. Also tested during suspend.
Change-Id: I4b819e12cc23a3d7a8ce048e208c15eac4f8d6c5
2017-03-31 13:08:45 -07:00