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

Commit 26029547 authored by Barry's avatar Barry Committed by Android Build Cherrypicker Worker
Browse files

Bluetooth Framework support new BQR parameter for Android Bluetooth Metric

- Add QUALITY_REPORT_ID_ENERGY_MONITOR in BluetoothQualityReport class
for support BQR energy monitor

- Add QUALITY_REPORT_ID_RF_STATS in BluetoothQualityReport class for
support BQR RF stats

- Add new parameters in BqrCommon class for support new BQR parameters

- Add BqrEnergyMonitor classs for support BQR energy monitor event.

Bug: 358472003
Bug: 360807101
Bug: 364517559
Bug: 344812145

Flag: com.android.bluetooth.flags.support_bluetooth_quality_report_v6
Test: m com.google.android.btservices
Test: manually verified
(cherry picked from https://android-review.googlesource.com/q/commit:6668def0e10fdd44a9be5cc76dd2b3b5b6d6733f)
Merged-In: I7762ac9b70c828a384a5d6f5548274fb3e1f6b7d
Change-Id: I7762ac9b70c828a384a5d6f5548274fb3e1f6b7d
parent 55843315
Loading
Loading
Loading
Loading
+65 −0
Original line number Diff line number Diff line
@@ -894,7 +894,9 @@ package android.bluetooth {
    field public static final int QUALITY_REPORT_ID_A2DP_CHOPPY = 3; // 0x3
    field public static final int QUALITY_REPORT_ID_APPROACH_LSTO = 2; // 0x2
    field public static final int QUALITY_REPORT_ID_CONN_FAIL = 8; // 0x8
    field @FlaggedApi("com.android.bluetooth.flags.support_bluetooth_quality_report_v6") public static final int QUALITY_REPORT_ID_ENERGY_MONITOR = 6; // 0x6
    field public static final int QUALITY_REPORT_ID_MONITOR = 1; // 0x1
    field @FlaggedApi("com.android.bluetooth.flags.support_bluetooth_quality_report_v6") public static final int QUALITY_REPORT_ID_RF_STATS = 9; // 0x9
    field public static final int QUALITY_REPORT_ID_SCO_CHOPPY = 4; // 0x4
  }

@@ -903,8 +905,10 @@ package android.bluetooth {
    method public int describeContents();
    method public int getAfhSelectUnidealChannelCount();
    method public int getCalFailedItemCount();
    method @FlaggedApi("com.android.bluetooth.flags.support_bluetooth_quality_report_v6") public int getCoexInfoMask();
    method public int getConnectionHandle();
    method public int getConnectionRole();
    method @FlaggedApi("com.android.bluetooth.flags.support_bluetooth_quality_report_v6") public long getCrcErrorPackets();
    method public long getFlowOffCount();
    method public long getLastFlowOnTimestamp();
    method public long getLastTxAckTimestamp();
@@ -916,8 +920,14 @@ package android.bluetooth {
    method public long getPiconetClock();
    method public long getRetransmissionCount();
    method public int getRssi();
    method @FlaggedApi("com.android.bluetooth.flags.support_bluetooth_quality_report_v6") public long getRxDupPackets();
    method @FlaggedApi("com.android.bluetooth.flags.support_bluetooth_quality_report_v6") public long getRxUnRecvPackets();
    method public int getSnr();
    method @FlaggedApi("com.android.bluetooth.flags.support_bluetooth_quality_report_v6") public long getTxFlushPackets();
    method @FlaggedApi("com.android.bluetooth.flags.support_bluetooth_quality_report_v6") public long getTxLastSubeventPackets();
    method public int getTxPowerLevel();
    method @FlaggedApi("com.android.bluetooth.flags.support_bluetooth_quality_report_v6") public long getTxTotalPackets();
    method @FlaggedApi("com.android.bluetooth.flags.support_bluetooth_quality_report_v6") public long getTxUnackPackets();
    method public long getUnderflowCount();
    method public int getUnusedAfhChannelCount();
    method @Nullable public static String packetTypeToString(int);
@@ -940,6 +950,61 @@ package android.bluetooth {
    field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.BluetoothQualityReport.BqrConnectFail> CREATOR;
  }

  @FlaggedApi("com.android.bluetooth.flags.support_bluetooth_quality_report_v6") public static final class BluetoothQualityReport.BqrEnergyMonitor implements android.os.Parcelable {
    method public int describeContents();
    method public long getActiveStateEnterCount();
    method public long getActiveStateTotalTimeMillis();
    method public int getAverageCurrentConsumptionMicroamps();
    method public int getBredrAverageTxPowerLeveldBm();
    method public long getBredrRxStateEnterCount();
    method public long getBredrRxTotalTimeMillis();
    method public long getBredrTxStateEnterCount();
    method public long getBredrTxTotalTimeMillis();
    method public long getIdleStateEnterCount();
    method public long getIdleStateTotalTimeMillis();
    method public int getLeAverageTxPowerLeveldBm();
    method public long getLeRxStateEnterCount();
    method public long getLeRxTotalTimeMillis();
    method public long getLeTsTotalTimeMillis();
    method public long getLeTxStateEnterCount();
    method public long getPowerDataTotalTimeMillis();
    method public long getRxDualChainActiveDurationMillis();
    method public long getRxSingleChainActiveDurationMillis();
    method public long getTxExternalPaDualChainActiveDurationMillis();
    method public long getTxExternalPaSingleChainActiveDurationMillis();
    method public long getTxInternalPaDualChainActiveDurationMillis();
    method public long getTxInternalPaSingleChainActiveDurationMillis();
    method public void writeToParcel(@NonNull android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.BluetoothQualityReport.BqrEnergyMonitor> CREATOR;
  }

  @FlaggedApi("com.android.bluetooth.flags.support_bluetooth_quality_report_v6") public static final class BluetoothQualityReport.BqrRfStats implements android.os.Parcelable {
    method public int describeContents();
    method public int getExtensionInfo();
    method public long getPacketsWithRssi50To55dBm();
    method public long getPacketsWithRssi55To60dBm();
    method public long getPacketsWithRssi60To65dBm();
    method public long getPacketsWithRssi65To70dBm();
    method public long getPacketsWithRssi70To75dBm();
    method public long getPacketsWithRssi75To80dBm();
    method public long getPacketsWithRssi80To85dBm();
    method public long getPacketsWithRssi85To90dBm();
    method public long getPacketsWithRssiAboveMinus50dBm();
    method public long getPacketsWithRssiBelowMinus90dBm();
    method public long getPacketsWithRssiDelta2To5dBm();
    method public long getPacketsWithRssiDelta5To8dBm();
    method public long getPacketsWithRssiDelta8To11dBm();
    method public long getPacketsWithRssiDeltaAbove11dBm();
    method public long getPacketsWithRssiDeltaBelow2dBm();
    method public long getPerformanceDurationMillis();
    method public long getTxPowerExternalPaBeamformingCount();
    method public long getTxPowerExternalPaDiversityCount();
    method public long getTxPowerInternalPaBeamformingCount();
    method public long getTxPowerInternalPaDiversityCount();
    method public void writeToParcel(@NonNull android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.BluetoothQualityReport.BqrRfStats> CREATOR;
  }

  public static final class BluetoothQualityReport.BqrVsA2dpChoppy implements android.os.Parcelable {
    method public int describeContents();
    method public int getAclTxQueueLength();
+1169 −35

File changed.

Preview size limit exceeded, changes collapsed.