mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 17:36:49 +00:00
Using the usermanager api to get creation time
Bug: 22539048 Change-Id: I17647f2456434ca66a9778300e1a2910cec171d4
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user