[Audiosharing] Add logging 1.
Test: atest -c com.android.settings.connecteddevice.audiosharing.audiostreams Bug: 308368124 Change-Id: I2513824826b9d7dd6240728179ea004f33b4fbe3
This commit is contained in:
@@ -18,6 +18,7 @@ package com.android.settings.connecteddevice.audiosharing;
|
|||||||
|
|
||||||
import static com.android.settings.connecteddevice.audiosharing.AudioSharingUtils.isBroadcasting;
|
import static com.android.settings.connecteddevice.audiosharing.AudioSharingUtils.isBroadcasting;
|
||||||
|
|
||||||
|
import android.app.settings.SettingsEnums;
|
||||||
import android.bluetooth.BluetoothLeBroadcast;
|
import android.bluetooth.BluetoothLeBroadcast;
|
||||||
import android.bluetooth.BluetoothLeBroadcastMetadata;
|
import android.bluetooth.BluetoothLeBroadcastMetadata;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
@@ -32,11 +33,13 @@ import androidx.preference.PreferenceScreen;
|
|||||||
|
|
||||||
import com.android.settings.bluetooth.Utils;
|
import com.android.settings.bluetooth.Utils;
|
||||||
import com.android.settings.core.BasePreferenceController;
|
import com.android.settings.core.BasePreferenceController;
|
||||||
|
import com.android.settings.overlay.FeatureFactory;
|
||||||
import com.android.settings.widget.ValidatedEditTextPreference;
|
import com.android.settings.widget.ValidatedEditTextPreference;
|
||||||
import com.android.settingslib.bluetooth.BluetoothUtils;
|
import com.android.settingslib.bluetooth.BluetoothUtils;
|
||||||
import com.android.settingslib.bluetooth.LocalBluetoothLeBroadcast;
|
import com.android.settingslib.bluetooth.LocalBluetoothLeBroadcast;
|
||||||
import com.android.settingslib.bluetooth.LocalBluetoothManager;
|
import com.android.settingslib.bluetooth.LocalBluetoothManager;
|
||||||
import com.android.settingslib.bluetooth.LocalBluetoothProfileManager;
|
import com.android.settingslib.bluetooth.LocalBluetoothProfileManager;
|
||||||
|
import com.android.settingslib.core.instrumentation.MetricsFeatureProvider;
|
||||||
import com.android.settingslib.utils.ThreadUtils;
|
import com.android.settingslib.utils.ThreadUtils;
|
||||||
|
|
||||||
import java.util.concurrent.Executor;
|
import java.util.concurrent.Executor;
|
||||||
@@ -116,6 +119,8 @@ public class AudioSharingNamePreferenceController extends BasePreferenceControll
|
|||||||
@Nullable private AudioSharingNamePreference mPreference;
|
@Nullable private AudioSharingNamePreference mPreference;
|
||||||
private final Executor mExecutor;
|
private final Executor mExecutor;
|
||||||
private final AudioSharingNameTextValidator mAudioSharingNameTextValidator;
|
private final AudioSharingNameTextValidator mAudioSharingNameTextValidator;
|
||||||
|
|
||||||
|
private final MetricsFeatureProvider mMetricsFeatureProvider;
|
||||||
private AtomicBoolean mCallbacksRegistered = new AtomicBoolean(false);
|
private AtomicBoolean mCallbacksRegistered = new AtomicBoolean(false);
|
||||||
|
|
||||||
public AudioSharingNamePreferenceController(Context context, String preferenceKey) {
|
public AudioSharingNamePreferenceController(Context context, String preferenceKey) {
|
||||||
@@ -126,6 +131,7 @@ public class AudioSharingNamePreferenceController extends BasePreferenceControll
|
|||||||
(mProfileManager != null) ? mProfileManager.getLeAudioBroadcastProfile() : null;
|
(mProfileManager != null) ? mProfileManager.getLeAudioBroadcastProfile() : null;
|
||||||
mAudioSharingNameTextValidator = new AudioSharingNameTextValidator();
|
mAudioSharingNameTextValidator = new AudioSharingNameTextValidator();
|
||||||
mExecutor = Executors.newSingleThreadExecutor();
|
mExecutor = Executors.newSingleThreadExecutor();
|
||||||
|
mMetricsFeatureProvider = FeatureFactory.getFeatureFactory().getMetricsFeatureProvider();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -214,14 +220,19 @@ public class AudioSharingNamePreferenceController extends BasePreferenceControll
|
|||||||
ThreadUtils.postOnBackgroundThread(
|
ThreadUtils.postOnBackgroundThread(
|
||||||
() -> {
|
() -> {
|
||||||
if (mBroadcast != null) {
|
if (mBroadcast != null) {
|
||||||
|
boolean isBroadcasting = isBroadcasting(mBtManager);
|
||||||
mBroadcast.setBroadcastName((String) newValue);
|
mBroadcast.setBroadcastName((String) newValue);
|
||||||
// We currently don't have a UI field for program info so we keep it
|
// We currently don't have a UI field for program info so we keep it
|
||||||
// consistent with broadcast name.
|
// consistent with broadcast name.
|
||||||
mBroadcast.setProgramInfo((String) newValue);
|
mBroadcast.setProgramInfo((String) newValue);
|
||||||
if (isBroadcasting(mBtManager)) {
|
if (isBroadcasting) {
|
||||||
mBroadcast.updateBroadcast();
|
mBroadcast.updateBroadcast();
|
||||||
}
|
}
|
||||||
updateBroadcastName();
|
updateBroadcastName();
|
||||||
|
mMetricsFeatureProvider.action(
|
||||||
|
mContext,
|
||||||
|
SettingsEnums.ACTION_AUDIO_STREAM_NAME_UPDATED,
|
||||||
|
isBroadcasting ? 1 : 0);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
|
@@ -18,6 +18,7 @@ package com.android.settings.connecteddevice.audiosharing;
|
|||||||
|
|
||||||
import static com.android.settings.connecteddevice.audiosharing.AudioSharingUtils.isBroadcasting;
|
import static com.android.settings.connecteddevice.audiosharing.AudioSharingUtils.isBroadcasting;
|
||||||
|
|
||||||
|
import android.app.settings.SettingsEnums;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
@@ -29,9 +30,11 @@ import androidx.preference.PreferenceScreen;
|
|||||||
import com.android.settings.R;
|
import com.android.settings.R;
|
||||||
import com.android.settings.bluetooth.Utils;
|
import com.android.settings.bluetooth.Utils;
|
||||||
import com.android.settings.core.BasePreferenceController;
|
import com.android.settings.core.BasePreferenceController;
|
||||||
|
import com.android.settings.overlay.FeatureFactory;
|
||||||
import com.android.settings.widget.ValidatedEditTextPreference;
|
import com.android.settings.widget.ValidatedEditTextPreference;
|
||||||
import com.android.settingslib.bluetooth.LocalBluetoothLeBroadcast;
|
import com.android.settingslib.bluetooth.LocalBluetoothLeBroadcast;
|
||||||
import com.android.settingslib.bluetooth.LocalBluetoothManager;
|
import com.android.settingslib.bluetooth.LocalBluetoothManager;
|
||||||
|
import com.android.settingslib.core.instrumentation.MetricsFeatureProvider;
|
||||||
import com.android.settingslib.utils.ThreadUtils;
|
import com.android.settingslib.utils.ThreadUtils;
|
||||||
|
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
@@ -48,6 +51,7 @@ public class AudioSharingPasswordPreferenceController extends BasePreferenceCont
|
|||||||
@Nullable private final LocalBluetoothLeBroadcast mBroadcast;
|
@Nullable private final LocalBluetoothLeBroadcast mBroadcast;
|
||||||
@Nullable private AudioSharingPasswordPreference mPreference;
|
@Nullable private AudioSharingPasswordPreference mPreference;
|
||||||
private final AudioSharingPasswordValidator mAudioSharingPasswordValidator;
|
private final AudioSharingPasswordValidator mAudioSharingPasswordValidator;
|
||||||
|
private final MetricsFeatureProvider mMetricsFeatureProvider;
|
||||||
|
|
||||||
public AudioSharingPasswordPreferenceController(Context context, String preferenceKey) {
|
public AudioSharingPasswordPreferenceController(Context context, String preferenceKey) {
|
||||||
super(context, preferenceKey);
|
super(context, preferenceKey);
|
||||||
@@ -57,6 +61,7 @@ public class AudioSharingPasswordPreferenceController extends BasePreferenceCont
|
|||||||
? mBtManager.getProfileManager().getLeAudioBroadcastProfile()
|
? mBtManager.getProfileManager().getLeAudioBroadcastProfile()
|
||||||
: null;
|
: null;
|
||||||
mAudioSharingPasswordValidator = new AudioSharingPasswordValidator();
|
mAudioSharingPasswordValidator = new AudioSharingPasswordValidator();
|
||||||
|
mMetricsFeatureProvider = FeatureFactory.getFeatureFactory().getMetricsFeatureProvider();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -94,18 +99,38 @@ public class AudioSharingPasswordPreferenceController extends BasePreferenceCont
|
|||||||
}
|
}
|
||||||
mPreference.setEditable(!isBroadcasting(mBtManager));
|
mPreference.setEditable(!isBroadcasting(mBtManager));
|
||||||
var password = mBroadcast.getBroadcastCode();
|
var password = mBroadcast.getBroadcastCode();
|
||||||
mPreference.setChecked(password == null || password.length == 0);
|
mPreference.setChecked(isPublicBroadcast(password));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPreferenceDataChanged(@NonNull String password, boolean isPublicBroadcast) {
|
public void onPreferenceDataChanged(@NonNull String password, boolean isPublicBroadcast) {
|
||||||
if (mBroadcast == null || isBroadcasting(mBtManager)) {
|
var unused =
|
||||||
Log.w(TAG, "onPreferenceDataChanged() changing password when broadcasting or null!");
|
ThreadUtils.postOnBackgroundThread(
|
||||||
return;
|
() -> {
|
||||||
}
|
if (mBroadcast == null || isBroadcasting(mBtManager)) {
|
||||||
persistDefaultPassword(mContext, password);
|
Log.w(
|
||||||
mBroadcast.setBroadcastCode(isPublicBroadcast ? new byte[0] : password.getBytes());
|
TAG,
|
||||||
updatePreference();
|
"onPreferenceDataChanged() changing password when"
|
||||||
|
+ " broadcasting or null!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
boolean isCurrentPublicBroadcast =
|
||||||
|
isPublicBroadcast(mBroadcast.getBroadcastCode());
|
||||||
|
String currentDefaultPassword = getDefaultPassword(mContext);
|
||||||
|
if (password.equals(currentDefaultPassword)
|
||||||
|
&& isCurrentPublicBroadcast == isPublicBroadcast) {
|
||||||
|
Log.d(TAG, "onPreferenceDataChanged() nothing changed");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
persistDefaultPassword(mContext, password);
|
||||||
|
mBroadcast.setBroadcastCode(
|
||||||
|
isPublicBroadcast ? new byte[0] : password.getBytes());
|
||||||
|
updatePreference();
|
||||||
|
mMetricsFeatureProvider.action(
|
||||||
|
mContext,
|
||||||
|
SettingsEnums.ACTION_AUDIO_STREAM_PASSWORD_UPDATED,
|
||||||
|
isPublicBroadcast ? 1 : 0);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updatePreference() {
|
private void updatePreference() {
|
||||||
@@ -116,7 +141,7 @@ public class AudioSharingPasswordPreferenceController extends BasePreferenceCont
|
|||||||
ThreadUtils.postOnBackgroundThread(
|
ThreadUtils.postOnBackgroundThread(
|
||||||
() -> {
|
() -> {
|
||||||
byte[] password = mBroadcast.getBroadcastCode();
|
byte[] password = mBroadcast.getBroadcastCode();
|
||||||
boolean noPassword = (password == null || password.length == 0);
|
boolean noPassword = isPublicBroadcast(password);
|
||||||
String passwordToDisplay =
|
String passwordToDisplay =
|
||||||
noPassword
|
noPassword
|
||||||
? getDefaultPassword(mContext)
|
? getDefaultPassword(mContext)
|
||||||
@@ -140,25 +165,20 @@ public class AudioSharingPasswordPreferenceController extends BasePreferenceCont
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static void persistDefaultPassword(Context context, String defaultPassword) {
|
private static void persistDefaultPassword(Context context, String defaultPassword) {
|
||||||
var unused =
|
if (getDefaultPassword(context).equals(defaultPassword)) {
|
||||||
ThreadUtils.postOnBackgroundThread(
|
return;
|
||||||
() -> {
|
}
|
||||||
if (getDefaultPassword(context).equals(defaultPassword)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
SharedPreferences sharedPref =
|
SharedPreferences sharedPref =
|
||||||
context.getSharedPreferences(
|
context.getSharedPreferences(SHARED_PREF_NAME, Context.MODE_PRIVATE);
|
||||||
SHARED_PREF_NAME, Context.MODE_PRIVATE);
|
if (sharedPref == null) {
|
||||||
if (sharedPref == null) {
|
Log.w(TAG, "persistDefaultPassword(): sharedPref is empty!");
|
||||||
Log.w(TAG, "persistDefaultPassword(): sharedPref is empty!");
|
return;
|
||||||
return;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
SharedPreferences.Editor editor = sharedPref.edit();
|
SharedPreferences.Editor editor = sharedPref.edit();
|
||||||
editor.putString(SHARED_PREF_KEY, defaultPassword);
|
editor.putString(SHARED_PREF_KEY, defaultPassword);
|
||||||
editor.apply();
|
editor.apply();
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String getDefaultPassword(Context context) {
|
private static String getDefaultPassword(Context context) {
|
||||||
@@ -175,4 +195,8 @@ public class AudioSharingPasswordPreferenceController extends BasePreferenceCont
|
|||||||
}
|
}
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static boolean isPublicBroadcast(@Nullable byte[] password) {
|
||||||
|
return password == null || password.length == 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
package com.android.settings.connecteddevice.audiosharing.audiostreams;
|
package com.android.settings.connecteddevice.audiosharing.audiostreams;
|
||||||
|
|
||||||
|
import android.app.settings.SettingsEnums;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
||||||
@@ -45,8 +46,7 @@ public class AudioStreamDetailsFragment extends DashboardFragment {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMetricsCategory() {
|
public int getMetricsCategory() {
|
||||||
// TODO(chelseahao): update metrics id
|
return SettingsEnums.AUDIO_STREAM_DETAIL;
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@@ -20,6 +20,7 @@ import android.app.Notification;
|
|||||||
import android.app.NotificationChannel;
|
import android.app.NotificationChannel;
|
||||||
import android.app.NotificationManager;
|
import android.app.NotificationManager;
|
||||||
import android.app.Service;
|
import android.app.Service;
|
||||||
|
import android.app.settings.SettingsEnums;
|
||||||
import android.bluetooth.BluetoothAdapter;
|
import android.bluetooth.BluetoothAdapter;
|
||||||
import android.bluetooth.BluetoothDevice;
|
import android.bluetooth.BluetoothDevice;
|
||||||
import android.bluetooth.BluetoothLeBroadcastReceiveState;
|
import android.bluetooth.BluetoothLeBroadcastReceiveState;
|
||||||
@@ -40,12 +41,14 @@ import androidx.annotation.Nullable;
|
|||||||
import com.android.settings.R;
|
import com.android.settings.R;
|
||||||
import com.android.settings.bluetooth.Utils;
|
import com.android.settings.bluetooth.Utils;
|
||||||
import com.android.settings.connecteddevice.audiosharing.AudioSharingUtils;
|
import com.android.settings.connecteddevice.audiosharing.AudioSharingUtils;
|
||||||
|
import com.android.settings.overlay.FeatureFactory;
|
||||||
import com.android.settingslib.bluetooth.BluetoothCallback;
|
import com.android.settingslib.bluetooth.BluetoothCallback;
|
||||||
import com.android.settingslib.bluetooth.CachedBluetoothDevice;
|
import com.android.settingslib.bluetooth.CachedBluetoothDevice;
|
||||||
import com.android.settingslib.bluetooth.CachedBluetoothDeviceManager;
|
import com.android.settingslib.bluetooth.CachedBluetoothDeviceManager;
|
||||||
import com.android.settingslib.bluetooth.LocalBluetoothLeBroadcastAssistant;
|
import com.android.settingslib.bluetooth.LocalBluetoothLeBroadcastAssistant;
|
||||||
import com.android.settingslib.bluetooth.LocalBluetoothManager;
|
import com.android.settingslib.bluetooth.LocalBluetoothManager;
|
||||||
import com.android.settingslib.bluetooth.VolumeControlProfile;
|
import com.android.settingslib.bluetooth.VolumeControlProfile;
|
||||||
|
import com.android.settingslib.core.instrumentation.MetricsFeatureProvider;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
@@ -177,6 +180,8 @@ public class AudioStreamMediaService extends Service {
|
|||||||
LEAVE_BROADCAST_TEXT,
|
LEAVE_BROADCAST_TEXT,
|
||||||
com.android.settings.R.drawable.ic_clear);
|
com.android.settings.R.drawable.ic_clear);
|
||||||
|
|
||||||
|
private final MetricsFeatureProvider mMetricsFeatureProvider =
|
||||||
|
FeatureFactory.getFeatureFactory().getMetricsFeatureProvider();
|
||||||
private final ExecutorService mExecutor = Executors.newSingleThreadExecutor();
|
private final ExecutorService mExecutor = Executors.newSingleThreadExecutor();
|
||||||
private int mBroadcastId;
|
private int mBroadcastId;
|
||||||
@Nullable private ArrayList<BluetoothDevice> mDevices;
|
@Nullable private ArrayList<BluetoothDevice> mDevices;
|
||||||
@@ -322,6 +327,11 @@ public class AudioStreamMediaService extends Service {
|
|||||||
+ 0);
|
+ 0);
|
||||||
if (mVolumeControl != null) {
|
if (mVolumeControl != null) {
|
||||||
mVolumeControl.setDeviceVolume(mDevices.get(0), 0, true);
|
mVolumeControl.setDeviceVolume(mDevices.get(0), 0, true);
|
||||||
|
mMetricsFeatureProvider.action(
|
||||||
|
getApplicationContext(),
|
||||||
|
SettingsEnums
|
||||||
|
.ACTION_AUDIO_STREAM_NOTIFICATION_MUTE_BUTTON_CLICK,
|
||||||
|
1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -341,6 +351,10 @@ public class AudioStreamMediaService extends Service {
|
|||||||
mVolumeControl.setDeviceVolume(
|
mVolumeControl.setDeviceVolume(
|
||||||
mDevices.get(0), mLatestPositiveVolume, true);
|
mDevices.get(0), mLatestPositiveVolume, true);
|
||||||
}
|
}
|
||||||
|
mMetricsFeatureProvider.action(
|
||||||
|
getApplicationContext(),
|
||||||
|
SettingsEnums.ACTION_AUDIO_STREAM_NOTIFICATION_MUTE_BUTTON_CLICK,
|
||||||
|
0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -348,6 +362,10 @@ public class AudioStreamMediaService extends Service {
|
|||||||
Log.d(TAG, "onCustomAction: " + action);
|
Log.d(TAG, "onCustomAction: " + action);
|
||||||
if (action.equals(LEAVE_BROADCAST_ACTION) && mAudioStreamsHelper != null) {
|
if (action.equals(LEAVE_BROADCAST_ACTION) && mAudioStreamsHelper != null) {
|
||||||
mAudioStreamsHelper.removeSource(mBroadcastId);
|
mAudioStreamsHelper.removeSource(mBroadcastId);
|
||||||
|
mMetricsFeatureProvider.action(
|
||||||
|
getApplicationContext(),
|
||||||
|
SettingsEnums
|
||||||
|
.ACTION_AUDIO_STREAM_NOTIFICATION_LEAVE_BUTTON_CLICK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -379,7 +397,7 @@ public class AudioStreamMediaService extends Service {
|
|||||||
mLocalSession != null ? mLocalSession.getSessionToken() : null);
|
mLocalSession != null ? mLocalSession.getSessionToken() : null);
|
||||||
if (deviceName != null && !deviceName.isEmpty()) {
|
if (deviceName != null && !deviceName.isEmpty()) {
|
||||||
mediaStyle.setRemotePlaybackInfo(
|
mediaStyle.setRemotePlaybackInfo(
|
||||||
deviceName, com.android.internal.R.drawable.ic_bt_headset_hfp, null);
|
deviceName, com.android.settingslib.R.drawable.ic_bt_le_audio, null);
|
||||||
}
|
}
|
||||||
Notification.Builder notificationBuilder =
|
Notification.Builder notificationBuilder =
|
||||||
new Notification.Builder(this, CHANNEL_ID)
|
new Notification.Builder(this, CHANNEL_ID)
|
||||||
|
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
package com.android.settings.connecteddevice.audiosharing.audiostreams;
|
package com.android.settings.connecteddevice.audiosharing.audiostreams;
|
||||||
|
|
||||||
|
import android.app.settings.SettingsEnums;
|
||||||
import android.bluetooth.BluetoothLeBroadcastMetadata;
|
import android.bluetooth.BluetoothLeBroadcastMetadata;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@@ -45,8 +46,7 @@ public class AudioStreamsQrCodeFragment extends InstrumentedFragment {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMetricsCategory() {
|
public int getMetricsCategory() {
|
||||||
// TODO(chelseahao): update metrics id
|
return SettingsEnums.AUDIO_STREAM_QR_CODE;
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@@ -248,6 +248,6 @@ public class AudioStreamsQrCodeScanFragment extends InstrumentedFragment
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMetricsCategory() {
|
public int getMetricsCategory() {
|
||||||
return SettingsEnums.LE_AUDIO_BROADCAST_SCAN_QR_CODE;
|
return SettingsEnums.AUDIO_STREAM_QR_CODE_SCAN;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -16,7 +16,6 @@
|
|||||||
|
|
||||||
package com.android.settings.connecteddevice.audiosharing.audiostreams;
|
package com.android.settings.connecteddevice.audiosharing.audiostreams;
|
||||||
|
|
||||||
import android.app.settings.SettingsEnums;
|
|
||||||
import android.bluetooth.BluetoothProfile;
|
import android.bluetooth.BluetoothProfile;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
@@ -111,7 +110,7 @@ public class AudioStreamsScanQrCodeController extends BasePreferenceController
|
|||||||
.setTitleRes(R.string.audio_streams_main_page_scan_qr_code_title)
|
.setTitleRes(R.string.audio_streams_main_page_scan_qr_code_title)
|
||||||
.setDestination(AudioStreamsQrCodeScanFragment.class.getName())
|
.setDestination(AudioStreamsQrCodeScanFragment.class.getName())
|
||||||
.setResultListener(mFragment, REQUEST_SCAN_BT_BROADCAST_QR_CODE)
|
.setResultListener(mFragment, REQUEST_SCAN_BT_BROADCAST_QR_CODE)
|
||||||
.setSourceMetricsCategory(SettingsEnums.PAGE_UNKNOWN)
|
.setSourceMetricsCategory(mFragment.getMetricsCategory())
|
||||||
.launch();
|
.launch();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user