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

Commit 48f67682 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Modify Bluetooth Class of Device from Android stack"

parents b5fd8075 d48a58ab
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2017, The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.bluetooth;

parcelable BluetoothClass;
+2 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package android.bluetooth;
import android.bluetooth.IBluetoothCallback;
import android.bluetooth.IBluetoothStateChangeCallback;
import android.bluetooth.BluetoothActivityEnergyInfo;
import android.bluetooth.BluetoothClass;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.OobData;
import android.os.ParcelUuid;
@@ -42,6 +43,7 @@ interface IBluetooth
    ParcelUuid[] getUuids();
    boolean setName(in String name);
    String getName();
    boolean setBluetoothClass(in BluetoothClass bluetoothClass);

    int getScanMode();
    boolean setScanMode(int mode, int duration);
+9 −0
Original line number Diff line number Diff line
@@ -988,6 +988,15 @@ bt_status_t btif_set_adapter_property(const bt_property_t* property) {
         if required */
      storage_req_id = BTIF_CORE_STORAGE_ADAPTER_WRITE;
    } break;
    case BT_PROPERTY_CLASS_OF_DEVICE: {
      DEV_CLASS dev_class;
      memcpy(dev_class, property->val, DEV_CLASS_LEN);

      BTIF_TRACE_EVENT("set property dev_class : 0x%02x%02x%02x", dev_class[0],
                       dev_class[1], dev_class[2]);

      BTM_SetDeviceClass(dev_class);
    } break;
    case BT_PROPERTY_BDADDR:
    case BT_PROPERTY_UUIDS:
    case BT_PROPERTY_ADAPTER_BONDED_DEVICES: