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

Commit 7b0dc688 authored by Yanting Yang's avatar Yanting Yang
Browse files

Correct metrics category in ConnectedDeviceSlice

The used category METRICS_CATEGORY_UNKNOWN in Bluetooth detail intent is
not matched. Correct the category to BLUETOOTH_DEVICE_DETAILS.

Bug: 114807655
Test: robotest
Change-Id: I941db81164ac2b3a09b6d3c0d97f14c5e65fb6ed
parent e8ac1019
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.settings.homepage.contextualcards.slices;

import android.app.PendingIntent;
import android.app.settings.SettingsEnums;
import android.bluetooth.BluetoothAdapter;
import android.content.Context;
import android.content.Intent;
@@ -48,7 +49,6 @@ import com.android.settings.slices.SliceBuilderUtils;
import com.android.settingslib.bluetooth.BluetoothUtils;
import com.android.settingslib.bluetooth.CachedBluetoothDevice;
import com.android.settingslib.bluetooth.LocalBluetoothManager;
import com.android.settingslib.core.instrumentation.Instrumentable;

import java.util.ArrayList;
import java.util.Collection;
@@ -193,7 +193,7 @@ public class ConnectedDeviceSlice implements CustomSliceable {
        subSettingLauncher.setDestination(BluetoothDeviceDetailsFragment.class.getName())
                .setArguments(args)
                .setTitleRes(R.string.device_details_title)
                .setSourceMetricsCategory(Instrumentable.METRICS_CATEGORY_UNKNOWN);
                .setSourceMetricsCategory(SettingsEnums.BLUETOOTH_DEVICE_DETAILS);

        // The requestCode should be unique, use the hashcode of device as request code.
        return PendingIntent