summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Henri Chataing <henrichataing@google.com> 2025-03-11 09:03:52 -0700
committer Android (Google) Code Review <android-gerrit@google.com> 2025-03-11 09:03:52 -0700
commita7d176bf77f0208a6d34ccb581aa9988c4af6d8e (patch)
treee7461c0e4fca99dfce393a6471b05b4c3159bcd3
parent0d25e6356e9cab0a91b11382f42e2a6de57b5434 (diff)
parent0fbb5411c2daa96ce6d93ea1303fcdd30403c328 (diff)
Merge changes from topic "bluetooth-manager-service-proto" into main
* changes: BluetoothManagerService: Remove proto dump Remove legacy definitions from BluetoothMetricsProto
-rw-r--r--android/app/lib-lint-baseline.xml553
-rw-r--r--android/app/lint-baseline.xml38
-rw-r--r--android/app/src/com/android/bluetooth/a2dp/A2dpService.java4
-rw-r--r--android/app/src/com/android/bluetooth/a2dpsink/A2dpSinkStateMachine.java4
-rw-r--r--android/app/src/com/android/bluetooth/avrcp/AvrcpTargetService.java2
-rw-r--r--android/app/src/com/android/bluetooth/avrcpcontroller/AvrcpControllerStateMachine.java7
-rw-r--r--android/app/src/com/android/bluetooth/btservice/AdapterService.java1
-rw-r--r--android/app/src/com/android/bluetooth/btservice/MetricsLogger.java36
-rw-r--r--android/app/src/com/android/bluetooth/btservice/ProfileService.java12
-rw-r--r--android/app/src/com/android/bluetooth/gatt/GattService.java8
-rw-r--r--android/app/src/com/android/bluetooth/hearingaid/HearingAidService.java8
-rw-r--r--android/app/src/com/android/bluetooth/hfp/HeadsetService.java2
-rw-r--r--android/app/src/com/android/bluetooth/hfpclient/HeadsetClientStateMachine.java3
-rw-r--r--android/app/src/com/android/bluetooth/hid/HidDeviceService.java5
-rw-r--r--android/app/src/com/android/bluetooth/hid/HidHostService.java5
-rw-r--r--android/app/src/com/android/bluetooth/le_audio/LeAudioService.java8
-rw-r--r--android/app/src/com/android/bluetooth/le_scan/AppScanStats.java40
-rw-r--r--android/app/src/com/android/bluetooth/le_scan/ScanController.java21
-rw-r--r--android/app/src/com/android/bluetooth/map/BluetoothMapService.java2
-rw-r--r--android/app/src/com/android/bluetooth/mapclient/MceStateMachine.java4
-rw-r--r--android/app/src/com/android/bluetooth/opp/BluetoothOppObexClientSession.java9
-rw-r--r--android/app/src/com/android/bluetooth/opp/BluetoothOppObexServerSession.java8
-rw-r--r--android/app/src/com/android/bluetooth/pan/PanService.java6
-rw-r--r--android/app/src/com/android/bluetooth/pbap/PbapStateMachine.java2
-rw-r--r--android/app/src/com/android/bluetooth/pbapclient/PbapClientStateMachine.java4
-rw-r--r--android/app/src/com/android/bluetooth/pbapclient/PbapClientStateMachineOld.java4
-rw-r--r--android/app/src/com/android/bluetooth/sap/SapService.java4
-rw-r--r--android/app/tests/unit/src/com/android/bluetooth/btservice/MetricsLoggerTest.java56
-rw-r--r--service/Android.bp17
-rwxr-xr-xservice/kls-classpath1
-rw-r--r--service/src/ActiveLog.kt16
-rw-r--r--service/src/ActiveLogTest.kt11
-rw-r--r--service/src/com/android/server/bluetooth/BluetoothManagerService.java32
-rw-r--r--system/gd/proto/bluetooth/metrics/bluetooth.proto276
34 files changed, 237 insertions, 972 deletions
diff --git a/android/app/lib-lint-baseline.xml b/android/app/lib-lint-baseline.xml
index c2a527c3fc..a43b47a0d7 100644
--- a/android/app/lib-lint-baseline.xml
+++ b/android/app/lib-lint-baseline.xml
@@ -101,24 +101,13 @@
</issue>
<issue
- id="DefaultLocale"
- message="Implicitly using the default locale is a common source of bugs: Use `String.format(Locale, ...)` instead"
- errorLine1=" return String.format("
- errorLine2=" ^">
- <location
- file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/mapclient/MapClientContent.java"
- line="911"
- column="20"/>
- </issue>
-
- <issue
id="SimpleDateFormat"
message="To get local formatting use `getDateInstance()`, `getDateTimeInstance()`, or `getTimeInstance()`, or use `new SimpleDateFormat(String template, Locale locale)` with for example `Locale.US` for ASCII dates."
errorLine1=" ThreadLocal.withInitial(() -> new SimpleDateFormat(&quot;MM-dd HH:mm:ss&quot;));"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/le_scan/AppScanStats.java"
- line="53"
+ line="64"
column="43"/>
</issue>
@@ -327,7 +316,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/map/BluetoothMapUtils.java"
- line="740"
+ line="739"
column="27"/>
</issue>
@@ -338,7 +327,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/map/BluetoothMapUtils.java"
- line="741"
+ line="740"
column="27"/>
</issue>
@@ -356,8 +345,8 @@
<issue
id="SimpleDateFormat"
message="To get local formatting use `getDateInstance()`, `getDateTimeInstance()`, or `getTimeInstance()`, or use `new SimpleDateFormat(String template, Locale locale)` with for example `Locale.US` for ASCII dates."
- errorLine1=" SimpleDateFormat df = new SimpleDateFormat(RFC_2455_FORMAT);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ errorLine1=" SimpleDateFormat df = new SimpleDateFormat(rfc2455Format);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/pbap/BluetoothPbapCallLogComposer.java"
line="226"
@@ -426,7 +415,7 @@
errorLine2=" ^">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/map/BluetoothMapService.java"
- line="807"
+ line="810"
column="9"/>
</issue>
@@ -437,7 +426,7 @@
errorLine2=" ^">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/map/BluetoothMapService.java"
- line="807"
+ line="810"
column="9"/>
</issue>
@@ -448,7 +437,7 @@
errorLine2=" ^">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/map/BluetoothMapService.java"
- line="807"
+ line="810"
column="9"/>
</issue>
@@ -459,7 +448,7 @@
errorLine2=" ^">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/map/BluetoothMapService.java"
- line="807"
+ line="810"
column="9"/>
</issue>
@@ -547,7 +536,7 @@
errorLine2=" ~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/opp/BluetoothOppTransferActivity.java"
- line="240"
+ line="239"
column="69"/>
</issue>
@@ -565,55 +554,11 @@
<issue
id="VisibleForTests"
message="This method should only be accessed from tests or within private scope"
- errorLine1=" return mDatabaseManager.getA2dpSupportsOptionalCodecs(device);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/a2dp/A2dpService.java"
- line="802"
- column="33"/>
- </issue>
-
- <issue
- id="VisibleForTests"
- message="This method should only be accessed from tests or within private scope"
- errorLine1=" mDatabaseManager.setA2dpSupportsOptionalCodecs(device, value);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/a2dp/A2dpService.java"
- line="810"
- column="26"/>
- </issue>
-
- <issue
- id="VisibleForTests"
- message="This method should only be accessed from tests or within private scope"
- errorLine1=" return mDatabaseManager.getA2dpOptionalCodecsEnabled(device);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/a2dp/A2dpService.java"
- line="823"
- column="33"/>
- </issue>
-
- <issue
- id="VisibleForTests"
- message="This method should only be accessed from tests or within private scope"
- errorLine1=" mDatabaseManager.setA2dpOptionalCodecsEnabled(device, value);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/a2dp/A2dpService.java"
- line="843"
- column="26"/>
- </issue>
-
- <issue
- id="VisibleForTests"
- message="This method should only be accessed from tests or within private scope"
errorLine1=" sm.sendMessage(A2dpStateMachine.MESSAGE_STACK_EVENT, stackEvent);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/a2dp/A2dpService.java"
- line="918"
+ line="920"
column="45"/>
</issue>
@@ -624,7 +569,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/btservice/AdapterService.java"
- line="1149"
+ line="1141"
column="20"/>
</issue>
@@ -635,7 +580,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/btservice/AdapterService.java"
- line="1154"
+ line="1146"
column="20"/>
</issue>
@@ -646,7 +591,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/btservice/AdapterService.java"
- line="1996"
+ line="1965"
column="43"/>
</issue>
@@ -657,7 +602,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/btservice/AdapterService.java"
- line="2001"
+ line="1970"
column="45"/>
</issue>
@@ -668,29 +613,18 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/btservice/AdapterService.java"
- line="2005"
+ line="1974"
column="34"/>
</issue>
<issue
id="VisibleForTests"
message="This method should only be accessed from tests or within private scope"
- errorLine1=" return mDatabaseManager.setCustomMeta(device, key, value);"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/btservice/AdapterService.java"
- line="2237"
- column="33"/>
- </issue>
-
- <issue
- id="VisibleForTests"
- message="This method should only be accessed from tests or within private scope"
errorLine1=" mRemoteDevices.resetBatteryLevel(device, isBas);"
errorLine2=" ~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/btservice/AdapterService.java"
- line="7293"
+ line="7201"
column="28"/>
</issue>
@@ -701,7 +635,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/btservice/AdapterService.java"
- line="7295"
+ line="7203"
column="28"/>
</issue>
@@ -712,7 +646,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/AtPhonebook.java"
- line="182"
+ line="187"
column="38"/>
</issue>
@@ -723,7 +657,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/AtPhonebook.java"
- line="203"
+ line="208"
column="30"/>
</issue>
@@ -734,7 +668,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/AtPhonebook.java"
- line="205"
+ line="210"
column="26"/>
</issue>
@@ -745,7 +679,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/AtPhonebook.java"
- line="274"
+ line="279"
column="30"/>
</issue>
@@ -756,7 +690,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/AtPhonebook.java"
- line="276"
+ line="281"
column="26"/>
</issue>
@@ -767,7 +701,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/AtPhonebook.java"
- line="299"
+ line="304"
column="42"/>
</issue>
@@ -778,7 +712,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/AtPhonebook.java"
- line="314"
+ line="319"
column="34"/>
</issue>
@@ -789,7 +723,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/AtPhonebook.java"
- line="315"
+ line="320"
column="34"/>
</issue>
@@ -800,7 +734,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/AtPhonebook.java"
- line="326"
+ line="331"
column="38"/>
</issue>
@@ -811,7 +745,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/AtPhonebook.java"
- line="334"
+ line="339"
column="38"/>
</issue>
@@ -822,7 +756,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/AtPhonebook.java"
- line="354"
+ line="359"
column="38"/>
</issue>
@@ -833,7 +767,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/AtPhonebook.java"
- line="367"
+ line="372"
column="38"/>
</issue>
@@ -844,7 +778,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/AtPhonebook.java"
- line="373"
+ line="378"
column="38"/>
</issue>
@@ -855,7 +789,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/AtPhonebook.java"
- line="387"
+ line="392"
column="34"/>
</issue>
@@ -866,7 +800,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/AtPhonebook.java"
- line="640"
+ line="645"
column="30"/>
</issue>
@@ -1020,7 +954,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/map/BluetoothMapContent.java"
- line="1261"
+ line="1262"
column="49"/>
</issue>
@@ -1075,7 +1009,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/btservice/BondStateMachine.java"
- line="656"
+ line="657"
column="28"/>
</issue>
@@ -1086,7 +1020,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/btservice/BondStateMachine.java"
- line="693"
+ line="694"
column="28"/>
</issue>
@@ -1097,7 +1031,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/btservice/BondStateMachine.java"
- line="723"
+ line="724"
column="28"/>
</issue>
@@ -1108,7 +1042,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/csip/CsipSetCoordinatorService.java"
- line="855"
+ line="860"
column="63"/>
</issue>
@@ -1119,7 +1053,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hap/HapClientService.java"
- line="157"
+ line="162"
column="16"/>
</issue>
@@ -1130,7 +1064,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfpclient/HeadsetClientService.java"
- line="105"
+ line="111"
column="26"/>
</issue>
@@ -1141,7 +1075,7 @@
errorLine2=" ~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfpclient/HeadsetClientService.java"
- line="177"
+ line="183"
column="26"/>
</issue>
@@ -1152,7 +1086,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfpclient/HeadsetClientStateMachine.java"
- line="418"
+ line="423"
column="26"/>
</issue>
@@ -1163,7 +1097,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfpclient/HeadsetClientStateMachine.java"
- line="671"
+ line="676"
column="30"/>
</issue>
@@ -1174,7 +1108,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfpclient/HeadsetClientStateMachine.java"
- line="712"
+ line="717"
column="30"/>
</issue>
@@ -1185,7 +1119,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfpclient/HeadsetClientStateMachine.java"
- line="737"
+ line="742"
column="30"/>
</issue>
@@ -1196,7 +1130,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfpclient/HeadsetClientStateMachine.java"
- line="760"
+ line="765"
column="34"/>
</issue>
@@ -1207,7 +1141,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfpclient/HeadsetClientStateMachine.java"
- line="1008"
+ line="1013"
column="30"/>
</issue>
@@ -1218,7 +1152,7 @@
errorLine2=" ~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfpclient/HeadsetClientStateMachine.java"
- line="1098"
+ line="1095"
column="43"/>
</issue>
@@ -1229,7 +1163,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfpclient/HeadsetClientStateMachine.java"
- line="1152"
+ line="1146"
column="42"/>
</issue>
@@ -1240,7 +1174,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfpclient/HeadsetClientStateMachine.java"
- line="1316"
+ line="1304"
column="42"/>
</issue>
@@ -1251,7 +1185,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfpclient/HeadsetClientStateMachine.java"
- line="1324"
+ line="1312"
column="46"/>
</issue>
@@ -1262,7 +1196,7 @@
errorLine2=" ~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfpclient/HeadsetClientStateMachine.java"
- line="1435"
+ line="1413"
column="38"/>
</issue>
@@ -1273,7 +1207,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfpclient/HeadsetClientStateMachine.java"
- line="1443"
+ line="1421"
column="47"/>
</issue>
@@ -1284,7 +1218,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfpclient/HeadsetClientStateMachine.java"
- line="1447"
+ line="1425"
column="50"/>
</issue>
@@ -1295,7 +1229,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfpclient/HeadsetClientStateMachine.java"
- line="1453"
+ line="1431"
column="43"/>
</issue>
@@ -1306,7 +1240,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfpclient/HeadsetClientStateMachine.java"
- line="1473"
+ line="1451"
column="46"/>
</issue>
@@ -1317,7 +1251,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfpclient/HeadsetClientStateMachine.java"
- line="1483"
+ line="1461"
column="46"/>
</issue>
@@ -1328,7 +1262,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfpclient/HeadsetClientStateMachine.java"
- line="1505"
+ line="1483"
column="46"/>
</issue>
@@ -1339,7 +1273,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfpclient/HeadsetClientStateMachine.java"
- line="1526"
+ line="1504"
column="46"/>
</issue>
@@ -1350,7 +1284,7 @@
errorLine2=" ~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfpclient/HeadsetClientStateMachine.java"
- line="1537"
+ line="1515"
column="42"/>
</issue>
@@ -1361,7 +1295,7 @@
errorLine2=" ~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfpclient/HeadsetClientStateMachine.java"
- line="1568"
+ line="1546"
column="42"/>
</issue>
@@ -1372,7 +1306,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfpclient/HeadsetClientStateMachine.java"
- line="1575"
+ line="1553"
column="42"/>
</issue>
@@ -1383,7 +1317,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfpclient/HeadsetClientStateMachine.java"
- line="1641"
+ line="1619"
column="54"/>
</issue>
@@ -1394,7 +1328,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfpclient/HeadsetClientStateMachine.java"
- line="2544"
+ line="2519"
column="31"/>
</issue>
@@ -1405,7 +1339,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfpclient/HeadsetClientStateMachine.java"
- line="2554"
+ line="2529"
column="31"/>
</issue>
@@ -1427,7 +1361,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetService.java"
- line="273"
+ line="276"
column="38"/>
</issue>
@@ -1438,7 +1372,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetService.java"
- line="275"
+ line="278"
column="42"/>
</issue>
@@ -1449,7 +1383,7 @@
errorLine2=" ~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetService.java"
- line="288"
+ line="291"
column="26"/>
</issue>
@@ -1460,18 +1394,18 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetService.java"
- line="436"
+ line="439"
column="42"/>
</issue>
<issue
id="VisibleForTests"
message="This method should only be accessed from tests or within private scope"
- errorLine1=" if (stateMachine.getConnectionState() != BluetoothProfile.STATE_DISCONNECTED) {"
+ errorLine1=" if (stateMachine.getConnectionState() != STATE_DISCONNECTED) {"
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetService.java"
- line="508"
+ line="511"
column="30"/>
</issue>
@@ -1482,7 +1416,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetService.java"
- line="866"
+ line="869"
column="48"/>
</issue>
@@ -1493,18 +1427,18 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetService.java"
- line="914"
+ line="916"
column="48"/>
</issue>
<issue
id="VisibleForTests"
message="This method should only be accessed from tests or within private scope"
- errorLine1=" if (stateMachine.getConnectionState() == BluetoothProfile.STATE_CONNECTED) {"
+ errorLine1=" if (stateMachine.getConnectionState() == STATE_CONNECTED) {"
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetService.java"
- line="934"
+ line="935"
column="34"/>
</issue>
@@ -1515,7 +1449,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetService.java"
- line="982"
+ line="983"
column="33"/>
</issue>
@@ -1526,7 +1460,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetService.java"
- line="1096"
+ line="1097"
column="38"/>
</issue>
@@ -1537,7 +1471,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetService.java"
- line="1098"
+ line="1099"
column="42"/>
</issue>
@@ -1548,7 +1482,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetService.java"
- line="1114"
+ line="1115"
column="48"/>
</issue>
@@ -1570,7 +1504,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetService.java"
- line="1243"
+ line="1242"
column="26"/>
</issue>
@@ -1581,7 +1515,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetService.java"
- line="1379"
+ line="1378"
column="30"/>
</issue>
@@ -1592,7 +1526,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetService.java"
- line="1422"
+ line="1421"
column="35"/>
</issue>
@@ -1603,7 +1537,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetService.java"
- line="1433"
+ line="1432"
column="65"/>
</issue>
@@ -1614,7 +1548,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetService.java"
- line="1451"
+ line="1450"
column="38"/>
</issue>
@@ -1625,18 +1559,18 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetService.java"
- line="1490"
+ line="1489"
column="42"/>
</issue>
<issue
id="VisibleForTests"
message="This method should only be accessed from tests or within private scope"
- errorLine1=" if (stateMachine.getConnectionState() != BluetoothProfile.STATE_CONNECTED) {"
+ errorLine1=" if (stateMachine.getConnectionState() != STATE_CONNECTED) {"
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetService.java"
- line="1549"
+ line="1548"
column="30"/>
</issue>
@@ -1647,7 +1581,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetService.java"
- line="1784"
+ line="1783"
column="38"/>
</issue>
@@ -1658,7 +1592,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetService.java"
- line="1786"
+ line="1785"
column="42"/>
</issue>
@@ -1669,7 +1603,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetService.java"
- line="1868"
+ line="1867"
column="35"/>
</issue>
@@ -1680,7 +1614,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetService.java"
- line="1881"
+ line="1880"
column="35"/>
</issue>
@@ -1691,7 +1625,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetService.java"
- line="1882"
+ line="1881"
column="34"/>
</issue>
@@ -1702,7 +1636,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetService.java"
- line="1909"
+ line="1908"
column="38"/>
</issue>
@@ -1713,7 +1647,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetService.java"
- line="1911"
+ line="1910"
column="42"/>
</issue>
@@ -1724,7 +1658,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetService.java"
- line="1932"
+ line="1931"
column="35"/>
</issue>
@@ -1735,7 +1669,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetService.java"
- line="1984"
+ line="1983"
column="65"/>
</issue>
@@ -1746,7 +1680,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetService.java"
- line="1985"
+ line="1984"
column="38"/>
</issue>
@@ -1757,7 +1691,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetService.java"
- line="1986"
+ line="1985"
column="38"/>
</issue>
@@ -1768,7 +1702,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetService.java"
- line="1987"
+ line="1986"
column="38"/>
</issue>
@@ -1779,7 +1713,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetService.java"
- line="1991"
+ line="1990"
column="50"/>
</issue>
@@ -1790,7 +1724,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetService.java"
- line="2009"
+ line="2008"
column="49"/>
</issue>
@@ -1801,7 +1735,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetService.java"
- line="2078"
+ line="2076"
column="48"/>
</issue>
@@ -1812,7 +1746,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetService.java"
- line="2226"
+ line="2221"
column="86"/>
</issue>
@@ -1823,7 +1757,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetService.java"
- line="2234"
+ line="2229"
column="52"/>
</issue>
@@ -1834,7 +1768,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetService.java"
- line="2263"
+ line="2258"
column="38"/>
</issue>
@@ -1845,7 +1779,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetService.java"
- line="2493"
+ line="2488"
column="56"/>
</issue>
@@ -1856,7 +1790,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetService.java"
- line="2562"
+ line="2557"
column="48"/>
</issue>
@@ -1867,40 +1801,18 @@
errorLine2=" ~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetService.java"
- line="2641"
+ line="2636"
column="83"/>
</issue>
<issue
id="VisibleForTests"
message="This method should only be accessed from tests or within private scope"
- errorLine1=" mDatabaseManager.getAudioPolicyMetadata(device);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="208"
- column="34"/>
- </issue>
-
- <issue
- id="VisibleForTests"
- message="This method should only be accessed from tests or within private scope"
- errorLine1=" mDatabaseManager.setAudioPolicyMetadata(device, mHsClientAudioPolicy);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="212"
- column="30"/>
- </issue>
-
- <issue
- id="VisibleForTests"
- message="This method should only be accessed from tests or within private scope"
errorLine1=" mHeadsetService.onConnectionStateChangedFromStateMachine(device, fromState, toState);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="347"
+ line="352"
column="29"/>
</issue>
@@ -1911,7 +1823,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="372"
+ line="377"
column="29"/>
</issue>
@@ -1922,7 +1834,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="527"
+ line="532"
column="39"/>
</issue>
@@ -1933,7 +1845,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="588"
+ line="604"
column="43"/>
</issue>
@@ -1944,7 +1856,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="663"
+ line="684"
column="47"/>
</issue>
@@ -1955,7 +1867,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="845"
+ line="871"
column="46"/>
</issue>
@@ -1966,7 +1878,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="849"
+ line="875"
column="46"/>
</issue>
@@ -1977,7 +1889,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="1021"
+ line="1047"
column="47"/>
</issue>
@@ -1988,7 +1900,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="1037"
+ line="1063"
column="47"/>
</issue>
@@ -1999,7 +1911,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="1047"
+ line="1073"
column="43"/>
</issue>
@@ -2010,7 +1922,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="1060"
+ line="1086"
column="38"/>
</issue>
@@ -2021,7 +1933,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="1073"
+ line="1099"
column="42"/>
</issue>
@@ -2032,7 +1944,7 @@
errorLine2=" ~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="1081"
+ line="1107"
column="38"/>
</issue>
@@ -2043,7 +1955,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="1093"
+ line="1119"
column="42"/>
</issue>
@@ -2054,7 +1966,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="1113"
+ line="1139"
column="46"/>
</issue>
@@ -2065,7 +1977,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="1147"
+ line="1173"
column="46"/>
</issue>
@@ -2076,7 +1988,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="1150"
+ line="1176"
column="46"/>
</issue>
@@ -2087,7 +1999,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="1253"
+ line="1279"
column="34"/>
</issue>
@@ -2098,7 +2010,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="1274"
+ line="1300"
column="34"/>
</issue>
@@ -2109,7 +2021,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="1307"
+ line="1336"
column="47"/>
</issue>
@@ -2120,7 +2032,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="1334"
+ line="1360"
column="53"/>
</issue>
@@ -2131,7 +2043,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="1345"
+ line="1371"
column="43"/>
</issue>
@@ -2142,7 +2054,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="1377"
+ line="1403"
column="47"/>
</issue>
@@ -2153,7 +2065,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="1393"
+ line="1419"
column="47"/>
</issue>
@@ -2164,7 +2076,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="1581"
+ line="1607"
column="47"/>
</issue>
@@ -2175,7 +2087,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="1611"
+ line="1637"
column="46"/>
</issue>
@@ -2186,7 +2098,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="1923"
+ line="1949"
column="30"/>
</issue>
@@ -2197,7 +2109,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="1930"
+ line="1956"
column="34"/>
</issue>
@@ -2208,7 +2120,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="1938"
+ line="1964"
column="34"/>
</issue>
@@ -2219,7 +2131,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="1945"
+ line="1971"
column="34"/>
</issue>
@@ -2230,7 +2142,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="1957"
+ line="1983"
column="30"/>
</issue>
@@ -2241,7 +2153,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="1966"
+ line="1992"
column="34"/>
</issue>
@@ -2252,7 +2164,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="1970"
+ line="1996"
column="34"/>
</issue>
@@ -2263,7 +2175,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="1972"
+ line="1998"
column="34"/>
</issue>
@@ -2274,7 +2186,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="1975"
+ line="2001"
column="30"/>
</issue>
@@ -2285,7 +2197,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="2103"
+ line="2129"
column="63"/>
</issue>
@@ -2296,7 +2208,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="2141"
+ line="2167"
column="26"/>
</issue>
@@ -2307,18 +2219,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="2406"
- column="26"/>
- </issue>
-
- <issue
- id="VisibleForTests"
- message="This method should only be accessed from tests or within private scope"
- errorLine1=" mDatabaseManager.setAudioPolicyMetadata(mDevice, policies);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="2467"
+ line="2432"
column="26"/>
</issue>
@@ -2329,7 +2230,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="2584"
+ line="2610"
column="30"/>
</issue>
@@ -2340,7 +2241,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="2585"
+ line="2611"
column="30"/>
</issue>
@@ -2351,7 +2252,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="2593"
+ line="2619"
column="34"/>
</issue>
@@ -2362,7 +2263,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="2596"
+ line="2622"
column="35"/>
</issue>
@@ -2373,7 +2274,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="2723"
+ line="2754"
column="26"/>
</issue>
@@ -2384,7 +2285,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java"
- line="2723"
+ line="2754"
column="49"/>
</issue>
@@ -2395,7 +2296,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hearingaid/HearingAidService.java"
- line="624"
+ line="626"
column="51"/>
</issue>
@@ -2439,7 +2340,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/le_audio/LeAudioService.java"
- line="204"
+ line="207"
column="5"/>
</issue>
@@ -2450,7 +2351,7 @@
errorLine2=" ~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/le_audio/LeAudioService.java"
- line="593"
+ line="607"
column="29"/>
</issue>
@@ -2461,7 +2362,7 @@
errorLine2=" ~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/le_audio/LeAudioService.java"
- line="683"
+ line="695"
column="29"/>
</issue>
@@ -2472,7 +2373,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/le_audio/LeAudioService.java"
- line="2775"
+ line="2796"
column="52"/>
</issue>
@@ -2483,7 +2384,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/le_audio/LeAudioService.java"
- line="3516"
+ line="3545"
column="52"/>
</issue>
@@ -2494,7 +2395,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/le_audio/LeAudioService.java"
- line="4765"
+ line="4759"
column="29"/>
</issue>
@@ -2505,7 +2406,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/mapclient/MceStateMachine.java"
- line="287"
+ line="289"
column="22"/>
</issue>
@@ -2516,7 +2417,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/pan/PanNativeInterface.java"
- line="61"
+ line="65"
column="21"/>
</issue>
@@ -2527,7 +2428,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/btservice/PhonePolicy.java"
- line="196"
+ line="197"
column="34"/>
</issue>
@@ -2538,7 +2439,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/btservice/PhonePolicy.java"
- line="201"
+ line="202"
column="33"/>
</issue>
@@ -2549,7 +2450,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/btservice/PhonePolicy.java"
- line="586"
+ line="587"
column="37"/>
</issue>
@@ -2560,7 +2461,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/btservice/SilenceDeviceManager.java"
- line="249"
+ line="248"
column="25"/>
</issue>
@@ -2571,7 +2472,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/btservice/SilenceDeviceManager.java"
- line="253"
+ line="252"
column="28"/>
</issue>
@@ -2582,7 +2483,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/tbs/TbsGeneric.java"
- line="175"
+ line="177"
column="48"/>
</issue>
@@ -2598,24 +2499,13 @@
</issue>
<issue
- id="ExportedContentProvider"
- message="Exported content providers can provide access to potentially sensitive data"
- errorLine1=" &lt;provider android:process=&quot;@string/process&quot; android:name=&quot;com.android.bluetooth.avrcpcontroller.AvrcpCoverArtProvider&quot; android:authorities=&quot;com.android.bluetooth.avrcpcontroller.AvrcpCoverArtProvider&quot; android:enabled=&quot;false&quot; android:grantUriPermissions=&quot;true&quot; android:exported=&quot;true&quot;>"
- errorLine2=" ~~~~~~~~">
- <location
- file="./out/soong/.intermediates/packages/modules/Bluetooth/android/app/BluetoothLib/android_common_apex35/manifest_fixer/AndroidManifest.xml"
- line="98"
- column="10"/>
- </issue>
-
- <issue
id="ExportedReceiver"
message="Exported receiver does not require permission"
errorLine1=" &lt;receiver android:process=&quot;@string/process&quot; android:name=&quot;com.android.bluetooth.opp.BluetoothOppReceiver&quot; android:exported=&quot;true&quot; android:enabled=&quot;false&quot;>"
errorLine2=" ~~~~~~~~">
<location
- file="./out/soong/.intermediates/packages/modules/Bluetooth/android/app/BluetoothLib/android_common_apex35/manifest_fixer/AndroidManifest.xml"
- line="125"
+ file="./out/soong/.intermediates/packages/modules/Bluetooth/android/app/BluetoothLib/android_common_apex36/manifest_fixer/AndroidManifest.xml"
+ line="40"
column="10"/>
</issue>
@@ -2625,8 +2515,8 @@
errorLine1=" &lt;service android:process=&quot;@string/process&quot; android:name=&quot;com.android.bluetooth.avrcpcontroller.BluetoothMediaBrowserService&quot; android:enabled=&quot;true&quot; android:exported=&quot;true&quot; android:label=&quot;@string/a2dp_sink_mbs_label&quot;>"
errorLine2=" ~~~~~~~">
<location
- file="./out/soong/.intermediates/packages/modules/Bluetooth/android/app/BluetoothLib/android_common_apex35/manifest_fixer/AndroidManifest.xml"
- line="92"
+ file="./out/soong/.intermediates/packages/modules/Bluetooth/android/app/BluetoothLib/android_common_apex36/manifest_fixer/AndroidManifest.xml"
+ line="17"
column="10"/>
</issue>
@@ -2636,63 +2526,41 @@
errorLine1=" &lt;service android:process=&quot;@string/process&quot; android:name=&quot;com.android.bluetooth.pbapclient.PbapClientAccountAuthenticatorService&quot; android:enabled=&quot;false&quot; android:exported=&quot;true&quot;>"
errorLine2=" ~~~~~~~">
<location
- file="./out/soong/.intermediates/packages/modules/Bluetooth/android/app/BluetoothLib/android_common_apex35/manifest_fixer/AndroidManifest.xml"
- line="200"
+ file="./out/soong/.intermediates/packages/modules/Bluetooth/android/app/BluetoothLib/android_common_apex36/manifest_fixer/AndroidManifest.xml"
+ line="113"
column="10"/>
</issue>
<issue
- id="InvalidPermission"
- message="Protecting an unsupported element with a permission is a no-op and potentially dangerous"
- errorLine1=" &lt;path-permission android:pathPrefix=&quot;/btopp&quot; android:permission=&quot;android.permission.ACCESS_BLUETOOTH_SHARE&quot;/>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="./out/soong/.intermediates/packages/modules/Bluetooth/android/app/BluetoothLib/android_common_apex35/manifest_fixer/AndroidManifest.xml"
- line="123"
- column="58"/>
- </issue>
-
- <issue
id="ExpiredTargetSdkVersion"
message="Google Play requires that apps target API level 33 or higher."
errorLine1=" &lt;uses-sdk android:minSdkVersion=&quot;33&quot; android:targetSdkVersion=&quot;16&quot;/>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
- file="./out/soong/.intermediates/packages/modules/Bluetooth/android/app/BluetoothLib/android_common_apex35/manifest_fixer/AndroidManifest.xml"
- line="74"
+ file="./out/soong/.intermediates/packages/modules/Bluetooth/android/app/BluetoothLib/android_common_apex36/manifest_fixer/AndroidManifest.xml"
+ line="3"
column="42"/>
</issue>
<issue
- id="QueryAllPackagesPermission"
- message="A `&lt;queries>` declaration should generally be used instead of QUERY_ALL_PACKAGES; see https://g.co/dev/packagevisibility for details"
- errorLine1=" &lt;uses-permission android:name=&quot;android.permission.QUERY_ALL_PACKAGES&quot;/>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="./out/soong/.intermediates/packages/modules/Bluetooth/android/app/BluetoothLib/android_common_apex35/manifest_fixer/AndroidManifest.xml"
- line="47"
- column="22"/>
- </issue>
-
- <issue
id="Wakelock"
message="The `release()` call is not always reached (can exit the method via path acquire() → d() → removeMessages() → sendMessageDelayed() → obtainMessage() → break → exit; use try/finally to ensure `release` is always called)"
errorLine1=" mWakeLock.release();"
errorLine2=" ~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/map/BluetoothMapService.java"
- line="467"
+ line="470"
column="35"/>
</issue>
<issue
id="Wakelock"
- message="The `release()` call is not always reached (because of a possible exception in the path acquire() → try → sleep() → if → ! → then → connect() → = → loop → if → ! → then → doSend() → exit; use try/finally to ensure `release` is always called)"
+ message="The `release()` call is not always reached (because of a possible exception in the path acquire() → try → sleep() → if → ! → then → connect() → loop → if → ! → then → doSend() → exit; use try/finally to ensure `release` is always called)"
errorLine1=" mWakeLock.release();"
errorLine2=" ~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/opp/BluetoothOppObexClientSession.java"
- line="201"
+ line="196"
column="27"/>
</issue>
@@ -2703,7 +2571,7 @@
errorLine2=" ~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/pbap/BluetoothPbapService.java"
- line="574"
+ line="580"
column="35"/>
</issue>
@@ -2714,7 +2582,7 @@
errorLine2=" ~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/sap/SapService.java"
- line="511"
+ line="515"
column="43"/>
</issue>
@@ -2725,7 +2593,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/btservice/AdapterService.java"
- line="6561"
+ line="6511"
column="17"/>
</issue>
@@ -2736,7 +2604,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/map/BluetoothMapService.java"
- line="273"
+ line="276"
column="13"/>
</issue>
@@ -2747,7 +2615,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/map/BluetoothMapService.java"
- line="456"
+ line="459"
column="25"/>
</issue>
@@ -2758,7 +2626,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/opp/BluetoothOppObexClientSession.java"
- line="162"
+ line="158"
column="13"/>
</issue>
@@ -2769,7 +2637,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/opp/BluetoothOppObexServerSession.java"
- line="310"
+ line="307"
column="13"/>
</issue>
@@ -2780,7 +2648,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/pbap/BluetoothPbapService.java"
- line="558"
+ line="564"
column="25"/>
</issue>
@@ -2791,7 +2659,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/sap/SapService.java"
- line="302"
+ line="306"
column="13"/>
</issue>
@@ -2802,7 +2670,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/sap/SapService.java"
- line="500"
+ line="504"
column="33"/>
</issue>
@@ -2813,18 +2681,40 @@
errorLine2="~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/btservice/AdapterSuspend.java"
- line="36"
+ line="37"
column="1"/>
</issue>
<issue
id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 35"
+ errorLine1=" @RequiresApi(Build.VERSION_CODES.VANILLA_ICE_CREAM)"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/BluetoothMethodProxy.java"
+ line="304"
+ column="5"/>
+ </issue>
+
+ <issue
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 35"
+ errorLine1=" @RequiresApi(Build.VERSION_CODES.VANILLA_ICE_CREAM)"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/opp/BluetoothOppLauncherActivity.java"
+ line="353"
+ column="5"/>
+ </issue>
+
+ <issue
+ id="ObsoleteSdkInt"
message="Unnecessary; SDK_INT is always >= 34"
errorLine1=" @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/btservice/MetricsLogger.java"
- line="628"
+ line="584"
column="5"/>
</issue>
@@ -2835,7 +2725,7 @@
errorLine2=" ^">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/btservice/AdapterService.java"
- line="755"
+ line="747"
column="9"/>
</issue>
@@ -2912,7 +2802,7 @@
errorLine2=" ^">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/opp/BluetoothOppNotification.java"
- line="230"
+ line="228"
column="13"/>
</issue>
@@ -2945,7 +2835,7 @@
errorLine2=" ^">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hid/HidHostService.java"
- line="335"
+ line="331"
column="13"/>
</issue>
@@ -2956,7 +2846,7 @@
errorLine2=" ^">
<location
file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/sap/SapService.java"
- line="462"
+ line="466"
column="13"/>
</issue>
@@ -3942,17 +3832,6 @@
<issue
id="TypographyEllipsis"
message="Replace &quot;...&quot; with ellipsis character (…, &amp;#8230;) ?"
- errorLine1=" &lt;string name=&quot;enabling_progress_title&quot; msgid=&quot;5262637688863903594&quot;>&quot;Palun oodake ...&quot;&lt;/string>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~">
- <location
- file="packages/modules/Bluetooth/android/app/res/values-et/strings.xml"
- line="77"
- column="72"/>
- </issue>
-
- <issue
- id="TypographyEllipsis"
- message="Replace &quot;...&quot; with ellipsis character (…, &amp;#8230;) ?"
errorLine1=" &lt;string name=&quot;enabling_progress_title&quot; msgid=&quot;5262637688863903594&quot;>&quot;Veuillez patienter...&quot;&lt;/string>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
<location
diff --git a/android/app/lint-baseline.xml b/android/app/lint-baseline.xml
index 256dbfab50..c834f2c6b5 100644
--- a/android/app/lint-baseline.xml
+++ b/android/app/lint-baseline.xml
@@ -51,7 +51,7 @@
errorLine1="&lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;"
errorLine2=" ~~~~~~~~">
<location
- file="./out/soong/.intermediates/packages/modules/Bluetooth/android/app/Bluetooth/android_common_apex35/manifest_merger/AndroidManifest.xml"
+ file="./out/soong/.intermediates/packages/modules/Bluetooth/android/app/Bluetooth/android_common_apex36/manifest_merger/AndroidManifest.xml"
line="2"
column="2"/>
</issue>
@@ -62,7 +62,7 @@
errorLine1="&lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;"
errorLine2=" ~~~~~~~~">
<location
- file="./out/soong/.intermediates/packages/modules/Bluetooth/android/app/Bluetooth/android_common_apex35/manifest_merger/AndroidManifest.xml"
+ file="./out/soong/.intermediates/packages/modules/Bluetooth/android/app/Bluetooth/android_common_apex36/manifest_merger/AndroidManifest.xml"
line="2"
column="2"/>
</issue>
@@ -73,7 +73,7 @@
errorLine1=" &lt;provider"
errorLine2=" ~~~~~~~~">
<location
- file="./out/soong/.intermediates/packages/modules/Bluetooth/android/app/Bluetooth/android_common_apex35/manifest_merger/AndroidManifest.xml"
+ file="./out/soong/.intermediates/packages/modules/Bluetooth/android/app/Bluetooth/android_common_apex36/manifest_merger/AndroidManifest.xml"
line="144"
column="10"/>
</issue>
@@ -84,7 +84,7 @@
errorLine1=" &lt;receiver"
errorLine2=" ~~~~~~~~">
<location
- file="./out/soong/.intermediates/packages/modules/Bluetooth/android/app/Bluetooth/android_common_apex35/manifest_merger/AndroidManifest.xml"
+ file="./out/soong/.intermediates/packages/modules/Bluetooth/android/app/Bluetooth/android_common_apex36/manifest_merger/AndroidManifest.xml"
line="209"
column="10"/>
</issue>
@@ -95,7 +95,7 @@
errorLine1=" &lt;service"
errorLine2=" ~~~~~~~">
<location
- file="./out/soong/.intermediates/packages/modules/Bluetooth/android/app/Bluetooth/android_common_apex35/manifest_merger/AndroidManifest.xml"
+ file="./out/soong/.intermediates/packages/modules/Bluetooth/android/app/Bluetooth/android_common_apex36/manifest_merger/AndroidManifest.xml"
line="129"
column="10"/>
</issue>
@@ -106,7 +106,7 @@
errorLine1=" &lt;service"
errorLine2=" ~~~~~~~">
<location
- file="./out/soong/.intermediates/packages/modules/Bluetooth/android/app/Bluetooth/android_common_apex35/manifest_merger/AndroidManifest.xml"
+ file="./out/soong/.intermediates/packages/modules/Bluetooth/android/app/Bluetooth/android_common_apex36/manifest_merger/AndroidManifest.xml"
line="348"
column="10"/>
</issue>
@@ -117,7 +117,7 @@
errorLine1=" android:permission=&quot;android.permission.ACCESS_BLUETOOTH_SHARE&quot; />"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
- file="./out/soong/.intermediates/packages/modules/Bluetooth/android/app/Bluetooth/android_common_apex35/manifest_merger/AndroidManifest.xml"
+ file="./out/soong/.intermediates/packages/modules/Bluetooth/android/app/Bluetooth/android_common_apex36/manifest_merger/AndroidManifest.xml"
line="206"
column="17"/>
</issue>
@@ -128,7 +128,18 @@
errorLine1=" &lt;uses-permission android:name=&quot;android.permission.QUERY_ALL_PACKAGES&quot; />"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
- file="./out/soong/.intermediates/packages/modules/Bluetooth/android/app/Bluetooth/android_common_apex35/manifest_merger/AndroidManifest.xml"
+ file="./out/soong/.intermediates/packages/modules/Bluetooth/android/app/Bluetooth/android_common_apex36/manifest_merger/AndroidManifest.xml"
+ line="61"
+ column="22"/>
+ </issue>
+
+ <issue
+ id="QueryAllPackagesPermission"
+ message="A `&lt;queries>` declaration should generally be used instead of QUERY_ALL_PACKAGES; see https://g.co/dev/packagevisibility for details"
+ errorLine1=" &lt;uses-permission android:name=&quot;android.permission.QUERY_ALL_PACKAGES&quot; />"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="./out/soong/.intermediates/packages/modules/Bluetooth/android/app/Bluetooth/android_common_apex36/manifest_merger/AndroidManifest.xml"
line="61"
column="22"/>
</issue>
@@ -1126,17 +1137,6 @@
<issue
id="TypographyEllipsis"
message="Replace &quot;...&quot; with ellipsis character (…, &amp;#8230;) ?"
- errorLine1=" &lt;string name=&quot;enabling_progress_title&quot; msgid=&quot;5262637688863903594&quot;>&quot;Palun oodake ...&quot;&lt;/string>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~">
- <location
- file="packages/modules/Bluetooth/android/app/res/values-et/strings.xml"
- line="77"
- column="72"/>
- </issue>
-
- <issue
- id="TypographyEllipsis"
- message="Replace &quot;...&quot; with ellipsis character (…, &amp;#8230;) ?"
errorLine1=" &lt;string name=&quot;enabling_progress_title&quot; msgid=&quot;5262637688863903594&quot;>&quot;Veuillez patienter...&quot;&lt;/string>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
<location
diff --git a/android/app/src/com/android/bluetooth/a2dp/A2dpService.java b/android/app/src/com/android/bluetooth/a2dp/A2dpService.java
index e739c24c99..9481146d61 100644
--- a/android/app/src/com/android/bluetooth/a2dp/A2dpService.java
+++ b/android/app/src/com/android/bluetooth/a2dp/A2dpService.java
@@ -59,7 +59,6 @@ import android.os.Looper;
import android.sysprop.BluetoothProperties;
import android.util.Log;
-import com.android.bluetooth.BluetoothMetricsProto;
import com.android.bluetooth.BluetoothStatsLog;
import com.android.bluetooth.Utils;
import com.android.bluetooth.btservice.ActiveDeviceManager;
@@ -1306,9 +1305,6 @@ public class A2dpService extends ProfileService {
if ((device == null) || (fromState == toState)) {
return;
}
- if (toState == STATE_CONNECTED) {
- MetricsLogger.logProfileConnectionEvent(BluetoothMetricsProto.ProfileId.A2DP);
- }
// Set the active device if only one connected device is supported and it was connected
if (toState == STATE_CONNECTED && (mMaxConnectedAudioDevices == 1)) {
setActiveDevice(device);
diff --git a/android/app/src/com/android/bluetooth/a2dpsink/A2dpSinkStateMachine.java b/android/app/src/com/android/bluetooth/a2dpsink/A2dpSinkStateMachine.java
index 18d956b594..7ec05af50d 100644
--- a/android/app/src/com/android/bluetooth/a2dpsink/A2dpSinkStateMachine.java
+++ b/android/app/src/com/android/bluetooth/a2dpsink/A2dpSinkStateMachine.java
@@ -34,7 +34,6 @@ import android.os.Looper;
import android.os.Message;
import android.util.Log;
-import com.android.bluetooth.BluetoothMetricsProto;
import com.android.bluetooth.Utils;
import com.android.bluetooth.btservice.MetricsLogger;
import com.android.bluetooth.btservice.ProfileService;
@@ -316,9 +315,6 @@ class A2dpSinkStateMachine extends StateMachine {
if (mMostRecentState == currentState) {
return;
}
- if (currentState == STATE_CONNECTED) {
- MetricsLogger.logProfileConnectionEvent(BluetoothMetricsProto.ProfileId.A2DP_SINK);
- }
Log.d(TAG, "[" + mDevice + "] Connection state: " + mMostRecentState + "->" + currentState);
Intent intent = new Intent(BluetoothA2dpSink.ACTION_CONNECTION_STATE_CHANGED);
intent.putExtra(BluetoothProfile.EXTRA_PREVIOUS_STATE, mMostRecentState);
diff --git a/android/app/src/com/android/bluetooth/avrcp/AvrcpTargetService.java b/android/app/src/com/android/bluetooth/avrcp/AvrcpTargetService.java
index 29e6e6676b..e768a976cb 100644
--- a/android/app/src/com/android/bluetooth/avrcp/AvrcpTargetService.java
+++ b/android/app/src/com/android/bluetooth/avrcp/AvrcpTargetService.java
@@ -36,7 +36,6 @@ import android.util.Log;
import android.view.KeyEvent;
import com.android.bluetooth.BluetoothEventLogger;
-import com.android.bluetooth.BluetoothMetricsProto;
import com.android.bluetooth.a2dp.A2dpService;
import com.android.bluetooth.audio_util.ListItem;
import com.android.bluetooth.audio_util.MediaData;
@@ -308,7 +307,6 @@ public class AvrcpTargetService extends ProfileService {
void deviceConnected(BluetoothDevice device, boolean absoluteVolume) {
Log.i(TAG, "deviceConnected: device=" + device + " absoluteVolume=" + absoluteVolume);
mVolumeManager.deviceConnected(device, absoluteVolume);
- MetricsLogger.logProfileConnectionEvent(BluetoothMetricsProto.ProfileId.AVRCP);
}
/** Informs {@link AvrcpVolumeManager} that a device is disconnected */
diff --git a/android/app/src/com/android/bluetooth/avrcpcontroller/AvrcpControllerStateMachine.java b/android/app/src/com/android/bluetooth/avrcpcontroller/AvrcpControllerStateMachine.java
index a74ec6c0e9..8b987e301d 100644
--- a/android/app/src/com/android/bluetooth/avrcpcontroller/AvrcpControllerStateMachine.java
+++ b/android/app/src/com/android/bluetooth/avrcpcontroller/AvrcpControllerStateMachine.java
@@ -38,12 +38,10 @@ import android.support.v4.media.session.PlaybackStateCompat;
import android.util.Log;
import android.util.SparseArray;
-import com.android.bluetooth.BluetoothMetricsProto;
import com.android.bluetooth.R;
import com.android.bluetooth.Utils;
import com.android.bluetooth.a2dpsink.A2dpSinkService;
import com.android.bluetooth.btservice.AdapterService;
-import com.android.bluetooth.btservice.MetricsLogger;
import com.android.bluetooth.btservice.ProfileService;
import com.android.bluetooth.flags.Flags;
import com.android.internal.annotations.VisibleForTesting;
@@ -1405,10 +1403,7 @@ class AvrcpControllerStateMachine extends StateMachine {
if (mMostRecentState == currentState) {
return;
}
- if (currentState == STATE_CONNECTED) {
- MetricsLogger.logProfileConnectionEvent(
- BluetoothMetricsProto.ProfileId.AVRCP_CONTROLLER);
- }
+
mAdapterService.updateProfileConnectionAdapterProperties(
mDevice, BluetoothProfile.AVRCP_CONTROLLER, currentState, mMostRecentState);
diff --git a/android/app/src/com/android/bluetooth/btservice/AdapterService.java b/android/app/src/com/android/bluetooth/btservice/AdapterService.java
index 3b2a10d2ad..87f5daad12 100644
--- a/android/app/src/com/android/bluetooth/btservice/AdapterService.java
+++ b/android/app/src/com/android/bluetooth/btservice/AdapterService.java
@@ -131,7 +131,6 @@ import android.util.Pair;
import android.util.SparseArray;
import com.android.bluetooth.BluetoothEventLogger;
-import com.android.bluetooth.BluetoothMetricsProto;
import com.android.bluetooth.BluetoothStatsLog;
import com.android.bluetooth.R;
import com.android.bluetooth.Utils;
diff --git a/android/app/src/com/android/bluetooth/btservice/MetricsLogger.java b/android/app/src/com/android/bluetooth/btservice/MetricsLogger.java
index 5d490e3a1a..736d6e88e2 100644
--- a/android/app/src/com/android/bluetooth/btservice/MetricsLogger.java
+++ b/android/app/src/com/android/bluetooth/btservice/MetricsLogger.java
@@ -70,10 +70,7 @@ import android.util.proto.ProtoOutputStream;
import androidx.annotation.RequiresApi;
-import com.android.bluetooth.BluetoothMetricsProto.BluetoothLog;
import com.android.bluetooth.BluetoothMetricsProto.BluetoothRemoteDeviceInformation;
-import com.android.bluetooth.BluetoothMetricsProto.ProfileConnectionStats;
-import com.android.bluetooth.BluetoothMetricsProto.ProfileId;
import com.android.bluetooth.BluetoothStatsLog;
import com.android.bluetooth.BtRestrictedStatsLog;
import com.android.bluetooth.Utils;
@@ -112,8 +109,6 @@ public class MetricsLogger {
private static final long BLUETOOTH_COUNTER_METRICS_ACTION_DURATION_MILLIS = 6L * 3600L * 1000L;
private static final int MAX_WORDS_ALLOWED_IN_DEVICE_NAME = 7;
- private static final HashMap<ProfileId, Integer> sProfileConnectionCounts = new HashMap<>();
-
HashMap<Integer, Long> mCounters = new HashMap<>();
private static volatile MetricsLogger sInstance = null;
private AdapterService mAdapterService = null;
@@ -389,37 +384,6 @@ public class MetricsLogger {
return true;
}
- /**
- * Log profile connection event by incrementing an internal counter for that profile. This log
- * persists over adapter enable/disable and only get cleared when metrics are dumped or when
- * Bluetooth process is killed.
- *
- * @param profileId Bluetooth profile that is connected at this event
- */
- public static void logProfileConnectionEvent(ProfileId profileId) {
- synchronized (sProfileConnectionCounts) {
- sProfileConnectionCounts.merge(profileId, 1, Integer::sum);
- }
- }
-
- /**
- * Dump collected metrics into proto using a builder. Clean up internal data after the dump.
- *
- * @param metricsBuilder proto builder for {@link BluetoothLog}
- */
- public static void dumpProto(BluetoothLog.Builder metricsBuilder) {
- synchronized (sProfileConnectionCounts) {
- sProfileConnectionCounts.forEach(
- (key, value) ->
- metricsBuilder.addProfileConnectionStats(
- ProfileConnectionStats.newBuilder()
- .setProfileId(key)
- .setNumTimesConnected(value)
- .build()));
- sProfileConnectionCounts.clear();
- }
- }
-
protected void scheduleDrains() {
Log.i(TAG, "setCounterMetricsAlarm()");
if (mAlarmManager == null) {
diff --git a/android/app/src/com/android/bluetooth/btservice/ProfileService.java b/android/app/src/com/android/bluetooth/btservice/ProfileService.java
index 8a0fc82555..e8ea20de03 100644
--- a/android/app/src/com/android/bluetooth/btservice/ProfileService.java
+++ b/android/app/src/com/android/bluetooth/btservice/ProfileService.java
@@ -24,7 +24,6 @@ import android.content.pm.PackageManager;
import android.os.IBinder;
import android.util.Log;
-import com.android.bluetooth.BluetoothMetricsProto;
import com.android.bluetooth.Utils;
/** Base class for a background service that runs a Bluetooth profile */
@@ -147,17 +146,6 @@ public abstract class ProfileService extends ContextWrapper {
}
/**
- * Support dumping scan events from GattService
- *
- * @param builder metrics proto builder
- */
- // Suppressed since this is called from framework
- @SuppressLint("AndroidFrameworkRequiresPermission")
- public void dumpProto(BluetoothMetricsProto.BluetoothLog.Builder builder) {
- // Do nothing
- }
-
- /**
* Append an indented String for adding dumpsys support to subclasses.
*
* @param sb StringBuilder from the profile.
diff --git a/android/app/src/com/android/bluetooth/gatt/GattService.java b/android/app/src/com/android/bluetooth/gatt/GattService.java
index 65e0497420..d7a1421db9 100644
--- a/android/app/src/com/android/bluetooth/gatt/GattService.java
+++ b/android/app/src/com/android/bluetooth/gatt/GattService.java
@@ -61,7 +61,6 @@ import android.provider.Settings;
import android.sysprop.BluetoothProperties;
import android.util.Log;
-import com.android.bluetooth.BluetoothMetricsProto;
import com.android.bluetooth.BluetoothStatsLog;
import com.android.bluetooth.R;
import com.android.bluetooth.Utils;
@@ -3126,13 +3125,6 @@ public class GattService extends ProfileService {
+ connectionStatus);
}
- @Override
- public void dumpProto(BluetoothMetricsProto.BluetoothLog.Builder builder) {
- if (mScanController != null) {
- mScanController.dumpProto(builder);
- }
- }
-
private BluetoothDevice getDevice(String address) {
byte[] addressBytes = Utils.getBytesFromAddress(address);
return mAdapterService.getDeviceFromByte(addressBytes);
diff --git a/android/app/src/com/android/bluetooth/hearingaid/HearingAidService.java b/android/app/src/com/android/bluetooth/hearingaid/HearingAidService.java
index 88f158a0ed..0632cf4df9 100644
--- a/android/app/src/com/android/bluetooth/hearingaid/HearingAidService.java
+++ b/android/app/src/com/android/bluetooth/hearingaid/HearingAidService.java
@@ -48,7 +48,6 @@ import android.os.UserHandle;
import android.sysprop.BluetoothProperties;
import android.util.Log;
-import com.android.bluetooth.BluetoothMetricsProto;
import com.android.bluetooth.BluetoothStatsLog;
import com.android.bluetooth.Utils;
import com.android.bluetooth.btservice.AdapterService;
@@ -830,13 +829,6 @@ public class HearingAidService extends ProfileService {
}
if (toState == STATE_CONNECTED) {
long myHiSyncId = getHiSyncId(device);
- if (myHiSyncId == BluetoothHearingAid.HI_SYNC_ID_INVALID
- || getConnectedPeerDevices(myHiSyncId).size() == 1) {
- // Log hearing aid connection event if we are the first device in a set
- // Or when the hiSyncId has not been found
- MetricsLogger.logProfileConnectionEvent(
- BluetoothMetricsProto.ProfileId.HEARING_AID);
- }
if (!mHiSyncIdConnectedMap.getOrDefault(myHiSyncId, false)) {
mHiSyncIdConnectedMap.put(myHiSyncId, true);
}
diff --git a/android/app/src/com/android/bluetooth/hfp/HeadsetService.java b/android/app/src/com/android/bluetooth/hfp/HeadsetService.java
index 98f066d943..251f347ea2 100644
--- a/android/app/src/com/android/bluetooth/hfp/HeadsetService.java
+++ b/android/app/src/com/android/bluetooth/hfp/HeadsetService.java
@@ -62,7 +62,6 @@ import android.sysprop.BluetoothProperties;
import android.telecom.PhoneAccount;
import android.util.Log;
-import com.android.bluetooth.BluetoothMetricsProto;
import com.android.bluetooth.BluetoothStatsLog;
import com.android.bluetooth.Utils;
import com.android.bluetooth.a2dp.A2dpService;
@@ -2215,7 +2214,6 @@ public class HeadsetService extends ProfileService {
BluetoothDevice device, int fromState, int toState) {
if (fromState != STATE_CONNECTED && toState == STATE_CONNECTED) {
updateInbandRinging(device, true);
- MetricsLogger.logProfileConnectionEvent(BluetoothMetricsProto.ProfileId.HEADSET);
}
if (fromState != STATE_DISCONNECTED && toState == STATE_DISCONNECTED) {
updateInbandRinging(device, false);
diff --git a/android/app/src/com/android/bluetooth/hfpclient/HeadsetClientStateMachine.java b/android/app/src/com/android/bluetooth/hfpclient/HeadsetClientStateMachine.java
index 49153659fc..23ed0b7c7d 100644
--- a/android/app/src/com/android/bluetooth/hfpclient/HeadsetClientStateMachine.java
+++ b/android/app/src/com/android/bluetooth/hfpclient/HeadsetClientStateMachine.java
@@ -65,7 +65,6 @@ import android.os.SystemProperties;
import android.util.Log;
import android.util.Pair;
-import com.android.bluetooth.BluetoothMetricsProto;
import com.android.bluetooth.BluetoothStatsLog;
import com.android.bluetooth.R;
import com.android.bluetooth.Utils;
@@ -1386,8 +1385,6 @@ public class HeadsetClientStateMachine extends StateMachine {
if (mHeadsetService != null) {
mHeadsetService.updateInbandRinging(mCurrentDevice, true);
}
- MetricsLogger.logProfileConnectionEvent(
- BluetoothMetricsProto.ProfileId.HEADSET_CLIENT);
} else if (mPrevState != mAudioOn) {
String prevStateName = mPrevState == null ? "null" : mPrevState.getName();
error(
diff --git a/android/app/src/com/android/bluetooth/hid/HidDeviceService.java b/android/app/src/com/android/bluetooth/hid/HidDeviceService.java
index 6e5ea040ea..2c2f11940e 100644
--- a/android/app/src/com/android/bluetooth/hid/HidDeviceService.java
+++ b/android/app/src/com/android/bluetooth/hid/HidDeviceService.java
@@ -48,7 +48,6 @@ import android.os.RemoteException;
import android.sysprop.BluetoothProperties;
import android.util.Log;
-import com.android.bluetooth.BluetoothMetricsProto;
import com.android.bluetooth.Utils;
import com.android.bluetooth.btservice.AdapterService;
import com.android.bluetooth.btservice.MetricsLogger;
@@ -888,10 +887,6 @@ public class HidDeviceService extends ProfileService {
mAdapterService.updateProfileConnectionAdapterProperties(
device, BluetoothProfile.HID_DEVICE, newState, prevState);
- if (newState == STATE_CONNECTED) {
- MetricsLogger.logProfileConnectionEvent(BluetoothMetricsProto.ProfileId.HID_DEVICE);
- }
-
Intent intent = new Intent(BluetoothHidDevice.ACTION_CONNECTION_STATE_CHANGED);
intent.putExtra(BluetoothProfile.EXTRA_PREVIOUS_STATE, prevState);
intent.putExtra(BluetoothProfile.EXTRA_STATE, newState);
diff --git a/android/app/src/com/android/bluetooth/hid/HidHostService.java b/android/app/src/com/android/bluetooth/hid/HidHostService.java
index 1f1cd866ab..3a29ed5b62 100644
--- a/android/app/src/com/android/bluetooth/hid/HidHostService.java
+++ b/android/app/src/com/android/bluetooth/hid/HidHostService.java
@@ -46,7 +46,6 @@ import android.util.Log;
import androidx.annotation.VisibleForTesting;
-import com.android.bluetooth.BluetoothMetricsProto;
import com.android.bluetooth.Utils;
import com.android.bluetooth.btservice.AdapterService;
import com.android.bluetooth.btservice.MetricsLogger;
@@ -1296,10 +1295,6 @@ public class HidHostService extends ProfileService {
return;
}
- if (newState == STATE_CONNECTED) {
- MetricsLogger.logProfileConnectionEvent(BluetoothMetricsProto.ProfileId.HID_HOST);
- }
-
mInputDevices.put(device, inputDevice);
broadcastConnectionState(device, transport, prevState, newState);
diff --git a/android/app/src/com/android/bluetooth/le_audio/LeAudioService.java b/android/app/src/com/android/bluetooth/le_audio/LeAudioService.java
index 2379ffbd43..3f4d7cccbc 100644
--- a/android/app/src/com/android/bluetooth/le_audio/LeAudioService.java
+++ b/android/app/src/com/android/bluetooth/le_audio/LeAudioService.java
@@ -4242,14 +4242,6 @@ public class LeAudioService extends ProfileService {
return;
}
- if (deviceDescriptor.mGroupId == LE_AUDIO_GROUP_ID_INVALID
- || getConnectedPeerDevices(deviceDescriptor.mGroupId).size() == 1) {
- // Log LE Audio connection event if we are the first device in a set
- // Or when the GroupId has not been found
- // MetricsLogger.logProfileConnectionEvent(
- // BluetoothMetricsProto.ProfileId.LE_AUDIO);
- }
-
LeAudioGroupDescriptor descriptor = getGroupDescriptor(deviceDescriptor.mGroupId);
if (descriptor != null) {
descriptor.mIsConnected = true;
diff --git a/android/app/src/com/android/bluetooth/le_scan/AppScanStats.java b/android/app/src/com/android/bluetooth/le_scan/AppScanStats.java
index 0be2a7e299..e5002988fa 100644
--- a/android/app/src/com/android/bluetooth/le_scan/AppScanStats.java
+++ b/android/app/src/com/android/bluetooth/le_scan/AppScanStats.java
@@ -30,7 +30,6 @@ import android.os.BatteryStatsManager;
import android.os.Binder;
import android.os.WorkSource;
-import com.android.bluetooth.BluetoothMetricsProto;
import com.android.bluetooth.BluetoothStatsLog;
import com.android.bluetooth.Utils.TimeProvider;
import com.android.bluetooth.btservice.AdapterService;
@@ -197,16 +196,6 @@ class AppScanStats {
return mOngoingScans.get(scannerId);
}
- private BluetoothMetricsProto.ScanEvent.Builder createBaseScanEvent(
- BluetoothMetricsProto.ScanEvent.ScanEventType type) {
- return BluetoothMetricsProto.ScanEvent.newBuilder()
- .setScanEventType(type)
- .setScanTechnologyType(
- BluetoothMetricsProto.ScanEvent.ScanTechnologyType.SCAN_TECH_TYPE_LE)
- .setEventTimeMillis(System.currentTimeMillis())
- .setInitiator(truncateAppName(mAppName));
- }
-
synchronized void addResult(int scannerId) {
LastScan scan = getScanFromScannerId(scannerId);
if (scan != null) {
@@ -318,11 +307,6 @@ class AppScanStats {
}
}
- BluetoothMetricsProto.ScanEvent scanEvent =
- createBaseScanEvent(BluetoothMetricsProto.ScanEvent.ScanEventType.SCAN_EVENT_START)
- .build();
- mScanController.addScanEvent(scanEvent);
-
if (!isScanning()) {
mScanStartTime = startTime;
}
@@ -362,12 +346,6 @@ class AppScanStats {
}
mLastScans.add(scan);
- BluetoothMetricsProto.ScanEvent scanEvent =
- createBaseScanEvent(BluetoothMetricsProto.ScanEvent.ScanEventType.SCAN_EVENT_STOP)
- .setNumberResults(scan.results)
- .build();
- mScanController.addScanEvent(scanEvent);
-
mTotalScanTime += scanDuration;
long activeDuration = scanDuration - scan.suspendDuration;
mTotalActiveTime += activeDuration;
@@ -853,24 +831,6 @@ class AppScanStats {
< LARGE_SCAN_TIME_GAP_MS);
}
- // This function truncates the app name for privacy reasons. Apps with
- // four part package names or more get truncated to three parts, and apps
- // with three part package names names get truncated to two. Apps with two
- // or less package names names are untouched.
- // Examples: one.two.three.four => one.two.three
- // one.two.three => one.two
- private static String truncateAppName(String name) {
- String initiator = name;
- String[] nameSplit = initiator.split("\\.");
- if (nameSplit.length > 3) {
- initiator = nameSplit[0] + "." + nameSplit[1] + "." + nameSplit[2];
- } else if (nameSplit.length == 3) {
- initiator = nameSplit[0] + "." + nameSplit[1];
- }
-
- return initiator;
- }
-
private static String filterToStringWithoutNullParam(ScanFilter filter) {
StringBuilder filterString = new StringBuilder("BluetoothLeScanFilter [");
if (filter.getDeviceName() != null) {
diff --git a/android/app/src/com/android/bluetooth/le_scan/ScanController.java b/android/app/src/com/android/bluetooth/le_scan/ScanController.java
index 6e1678d97e..07ff67b65b 100644
--- a/android/app/src/com/android/bluetooth/le_scan/ScanController.java
+++ b/android/app/src/com/android/bluetooth/le_scan/ScanController.java
@@ -60,7 +60,6 @@ import android.provider.DeviceConfig;
import android.text.format.DateUtils;
import android.util.Log;
-import com.android.bluetooth.BluetoothMetricsProto;
import com.android.bluetooth.R;
import com.android.bluetooth.Utils;
import com.android.bluetooth.btservice.AdapterService;
@@ -96,7 +95,6 @@ public class ScanController {
// Batch scan related constants.
private static final int TRUNCATED_RESULT_SIZE = 11;
- private static final int NUM_SCAN_EVENTS_KEPT = 20;
// onFoundLost related constants
@VisibleForTesting static final int ADVT_STATE_ONFOUND = 0;
@@ -122,10 +120,6 @@ public class ScanController {
}
};
- /** Internal list of scan events to use with the proto */
- private final Deque<BluetoothMetricsProto.ScanEvent> mScanEvents =
- new ArrayDeque<>(NUM_SCAN_EVENTS_KEPT);
-
private final Map<Integer, Integer> mFilterIndexToMsftAdvMonitorMap = new HashMap<>();
private final Object mTestModeLock = new Object();
@@ -1656,15 +1650,6 @@ public class ScanController {
}
}
- void addScanEvent(BluetoothMetricsProto.ScanEvent event) {
- synchronized (mScanEvents) {
- if (mScanEvents.size() == NUM_SCAN_EVENTS_KEPT) {
- mScanEvents.remove();
- }
- mScanEvents.add(event);
- }
- }
-
public void dumpRegisterId(StringBuilder sb) {
sb.append(" Scanner:\n");
mScannerMap.dumpApps(sb, ProfileService::println);
@@ -1674,10 +1659,4 @@ public class ScanController {
sb.append("GATT Scanner Map\n");
mScannerMap.dump(sb);
}
-
- public void dumpProto(BluetoothMetricsProto.BluetoothLog.Builder builder) {
- synchronized (mScanEvents) {
- builder.addAllScanEvent(mScanEvents);
- }
- }
}
diff --git a/android/app/src/com/android/bluetooth/map/BluetoothMapService.java b/android/app/src/com/android/bluetooth/map/BluetoothMapService.java
index 962bfb4421..86b9381ea4 100644
--- a/android/app/src/com/android/bluetooth/map/BluetoothMapService.java
+++ b/android/app/src/com/android/bluetooth/map/BluetoothMapService.java
@@ -55,7 +55,6 @@ import android.telephony.TelephonyManager;
import android.util.Log;
import android.util.SparseArray;
-import com.android.bluetooth.BluetoothMetricsProto;
import com.android.bluetooth.BluetoothStatsLog;
import com.android.bluetooth.R;
import com.android.bluetooth.Utils;
@@ -959,7 +958,6 @@ public class BluetoothMapService extends ProfileService {
} else if (mPermission == BluetoothDevice.ACCESS_ALLOWED) {
// Signal to the service that we have a incoming connection.
sendConnectMessage(masInst.getMasId());
- MetricsLogger.logProfileConnectionEvent(BluetoothMetricsProto.ProfileId.MAP);
}
return true;
}
diff --git a/android/app/src/com/android/bluetooth/mapclient/MceStateMachine.java b/android/app/src/com/android/bluetooth/mapclient/MceStateMachine.java
index 457e87c69f..c532af9b99 100644
--- a/android/app/src/com/android/bluetooth/mapclient/MceStateMachine.java
+++ b/android/app/src/com/android/bluetooth/mapclient/MceStateMachine.java
@@ -65,7 +65,6 @@ import android.telecom.PhoneAccount;
import android.telephony.SmsManager;
import android.util.Log;
-import com.android.bluetooth.BluetoothMetricsProto;
import com.android.bluetooth.Utils;
import com.android.bluetooth.btservice.AdapterService;
import com.android.bluetooth.btservice.MetricsLogger;
@@ -310,9 +309,6 @@ class MceStateMachine extends StateMachine {
+ prevState
+ ", new="
+ state);
- if (prevState != state && state == STATE_CONNECTED) {
- MetricsLogger.logProfileConnectionEvent(BluetoothMetricsProto.ProfileId.MAP_CLIENT);
- }
setState(state);
mAdapterService.updateProfileConnectionAdapterProperties(
diff --git a/android/app/src/com/android/bluetooth/opp/BluetoothOppObexClientSession.java b/android/app/src/com/android/bluetooth/opp/BluetoothOppObexClientSession.java
index 6f365e7507..666ed9b2fc 100644
--- a/android/app/src/com/android/bluetooth/opp/BluetoothOppObexClientSession.java
+++ b/android/app/src/com/android/bluetooth/opp/BluetoothOppObexClientSession.java
@@ -48,7 +48,6 @@ import android.os.SystemClock;
import android.util.Log;
import com.android.bluetooth.BluetoothMethodProxy;
-import com.android.bluetooth.BluetoothMetricsProto;
import com.android.bluetooth.BluetoothStatsLog;
import com.android.bluetooth.btservice.MetricsLogger;
import com.android.bluetooth.content_profiles.ContentProfileErrorReportUtils;
@@ -76,8 +75,6 @@ public class BluetoothOppObexClientSession implements BluetoothOppObexSession {
private ClientThread mThread;
private volatile boolean mInterrupted;
- private int mNumFilesAttemptedToSend;
-
public BluetoothOppObexClientSession(Context context, ObexTransport transport) {
mContext = requireNonNull(context);
mTransport = requireNonNull(transport);
@@ -175,7 +172,6 @@ public class BluetoothOppObexClientSession implements BluetoothOppObexSession {
connect(mNumShares);
}
- mNumFilesAttemptedToSend = 0;
while (!mInterrupted) {
if (!mWaitingForShare) {
doSend();
@@ -200,10 +196,6 @@ public class BluetoothOppObexClientSession implements BluetoothOppObexSession {
mWakeLock.release();
}
- if (mNumFilesAttemptedToSend > 0) {
- // Log outgoing OPP transfer if more than one file is accepted by remote
- MetricsLogger.logProfileConnectionEvent(BluetoothMetricsProto.ProfileId.OPP);
- }
Message msg = Message.obtain(mCallbackHandler);
msg.what = BluetoothOppObexSession.MSG_SESSION_COMPLETE;
msg.obj = mInfo;
@@ -503,7 +495,6 @@ public class BluetoothOppObexClientSession implements BluetoothOppObexSession {
updateValues.put(BluetoothShare.CURRENT_BYTES, position);
mContext.getContentResolver()
.update(contentUri, updateValues, null, null);
- mNumFilesAttemptedToSend++;
} else {
Log.i(TAG, "Remote reject, Response code is " + responseCode);
}
diff --git a/android/app/src/com/android/bluetooth/opp/BluetoothOppObexServerSession.java b/android/app/src/com/android/bluetooth/opp/BluetoothOppObexServerSession.java
index cc92f0cb03..e4d08c6fd9 100644
--- a/android/app/src/com/android/bluetooth/opp/BluetoothOppObexServerSession.java
+++ b/android/app/src/com/android/bluetooth/opp/BluetoothOppObexServerSession.java
@@ -47,7 +47,6 @@ import android.util.Log;
import android.webkit.MimeTypeMap;
import com.android.bluetooth.BluetoothMethodProxy;
-import com.android.bluetooth.BluetoothMetricsProto;
import com.android.bluetooth.BluetoothObexTransport;
import com.android.bluetooth.BluetoothStatsLog;
import com.android.bluetooth.Utils;
@@ -82,7 +81,6 @@ public class BluetoothOppObexServerSession extends ServerRequestHandler
private long mTimestamp;
private boolean mInterrupted;
private int mLocalShareInfoId; // info id when we insert the record
- private int mNumFilesAttemptedToReceive;
@VisibleForTesting boolean mTimeoutMsgSent;
@VisibleForTesting public ServerSession mSession;
@VisibleForTesting BluetoothOppReceiveFileInfo mFileInfo;
@@ -362,7 +360,6 @@ public class BluetoothOppObexServerSession extends ServerRequestHandler
|| mAccepted == BluetoothShare.USER_CONFIRMATION_AUTO_CONFIRMED
|| mAccepted == BluetoothShare.USER_CONFIRMATION_HANDOVER_CONFIRMED) {
/* Confirm or auto-confirm */
- mNumFilesAttemptedToReceive++;
if (mFileInfo.mFileName == null) {
status = mFileInfo.mStatus;
@@ -649,17 +646,12 @@ public class BluetoothOppObexServerSession extends ServerRequestHandler
Utils.getTempBroadcastOptions().toBundle());
}
mTimestamp = System.currentTimeMillis();
- mNumFilesAttemptedToReceive = 0;
return ResponseCodes.OBEX_HTTP_OK;
}
@Override
public void onDisconnect(HeaderSet req, HeaderSet resp) {
Log.d(TAG, "onDisconnect");
- if (mNumFilesAttemptedToReceive > 0) {
- // Log incoming OPP transfer if more than one file is accepted by user
- MetricsLogger.logProfileConnectionEvent(BluetoothMetricsProto.ProfileId.OPP);
- }
resp.responseCode = ResponseCodes.OBEX_HTTP_OK;
}
diff --git a/android/app/src/com/android/bluetooth/pan/PanService.java b/android/app/src/com/android/bluetooth/pan/PanService.java
index 11788f9cf4..311e100b52 100644
--- a/android/app/src/com/android/bluetooth/pan/PanService.java
+++ b/android/app/src/com/android/bluetooth/pan/PanService.java
@@ -51,10 +51,8 @@ import android.os.UserManager;
import android.sysprop.BluetoothProperties;
import android.util.Log;
-import com.android.bluetooth.BluetoothMetricsProto;
import com.android.bluetooth.Utils;
import com.android.bluetooth.btservice.AdapterService;
-import com.android.bluetooth.btservice.MetricsLogger;
import com.android.bluetooth.btservice.ProfileService;
import com.android.bluetooth.btservice.storage.DatabaseManager;
import com.android.bluetooth.flags.Flags;
@@ -698,9 +696,7 @@ public class PanService extends ProfileService {
mPanDevices.remove(device);
}
}
- if (state == STATE_CONNECTED) {
- MetricsLogger.logProfileConnectionEvent(BluetoothMetricsProto.ProfileId.PAN);
- }
+
mAdapterService.updateProfileConnectionAdapterProperties(
device, BluetoothProfile.PAN, state, prevState);
diff --git a/android/app/src/com/android/bluetooth/pbap/PbapStateMachine.java b/android/app/src/com/android/bluetooth/pbap/PbapStateMachine.java
index d0a756ac0d..41031ed92e 100644
--- a/android/app/src/com/android/bluetooth/pbap/PbapStateMachine.java
+++ b/android/app/src/com/android/bluetooth/pbap/PbapStateMachine.java
@@ -39,7 +39,6 @@ import android.os.Message;
import android.os.UserHandle;
import android.util.Log;
-import com.android.bluetooth.BluetoothMetricsProto;
import com.android.bluetooth.BluetoothObexTransport;
import com.android.bluetooth.BluetoothStatsLog;
import com.android.bluetooth.ObexRejectServer;
@@ -355,7 +354,6 @@ public class PbapStateMachine extends StateMachine {
Log.e(TAG, "Caught exception starting OBEX server session" + ex.toString());
}
broadcastStateTransitions();
- MetricsLogger.logProfileConnectionEvent(BluetoothMetricsProto.ProfileId.PBAP);
mService.setConnectionPolicy(mRemoteDevice, CONNECTION_POLICY_ALLOWED);
}
diff --git a/android/app/src/com/android/bluetooth/pbapclient/PbapClientStateMachine.java b/android/app/src/com/android/bluetooth/pbapclient/PbapClientStateMachine.java
index d42cfec25e..ee09597feb 100644
--- a/android/app/src/com/android/bluetooth/pbapclient/PbapClientStateMachine.java
+++ b/android/app/src/com/android/bluetooth/pbapclient/PbapClientStateMachine.java
@@ -34,7 +34,6 @@ import android.os.Looper;
import android.os.Message;
import android.util.Log;
-import com.android.bluetooth.BluetoothMetricsProto;
import com.android.bluetooth.Utils;
import com.android.bluetooth.btservice.AdapterService;
import com.android.bluetooth.btservice.MetricsLogger;
@@ -908,9 +907,6 @@ class PbapClientStateMachine extends StateMachine {
private void onConnectionStateChanged(int state) {
int prevState = mCurrentState;
- if (prevState != state && state == STATE_CONNECTED) {
- MetricsLogger.logProfileConnectionEvent(BluetoothMetricsProto.ProfileId.PBAP_CLIENT);
- }
Intent intent = new Intent(BluetoothPbapClient.ACTION_CONNECTION_STATE_CHANGED);
intent.putExtra(BluetoothProfile.EXTRA_PREVIOUS_STATE, prevState);
diff --git a/android/app/src/com/android/bluetooth/pbapclient/PbapClientStateMachineOld.java b/android/app/src/com/android/bluetooth/pbapclient/PbapClientStateMachineOld.java
index 0576c30f5c..1cc8be9dbd 100644
--- a/android/app/src/com/android/bluetooth/pbapclient/PbapClientStateMachineOld.java
+++ b/android/app/src/com/android/bluetooth/pbapclient/PbapClientStateMachineOld.java
@@ -63,7 +63,6 @@ import android.os.Process;
import android.os.UserManager;
import android.util.Log;
-import com.android.bluetooth.BluetoothMetricsProto;
import com.android.bluetooth.Utils;
import com.android.bluetooth.btservice.AdapterService;
import com.android.bluetooth.btservice.MetricsLogger;
@@ -403,9 +402,6 @@ class PbapClientStateMachineOld extends StateMachine {
Log.w(TAG, "onConnectionStateChanged with invalid device");
return;
}
- if (prevState != state && state == STATE_CONNECTED) {
- MetricsLogger.logProfileConnectionEvent(BluetoothMetricsProto.ProfileId.PBAP_CLIENT);
- }
Log.d(TAG, "Connection state " + device + ": " + prevState + "->" + state);
AdapterService adapterService = AdapterService.getAdapterService();
if (adapterService != null) {
diff --git a/android/app/src/com/android/bluetooth/sap/SapService.java b/android/app/src/com/android/bluetooth/sap/SapService.java
index 277acc4cf2..5dc8215d2b 100644
--- a/android/app/src/com/android/bluetooth/sap/SapService.java
+++ b/android/app/src/com/android/bluetooth/sap/SapService.java
@@ -52,7 +52,6 @@ import android.sysprop.BluetoothProperties;
import android.text.TextUtils;
import android.util.Log;
-import com.android.bluetooth.BluetoothMetricsProto;
import com.android.bluetooth.R;
import com.android.bluetooth.Utils;
import com.android.bluetooth.btservice.AdapterService;
@@ -539,9 +538,6 @@ public class SapService extends ProfileService implements AdapterService.Bluetoo
private synchronized void setState(int state, int result) {
if (state != mState) {
Log.d(TAG, "Sap state " + mState + " -> " + state + ", result = " + result);
- if (state == STATE_CONNECTED) {
- MetricsLogger.logProfileConnectionEvent(BluetoothMetricsProto.ProfileId.SAP);
- }
int prevState = mState;
mState = state;
mAdapterService.updateProfileConnectionAdapterProperties(
diff --git a/android/app/tests/unit/src/com/android/bluetooth/btservice/MetricsLoggerTest.java b/android/app/tests/unit/src/com/android/bluetooth/btservice/MetricsLoggerTest.java
index 21f04ff490..a7a25a372e 100644
--- a/android/app/tests/unit/src/com/android/bluetooth/btservice/MetricsLoggerTest.java
+++ b/android/app/tests/unit/src/com/android/bluetooth/btservice/MetricsLoggerTest.java
@@ -25,10 +25,7 @@ import android.bluetooth.BluetoothDevice;
import androidx.test.filters.MediumTest;
import androidx.test.runner.AndroidJUnit4;
-import com.android.bluetooth.BluetoothMetricsProto.BluetoothLog;
import com.android.bluetooth.BluetoothMetricsProto.BluetoothRemoteDeviceInformation;
-import com.android.bluetooth.BluetoothMetricsProto.ProfileConnectionStats;
-import com.android.bluetooth.BluetoothMetricsProto.ProfileId;
import com.google.common.hash.BloomFilter;
import com.google.common.hash.Funnels;
@@ -111,68 +108,15 @@ public class MetricsLoggerTest {
@Before
public void setUp() {
- MetricsLogger.dumpProto(BluetoothLog.newBuilder());
mTestableMetricsLogger = new TestableMetricsLogger();
mTestableMetricsLogger.init(mAdapterService, mRemoteDevices);
}
@After
public void tearDown() {
- // Dump metrics to clean up internal states
- MetricsLogger.dumpProto(BluetoothLog.newBuilder());
mTestableMetricsLogger.close();
}
- /** Simple test to verify that profile connection event can be logged, dumped, and cleaned */
- @Test
- public void testLogProfileConnectionEvent() {
- MetricsLogger.logProfileConnectionEvent(ProfileId.AVRCP);
- BluetoothLog.Builder metricsBuilder = BluetoothLog.newBuilder();
- MetricsLogger.dumpProto(metricsBuilder);
- BluetoothLog metricsProto = metricsBuilder.build();
- assertThat(metricsProto.getProfileConnectionStatsCount()).isEqualTo(1);
- ProfileConnectionStats profileUsageStatsAvrcp = metricsProto.getProfileConnectionStats(0);
- assertThat(profileUsageStatsAvrcp.getProfileId()).isEqualTo(ProfileId.AVRCP);
- assertThat(profileUsageStatsAvrcp.getNumTimesConnected()).isEqualTo(1);
- // Verify that MetricsLogger's internal state is cleared after a dump
- BluetoothLog.Builder metricsBuilderAfterDump = BluetoothLog.newBuilder();
- MetricsLogger.dumpProto(metricsBuilderAfterDump);
- BluetoothLog metricsProtoAfterDump = metricsBuilderAfterDump.build();
- assertThat(metricsProtoAfterDump.getProfileConnectionStatsCount()).isEqualTo(0);
- }
-
- /** Test whether multiple profile's connection events can be logged interleaving */
- @Test
- public void testLogProfileConnectionEventMultipleProfile() {
- MetricsLogger.logProfileConnectionEvent(ProfileId.AVRCP);
- MetricsLogger.logProfileConnectionEvent(ProfileId.HEADSET);
- MetricsLogger.logProfileConnectionEvent(ProfileId.AVRCP);
- BluetoothLog.Builder metricsBuilder = BluetoothLog.newBuilder();
- MetricsLogger.dumpProto(metricsBuilder);
- BluetoothLog metricsProto = metricsBuilder.build();
- assertThat(metricsProto.getProfileConnectionStatsCount()).isEqualTo(2);
- Map<ProfileId, ProfileConnectionStats> profileConnectionCountMap =
- getProfileUsageStatsMap(metricsProto.getProfileConnectionStatsList());
- assertThat(profileConnectionCountMap).containsKey(ProfileId.AVRCP);
- assertThat(profileConnectionCountMap.get(ProfileId.AVRCP).getNumTimesConnected())
- .isEqualTo(2);
- assertThat(profileConnectionCountMap).containsKey(ProfileId.HEADSET);
- assertThat(profileConnectionCountMap.get(ProfileId.HEADSET).getNumTimesConnected())
- .isEqualTo(1);
- // Verify that MetricsLogger's internal state is cleared after a dump
- BluetoothLog.Builder metricsBuilderAfterDump = BluetoothLog.newBuilder();
- MetricsLogger.dumpProto(metricsBuilderAfterDump);
- BluetoothLog metricsProtoAfterDump = metricsBuilderAfterDump.build();
- assertThat(metricsProtoAfterDump.getProfileConnectionStatsCount()).isEqualTo(0);
- }
-
- private static Map<ProfileId, ProfileConnectionStats> getProfileUsageStatsMap(
- List<ProfileConnectionStats> profileUsageStats) {
- HashMap<ProfileId, ProfileConnectionStats> profileUsageStatsMap = new HashMap<>();
- profileUsageStats.forEach(item -> profileUsageStatsMap.put(item.getProfileId(), item));
- return profileUsageStatsMap;
- }
-
/** Test add counters and send them to statsd */
@Test
public void testAddAndSendCountersNormalCases() {
diff --git a/service/Android.bp b/service/Android.bp
index 1532b89d3c..4b608dd4b3 100644
--- a/service/Android.bp
+++ b/service/Android.bp
@@ -72,7 +72,6 @@ java_library {
static_libs: [
"androidx.annotation_annotation",
"androidx.appcompat_appcompat",
- "bluetooth-manager-service-proto-java-gen",
"bluetooth-nano-protos",
"bluetooth-proto-enums-java-gen",
"bluetooth_flags_java_lib",
@@ -121,21 +120,6 @@ java_library {
}
java_library {
- name: "bluetooth-manager-service-proto-java-gen",
- srcs: [":srcs_bluetooth_manager_service_proto"],
- installable: false,
-
- proto: {
- type: "stream",
- include_dirs: ["external/protobuf/src"],
- },
-
- sdk_version: "system_server_current",
- min_sdk_version: "Tiramisu",
- apex_available: ["com.android.bt"],
-}
-
-java_library {
name: "bluetooth-nano-protos",
srcs: [":system-messages-proto-src"],
installable: false,
@@ -183,7 +167,6 @@ android_robolectric_test {
static_libs: [
"androidx.test.core",
"androidx.test.ext.truth",
- "bluetooth-manager-service-proto-java-gen",
"bluetooth-nano-protos",
"bluetooth-proto-enums-java-gen",
"bluetooth_flags_java_lib",
diff --git a/service/kls-classpath b/service/kls-classpath
index 94c74875ad..3ea610246d 100755
--- a/service/kls-classpath
+++ b/service/kls-classpath
@@ -16,7 +16,6 @@ CLASSPATH+=":$ROOT/out/soong/.intermediates/packages/modules/Bluetooth/service/c
CLASSPATH+=":$ROOT/out/soong/.intermediates/packages/modules/Bluetooth/framework/framework-bluetooth.impl/android_common/turbine-jarjar/framework-bluetooth.impl.jar"
CLASSPATH+=":$ROOT/out/soong/.intermediates/prebuilts/sdk/current/androidx/m2repository/androidx/annotation/annotation-jvm/1.8.0-alpha01/androidx.annotation_annotation/android_common_apex33/turbine-combined/androidx.annotation_annotation.jar"
-CLASSPATH+=":$ROOT/out/soong/.intermediates/packages/modules/Bluetooth/service/bluetooth-manager-service-proto-java-gen/android_common_apex33/turbine-combined/bluetooth-manager-service-proto-java-gen.jar"
CLASSPATH+=":$ROOT/out/soong/.intermediates/packages/modules/Bluetooth/service/bluetooth-nano-protos/android_common_apex33/turbine-combined/bluetooth-nano-protos.jar"
CLASSPATH+=":$ROOT/out/soong/.intermediates/packages/modules/Bluetooth/android/app/bluetooth-proto-enums-java-gen/android_common_apex33/turbine-combined/bluetooth-proto-enums-java-gen.jar"
CLASSPATH+=":$ROOT/out/soong/.intermediates/packages/modules/Bluetooth/flags/bluetooth_flags_java_lib/android_common_apex33/turbine-combined/bluetooth_flags_java_lib.jar"
diff --git a/service/src/ActiveLog.kt b/service/src/ActiveLog.kt
index 46e3a5570d..ac49031f90 100644
--- a/service/src/ActiveLog.kt
+++ b/service/src/ActiveLog.kt
@@ -30,14 +30,12 @@ import android.bluetooth.BluetoothProtoEnums.ENABLE_DISABLE_REASON_START_ERROR
import android.bluetooth.BluetoothProtoEnums.ENABLE_DISABLE_REASON_SYSTEM_BOOT
import android.bluetooth.BluetoothProtoEnums.ENABLE_DISABLE_REASON_USER_SWITCH
import android.os.Binder
-import android.util.proto.ProtoOutputStream
import androidx.annotation.VisibleForTesting
import com.android.bluetooth.BluetoothStatsLog
import com.android.bluetooth.BluetoothStatsLog.BLUETOOTH_ENABLED_STATE_CHANGED
import com.android.bluetooth.BluetoothStatsLog.BLUETOOTH_ENABLED_STATE_CHANGED__STATE__DISABLED
import com.android.bluetooth.BluetoothStatsLog.BLUETOOTH_ENABLED_STATE_CHANGED__STATE__ENABLED
import com.android.bluetooth.BluetoothStatsLog.BLUETOOTH_ENABLED_STATE_CHANGED__STATE__UNKNOWN
-import com.android.server.BluetoothManagerServiceDumpProto as BtProto
import java.io.PrintWriter
private const val TAG = "ActiveLogs"
@@ -58,13 +56,6 @@ object ActiveLogs {
}
@JvmStatic
- fun dumpProto(proto: ProtoOutputStream) {
- val token = proto.start(BtProto.ACTIVE_LOGS)
- activeLogs.forEach { it.dump(proto) }
- proto.end(token)
- }
-
- @JvmStatic
fun add(reason: Int, enable: Boolean) {
add(reason, enable, "BluetoothSystemServer", false)
}
@@ -124,13 +115,6 @@ internal class ActiveLog(
(if (isBle) "Ble" else "") +
"]. \tReason is " +
getEnableDisableReasonString(reason)
-
- fun dump(proto: ProtoOutputStream) {
- proto.write(BtProto.ActiveLog.TIMESTAMP_MS, timestamp)
- proto.write(BtProto.ActiveLog.ENABLE, enable)
- proto.write(BtProto.ActiveLog.PACKAGE_NAME, packageName)
- proto.write(BtProto.ActiveLog.REASON, reason)
- }
}
private fun getEnableDisableReasonString(reason: Int): String {
diff --git a/service/src/ActiveLogTest.kt b/service/src/ActiveLogTest.kt
index ccd86a375e..baa5076626 100644
--- a/service/src/ActiveLogTest.kt
+++ b/service/src/ActiveLogTest.kt
@@ -26,7 +26,6 @@ import android.bluetooth.BluetoothProtoEnums.ENABLE_DISABLE_REASON_SATELLITE_MOD
import android.bluetooth.BluetoothProtoEnums.ENABLE_DISABLE_REASON_START_ERROR
import android.bluetooth.BluetoothProtoEnums.ENABLE_DISABLE_REASON_SYSTEM_BOOT
import android.bluetooth.BluetoothProtoEnums.ENABLE_DISABLE_REASON_USER_SWITCH
-import android.util.proto.ProtoOutputStream
import com.android.server.bluetooth.ActiveLogs
import com.android.server.bluetooth.Log
import com.google.common.truth.Truth.assertThat
@@ -137,14 +136,4 @@ class ActiveLogTest {
".*UNKNOWN\\[\\d+\\]\n"
)
}
-
- @Test
- fun protoDump() {
- ActiveLogs.add(ENABLE_DISABLE_REASON_APPLICATION_REQUEST, false)
-
- val proto = ProtoOutputStream()
- ActiveLogs.dumpProto(proto)
-
- assertThat(proto.getRawSize()).isEqualTo(48)
- }
}
diff --git a/service/src/com/android/server/bluetooth/BluetoothManagerService.java b/service/src/com/android/server/bluetooth/BluetoothManagerService.java
index 9d9705c2a3..08a949d81a 100644
--- a/service/src/com/android/server/bluetooth/BluetoothManagerService.java
+++ b/service/src/com/android/server/bluetooth/BluetoothManagerService.java
@@ -86,7 +86,6 @@ import com.android.bluetooth.flags.Flags;
import com.android.internal.annotations.VisibleForTesting;
import com.android.modules.expresslog.Counter;
import com.android.modules.expresslog.Histogram;
-import com.android.server.BluetoothManagerServiceDumpProto;
import com.android.server.bluetooth.airplane.AirplaneModeListener;
import com.android.server.bluetooth.satellite.SatelliteModeListener;
@@ -2009,10 +2008,6 @@ class BluetoothManagerService {
}
void dump(FileDescriptor fd, PrintWriter writer, String[] args) {
- if ((args.length > 0) && args[0].startsWith("--proto")) {
- dumpProto(fd);
- return;
- }
String errorMsg = null;
writer.println("Bluetooth Status");
@@ -2102,33 +2097,6 @@ class BluetoothManagerService {
});
}
- private void dumpProto(FileDescriptor fd) {
- final ProtoOutputStream proto = new ProtoOutputStream(new FileOutputStream(fd));
- proto.write(BluetoothManagerServiceDumpProto.ENABLED, isEnabled());
- proto.write(BluetoothManagerServiceDumpProto.STATE, mState.get());
- proto.write(BluetoothManagerServiceDumpProto.STATE_NAME, nameForState(mState.get()));
- proto.write(BluetoothManagerServiceDumpProto.ADDRESS, logAddress(mAddress));
- proto.write(BluetoothManagerServiceDumpProto.NAME, mName);
- if (mEnable) {
- proto.write(BluetoothManagerServiceDumpProto.LAST_ENABLED_TIME_MS, mLastEnabledTime);
- }
- proto.write(
- BluetoothManagerServiceDumpProto.CURR_TIMESTAMP_MS, SystemClock.elapsedRealtime());
- ActiveLogs.dumpProto(proto);
- proto.write(BluetoothManagerServiceDumpProto.NUM_CRASHES, mCrashes);
- proto.write(
- BluetoothManagerServiceDumpProto.CRASH_LOG_MAXED, mCrashes == CRASH_LOG_MAX_SIZE);
- for (Long time : mCrashTimestamps) {
- proto.write(BluetoothManagerServiceDumpProto.CRASH_TIMESTAMPS_MS, time);
- }
- proto.write(BluetoothManagerServiceDumpProto.NUM_BLE_APPS, mBleApps.size());
- for (ClientDeathRecipient app : mBleApps.values()) {
- proto.write(
- BluetoothManagerServiceDumpProto.BLE_APP_PACKAGE_NAMES, app.getPackageName());
- }
- proto.flush();
- }
-
static @NonNull Bundle getTempAllowlistBroadcastOptions() {
final long duration = 10_000;
final BroadcastOptions bOptions = BroadcastOptions.makeBasic();
diff --git a/system/gd/proto/bluetooth/metrics/bluetooth.proto b/system/gd/proto/bluetooth/metrics/bluetooth.proto
index 64eb0eea21..4acad9fe1e 100644
--- a/system/gd/proto/bluetooth/metrics/bluetooth.proto
+++ b/system/gd/proto/bluetooth/metrics/bluetooth.proto
@@ -22,286 +22,10 @@ package bluetooth.metrics.BluetoothMetricsProto;
option java_package = "com.android.bluetooth";
option java_outer_classname = "BluetoothMetricsProto";
-message BluetoothLog {
- // Session information that gets logged for every BT connection.
- repeated BluetoothSession session = 1;
-
- // Session information that gets logged for every Pair event.
- repeated PairEvent pair_event = 2;
-
- // Information for Wake locks.
- repeated WakeEvent wake_event = 3;
-
- // Scan event information.
- repeated ScanEvent scan_event = 4;
-
- // Number of bonded devices.
- optional int32 num_bonded_devices = 5;
-
- // Number of BluetoothSession including discarded ones beyond capacity
- optional int64 num_bluetooth_session = 6;
-
- // Number of PairEvent including discarded ones beyond capacity
- optional int64 num_pair_event = 7;
-
- // Number of WakeEvent including discarded ones beyond capacity
- optional int64 num_wake_event = 8;
-
- // Number of ScanEvent including discarded ones beyond capacity
- optional int64 num_scan_event = 9;
-
- // Statistics about Bluetooth profile connections
- repeated ProfileConnectionStats profile_connection_stats = 10;
-
- // Statistics about Headset profile connections
- repeated HeadsetProfileConnectionStats headset_profile_connection_stats = 11;
-}
-
-// The information about the device.
-message DeviceInfo {
- // Device type.
- enum DeviceType {
- // Type is unknown.
- DEVICE_TYPE_UNKNOWN = 0;
-
- DEVICE_TYPE_BREDR = 1;
-
- DEVICE_TYPE_LE = 2;
-
- DEVICE_TYPE_DUMO = 3;
- }
-
- // Device class
- // https://cs.corp.google.com/#android/packages/modules/Bluetooth/system/stack/include/btm_api.h&q=major_computer.
- optional int32 device_class = 1;
-
- // Device type.
- optional DeviceType device_type = 2;
-}
-
-// Information that gets logged for every Bluetooth connection.
-message BluetoothSession {
- // Type of technology used in the connection.
- enum ConnectionTechnologyType {
- CONNECTION_TECHNOLOGY_TYPE_UNKNOWN = 0;
-
- CONNECTION_TECHNOLOGY_TYPE_LE = 1;
-
- CONNECTION_TECHNOLOGY_TYPE_BREDR = 2;
- }
-
- enum DisconnectReasonType {
- UNKNOWN = 0;
-
- // A metrics dump takes a snapshot of current Bluetooth session and thus
- // is not a real disconnect, but a discontinuation in metrics logging.
- // This enum indicates this situation.
- METRICS_DUMP = 1;
-
- NEXT_START_WITHOUT_END_PREVIOUS = 2;
- }
-
- // Duration of the session.
- optional int64 session_duration_sec = 2;
-
- // Technology type.
- optional ConnectionTechnologyType connection_technology_type = 3;
-
- // Reason for disconnecting.
- optional string disconnect_reason = 4 [deprecated = true];
-
- // The information about the device which it is connected to.
- optional DeviceInfo device_connected_to = 5;
-
- // The information about the RFComm session.
- optional RFCommSession rfcomm_session = 6;
-
- // The information about the A2DP audio session.
- optional A2DPSession a2dp_session = 7;
-
- // Numeric reason for disconnecting as defined in metrics.h
- optional DisconnectReasonType disconnect_reason_type = 8;
-}
-
-message RFCommSession {
- // bytes transmitted.
- optional int32 rx_bytes = 1;
-
- // bytes transmitted.
- optional int32 tx_bytes = 2;
-}
-
-enum A2dpSourceCodec {
- A2DP_SOURCE_CODEC_UNKNOWN = 0;
- A2DP_SOURCE_CODEC_SBC = 1;
- A2DP_SOURCE_CODEC_AAC = 2;
- A2DP_SOURCE_CODEC_APTX = 3;
- A2DP_SOURCE_CODEC_APTX_HD = 4;
- A2DP_SOURCE_CODEC_LDAC = 5;
-}
-
-// Session information that gets logged for A2DP session.
-message A2DPSession {
- // Media timer in milliseconds.
- optional int32 media_timer_min_millis = 1;
-
- // Media timer in milliseconds.
- optional int32 media_timer_max_millis = 2;
-
- // Media timer in milliseconds.
- optional int32 media_timer_avg_millis = 3;
-
- // Buffer overruns count.
- optional int32 buffer_overruns_max_count = 4;
-
- // Buffer overruns total.
- optional int32 buffer_overruns_total = 5;
-
- // Buffer underruns average.
- optional float buffer_underruns_average = 6;
-
- // Buffer underruns count.
- optional int32 buffer_underruns_count = 7;
-
- // Total audio time in this A2DP session
- optional int64 audio_duration_millis = 8;
-
- // Audio codec used in this A2DP session in A2DP source role
- optional A2dpSourceCodec source_codec = 9;
-
- // Whether A2DP offload is enabled in this A2DP session
- optional bool is_a2dp_offload = 10;
-}
-
-message PairEvent {
- // The reason for disconnecting
- // See: packages/modules/Bluetooth/system/stack/include/hcidefs.h, HCI_ERR_CONN_FAILED_ESTABLISHMENT
- optional int32 disconnect_reason = 1;
-
- // Pair event time
- optional int64 event_time_millis = 2; // [(datapol.semantic_type) = ST_TIMESTAMP];
-
- // The information about the device which it is paired to.
- optional DeviceInfo device_paired_with = 3;
-}
-
-message WakeEvent {
- // Information about the wake event type.
- enum WakeEventType {
- UNKNOWN = 0;
- // WakeLock was acquired.
- ACQUIRED = 1;
- // WakeLock was released.
- RELEASED = 2;
- }
-
- // Information about the wake event type.
- optional WakeEventType wake_event_type = 1;
-
- // Initiator of the scan. Only the first three names will be stored.
- // e.g. com.company.app
- optional string requestor = 2;
-
- // Name of the wakelock (e.g. bluedroid_timer).
- optional string name = 3;
-
- // Time of the event.
- optional int64 event_time_millis = 4; // [(datapol.semantic_type) = ST_TIMESTAMP];
-}
-
-message ScanEvent {
- // Scan type.
- enum ScanTechnologyType {
- SCAN_TYPE_UNKNOWN = 0;
-
- SCAN_TECH_TYPE_LE = 1;
-
- SCAN_TECH_TYPE_BREDR = 2;
-
- SCAN_TECH_TYPE_BOTH = 3;
- }
-
- // Scan event type.
- enum ScanEventType {
- // Scan started.
- SCAN_EVENT_START = 0;
- // Scan stopped.
- SCAN_EVENT_STOP = 1;
- }
-
- // Scan event type.
- optional ScanEventType scan_event_type = 1;
-
- // Initiator of the scan. Only the first three names will be stored.
- // e.g. com.company.app
- optional string initiator = 2;
-
- // Technology used for scanning.
- optional ScanTechnologyType scan_technology_type = 3;
-
- // Number of results returned.
- optional int32 number_results = 4;
-
- // Time of the event.
- optional int64 event_time_millis = 5; // [(datapol.semantic_type) = ST_TIMESTAMP];
-}
-
-// Profile IDs defined in BluetoothProfile API class
-// Values must match API class values
-enum ProfileId {
- PROFILE_UNKNOWN = 0;
- HEADSET = 1;
- A2DP = 2;
- HEALTH = 3;
- HID_HOST = 4;
- PAN = 5;
- PBAP = 6;
- GATT = 7;
- GATT_SERVER = 8;
- MAP = 9;
- SAP = 10;
- A2DP_SINK = 11;
- AVRCP_CONTROLLER = 12;
- AVRCP = 13;
- HEADSET_CLIENT = 16;
- PBAP_CLIENT = 17;
- MAP_CLIENT = 18;
- HID_DEVICE = 19;
- OPP = 20;
- HEARING_AID = 21;
-}
-
-// Statistics about Bluetooth profile connections
-message ProfileConnectionStats {
- // Profile id defined in BluetoothProfile.java
- optional ProfileId profile_id = 1;
-
- // Number of times that this profile is connected since last metrics dump
- optional int32 num_times_connected = 2;
-}
-
-enum HeadsetProfileType {
- HEADSET_PROFILE_UNKNOWN = 0;
- HSP = 1;
- HFP = 2;
-}
-
-// Statistics about headset profile connections
-message HeadsetProfileConnectionStats {
- // Type of headset profile connected
- optional HeadsetProfileType headset_profile_type = 1;
-
- // Number of times this type of headset profile is connected
- optional int32 num_times_connected = 2;
-}
-
/**
* Encapsulates Remote Device Information. Needs to be kept consistent with
* BluetoothRemoteDeviceInformation
* in frameworks/proto_logging/stats/atoms/bluetooth/bluetooth_extension_atoms.proto
-*
-* Logged from:
-* packages/modules/Bluetooth
*/
message BluetoothRemoteDeviceInformation {
// SHA256 hashed Bluetooth device name.