Merge "Check for null application context in UserManager." into tm-qpr-dev

This commit is contained in:
Oli Lan
2022-08-23 10:43:23 +00:00
committed by Android (Google) Code Review

View File

@@ -1971,7 +1971,8 @@ public class UserManager {
/** @hide */
public UserManager(Context context, IUserManager service) {
mService = service;
mContext = context.getApplicationContext();
Context appContext = context.getApplicationContext();
mContext = (appContext == null ? context : appContext);
mUserId = context.getUserId();
}