Get app info with correct user id.
- when querying app info from package manager, we should use the methods that takes the user id so that it will work properly with managed profile. Change-Id: Ifc84d3a29aaf7b2c1acfa096596a53f1715cc908 Fixes: 117222623 Test: make RunSettingsRoboTests
This commit is contained in:
@@ -19,6 +19,7 @@ package com.android.settings.development;
|
||||
import android.content.Context;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.UserHandle;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
@@ -66,7 +67,7 @@ public class WebViewAppPreferenceController extends DeveloperOptionsPreferenceCo
|
||||
@VisibleForTesting
|
||||
DefaultAppInfo getDefaultAppInfo() {
|
||||
final PackageInfo currentPackage = mWebViewUpdateServiceWrapper.getCurrentWebViewPackage();
|
||||
return new DefaultAppInfo(mContext, mPackageManager,
|
||||
return new DefaultAppInfo(mContext, mPackageManager, UserHandle.myUserId(),
|
||||
currentPackage == null ? null : currentPackage.applicationInfo);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user