mirror of
https://github.com/Evolution-X-Devices/device_google_wahoo
synced 2026-02-01 07:50:47 +00:00
Merge QQ3A.200605.002 into master
Bug: 158095402 Merged-In: Iea20c35e7280572777c417cda49a5bb8d9551589 Change-Id: I325c86794600c04252558ab0450be816b3a082c9
This commit is contained in:
@@ -48,7 +48,7 @@ PRODUCT_COPY_FILES += \
|
||||
|
||||
# Set the SVN for the targeted MR release
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
ro.vendor.build.svn=43
|
||||
ro.vendor.build.svn=44
|
||||
|
||||
# Enforce privapp-permissions whitelist
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
|
||||
@@ -45,6 +45,7 @@ int main(void) {
|
||||
ASensorRef hallSensor;
|
||||
ALooper *looper;
|
||||
ASensorEventQueue *eventQueue = nullptr;
|
||||
int32_t hallMinDelay = 0;
|
||||
time_t lastWarn = 0;
|
||||
int attemptCount = 0;
|
||||
|
||||
@@ -87,6 +88,14 @@ int main(void) {
|
||||
|
||||
// Get Hall-effect sensor events from the NDK
|
||||
sensorManager = ASensorManager_getInstanceForPackage(nullptr);
|
||||
looper = ALooper_forThread();
|
||||
if (looper == nullptr) {
|
||||
looper = ALooper_prepare(ALOOPER_PREPARE_ALLOW_NON_CALLBACKS);
|
||||
}
|
||||
|
||||
eventQueue = ASensorManager_createEventQueue(sensorManager, looper, 0, NULL,
|
||||
NULL);
|
||||
|
||||
/*
|
||||
* As long as we are unable to get the sensor handle, periodically retry
|
||||
* and emit an error message at a low frequency to prevent high CPU usage
|
||||
@@ -98,6 +107,7 @@ int main(void) {
|
||||
hallSensor = ASensorManager_getDefaultSensor(sensorManager,
|
||||
SENSOR_TYPE);
|
||||
if (hallSensor != nullptr) {
|
||||
hallMinDelay = ASensor_getMinDelay(hallSensor);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -112,16 +122,8 @@ int main(void) {
|
||||
sleep(RETRY_PERIOD);
|
||||
}
|
||||
|
||||
looper = ALooper_forThread();
|
||||
if (looper == nullptr) {
|
||||
looper = ALooper_prepare(ALOOPER_PREPARE_ALLOW_NON_CALLBACKS);
|
||||
}
|
||||
|
||||
eventQueue = ASensorManager_createEventQueue(sensorManager, looper, 0, NULL,
|
||||
NULL);
|
||||
err = ASensorEventQueue_registerSensor(eventQueue, hallSensor,
|
||||
ASensor_getMinDelay(hallSensor),
|
||||
10000);
|
||||
hallMinDelay, 10000);
|
||||
if (err < 0) {
|
||||
ALOGE("Unable to register for Hall-effect sensor events");
|
||||
goto out;
|
||||
|
||||
@@ -365,4 +365,7 @@
|
||||
|
||||
<!-- True if the firmware supports Wi-Fi link probing -->
|
||||
<bool name="config_wifi_link_probing_supported">true</bool>
|
||||
|
||||
<!-- True if the firmware supports p2p MAC randomization -->
|
||||
<bool name="config_wifi_p2p_mac_randomization_supported">true</bool>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user