Add logging to Bluetooth settings.

- Add logging when users selects the listed devices to connect or
disconnect, and when connection error is shown
- Update the event for the top level bluetooth master switch toggle to
have its own event.

Change-Id: I58f21256fdd07fad9d733ff987ff38df1148f4f8
Fix: 35065258
Test: make RunSettingsRoboTests
This commit is contained in:
Doris Ling
2017-03-09 17:35:22 -08:00
parent e32788c630
commit 133b096288
8 changed files with 262 additions and 8 deletions

View File

@@ -18,6 +18,7 @@ package com.android.settings.bluetooth;
import android.content.Context;
import android.support.v7.preference.PreferenceScreen;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.settings.core.PreferenceController;
import com.android.settings.core.lifecycle.LifecycleObserver;
import com.android.settings.core.lifecycle.events.OnPause;
@@ -54,7 +55,8 @@ public class BluetoothMasterSwitchPreferenceController extends PreferenceControl
mBtPreference = (MasterSwitchPreference) screen.findPreference(KEY_TOGGLE_BLUETOOTH);
mBluetoothEnabler = new BluetoothEnabler(mContext,
new MasterSwitchController(mBtPreference),
FeatureFactory.getFactory(mContext).getMetricsFeatureProvider(), mBluetoothManager);
FeatureFactory.getFactory(mContext).getMetricsFeatureProvider(), mBluetoothManager,
MetricsEvent.ACTION_SETTINGS_MASTER_SWITCH_BLUETOOTH_TOGGLE);
}
@Override