use of com.android.settingslib.core.instrumentation.MetricsFeatureProvider in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class SetNewPasswordActivity method logSetNewPasswordIntent.
private void logSetNewPasswordIntent() {
final String callingAppPackageName = PasswordUtils.getCallingAppPackageName(getActivityToken());
// use int min value to denote absence of EXTRA_PASSWORD_COMPLEXITY
final int extraPasswordComplexity = getIntent().hasExtra(EXTRA_PASSWORD_COMPLEXITY) ? getIntent().getIntExtra(EXTRA_PASSWORD_COMPLEXITY, PASSWORD_COMPLEXITY_NONE) : Integer.MIN_VALUE;
// this activity is launched by either ACTION_SET_NEW_PASSWORD or
// ACTION_SET_NEW_PARENT_PROFILE_PASSWORD
final int action = ACTION_SET_NEW_PASSWORD.equals(mNewPasswordAction) ? SettingsEnums.ACTION_SET_NEW_PASSWORD : SettingsEnums.ACTION_SET_NEW_PARENT_PROFILE_PASSWORD;
final MetricsFeatureProvider metricsProvider = FeatureFactory.getFactory(this).getMetricsFeatureProvider();
metricsProvider.action(metricsProvider.getAttribution(this), action, SettingsEnums.SET_NEW_PASSWORD_ACTIVITY, callingAppPackageName, extraPasswordComplexity);
}
use of com.android.settingslib.core.instrumentation.MetricsFeatureProvider in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class BluetoothDevicePreference method onClicked.
void onClicked() {
Context context = getContext();
int bondState = mCachedDevice.getBondState();
final MetricsFeatureProvider metricsFeatureProvider = FeatureFactory.getFactory(context).getMetricsFeatureProvider();
if (mCachedDevice.isConnected()) {
metricsFeatureProvider.action(context, SettingsEnums.ACTION_SETTINGS_BLUETOOTH_DISCONNECT);
askDisconnect();
} else if (bondState == BluetoothDevice.BOND_BONDED) {
metricsFeatureProvider.action(context, SettingsEnums.ACTION_SETTINGS_BLUETOOTH_CONNECT);
mCachedDevice.connect(true);
} else if (bondState == BluetoothDevice.BOND_NONE) {
metricsFeatureProvider.action(context, SettingsEnums.ACTION_SETTINGS_BLUETOOTH_PAIR);
if (!mCachedDevice.hasHumanReadableName()) {
metricsFeatureProvider.action(context, SettingsEnums.ACTION_SETTINGS_BLUETOOTH_PAIR_DEVICES_WITHOUT_NAMES);
}
pair();
}
}
use of com.android.settingslib.core.instrumentation.MetricsFeatureProvider in project android_packages_apps_Settings by omnirom.
the class ConditionContextualCardRenderer method bindView.
@Override
public void bindView(RecyclerView.ViewHolder holder, ContextualCard contextualCard) {
final ConditionalCardHolder view = (ConditionalCardHolder) holder;
final ConditionalContextualCard card = (ConditionalContextualCard) contextualCard;
final MetricsFeatureProvider metricsFeatureProvider = FeatureFactory.getFactory(mContext).getMetricsFeatureProvider();
metricsFeatureProvider.visible(mContext, SettingsEnums.SETTINGS_HOMEPAGE, card.getMetricsConstant(), 0);
initializePrimaryClick(view, card, metricsFeatureProvider);
initializeView(view, card);
initializeActionButton(view, card, metricsFeatureProvider);
}
use of com.android.settingslib.core.instrumentation.MetricsFeatureProvider in project android_packages_apps_Settings by omnirom.
the class PictureInPictureDetails method logSpecialPermissionChange.
@VisibleForTesting
void logSpecialPermissionChange(boolean newState, String packageName) {
int logCategory = newState ? SettingsEnums.APP_PICTURE_IN_PICTURE_ALLOW : SettingsEnums.APP_PICTURE_IN_PICTURE_DENY;
final MetricsFeatureProvider metricsFeatureProvider = FeatureFactory.getFactory(getContext()).getMetricsFeatureProvider();
metricsFeatureProvider.action(metricsFeatureProvider.getAttribution(getActivity()), logCategory, getMetricsCategory(), packageName, 0);
}
use of com.android.settingslib.core.instrumentation.MetricsFeatureProvider in project android_packages_apps_Settings by omnirom.
the class VrListenerSettings method logSpecialPermissionChange.
@VisibleForTesting
void logSpecialPermissionChange(boolean enable, String packageName) {
int logCategory = enable ? SettingsEnums.APP_SPECIAL_PERMISSION_VRHELPER_ALLOW : SettingsEnums.APP_SPECIAL_PERMISSION_VRHELPER_DENY;
final MetricsFeatureProvider metricsFeatureProvider = FeatureFactory.getFactory(getContext()).getMetricsFeatureProvider();
metricsFeatureProvider.action(metricsFeatureProvider.getAttribution(getActivity()), logCategory, getMetricsCategory(), packageName, 0);
}
Aggregations