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

Commit 979fef62 authored by Andrew Lewis's avatar Andrew Lewis
Browse files

Revert "DO NOT MERGE Hearing Aid: Add JNI API for add/remove whitelist"

This reverts commit 0861b3ef.

Reason for revert: broken pi-dev-plus-aosp

Change-Id: Iab11567fa326b6837a621c1edc93e0eceb04ec43
parent 08bb40f7
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
@@ -325,18 +325,6 @@ class HearingAidImpl : public HearingAid {
    BTA_GATTC_Open(gatt_if, address, true, GATT_TRANSPORT_LE, false);
  }

  void AddToWhiteList(const RawAddress& address) override {
    VLOG(2) << __func__ << " address: " << address;
    hearingDevices.Add(HearingDevice(address, true));
    BTA_GATTC_Open(gatt_if, address, false, GATT_TRANSPORT_LE, false);
    BTA_DmBleStartAutoConn();
  }

  void RemoveFromWhiteList(const RawAddress& address) override {
    VLOG(2) << __func__ << " address: " << address;
    BTA_GATTC_CancelOpen(gatt_if, address, false);
  }

  void AddFromStorage(const RawAddress& address, uint16_t psm,
                      uint8_t capabilities, uint16_t codecs,
                      uint16_t audio_control_point_handle,
+0 −2
Original line number Diff line number Diff line
@@ -55,8 +55,6 @@ class HearingAid {

  virtual void Connect(const RawAddress& address) = 0;
  virtual void Disconnect(const RawAddress& address) = 0;
  virtual void AddToWhiteList(const RawAddress& address) = 0;
  virtual void RemoveFromWhiteList(const RawAddress& address) = 0;
  virtual void SetVolume(int8_t volume) = 0;
};

+0 −3
Original line number Diff line number Diff line
@@ -227,9 +227,6 @@ void btif_storage_load_bonded_hearing_aids();
/** Deletes the bonded hearing aid device info from NVRAM */
void btif_storage_remove_hearing_aid(const RawAddress& address);

/** Add the hearing aid device to white list */
void btif_storage_add_hearing_aid_to_white_list(const RawAddress& address);

/** Remove the hearing aid device from white list */
void btif_storage_remove_hearing_aid_white_list(const RawAddress& address);

+0 −16
Original line number Diff line number Diff line
@@ -95,22 +95,6 @@ class HearingAidInterfaceImpl
        FROM_HERE, Bind(&btif_storage_remove_hearing_aid_white_list, address));
  }

  void AddToWhiteList(const RawAddress& address) override {
    DVLOG(2) << __func__ << " address: " << address;
    do_in_bta_thread(FROM_HERE, Bind(&HearingAid::AddToWhiteList,
                                     Unretained(HearingAid::Get()), address));
    do_in_jni_thread(
        FROM_HERE, Bind(&btif_storage_add_hearing_aid_to_white_list, address));
  }

  void RemoveFromWhiteList(const RawAddress& address) override {
    DVLOG(2) << __func__ << " address: " << address;
    do_in_bta_thread(FROM_HERE, Bind(&HearingAid::RemoveFromWhiteList,
                                     Unretained(HearingAid::Get()), address));
    do_in_jni_thread(
        FROM_HERE, Bind(&btif_storage_remove_hearing_aid_white_list, address));
  }

  void SetVolume(int8_t volume) override {
    DVLOG(2) << __func__ << " volume: " << +volume;
    do_in_main_thread(FROM_HERE, Bind(&HearingAid::SetVolume,
+0 −7
Original line number Diff line number Diff line
@@ -1546,13 +1546,6 @@ void btif_storage_remove_hearing_aid(const RawAddress& address) {
  btif_config_save();
}

/** Add the hearing aid device to white list */
void btif_storage_add_hearing_aid_to_white_list(const RawAddress& address) {
  std::string addrstr = address.ToString();

  btif_config_set_int(addrstr, HEARING_AID_IS_WHITE_LISTED, true);
}

/** Remove the hearing aid device from white list */
void btif_storage_remove_hearing_aid_white_list(const RawAddress& address) {
  std::string addrstr = address.ToString();
Loading