log more settings actions
airplane mode bluetooth cell data do not disturb Bug: 20264417 Change-Id: I726033a126fba9f9dffc916806d636feea04033b
This commit is contained in:
@@ -27,6 +27,7 @@ import android.provider.Settings;
|
||||
import android.widget.Switch;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.android.internal.logging.MetricsLogger;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.search.Index;
|
||||
import com.android.settings.widget.SwitchBar;
|
||||
@@ -184,6 +185,8 @@ public final class BluetoothEnabler implements SwitchBar.OnSwitchChangeListener
|
||||
switchView.setChecked(false);
|
||||
}
|
||||
|
||||
MetricsLogger.action(mContext, MetricsLogger.ACTION_BLUETOOTH_TOGGLE, isChecked);
|
||||
|
||||
if (mLocalAdapter != null) {
|
||||
mLocalAdapter.setBluetoothEnabled(isChecked);
|
||||
}
|
||||
|
@@ -231,16 +231,19 @@ public final class BluetoothSettings extends DeviceListPreferenceFragment implem
|
||||
switch (item.getItemId()) {
|
||||
case MENU_ID_SCAN:
|
||||
if (mLocalAdapter.getBluetoothState() == BluetoothAdapter.STATE_ON) {
|
||||
MetricsLogger.action(getActivity(), MetricsLogger.ACTION_BLUETOOTH_SCAN);
|
||||
startScanning();
|
||||
}
|
||||
return true;
|
||||
|
||||
case MENU_ID_RENAME_DEVICE:
|
||||
MetricsLogger.action(getActivity(), MetricsLogger.ACTION_BLUETOOTH_RENAME);
|
||||
new BluetoothNameDialogFragment().show(
|
||||
getFragmentManager(), "rename device");
|
||||
return true;
|
||||
|
||||
case MENU_ID_SHOW_RECEIVED:
|
||||
MetricsLogger.action(getActivity(), MetricsLogger.ACTION_BLUETOOTH_FILES);
|
||||
Intent intent = new Intent(BTOPP_ACTION_OPEN_RECEIVED_FILES);
|
||||
getActivity().sendBroadcast(intent);
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user