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

Commit 9e3514e2 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 7078355 from fe64cc06 to sc-release

Change-Id: I32597faf7ae43512681f27494703cc3f443253c8
parents adce7c4b fe64cc06
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -72,7 +72,7 @@ interface IBluetoothGatt {
    void unregisterSync(in IPeriodicAdvertisingCallback callback);

    @UnsupportedAppUsage
    void registerClient(in ParcelUuid appId, in IBluetoothGattCallback callback);
    void registerClient(in ParcelUuid appId, in IBluetoothGattCallback callback, boolean eatt_support);

    @UnsupportedAppUsage
    void unregisterClient(in int clientIf);
@@ -101,7 +101,7 @@ interface IBluetoothGatt {
                            int maxInterval, int peripheralLatency, int supervisionTimeout,
                            int minConnectionEventLen, int maxConnectionEventLen);

    void registerServer(in ParcelUuid appId, in IBluetoothGattServerCallback callback);
    void registerServer(in ParcelUuid appId, in IBluetoothGattServerCallback callback, boolean eatt_support);
    void unregisterServer(in int serverIf);
    void serverConnect(in int serverIf, in String address, in boolean isDirect, in int transport);
    void serverDisconnect(in int serverIf, in String address);
+1 −1
Original line number Diff line number Diff line
@@ -109,7 +109,7 @@ void bta_dm_init_pm(void) {
 *
 ******************************************************************************/
void bta_dm_disable_pm(void) {
  BTM_PmRegister(BTM_PM_DEREG, &bta_dm_cb.pm_id, NULL);
  BTM_PmRegister(BTM_PM_DEREG, &bta_dm_cb.pm_id, bta_dm_pm_btm_cback);

  /*
   * Deregister the PM callback from the system handling to prevent
+8 −8
Original line number Diff line number Diff line
@@ -31,21 +31,20 @@
#include <base/threading/thread.h>
#include <errno.h>
#include <hardware/bluetooth.h>
#include <string>
#include "device/include/controller.h"

#include "btif_common.h"
#include "btif_util.h"

#include <hardware/bt_gatt.h>

#include <string>

#include "bta_api.h"
#include "bta_gatt_api.h"
#include "btif_common.h"
#include "btif_config.h"
#include "btif_dm.h"
#include "btif_gatt.h"
#include "btif_gatt_util.h"
#include "btif_storage.h"
#include "btif_util.h"
#include "device/include/controller.h"
#include "osi/include/log.h"
#include "stack/include/acl_api.h"
#include "stack/include/acl_api_types.h"
@@ -255,7 +254,8 @@ void btm_read_rssi_cb(void* p_void) {
 *  Client API Functions
 ******************************************************************************/

static bt_status_t btif_gattc_register_app(const Uuid& uuid) {
static bt_status_t btif_gattc_register_app(const Uuid& uuid,
                                           bool eatt_support) {
  CHECK_BTGATT_INIT();

  return do_in_jni_thread(Bind(
@@ -274,7 +274,7 @@ static bt_status_t btif_gattc_register_app(const Uuid& uuid) {
                uuid),
            eatt_support);
      },
      uuid, false));
      uuid, eatt_support));
}

static void btif_gattc_unregister_app_impl(int client_if) {
+3 −2
Original line number Diff line number Diff line
@@ -267,11 +267,12 @@ static void btapp_gatts_cback(tBTA_GATTS_EVT event, tBTA_GATTS* p_data) {
/*******************************************************************************
 *  Server API Functions
 ******************************************************************************/
static bt_status_t btif_gatts_register_app(const Uuid& bt_uuid) {
static bt_status_t btif_gatts_register_app(const Uuid& bt_uuid,
                                           bool eatt_support) {
  CHECK_BTGATT_INIT();

  return do_in_jni_thread(
      Bind(&BTA_GATTS_AppRegister, bt_uuid, &btapp_gatts_cback, false));
      Bind(&BTA_GATTS_AppRegister, bt_uuid, &btapp_gatts_cback, eatt_support));
}

static bt_status_t btif_gatts_unregister_app(int server_if) {
+12 −0
Original line number Diff line number Diff line
@@ -96,5 +96,17 @@ inline std::string StringFormatTime(const std::string& format, const struct std:
  return os.str();
}

inline std::string StringFormatTimeWithMilliseconds(
    const std::string& format,
    std::chrono::time_point<std::chrono::system_clock> time_point,
    struct tm* (*calendar_to_tm)(const time_t* timep) = localtime) {
  std::time_t epoch_time = std::chrono::system_clock::to_time_t(time_point);
  auto millis = time_point.time_since_epoch() / std::chrono::milliseconds(1) % 1000;
  std::tm tm = *calendar_to_tm(&epoch_time);
  std::ostringstream os;
  os << std::put_time(&tm, format.c_str()) << StringFormat(".%03u", millis);
  return os.str();
}

}  // namespace common
}  // namespace bluetooth
Loading