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

Commit 88220560 authored by Christine Franks's avatar Christine Franks
Browse files

Add TRON counter for demo user creation

Differentiate count of demo users created versus regular users.

Bug: 38512629
Test: create demo user, and no crash.
Change-Id: I1e731206c2a4ee01ab084d0bf330a04d5ea4c605
parent b435250e
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -223,6 +223,7 @@ public class UserManagerService extends IUserManager.Stub {
    // Tron counters
    private static final String TRON_GUEST_CREATED = "users_guest_created";
    private static final String TRON_USER_CREATED = "users_user_created";
    private static final String TRON_DEMO_CREATED = "users_demo_created";

    private final Context mContext;
    private final PackageManagerService mPm;
@@ -2523,7 +2524,8 @@ public class UserManagerService extends IUserManager.Stub {
            addedIntent.putExtra(Intent.EXTRA_USER_HANDLE, userId);
            mContext.sendBroadcastAsUser(addedIntent, UserHandle.ALL,
                    android.Manifest.permission.MANAGE_USERS);
            MetricsLogger.count(mContext, isGuest ? TRON_GUEST_CREATED : TRON_USER_CREATED, 1);
            MetricsLogger.count(mContext, isGuest ? TRON_GUEST_CREATED
                    : (isDemo ? TRON_DEMO_CREATED : TRON_USER_CREATED), 1);
        } finally {
            Binder.restoreCallingIdentity(ident);
        }