summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/settings')
-rw-r--r--src/com/android/settings/AirplaneModeEnabler.java5
-rw-r--r--src/com/android/settings/DataUsageSummary.java5
-rw-r--r--src/com/android/settings/bluetooth/BluetoothEnabler.java3
-rwxr-xr-xsrc/com/android/settings/bluetooth/BluetoothSettings.java3
-rw-r--r--src/com/android/settings/notification/ZenModeAutomationSettings.java2
-rw-r--r--src/com/android/settings/notification/ZenModePrioritySettings.java5
-rw-r--r--src/com/android/settings/notification/ZenModeRuleSettingsBase.java4
7 files changed, 24 insertions, 3 deletions
diff --git a/src/com/android/settings/AirplaneModeEnabler.java b/src/com/android/settings/AirplaneModeEnabler.java
index 06648dbfb..39f61148f 100644
--- a/src/com/android/settings/AirplaneModeEnabler.java
+++ b/src/com/android/settings/AirplaneModeEnabler.java
@@ -27,6 +27,7 @@ import android.preference.Preference;
import android.preference.SwitchPreference;
import android.provider.Settings;
+import com.android.internal.logging.MetricsLogger;
import com.android.internal.telephony.PhoneStateIntentReceiver;
import com.android.internal.telephony.TelephonyProperties;
import com.android.settingslib.WirelessUtils;
@@ -120,7 +121,9 @@ public class AirplaneModeEnabler implements Preference.OnPreferenceChangeListene
SystemProperties.get(TelephonyProperties.PROPERTY_INECM_MODE))) {
// In ECM mode, do not update database at this point
} else {
- setAirplaneModeOn((Boolean) newValue);
+ Boolean value = (Boolean) newValue;
+ MetricsLogger.action(mContext, MetricsLogger.ACTION_AIRPLANE_TOGGLE, value);
+ setAirplaneModeOn(value);
}
return true;
}
diff --git a/src/com/android/settings/DataUsageSummary.java b/src/com/android/settings/DataUsageSummary.java
index 7eec3dfff..ed5de25d8 100644
--- a/src/com/android/settings/DataUsageSummary.java
+++ b/src/com/android/settings/DataUsageSummary.java
@@ -1217,10 +1217,11 @@ public class DataUsageSummary extends HighlightingFragment implements Indexable
public void onClick(View v) {
if (mBinding) return;
- final boolean dataEnabled = !mDataEnabled.isChecked();
+ final boolean enabled = !mDataEnabled.isChecked();
final String currentTab = mCurrentTab;
if (isMobileTab(currentTab)) {
- if (dataEnabled) {
+ MetricsLogger.action(getContext(), MetricsLogger.ACTION_CELL_DATA_TOGGLE, enabled);
+ if (enabled) {
// If we are showing the Sim Card tile then we are a Multi-Sim device.
if (Utils.showSimCardTile(getActivity())) {
handleMultiSimDataDialog();
diff --git a/src/com/android/settings/bluetooth/BluetoothEnabler.java b/src/com/android/settings/bluetooth/BluetoothEnabler.java
index 1c9eeb641..e83f483b3 100644
--- a/src/com/android/settings/bluetooth/BluetoothEnabler.java
+++ b/src/com/android/settings/bluetooth/BluetoothEnabler.java
@@ -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);
}
diff --git a/src/com/android/settings/bluetooth/BluetoothSettings.java b/src/com/android/settings/bluetooth/BluetoothSettings.java
index 1d0dc7e48..9ec4be1e9 100755
--- a/src/com/android/settings/bluetooth/BluetoothSettings.java
+++ b/src/com/android/settings/bluetooth/BluetoothSettings.java
@@ -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;
diff --git a/src/com/android/settings/notification/ZenModeAutomationSettings.java b/src/com/android/settings/notification/ZenModeAutomationSettings.java
index 5b6284448..ef225725c 100644
--- a/src/com/android/settings/notification/ZenModeAutomationSettings.java
+++ b/src/com/android/settings/notification/ZenModeAutomationSettings.java
@@ -96,6 +96,7 @@ public class ZenModeAutomationSettings extends ZenModeSettingsBase {
new ZenRuleNameDialog(mContext, mServiceListing, null, mConfig.getAutomaticRuleNames()) {
@Override
public void onOk(String ruleName, RuleInfo ri) {
+ MetricsLogger.action(mContext, MetricsLogger.ACTION_ZEN_ADD_RULE_OK);
final ZenRule rule = new ZenRule();
rule.name = ruleName;
rule.enabled = true;
@@ -168,6 +169,7 @@ public class ZenModeAutomationSettings extends ZenModeSettingsBase {
p.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
+ MetricsLogger.action(mContext, MetricsLogger.ACTION_ZEN_ADD_RULE);
showAddRuleDialog();
return true;
}
diff --git a/src/com/android/settings/notification/ZenModePrioritySettings.java b/src/com/android/settings/notification/ZenModePrioritySettings.java
index 4907cf0c4..6e34bf723 100644
--- a/src/com/android/settings/notification/ZenModePrioritySettings.java
+++ b/src/com/android/settings/notification/ZenModePrioritySettings.java
@@ -57,6 +57,7 @@ public class ZenModePrioritySettings extends ZenModeSettingsBase implements Inde
public boolean onPreferenceChange(Preference preference, Object newValue) {
if (mDisableListeners) return true;
final boolean val = (Boolean) newValue;
+ MetricsLogger.action(mContext, MetricsLogger.ACTION_ZEN_ALLOW_REMINDERS, val);
if (val == mConfig.allowReminders) return true;
if (DEBUG) Log.d(TAG, "onPrefChange allowReminders=" + val);
final ZenModeConfig newConfig = mConfig.copy();
@@ -71,6 +72,7 @@ public class ZenModePrioritySettings extends ZenModeSettingsBase implements Inde
public boolean onPreferenceChange(Preference preference, Object newValue) {
if (mDisableListeners) return true;
final boolean val = (Boolean) newValue;
+ MetricsLogger.action(mContext, MetricsLogger.ACTION_ZEN_ALLOW_EVENTS, val);
if (val == mConfig.allowEvents) return true;
if (DEBUG) Log.d(TAG, "onPrefChange allowEvents=" + val);
final ZenModeConfig newConfig = mConfig.copy();
@@ -86,6 +88,7 @@ public class ZenModePrioritySettings extends ZenModeSettingsBase implements Inde
public boolean onItemSelected(int pos, Object newValue) {
if (mDisableListeners) return true;
final int val = (Integer) newValue;
+ MetricsLogger.action(mContext, MetricsLogger.ACTION_ZEN_ALLOW_MESSAGES, val);
final boolean allowMessages = val != SOURCE_NONE;
final int allowMessagesFrom = val == SOURCE_NONE ? mConfig.allowMessagesFrom : val;
if (allowMessages == mConfig.allowMessages
@@ -108,6 +111,7 @@ public class ZenModePrioritySettings extends ZenModeSettingsBase implements Inde
public boolean onItemSelected(int pos, Object newValue) {
if (mDisableListeners) return true;
final int val = (Integer) newValue;
+ MetricsLogger.action(mContext, MetricsLogger.ACTION_ZEN_ALLOW_CALLS, val);
final boolean allowCalls = val != SOURCE_NONE;
final int allowCallsFrom = val == SOURCE_NONE ? mConfig.allowCallsFrom : val;
if (allowCalls == mConfig.allowCalls
@@ -132,6 +136,7 @@ public class ZenModePrioritySettings extends ZenModeSettingsBase implements Inde
public boolean onPreferenceChange(Preference preference, Object newValue) {
if (mDisableListeners) return true;
final boolean val = (Boolean) newValue;
+ MetricsLogger.action(mContext, MetricsLogger.ACTION_ZEN_ALLOW_REPEAT_CALLS, val);
if (val == mConfig.allowRepeatCallers) return true;
if (DEBUG) Log.d(TAG, "onPrefChange allowRepeatCallers=" + val);
final ZenModeConfig newConfig = mConfig.copy();
diff --git a/src/com/android/settings/notification/ZenModeRuleSettingsBase.java b/src/com/android/settings/notification/ZenModeRuleSettingsBase.java
index cf66da822..9ba7e92f3 100644
--- a/src/com/android/settings/notification/ZenModeRuleSettingsBase.java
+++ b/src/com/android/settings/notification/ZenModeRuleSettingsBase.java
@@ -36,6 +36,7 @@ import android.view.MenuItem;
import android.widget.Switch;
import android.widget.Toast;
+import com.android.internal.logging.MetricsLogger;
import com.android.settings.DropDownPreference;
import com.android.settings.R;
import com.android.settings.SettingsActivity;
@@ -152,6 +153,7 @@ public abstract class ZenModeRuleSettingsBase extends ZenModeSettingsBase
if (mDisableListeners) return;
final boolean enabled = isChecked;
if (enabled == mRule.enabled) return;
+ MetricsLogger.action(mContext, MetricsLogger.ACTION_ZEN_ENABLE_RULE, enabled);
if (DEBUG) Log.d(TAG, "onSwitchChanged enabled=" + enabled);
mRule.enabled = enabled;
mRule.snoozing = false;
@@ -198,6 +200,7 @@ public abstract class ZenModeRuleSettingsBase extends ZenModeSettingsBase
public boolean onOptionsItemSelected(MenuItem item) {
if (DEBUG) Log.d(TAG, "onOptionsItemSelected " + item.getItemId());
if (item.getItemId() == R.id.delete) {
+ MetricsLogger.action(mContext, MetricsLogger.ACTION_ZEN_DELETE_RULE);
showDeleteRuleDialog();
return true;
}
@@ -234,6 +237,7 @@ public abstract class ZenModeRuleSettingsBase extends ZenModeSettingsBase
.setPositiveButton(R.string.zen_mode_delete_rule_button, new OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
+ MetricsLogger.action(mContext, MetricsLogger.ACTION_ZEN_DELETE_RULE_OK);
mDeleting = true;
mConfig.automaticRules.remove(mRuleId);
setZenModeConfig(mConfig);