Migrate all MetricsProto enums to SettingsEnums

Bug: 122855168
Test: rebuild
Change-Id: I962d9a71179f86b7cae9dc5e9a00e0aa1557dc76
This commit is contained in:
Fan Zhang
2019-01-16 13:49:47 -08:00
parent dbaa5459b8
commit 31b210017b
502 changed files with 1184 additions and 1347 deletions

View File

@@ -15,13 +15,12 @@
*/
package com.android.settings.bluetooth;
import android.app.settings.SettingsEnums;
import android.content.Context;
import android.view.View;
import androidx.annotation.VisibleForTesting;
import com.android.internal.logging.nano.MetricsProto;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.settings.R;
import com.android.settings.core.SubSettingLauncher;
import com.android.settings.location.ScanningSettings;
@@ -67,7 +66,7 @@ public class BluetoothSwitchPreferenceController
mBluetoothEnabler = new BluetoothEnabler(context,
switchController,
FeatureFactory.getFactory(context).getMetricsFeatureProvider(),
MetricsEvent.ACTION_SETTINGS_MASTER_SWITCH_BLUETOOTH_TOGGLE,
SettingsEnums.ACTION_SETTINGS_MASTER_SWITCH_BLUETOOTH_TOGGLE,
mRestrictionUtils);
mBluetoothEnabler.setToggleCallback(this);
}
@@ -96,7 +95,7 @@ public class BluetoothSwitchPreferenceController
// send users to scanning settings if they click on the link in the summary text
new SubSettingLauncher(mContext)
.setDestination(ScanningSettings.class.getName())
.setSourceMetricsCategory(MetricsProto.MetricsEvent.BLUETOOTH_FRAGMENT)
.setSourceMetricsCategory(SettingsEnums.BLUETOOTH_FRAGMENT)
.launch();
}