Add connect / disconnect action when connect / disconnect to bluetooth device

Bug: 215299757
Test: build pass
Change-Id: Ib6fd592f63d4035674dc60cd54f16ffd5550ecff
This commit is contained in:
Hugh Chen
2022-01-19 08:09:35 +00:00
parent 1002473fc2
commit 8849628106
3 changed files with 18 additions and 2 deletions

View File

@@ -15,6 +15,7 @@
*/
package com.android.settings.bluetooth;
import android.app.settings.SettingsEnums;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.content.Context;
@@ -116,6 +117,8 @@ public class SavedBluetoothDeviceUpdater extends BluetoothDeviceUpdater
if (device.isConnected()) {
return device.setActive();
}
mMetricsFeatureProvider.action(mPrefContext,
SettingsEnums.ACTION_SETTINGS_BLUETOOTH_CONNECT);
device.connect();
return true;
}