summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2015-08-21 16:41:50 (GMT)
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-08-21 16:41:50 (GMT)
commit93adff28ed9b6bf06eba97c1266b3fb911eca6a0 (patch)
treee048fbc4420a3395df54b78ba688eefd048ca7fc
parent830b5e08ef8ccc8e4193926ac10ac38cb0ae3e56 (diff)
parentad0c2f28ceb750646e0132a01d393f5115cbfca9 (diff)
downloadandroid_packages_apps_Trebuchet-93adff28ed9b6bf06eba97c1266b3fb911eca6a0.zip
android_packages_apps_Trebuchet-93adff28ed9b6bf06eba97c1266b3fb911eca6a0.tar.gz
android_packages_apps_Trebuchet-93adff28ed9b6bf06eba97c1266b3fb911eca6a0.tar.bz2
Merge "Using the usermanager api to get creation time" into ub-launcher3-burnaby
-rw-r--r--src/com/android/launcher3/compat/UserManagerCompatVL.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/launcher3/compat/UserManagerCompatVL.java b/src/com/android/launcher3/compat/UserManagerCompatVL.java
index 4d404db..dc3ec3c 100644
--- a/src/com/android/launcher3/compat/UserManagerCompatVL.java
+++ b/src/com/android/launcher3/compat/UserManagerCompatVL.java
@@ -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);