Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 605bc9ac authored by Arjun Dhaliwal's avatar Arjun Dhaliwal
Browse files

osi: Use CLOCK_MONOTONIC on platforms that can't wake on BT

Some devices (such as TVs) are not wired up to be
woken by the controller. These devices might run
into unforeseen issues going to sleep with timers
armed. This commit adds a sysprop
(bluetooth.hardware.wakeup_supported) to specify
that the platform is wired up like that, and makes
all alarms on those platforms monotonic, so they
do not count up during suspend.

Bug: 343826774
Test: m -j128 com.android.btservices & QA testing
Flag: EXEMPT, behaviour controlled by sysprop
Change-Id: Ie720ea3c20cba317eb3536c49604c9c8b9c2d80f
parent 342ed20d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@ sysprop_library {
        "bta.sysprop",
        "device_id.sysprop",
        "gap.sysprop",
        "hardware.sysprop",
        "hfp.sysprop",
    ],
    property_owner: "Platform",
+1 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@ sysprop("libcom.android.sysprop.bluetooth") {
    "bta.sysprop",
    "device_id.sysprop",
    "gap.sysprop",
    "hardware.sysprop",
    "hfp.sysprop",
  ]
  deps = [ "//bt/floss/android-base:android-base" ]
+1 −0
Original line number Diff line number Diff line
@@ -22,4 +22,5 @@
#include <bta.sysprop.h>
#include <device_id.sysprop.h>
#include <gap.sysprop.h>
#include <hardware.sysprop.h>
#include <hfp.sysprop.h>
+10 −0
Original line number Diff line number Diff line
module: "android.sysprop.bluetooth.hardware"
owner: Platform

prop {
    api_name: "wakeup_supported"
    type: Boolean
    scope: Internal
    access: Readonly
    prop_name: "bluetooth.hardware.wakeup_supported"
}
+2 −0
Original line number Diff line number Diff line
@@ -187,6 +187,7 @@ cc_test {
        "libbluetooth_log",
        "libbt-common",
        "libchrome",
        "libcom.android.sysprop.bluetooth.wrapped",
        "libflagtest",
        "libfmq",
        "libgmock",
@@ -246,6 +247,7 @@ cc_defaults {
        "libbtif",
        "libbtif-core",
        "libchrome",
        "libcom.android.sysprop.bluetooth.wrapped",
        "libcutils",
        "libevent",
        "libg722codec",
Loading