use of android.webkit.WebViewProviderInfo in project android_frameworks_base by crdroidandroid.
the class WebViewUpdateServiceTest method testWithSinglePackage.
// ****************
// Tests
// ****************
public void testWithSinglePackage() {
String testPackageName = "test.package.name";
checkCertainPackageUsedAfterWebViewBootPreparation(testPackageName, new WebViewProviderInfo[] { new WebViewProviderInfo(testPackageName, "", true, /*default available*/
false, /* fallback */
null) });
}
use of android.webkit.WebViewProviderInfo in project android_frameworks_base by crdroidandroid.
the class WebViewUpdateServiceTest method testSeveralRelros.
public void testSeveralRelros() {
String singlePackage = "singlePackage";
checkCertainPackageUsedAfterWebViewBootPreparation(singlePackage, new WebViewProviderInfo[] { new WebViewProviderInfo(singlePackage, "", true, /*def av*/
false, null) }, 2);
}
use of android.webkit.WebViewProviderInfo in project platform_packages_apps_Settings by BlissRoms.
the class WebViewUpdateServiceWrapper method getValidWebViewApplicationInfos.
/**
* Fetches ApplicationInfo objects for all currently valid WebView packages.
* A WebView package is considered valid if it can be used as a WebView implementation. The
* validity of a package is not dependent on whether the package is installed/enabled.
*/
public List<ApplicationInfo> getValidWebViewApplicationInfos(Context context) {
WebViewProviderInfo[] providers = null;
try {
providers = WebViewFactory.getUpdateService().getValidWebViewPackages();
} catch (RemoteException e) {
}
List<ApplicationInfo> pkgs = new ArrayList<>();
for (WebViewProviderInfo provider : providers) {
try {
pkgs.add(context.getPackageManager().getApplicationInfo(provider.packageName, PACKAGE_FLAGS));
} catch (PackageManager.NameNotFoundException e) {
}
}
return pkgs;
}
Aggregations