Merge "Don't store a static instance of UserManager"

This commit is contained in:
Amith Yamasani
2015-10-30 18:19:08 +00:00
committed by Android (Google) Code Review

View File

@@ -533,14 +533,9 @@ public class UserManager {
/** @hide */
public static final int PIN_VERIFICATION_SUCCESS = -1;
private static UserManager sInstance = null;
/** @hide */
public synchronized static UserManager get(Context context) {
if (sInstance == null) {
sInstance = (UserManager) context.getSystemService(Context.USER_SERVICE);
}
return sInstance;
public static UserManager get(Context context) {
return (UserManager) context.getSystemService(Context.USER_SERVICE);
}
/** @hide */