Loading libs/sensor/Android.bp +16 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,18 @@ package { default_applicable_licenses: ["frameworks_native_license"], } aconfig_declarations { name: "libsensor_flags", package: "com.android.hardware.libsensor.flags", srcs: ["libsensor_flags.aconfig"], } cc_aconfig_library { name: "libsensor_flags_c_lib", host_supported: true, aconfig_declarations: "libsensor_flags", } cc_library { name: "libsensor", Loading Loading @@ -52,6 +64,10 @@ cc_library { "android.companion.virtual.virtualdevice_aidl-cpp", ], static_libs: [ "libsensor_flags_c_lib", ], export_include_dirs: ["include"], export_shared_lib_headers: [ Loading libs/sensor/SensorManager.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,8 @@ #include <sensor/Sensor.h> #include <sensor/SensorEventQueue.h> #include <com_android_hardware_libsensor_flags.h> // ---------------------------------------------------------------------------- namespace android { // ---------------------------------------------------------------------------- Loading Loading @@ -192,6 +194,9 @@ void SensorManager::sensorManagerDied() { } status_t SensorManager::assertStateLocked() { #if COM_ANDROID_HARDWARE_LIBSENSOR_FLAGS(SENSORMANAGER_PING_BINDER) if (mSensorServer == nullptr) { #else bool initSensorManager = false; if (mSensorServer == nullptr) { initSensorManager = true; Loading @@ -203,6 +208,7 @@ status_t SensorManager::assertStateLocked() { } } if (initSensorManager) { #endif waitForSensorService(&mSensorServer); LOG_ALWAYS_FATAL_IF(mSensorServer == nullptr, "getService(SensorService) NULL"); Loading libs/sensor/libsensor_flags.aconfig 0 → 100644 +9 −0 Original line number Diff line number Diff line package: "com.android.hardware.libsensor.flags" flag { name: "sensormanager_ping_binder" namespace: "libsensors" description: "Whether to pingBinder on SensorManager init" bug: "322228259" is_fixed_read_only: true } No newline at end of file Loading
libs/sensor/Android.bp +16 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,18 @@ package { default_applicable_licenses: ["frameworks_native_license"], } aconfig_declarations { name: "libsensor_flags", package: "com.android.hardware.libsensor.flags", srcs: ["libsensor_flags.aconfig"], } cc_aconfig_library { name: "libsensor_flags_c_lib", host_supported: true, aconfig_declarations: "libsensor_flags", } cc_library { name: "libsensor", Loading Loading @@ -52,6 +64,10 @@ cc_library { "android.companion.virtual.virtualdevice_aidl-cpp", ], static_libs: [ "libsensor_flags_c_lib", ], export_include_dirs: ["include"], export_shared_lib_headers: [ Loading
libs/sensor/SensorManager.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,8 @@ #include <sensor/Sensor.h> #include <sensor/SensorEventQueue.h> #include <com_android_hardware_libsensor_flags.h> // ---------------------------------------------------------------------------- namespace android { // ---------------------------------------------------------------------------- Loading Loading @@ -192,6 +194,9 @@ void SensorManager::sensorManagerDied() { } status_t SensorManager::assertStateLocked() { #if COM_ANDROID_HARDWARE_LIBSENSOR_FLAGS(SENSORMANAGER_PING_BINDER) if (mSensorServer == nullptr) { #else bool initSensorManager = false; if (mSensorServer == nullptr) { initSensorManager = true; Loading @@ -203,6 +208,7 @@ status_t SensorManager::assertStateLocked() { } } if (initSensorManager) { #endif waitForSensorService(&mSensorServer); LOG_ALWAYS_FATAL_IF(mSensorServer == nullptr, "getService(SensorService) NULL"); Loading
libs/sensor/libsensor_flags.aconfig 0 → 100644 +9 −0 Original line number Diff line number Diff line package: "com.android.hardware.libsensor.flags" flag { name: "sensormanager_ping_binder" namespace: "libsensors" description: "Whether to pingBinder on SensorManager init" bug: "322228259" is_fixed_read_only: true } No newline at end of file