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

Commit 6f326e95 authored by Sunny Goyal's avatar Sunny Goyal Committed by Android Git Automerger
Browse files

am 93adff28: Merge "Using the usermanager api to get creation time" into ub-launcher3-burnaby

* commit '93adff28':
  Using the usermanager api to get creation time
parents 0b158384 93adff28
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);