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

Commit 489d1240 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 8710048 from 08b0f534 to tm-release

Change-Id: I008e25fe03ab1cf6592e817eda1d6117092dcdbd
parents bbbf327c 08b0f534
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2691,7 +2691,7 @@ public class AdapterService extends Service {

            ParcelUuid[] parcels = service.getRemoteUuids(device);
            if (parcels == null) {
                parcels = new ParcelUuid[0];
                return null;
            }
            return Arrays.asList(parcels);
        }
+6 −1
Original line number Diff line number Diff line
@@ -1046,10 +1046,15 @@ public class DatabaseManager {
                // Do not log anything if metadata doesn't fall into above categories
                return;
        }
        String[] macAddress = device.getAddress().split(":");
        BluetoothStatsLog.write(BluetoothStatsLog.BLUETOOTH_DEVICE_INFO_REPORTED,
                mAdapterService.obfuscateAddress(device),
                BluetoothProtoEnums.DEVICE_INFO_EXTERNAL, callingApp, manufacturerName, modelName,
                hardwareVersion, softwareVersion, mAdapterService.getMetricId(device));
                hardwareVersion, softwareVersion, mAdapterService.getMetricId(device),
                device.getAddressType(),
                Integer.parseInt(macAddress[0], 16),
                Integer.parseInt(macAddress[1], 16),
                Integer.parseInt(macAddress[2], 16));
    }

    private void logMetadataChange(String address, String log) {
+5 −1
Original line number Diff line number Diff line
@@ -1914,10 +1914,14 @@ public class HeadsetStateMachine extends StateMachine {
        String vendorId = deviceInfo[0];
        String productId = deviceInfo[1];
        String version = deviceInfo[2];
        String[] macAddress = device.getAddress().split(":");
        BluetoothStatsLog.write(BluetoothStatsLog.BLUETOOTH_DEVICE_INFO_REPORTED,
                mAdapterService.obfuscateAddress(device), BluetoothProtoEnums.DEVICE_INFO_INTERNAL,
                BluetoothHeadset.VENDOR_SPECIFIC_HEADSET_EVENT_XAPL, vendorId, productId, version,
                null, mAdapterService.getMetricId(device));
                null, mAdapterService.getMetricId(device),
                device.getAddressType(),
                Integer.parseInt(macAddress[0], 16),
                Integer.parseInt(macAddress[1], 16), Integer.parseInt(macAddress[2], 16));
        // feature = 2 indicates that we support battery level reporting only
        mNativeInterface.atResponseString(device, "+XAPL=iPhone," + String.valueOf(2));
    }
+2 −3
Original line number Diff line number Diff line
@@ -53,7 +53,6 @@ import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.TimeoutException;
@@ -2228,8 +2227,8 @@ public final class BluetoothDevice implements Parcelable, Attributable {
                        new SynchronousResultReceiver();
                service.getRemoteUuids(this, mAttributionSource, recv);
                List<ParcelUuid> parcels = recv.awaitResultNoInterrupt(getSyncTimeout())
                        .getValue(new ArrayList<>());
                return parcels.toArray(new ParcelUuid[parcels.size()]);
                        .getValue(null);
                return parcels != null ? parcels.toArray(new ParcelUuid[parcels.size()]) : null;
            } catch (RemoteException | TimeoutException e) {
                Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable()));
            }
+10 −5
Original line number Diff line number Diff line
@@ -859,6 +859,7 @@ void LogSocketConnectionState(
}

void LogManufacturerInfo(const RawAddress& address,
                         android::bluetooth::AddressTypeEnum address_type,
                         android::bluetooth::DeviceInfoSrcEnum source_type,
                         const std::string& source_name,
                         const std::string& manufacturer,
@@ -875,16 +876,20 @@ void LogManufacturerInfo(const RawAddress& address,
  BytesField obfuscated_id_field(
      address.IsEmpty() ? nullptr : obfuscated_id.c_str(),
      address.IsEmpty() ? 0 : obfuscated_id.size());
  int ret = stats_write(BLUETOOTH_DEVICE_INFO_REPORTED, obfuscated_id_field,
                        source_type, source_name.c_str(), manufacturer.c_str(),
                        model.c_str(), hardware_version.c_str(),
                        software_version.c_str(), metric_id);
  int ret = stats_write(
      BLUETOOTH_DEVICE_INFO_REPORTED, obfuscated_id_field, source_type,
      source_name.c_str(), manufacturer.c_str(), model.c_str(),
      hardware_version.c_str(), software_version.c_str(), metric_id,
      address_type, address.address[5], address.address[4], address.address[3]);
  if (ret < 0) {
    LOG(WARNING) << __func__ << ": failed for " << address << ", source_type "
                 << source_type << ", source_name " << source_name
                 << ", manufacturer " << manufacturer << ", model " << model
                 << ", hardware_version " << hardware_version
                 << ", software_version " << software_version << ", error "
                 << ", software_version " << software_version
                 << " MAC address type " << address_type
                 << " MAC address prefix " << address.address[5] << " "
                 << address.address[4] << " " << address.address[3] << ", error "
                 << ret;
  }
}
Loading