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

Commit e6368d56 authored by Chen Chen's avatar Chen Chen
Browse files

BluetoothMetrics: Keep intent of counter metrics inside bluetooth

Bug: 207324271
Test: atest BluetoothInstrumentationTests
Change-Id: Icd1a2dba09e0c07ddb22fbe6d016e2da26595f10
parent df1d2145
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ public class MetricsLogger {
     * Intent indicating Bluetooth counter metrics should send logs to BluetoothStatsLog
     */
    public static final String BLUETOOTH_COUNTER_METRICS_ACTION =
            "com.android.bluetooth.map.BLUETOOTH_COUNTER_METRICS_ACTION";
            "com.android.bluetooth.btservice.BLUETOOTH_COUNTER_METRICS_ACTION";
    // 6 hours timeout for counter metrics
    private static final long BLUETOOTH_COUNTER_METRICS_ACTION_DURATION_MILLIS = 6L * 3600L * 1000L;

@@ -205,6 +205,7 @@ public class MetricsLogger {

    private PendingIntent getDrainIntent() {
        Intent counterMetricsIntent = new Intent(BLUETOOTH_COUNTER_METRICS_ACTION);
        counterMetricsIntent.setPackage("com.android.bluetooth");
        return PendingIntent.getBroadcast(
                mContext, 0, counterMetricsIntent, PendingIntent.FLAG_IMMUTABLE);
    }