FileDocCategorySizeDatePackage
WebViewUpdateService.javaAPI DocAndroid 5.1 API5252Thu Mar 12 22:22:42 GMT 2015com.android.server.webkit

WebViewUpdateService

public class WebViewUpdateService extends com.android.server.SystemService
Private service to wait for the updatable WebView to be ready for use.
hide

Fields Summary
private static final String
TAG
private static final int
WAIT_TIMEOUT_MS
private boolean
mRelroReady32Bit
private boolean
mRelroReady64Bit
private android.content.BroadcastReceiver
mWebViewUpdatedReceiver
Constructors Summary
public WebViewUpdateService(android.content.Context context)


       
        super(context);
    
Methods Summary
public voidonStart()

        mWebViewUpdatedReceiver = new BroadcastReceiver() {
                @Override
                public void onReceive(Context context, Intent intent) {
                    String webviewPackage = "package:" + WebViewFactory.getWebViewPackageName();
                    if (webviewPackage.equals(intent.getDataString())) {
                        onWebViewUpdateInstalled();
                    }
                }
        };
        IntentFilter filter = new IntentFilter();
        filter.addAction(Intent.ACTION_PACKAGE_REPLACED);
        filter.addDataScheme("package");
        getContext().registerReceiver(mWebViewUpdatedReceiver, filter);

        publishBinderService("webviewupdate", new BinderService());
    
private voidonWebViewUpdateInstalled()

        Slog.d(TAG, "WebView Package updated!");

        synchronized (this) {
            mRelroReady32Bit = false;
            mRelroReady64Bit = false;
        }
        WebViewFactory.onWebViewUpdateInstalled();