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

Commit 93adff28 authored by Sunny Goyal's avatar Sunny Goyal Committed by Android (Google) Code Review
Browse files

Merge "Using the usermanager api to get creation time" into ub-launcher3-burnaby

parents 830b5e08 ad0c2f28
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import android.os.Build;
import android.os.UserHandle;

import com.android.launcher3.LauncherAppState;
import com.android.launcher3.Utilities;
import com.android.launcher3.util.LongArrayMap;

import java.util.ArrayList;
@@ -100,7 +101,9 @@ public class UserManagerCompatVL extends UserManagerCompatV17 {

    @Override
    public long getUserCreationTime(UserHandleCompat user) {
        // TODO: Use system API once available.
        if (Utilities.ATLEAST_MARSHMALLOW) {
            return mUserManager.getUserCreationTime(user.getUser());
        }
        SharedPreferences prefs = mContext.getSharedPreferences(
                LauncherAppState.getSharedPreferencesKey(), Context.MODE_PRIVATE);
        String key = USER_CREATION_TIME_KEY + getSerialNumberForUser(user);