Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7f328536 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add a metrics for avatar"

parents f0564592 20aaf3d2
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.settings.accounts;

import android.accounts.Account;
import android.app.settings.SettingsEnums;
import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
@@ -38,6 +39,7 @@ import androidx.lifecycle.OnLifecycleEvent;
import com.android.settings.R;
import com.android.settings.homepage.SettingsHomepageActivity;
import com.android.settings.overlay.FeatureFactory;
import com.android.settingslib.core.instrumentation.MetricsFeatureProvider;
import com.android.settingslib.utils.ThreadUtils;

import java.net.URISyntaxException;
@@ -91,6 +93,12 @@ public class AvatarViewMixin implements LifecycleObserver {
                return;
            }

            final MetricsFeatureProvider metricsFeatureProvider = FeatureFactory.getFactory(
                    mContext).getMetricsFeatureProvider();
            metricsFeatureProvider.action(SettingsEnums.PAGE_UNKNOWN,
                    SettingsEnums.CLICK_ACCOUNT_AVATAR, SettingsEnums.SETTINGS_HOMEPAGE,
                    null /* key */, Integer.MIN_VALUE /* value */);

            // Here may have two different UI while start the activity.
            // It will display adding account UI when device has no any account.
            // It will display account information page when intent added the specified account.