summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorne (Richard Coles) <torne@google.com>2014-12-08 16:20:27 +0000
committerTorne (Richard Coles) <torne@google.com>2014-12-08 16:20:27 +0000
commitb68a89efd3409e3cca6a74a08df0ac825df4fd1c (patch)
tree220da227a445da315f1feb5beea8a4df2561e122
parent1b6db1dc37fed05c6f29f738de67ff25708a3aa4 (diff)
parenta770a09ca3346d8ec7cb4cdff90aaf83c8d2c5ff (diff)
downloadwebview-b68a89efd3409e3cca6a74a08df0ac825df4fd1c.tar.gz
Update chromium-dev to match master again.
chromium-dev had lagged behind; update it to be identical to master as there are no chromium-dev specific changes outstanding at the moment. Change-Id: I3aaa2c1a531d6e0f850848b2eb53596c5fe8a813
-rw-r--r--chromium/java/com/android/webview/chromium/CookieManagerAdapter.java10
-rw-r--r--chromium/java/com/android/webview/chromium/DataReductionProxyManager.java201
-rw-r--r--chromium/java/com/android/webview/chromium/DrawGLFunctor.java49
-rw-r--r--chromium/java/com/android/webview/chromium/ResourceRewriter.java35
-rw-r--r--chromium/java/com/android/webview/chromium/WebViewChromium.java78
-rw-r--r--chromium/java/com/android/webview/chromium/WebViewChromiumFactoryProvider.java89
-rw-r--r--chromium/java/com/android/webview/chromium/WebViewContentsClientAdapter.java14
-rw-r--r--chromium/java/com/android/webview/chromium/WebViewDelegateFactory.java343
-rw-r--r--chromium/listing/res/values-bn-rBD/strings.xml13
-rw-r--r--chromium/listing/res/values-eu-rES/strings.xml13
-rw-r--r--chromium/listing/res/values-gl-rES/strings.xml13
-rw-r--r--chromium/listing/res/values-is-rIS/strings.xml13
-rw-r--r--chromium/listing/res/values-it/strings.xml2
-rw-r--r--chromium/listing/res/values-ka-rGE/strings.xml2
-rw-r--r--chromium/listing/res/values-kk-rKZ/strings.xml13
-rw-r--r--chromium/listing/res/values-kn-rIN/strings.xml13
-rw-r--r--chromium/listing/res/values-ky-rKG/strings.xml13
-rw-r--r--chromium/listing/res/values-mk-rMK/strings.xml13
-rw-r--r--chromium/listing/res/values-ml-rIN/strings.xml13
-rw-r--r--chromium/listing/res/values-mr-rIN/strings.xml13
-rw-r--r--chromium/listing/res/values-my-rMM/strings.xml13
-rw-r--r--chromium/listing/res/values-ne-rNP/strings.xml13
-rw-r--r--chromium/listing/res/values-si-rLK/strings.xml13
-rw-r--r--chromium/listing/res/values-sw/strings.xml2
-rw-r--r--chromium/listing/res/values-ta-rIN/strings.xml13
-rw-r--r--chromium/listing/res/values-te-rIN/strings.xml13
-rw-r--r--chromium/listing/res/values-ur-rPK/strings.xml13
-rw-r--r--chromium/listing/res/values-uz-rUZ/strings.xml13
-rw-r--r--chromium/listing/res/values-zh-rHK/strings.xml2
-rw-r--r--chromium/listing/res/values-zh-rTW/strings.xml4
-rw-r--r--chromium/package.mk5
-rw-r--r--chromium/proguard.flags6
-rw-r--r--chromium/tests/UbWebViewJankTests/src/com/android/webview/chromium/tests/jank/WebViewFlingTest.java33
-rw-r--r--chromium/version.mk2
-rw-r--r--nullwebview/java/com/android/webview/nullwebview/NullWebViewFactoryProvider.java3
35 files changed, 957 insertions, 144 deletions
diff --git a/chromium/java/com/android/webview/chromium/CookieManagerAdapter.java b/chromium/java/com/android/webview/chromium/CookieManagerAdapter.java
index 44c2258..2dd34a3 100644
--- a/chromium/java/com/android/webview/chromium/CookieManagerAdapter.java
+++ b/chromium/java/com/android/webview/chromium/CookieManagerAdapter.java
@@ -88,6 +88,12 @@ public class CookieManagerAdapter extends CookieManager {
return getCookie(url);
}
+ // TODO(igsolla): remove this override once the WebView apk does not longer need
+ // to be binary compatibility with the API 21 version of the framework
+ /**
+ * IMPORTANT: This override is required for compatibility with the API 21 version of
+ * {@link CookieManager}.
+ */
@Override
public synchronized String getCookie(WebAddress uri) {
return mChromeCookieManager.getCookie(uri.toString());
@@ -133,10 +139,6 @@ public class CookieManagerAdapter extends CookieManager {
mChromeCookieManager.flushCookieStore();
}
- protected void flushCookieStore() {
- flush();
- }
-
@Override
protected boolean allowFileSchemeCookiesImpl() {
return mChromeCookieManager.allowFileSchemeCookies();
diff --git a/chromium/java/com/android/webview/chromium/DataReductionProxyManager.java b/chromium/java/com/android/webview/chromium/DataReductionProxyManager.java
new file mode 100644
index 0000000..aafd41e
--- /dev/null
+++ b/chromium/java/com/android/webview/chromium/DataReductionProxyManager.java
@@ -0,0 +1,201 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.webview.chromium;
+
+import android.content.BroadcastReceiver;
+import android.content.ContentResolver;
+import android.content.ContentValues;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.database.ContentObserver;
+import android.database.Cursor;
+import android.database.SQLException;
+import android.net.Uri;
+import android.os.AsyncTask;
+import android.os.Handler;
+import android.provider.Settings;
+import android.util.Log;
+import android.webkit.WebView;
+
+import org.chromium.android_webview.AwContentsStatics;
+import org.chromium.base.CommandLine;
+
+import java.lang.reflect.Field;
+
+/**
+ * Controls data reduction proxy. This logic will be moved to upstream fully.
+ */
+public final class DataReductionProxyManager {
+
+ // The setting Uri. Used when querying GoogleSettings.
+ private static final Uri CONTENT_URI = Uri.parse("content://com.google.settings/partner");
+
+ // Setting name for allowing data reduction proxy. Used when querying GoogleSettings.
+ // Setting type: int ( 0 = disallow, 1 = allow )
+ private static final String WEBVIEW_DATA_REDUCTION_PROXY = "use_webview_data_reduction_proxy";
+
+ private static final String DRP_CLASS = "com.android.webview.chromium.Drp";
+ private static final String TAG = "DataReductionProxySettingListener";
+
+ // This is the same as Chromium data_reduction_proxy::switches::kEnableDataReductionProxy.
+ private static final String ENABLE_DATA_REDUCTION_PROXY = "enable-spdy-proxy-auth";
+ // This is the same as Chromium data_reduction_proxy::switches::kDataReductionProxyKey.
+ private static final String DATA_REDUCTION_PROXY_KEY = "spdy-proxy-auth-value";
+
+ /*
+ * Listen for DataReductionProxySetting changes and take action.
+ * TODO: This is the old mechanism. Will be obsolete after L release.
+ * remove before release.
+ */
+ private static final class ProxySettingListener extends BroadcastReceiver {
+
+ final String mKey;
+
+ ProxySettingListener(final String key) {
+ mKey = key;
+ }
+
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ applyDataReductionProxySettingsAsync(context, mKey);
+ }
+ }
+
+ private ProxySettingListener mProxySettingListener;
+
+ private ContentObserver mProxySettingObserver;
+
+ public DataReductionProxyManager() { }
+
+ public void start(final Context context) {
+ // This is the DRP key embedded in WebView apk.
+ final String embeddedKey = readKey();
+
+ // Developers could test DRP by passing ENABLE_DATA_REDUCTION_PROXY and (optionally)
+ // DATA_REDUCTION_PROXY_KEY to the commandline switches. In this case, we will try to
+ // initialize DRP from commandline. And ignore user's preference. If
+ // DATA_REDUCTION_PROXY_KEY is specified in commandline, use it. Otherwise, use the key
+ // embedded in WebView apk.
+ CommandLine cl = CommandLine.getInstance();
+ if (cl.hasSwitch(ENABLE_DATA_REDUCTION_PROXY)) {
+ String key = cl.getSwitchValue(DATA_REDUCTION_PROXY_KEY, embeddedKey);
+ if (key == null || key.isEmpty()) {
+ return;
+ }
+
+ // Now we will enable DRP because we've got a commandline switch to enable it.
+ // We won't listen to Google Settings preference change because commandline switches
+ // trump that.
+ AwContentsStatics.setDataReductionProxyKey(key);
+ AwContentsStatics.setDataReductionProxyEnabled(true);
+ return;
+ }
+
+ // Now, there is no commandline switches to enable DRP, and reading the
+ // DRP key from WebView apk failed. Just return and leave DRP disabled.
+ if (embeddedKey == null || embeddedKey.isEmpty()) {
+ return;
+ }
+
+ applyDataReductionProxySettingsAsync(context, embeddedKey);
+ IntentFilter filter = new IntentFilter();
+ filter.addAction(WebView.DATA_REDUCTION_PROXY_SETTING_CHANGED);
+ mProxySettingListener = new ProxySettingListener(embeddedKey);
+ context.registerReceiver(mProxySettingListener, filter);
+ ContentResolver resolver = context.getContentResolver();
+ mProxySettingObserver = new ContentObserver(new Handler()) {
+ @Override
+ public void onChange(boolean selfChange, Uri uri) {
+ applyDataReductionProxySettingsAsync(context, embeddedKey);
+ }
+ };
+ resolver.registerContentObserver(
+ Uri.withAppendedPath(CONTENT_URI, WEBVIEW_DATA_REDUCTION_PROXY),
+ false, mProxySettingObserver);
+ }
+
+ private String readKey() {
+ try {
+ Class<?> cls = Class.forName(DRP_CLASS);
+ Field f = cls.getField("KEY");
+ return (String) f.get(null);
+ } catch (ClassNotFoundException ex) {
+ Log.e(TAG, "No DRP key due to exception:" + ex);
+ } catch (NoSuchFieldException ex) {
+ Log.e(TAG, "No DRP key due to exception:" + ex);
+ } catch (SecurityException ex) {
+ Log.e(TAG, "No DRP key due to exception:" + ex);
+ } catch (IllegalArgumentException ex) {
+ Log.e(TAG, "No DRP key due to exception:" + ex);
+ } catch (IllegalAccessException ex) {
+ Log.e(TAG, "No DRP key due to exception:" + ex);
+ } catch (NullPointerException ex) {
+ Log.e(TAG, "No DRP key due to exception:" + ex);
+ }
+ return null;
+ }
+
+ private static void applyDataReductionProxySettingsAsync(final Context context,
+ final String key) {
+ AsyncTask<Void, Void, Boolean> task = new AsyncTask<Void, Void, Boolean>() {
+ @Override
+ protected Boolean doInBackground(Void... params) {
+ return isDataReductionProxyEnabled(context);
+ }
+ @Override
+ protected void onPostExecute(Boolean enabled) {
+ if (enabled) {
+ // Set the data reduction proxy key.
+ AwContentsStatics.setDataReductionProxyKey(key);
+ }
+ AwContentsStatics.setDataReductionProxyEnabled(enabled);
+ }
+ };
+ task.execute();
+ }
+
+ private static boolean isDataReductionProxyEnabled(Context context) {
+ return getProxySetting(context.getContentResolver(),
+ WEBVIEW_DATA_REDUCTION_PROXY) != 0;
+ }
+
+ // Read query setting from GoogleSettings.
+ private static int getProxySetting(ContentResolver resolver, String name) {
+ String value = null;
+ Cursor c = null;
+ try {
+ c = resolver.query(CONTENT_URI, new String[] { "value" },
+ "name=?", new String[]{ name }, null);
+ if (c != null && c.moveToNext()) value = c.getString(0);
+ } catch (SQLException e) {
+ // SQL error: return null, but don't cache it.
+ Log.e(TAG, "Can't get key " + name + " from " + CONTENT_URI, e);
+ } finally {
+ if (c != null) c.close();
+ }
+ int enabled = 0;
+ try {
+ if (value != null) {
+ enabled = Integer.parseInt(value);
+ }
+ } catch (NumberFormatException e) {
+ Log.e(TAG, "cannot parse" + value, e);
+ }
+ return enabled;
+ }
+}
diff --git a/chromium/java/com/android/webview/chromium/DrawGLFunctor.java b/chromium/java/com/android/webview/chromium/DrawGLFunctor.java
index 7f7adeb..7805077 100644
--- a/chromium/java/com/android/webview/chromium/DrawGLFunctor.java
+++ b/chromium/java/com/android/webview/chromium/DrawGLFunctor.java
@@ -16,10 +16,12 @@
package com.android.webview.chromium;
-import android.view.HardwareCanvas;
-import android.view.ViewRootImpl;
+import android.view.View;
+import android.graphics.Canvas;
import android.util.Log;
+import com.android.webview.chromium.WebViewDelegateFactory.WebViewDelegate;
+
import org.chromium.content.common.CleanupReference;
// Simple Java abstraction and wrapper for the native DrawGLFunctor flow.
@@ -34,10 +36,12 @@ class DrawGLFunctor {
// Pointer to native side instance
private CleanupReference mCleanupReference;
private DestroyRunnable mDestroyRunnable;
+ private WebViewDelegate mWebViewDelegate;
- public DrawGLFunctor(long viewContext) {
- mDestroyRunnable = new DestroyRunnable(nativeCreateGLFunctor(viewContext));
+ public DrawGLFunctor(long viewContext, WebViewDelegate webViewDelegate) {
+ mDestroyRunnable = new DestroyRunnable(nativeCreateGLFunctor(viewContext), webViewDelegate);
mCleanupReference = new CleanupReference(this, mDestroyRunnable);
+ mWebViewDelegate = webViewDelegate;
}
public void destroy() {
@@ -46,6 +50,7 @@ class DrawGLFunctor {
mCleanupReference.cleanupNow();
mCleanupReference = null;
mDestroyRunnable = null;
+ mWebViewDelegate = null;
}
}
@@ -53,27 +58,29 @@ class DrawGLFunctor {
mDestroyRunnable.detachNativeFunctor();
}
- public boolean requestDrawGL(HardwareCanvas canvas, ViewRootImpl viewRootImpl,
+ public boolean requestDrawGL(Canvas canvas, View containerView,
boolean waitForCompletion) {
if (mDestroyRunnable.mNativeDrawGLFunctor == 0) {
throw new RuntimeException("requested DrawGL on already destroyed DrawGLFunctor");
}
- if (viewRootImpl == null) {
- // Can happen during teardown when window is leaked.
+
+ if (canvas != null && waitForCompletion) {
+ throw new IllegalArgumentException("requested a blocking DrawGL with a not null canvas.");
+ }
+
+ if (!mWebViewDelegate.canInvokeDrawGlFunctor(containerView)) {
return false;
}
- mDestroyRunnable.mViewRootImpl = viewRootImpl;
+ mDestroyRunnable.mContainerView = containerView;
+
if (canvas == null) {
- viewRootImpl.invokeFunctor(mDestroyRunnable.mNativeDrawGLFunctor, waitForCompletion);
+ mWebViewDelegate.invokeDrawGlFunctor(containerView,
+ mDestroyRunnable.mNativeDrawGLFunctor, waitForCompletion);
return true;
}
- canvas.callDrawGLFunction(mDestroyRunnable.mNativeDrawGLFunctor);
- if (waitForCompletion) {
- viewRootImpl.invokeFunctor(mDestroyRunnable.mNativeDrawGLFunctor,
- waitForCompletion);
- }
+ mWebViewDelegate.callDrawGlFunction(canvas, mDestroyRunnable.mNativeDrawGLFunctor);
return true;
}
@@ -85,10 +92,12 @@ class DrawGLFunctor {
// IMPORTANT: this class must not hold any reference back to the outer DrawGLFunctor
// instance, as that will defeat GC of that object.
private static final class DestroyRunnable implements Runnable {
- ViewRootImpl mViewRootImpl;
+ private WebViewDelegate mWebViewDelegate;
+ View mContainerView;
long mNativeDrawGLFunctor;
- DestroyRunnable(long nativeDrawGLFunctor) {
+ DestroyRunnable(long nativeDrawGLFunctor, WebViewDelegate webViewDelegate) {
mNativeDrawGLFunctor = nativeDrawGLFunctor;
+ mWebViewDelegate = webViewDelegate;
}
// Called when the outer DrawGLFunctor instance has been GC'ed, i.e this is its finalizer.
@@ -100,10 +109,12 @@ class DrawGLFunctor {
}
void detachNativeFunctor() {
- if (mNativeDrawGLFunctor != 0 && mViewRootImpl != null) {
- mViewRootImpl.detachFunctor(mNativeDrawGLFunctor);
+ if (mNativeDrawGLFunctor != 0 && mContainerView != null
+ && mWebViewDelegate != null) {
+ mWebViewDelegate.detachDrawGlFunctor(mContainerView, mNativeDrawGLFunctor);
}
- mViewRootImpl = null;
+ mContainerView = null;
+ mWebViewDelegate = null;
}
}
diff --git a/chromium/java/com/android/webview/chromium/ResourceRewriter.java b/chromium/java/com/android/webview/chromium/ResourceRewriter.java
index 683277a..7d035b7 100644
--- a/chromium/java/com/android/webview/chromium/ResourceRewriter.java
+++ b/chromium/java/com/android/webview/chromium/ResourceRewriter.java
@@ -17,7 +17,6 @@
package com.android.webview.chromium;
import android.content.Context;
-import android.util.SparseArray;
/**
* Helper class used to fix up resource ids.
@@ -27,29 +26,15 @@ import android.util.SparseArray;
*/
class ResourceRewriter {
- public static void rewriteRValues(Context ctx) {
- // Rewrite the R 'constants' for the WebView library apk.
- SparseArray<String> packageIdentifiers = ctx.getResources().getAssets()
- .getAssignedPackageIdentifiers();
-
- final int N = packageIdentifiers.size();
- for (int i = 0; i < N; i++) {
- final String name = packageIdentifiers.valueAt(i);
-
- // The resources are always called com.android.webview even if the manifest has had the
- // package renamed.
- if ("com.android.webview".equals(name)) {
- final int id = packageIdentifiers.keyAt(i);
-
- // TODO: We should use jarjar to remove the redundant R classes here, but due
- // to a bug in jarjar it's not possible to rename classes with '$' in their name.
- // See b/15684775.
- com.android.webview.chromium.R.onResourcesLoaded(id);
- org.chromium.ui.R.onResourcesLoaded(id);
- org.chromium.content.R.onResourcesLoaded(id);
-
- break;
- }
- }
+ /**
+ * Rewrite the R 'constants' for the WebView library apk.
+ */
+ public static void rewriteRValues(final int packageId) {
+ // TODO: We should use jarjar to remove the redundant R classes here, but due
+ // to a bug in jarjar it's not possible to rename classes with '$' in their name.
+ // See b/15684775.
+ com.android.webview.chromium.R.onResourcesLoaded(packageId);
+ org.chromium.ui.R.onResourcesLoaded(packageId);
+ org.chromium.content.R.onResourcesLoaded(packageId);
}
}
diff --git a/chromium/java/com/android/webview/chromium/WebViewChromium.java b/chromium/java/com/android/webview/chromium/WebViewChromium.java
index c08eb41..6cf4238 100644
--- a/chromium/java/com/android/webview/chromium/WebViewChromium.java
+++ b/chromium/java/com/android/webview/chromium/WebViewChromium.java
@@ -32,12 +32,12 @@ import android.net.http.SslCertificate;
import android.os.Build;
import android.os.Bundle;
import android.os.Looper;
+import android.os.Handler;
import android.os.Message;
import android.print.PrintDocumentAdapter;
import android.text.TextUtils;
import android.util.Base64;
import android.util.Log;
-import android.view.HardwareCanvas;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.MotionEvent;
@@ -70,6 +70,7 @@ import org.chromium.android_webview.AwLayoutSizer;
import org.chromium.android_webview.AwSettings;
import org.chromium.android_webview.AwPrintDocumentAdapter;
import org.chromium.base.ThreadUtils;
+import org.chromium.content.browser.SmartClipProvider;
import org.chromium.content_public.browser.LoadUrlParams;
import org.chromium.net.NetworkChangeNotifier;
@@ -93,7 +94,7 @@ import java.util.Queue;
* and a small set of no-op deprecated APIs.
*/
class WebViewChromium implements WebViewProvider,
- WebViewProvider.ScrollDelegate, WebViewProvider.ViewDelegate {
+ WebViewProvider.ScrollDelegate, WebViewProvider.ViewDelegate, SmartClipProvider {
private class WebViewChromiumRunQueue {
public WebViewChromiumRunQueue() {
@@ -166,8 +167,7 @@ class WebViewChromium implements WebViewProvider,
mAppTargetSdkVersion = mWebView.getContext().getApplicationInfo().targetSdkVersion;
mFactory = factory;
mRunQueue = new WebViewChromiumRunQueue();
- String webViewAssetPath = WebViewFactory.getLoadedPackageInfo().applicationInfo.sourceDir;
- mWebView.getContext().getAssets().addAssetPath(webViewAssetPath);
+ factory.getWebViewDelegate().addWebViewAssetPath(mWebView.getContext());
}
static void completeWindowCreation(WebView parent, WebView child) {
@@ -244,7 +244,8 @@ class WebViewChromium implements WebViewProvider,
final boolean areLegacyQuirksEnabled =
mAppTargetSdkVersion < Build.VERSION_CODES.KITKAT;
- mContentsClientAdapter = new WebViewContentsClientAdapter(mWebView);
+ mContentsClientAdapter = new WebViewContentsClientAdapter(
+ mWebView, mFactory.getWebViewDelegate());
mWebSettings = new ContentSettingsAdapter(new AwSettings(
mWebView.getContext(), isAccessFromFileURLsGrantedByDefault,
areLegacyQuirksEnabled));
@@ -318,7 +319,7 @@ class WebViewChromium implements WebViewProvider,
}
AwContentsStatics.setRecordFullDocument(sRecordWholeDocumentEnabledByApi ||
- mAppTargetSdkVersion < Build.VERSION_CODES.L);
+ mAppTargetSdkVersion < Build.VERSION_CODES.LOLLIPOP);
if (mAppTargetSdkVersion <= Build.VERSION_CODES.KITKAT) {
// On KK and older versions, JavaScript objects injected via addJavascriptInterface
@@ -1347,27 +1348,19 @@ class WebViewChromium implements WebViewProvider,
if (client == null) {
return false;
}
- Class<?> clientClass = client.getClass();
- boolean foundShowMethod = false;
- boolean foundHideMethod = false;
- while (clientClass != WebChromeClient.class && (!foundShowMethod || !foundHideMethod)) {
- if (!foundShowMethod) {
- try {
- clientClass.getDeclaredMethod("onShowCustomView", View.class,
- CustomViewCallback.class);
- foundShowMethod = true;
- } catch (NoSuchMethodException e) { }
- }
-
- if (!foundHideMethod) {
- try {
- clientClass.getDeclaredMethod("onHideCustomView");
- foundHideMethod = true;
- } catch (NoSuchMethodException e) { }
- }
- clientClass = clientClass.getSuperclass();
+ // If client is not a subclass of WebChromeClient then the methods have not been
+ // implemented because WebChromeClient has empty implementations.
+ if (client.getClass().isAssignableFrom(WebChromeClient.class)) {
+ return false;
+ }
+ try {
+ client.getClass().getDeclaredMethod("onShowCustomView", View.class,
+ CustomViewCallback.class);
+ client.getClass().getDeclaredMethod("onHideCustomView");
+ return true;
+ } catch (NoSuchMethodException e) {
+ return false;
}
- return foundShowMethod && foundHideMethod;
}
@Override
@@ -1883,7 +1876,17 @@ class WebViewChromium implements WebViewProvider,
}
@Override
- public void onScrollChanged(int l, int t, int oldl, int oldt) {
+ public void onScrollChanged(final int l, final int t, final int oldl, final int oldt) {
+ if (checkNeedsPost()) {
+ mRunQueue.addTask(new Runnable() {
+ @Override
+ public void run() {
+ onScrollChanged(l, t, oldl, oldt);
+ }
+ });
+ return;
+ }
+ mAwContents.onContainerViewScrollChanged(l, t, oldl, oldt);
}
@Override
@@ -2154,10 +2157,10 @@ class WebViewChromium implements WebViewProvider,
public boolean requestDrawGL(Canvas canvas, boolean waitForCompletion,
View containerView) {
if (mGLfunctor == null) {
- mGLfunctor = new DrawGLFunctor(mAwContents.getAwDrawGLViewContext());
+ mGLfunctor = new DrawGLFunctor(mAwContents.getAwDrawGLViewContext(),
+ mFactory.getWebViewDelegate());
}
- return mGLfunctor.requestDrawGL(
- (HardwareCanvas) canvas, containerView.getViewRootImpl(), waitForCompletion);
+ return mGLfunctor.requestDrawGL(canvas, containerView, waitForCompletion);
}
@Override
@@ -2254,4 +2257,19 @@ class WebViewChromium implements WebViewProvider,
return mWebViewPrivate.super_onHoverEvent(event);
}
}
+
+ // Implements SmartClipProvider
+ @Override
+ public void extractSmartClipData(int x, int y, int width, int height) {
+ checkThread();
+ mAwContents.extractSmartClipData(x, y, width, height);
+ }
+
+ // Implements SmartClipProvider
+ @Override
+ public void setSmartClipResultHandler(final Handler resultHandler) {
+ checkThread();
+ mAwContents.setSmartClipResultHandler(resultHandler);
+ }
+
}
diff --git a/chromium/java/com/android/webview/chromium/WebViewChromiumFactoryProvider.java b/chromium/java/com/android/webview/chromium/WebViewChromiumFactoryProvider.java
index 8043ad8..f54c964 100644
--- a/chromium/java/com/android/webview/chromium/WebViewChromiumFactoryProvider.java
+++ b/chromium/java/com/android/webview/chromium/WebViewChromiumFactoryProvider.java
@@ -16,10 +16,10 @@
package com.android.webview.chromium;
+import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.app.ActivityManager;
-import android.app.ActivityThread;
import android.content.ComponentCallbacks2;
import android.content.Context;
import android.content.Intent;
@@ -28,8 +28,6 @@ import android.net.Uri;
import android.os.Build;
import android.os.Looper;
import android.os.StrictMode;
-import android.os.SystemProperties;
-import android.os.Trace;
import android.util.Log;
import android.webkit.CookieManager;
import android.webkit.GeolocationPermissions;
@@ -41,6 +39,8 @@ import android.webkit.WebViewFactory;
import android.webkit.WebViewFactoryProvider;
import android.webkit.WebViewProvider;
+import com.android.webview.chromium.WebViewDelegateFactory.WebViewDelegate;
+
import org.chromium.android_webview.AwBrowserContext;
import org.chromium.android_webview.AwBrowserProcess;
import org.chromium.android_webview.AwContents;
@@ -96,9 +96,26 @@ public class WebViewChromiumFactoryProvider implements WebViewFactoryProvider {
// Read/write protected by mLock.
private boolean mStarted;
+ private DataReductionProxyManager mProxyManager;
private SharedPreferences mWebViewPrefs;
+ private WebViewDelegate mWebViewDelegate;
+ /**
+ * Constructor called by the API 21 version of {@link WebViewFactory} and earlier.
+ */
public WebViewChromiumFactoryProvider() {
+ initialize(WebViewDelegateFactory.createApi21CompatibilityDelegate());
+ }
+
+ /**
+ * Constructor called by the API 22 version of {@link WebViewFactory} and later.
+ */
+ public WebViewChromiumFactoryProvider(android.webkit.WebViewDelegate delegate) {
+ initialize(WebViewDelegateFactory.createProxyDelegate(delegate));
+ }
+
+ private void initialize(WebViewDelegate webViewDelegate) {
+ mWebViewDelegate = webViewDelegate;
if (isBuildDebuggable()) {
// Suppress the StrictMode violation as this codepath is only hit on debugglable builds.
StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskReads();
@@ -117,21 +134,26 @@ public class WebViewChromiumFactoryProvider implements WebViewFactoryProvider {
ThreadUtils.setWillOverrideUiThread();
// Load chromium library.
- Trace.traceBegin(Trace.TRACE_TAG_WEBVIEW, "AwBrowserProcess.loadLibrary()");
AwBrowserProcess.loadLibrary();
- Trace.traceEnd(Trace.TRACE_TAG_WEBVIEW);
+
+ final PackageInfo packageInfo = WebViewFactory.getLoadedPackageInfo();
+
+ // Register the handler that will append the WebView version to logcat in case of a crash.
+ AwContentsStatics.registerCrashHandler(
+ "Version " + packageInfo.versionName + " (code " + packageInfo.versionCode + ")");
+
// Load glue-layer support library.
System.loadLibrary("webviewchromium_plat_support");
// Use shared preference to check for package downgrade.
- mWebViewPrefs = ActivityThread.currentApplication().getSharedPreferences(
+ mWebViewPrefs = mWebViewDelegate.getApplication().getSharedPreferences(
CHROMIUM_PREFS_NAME, Context.MODE_PRIVATE);
int lastVersion = mWebViewPrefs.getInt(VERSION_CODE_PREF, 0);
- int currentVersion = WebViewFactory.getLoadedPackageInfo().versionCode;
+ int currentVersion = packageInfo.versionCode;
if (lastVersion > currentVersion) {
// The WebView package has been downgraded since we last ran in this application.
// Delete the WebView data directory's contents.
- String dataDir = PathUtils.getDataDirectory(ActivityThread.currentApplication());
+ String dataDir = PathUtils.getDataDirectory(mWebViewDelegate.getApplication());
Log.i(TAG, "WebView package downgraded from " + lastVersion + " to " + currentVersion +
"; deleting contents of " + dataDir);
deleteContents(new File(dataDir));
@@ -166,21 +188,6 @@ public class WebViewChromiumFactoryProvider implements WebViewFactoryProvider {
AwContents.setAwDrawGLFunctionTable(GraphicsUtils.getDrawGLFunctionTable());
}
- private static void initTraceEvent() {
- syncATraceState();
- SystemProperties.addChangeCallback(new Runnable() {
- @Override
- public void run() {
- syncATraceState();
- }
- });
- }
-
- private static void syncATraceState() {
- long enabledFlags = SystemProperties.getLong("debug.atrace.tags.enableflags", 0);
- TraceEvent.setATraceEnabled((enabledFlags & Trace.TRACE_TAG_WEBVIEW) != 0);
- }
-
private void ensureChromiumStartedLocked(boolean onMainThread) {
assert Thread.holdsLock(mLock);
@@ -250,15 +257,22 @@ public class WebViewChromiumFactoryProvider implements WebViewFactoryProvider {
"/system/framework/webview/paks");
// Make sure that ResourceProvider is initialized before starting the browser process.
- setUpResources(ActivityThread.currentApplication());
+ setUpResources(mWebViewDelegate.getApplication());
initPlatSupportLibrary();
- AwBrowserProcess.start(ActivityThread.currentApplication());
+ AwBrowserProcess.start(mWebViewDelegate.getApplication());
- if (Build.IS_DEBUGGABLE) {
+ if (isBuildDebuggable()) {
setWebContentsDebuggingEnabled(true);
}
- initTraceEvent();
+ TraceEvent.setATraceEnabled(mWebViewDelegate.isTraceTagEnabled());
+ mWebViewDelegate.setOnTraceEnabledChangeListener(
+ new WebViewDelegate.OnTraceEnabledChangeListener() {
+ @Override
+ public void onTraceEnabledChange(boolean enabled) {
+ TraceEvent.setATraceEnabled(enabled);
+ }
+ });
mStarted = true;
for (WeakReference<WebViewChromium> wvc : mWebViewsToStart) {
@@ -269,6 +283,10 @@ public class WebViewChromiumFactoryProvider implements WebViewFactoryProvider {
}
mWebViewsToStart.clear();
mWebViewsToStart = null;
+
+ // Start listening for data reduction proxy setting changes.
+ mProxyManager = new DataReductionProxyManager();
+ mProxyManager.start(mWebViewDelegate.getApplication());
}
boolean hasStarted() {
@@ -309,10 +327,13 @@ public class WebViewChromiumFactoryProvider implements WebViewFactoryProvider {
mDevToolsServer.setRemoteDebuggingEnabled(enable);
}
- private void setUpResources(Context ctx) {
- ResourceRewriter.rewriteRValues(ctx);
+ private void setUpResources(Context context) {
+ // The resources are always called com.android.webview even if the manifest has had the
+ // package renamed.
+ ResourceRewriter.rewriteRValues(
+ mWebViewDelegate.getPackageId(context.getResources(), "com.android.webview"));
- AwResource.setResources(ctx.getResources());
+ AwResource.setResources(context.getResources());
AwResource.setErrorPageResources(android.R.raw.loaderror,
android.R.raw.nodomain);
AwResource.setConfigKeySystemUuidMapping(
@@ -341,7 +362,7 @@ public class WebViewChromiumFactoryProvider implements WebViewFactoryProvider {
@Override
public void setWebContentsDebuggingEnabled(boolean enable) {
// Web Contents debugging is always enabled on debug builds.
- if (!Build.IS_DEBUGGABLE) {
+ if (!isBuildDebuggable()) {
WebViewChromiumFactoryProvider.this.
setWebContentsDebuggingEnabled(enable);
}
@@ -410,7 +431,7 @@ public class WebViewChromiumFactoryProvider implements WebViewFactoryProvider {
// will bring up just the parts it needs to make this work on a temporary
// basis until Chromium is started for real. The temporary cookie manager
// needs the application context to have been set.
- ContentMain.initApplicationContext(ActivityThread.currentApplication());
+ ContentMain.initApplicationContext(mWebViewDelegate.getApplication());
}
mCookieManager = new CookieManagerAdapter(new AwCookieManager());
}
@@ -453,4 +474,8 @@ public class WebViewChromiumFactoryProvider implements WebViewFactoryProvider {
}
return mWebViewDatabase;
}
+
+ WebViewDelegate getWebViewDelegate() {
+ return mWebViewDelegate;
+ }
}
diff --git a/chromium/java/com/android/webview/chromium/WebViewContentsClientAdapter.java b/chromium/java/com/android/webview/chromium/WebViewContentsClientAdapter.java
index 24c0ebc..6b4b894 100644
--- a/chromium/java/com/android/webview/chromium/WebViewContentsClientAdapter.java
+++ b/chromium/java/com/android/webview/chromium/WebViewContentsClientAdapter.java
@@ -24,7 +24,6 @@ import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Picture;
-import android.net.http.ErrorStrings;
import android.net.http.SslError;
import android.net.Uri;
import android.os.Build;
@@ -52,6 +51,8 @@ import android.webkit.WebResourceRequest;
import android.webkit.WebView;
import android.webkit.WebViewClient;
+import com.android.webview.chromium.WebViewDelegateFactory.WebViewDelegate;
+
import org.chromium.android_webview.AwContentsClient;
import org.chromium.android_webview.AwContentsClientBridge;
import org.chromium.android_webview.AwHttpAuthHandler;
@@ -107,6 +108,8 @@ public class WebViewContentsClientAdapter extends AwContentsClient {
// The listener receiving notifications of screen updates.
private WebView.PictureListener mPictureListener;
+ private WebViewDelegate mWebViewDelegate;
+
private DownloadListener mDownloadListener;
private Handler mUiThreadHandler;
@@ -120,12 +123,13 @@ public class WebViewContentsClientAdapter extends AwContentsClient {
*
* @param webView the {@link WebView} instance that this adapter is serving.
*/
- WebViewContentsClientAdapter(WebView webView) {
- if (webView == null) {
- throw new IllegalArgumentException("webView can't be null");
+ WebViewContentsClientAdapter(WebView webView, WebViewDelegate webViewDelegate) {
+ if (webView == null || webViewDelegate == null) {
+ throw new IllegalArgumentException("webView or delegate can't be null");
}
mWebView = webView;
+ mWebViewDelegate = webViewDelegate;
setWebViewClient(null);
mUiThreadHandler = new Handler() {
@@ -531,7 +535,7 @@ public class WebViewContentsClientAdapter extends AwContentsClient {
// ErrorStrings is @hidden, so we can't do this in AwContents.
// Normally the net/ layer will set a valid description, but for synthesized callbacks
// (like in the case for intercepted requests) AwContents will pass in null.
- description = ErrorStrings.getString(errorCode, mWebView.getContext());
+ description = mWebViewDelegate.getErrorString(mWebView.getContext(), errorCode);
}
TraceEvent.begin();
if (TRACE) Log.d(TAG, "onReceivedError=" + failingUrl);
diff --git a/chromium/java/com/android/webview/chromium/WebViewDelegateFactory.java b/chromium/java/com/android/webview/chromium/WebViewDelegateFactory.java
new file mode 100644
index 0000000..2bf6f14
--- /dev/null
+++ b/chromium/java/com/android/webview/chromium/WebViewDelegateFactory.java
@@ -0,0 +1,343 @@
+package com.android.webview.chromium;
+
+import android.app.Application;
+import android.content.Context;
+import android.content.pm.PackageInfo;
+import android.content.res.AssetManager;
+import android.content.res.Resources;
+import android.graphics.Canvas;
+import android.os.Trace;
+import android.util.SparseArray;
+import android.view.View;
+
+
+import java.lang.reflect.Method;
+
+/**
+ * Factory class for {@link WebViewDelegate com.android.webview.chromium.WebViewDelegate}s.
+ *
+ * <p>{@link WebViewDelegate com.android.webview.chromium.WebViewDelegate}s provide the same
+ * interface as {@link android.webkit.WebViewDelegate android.webkit.WebViewDelegate} but without
+ * a dependency on the webkit class. Defining our own
+ * {@link WebViewDelegate com.android.webview.chromium.WebViewDelegate} in frameworks/webview
+ * allows the WebView apk to be binary compatible with the API 21 version of the framework, in
+ * which {@link android.webkit.WebViewDelegate android.webkit.WebViewDelegate} had not yet been
+ * introduced.
+ *
+ * <p>The {@link WebViewDelegate com.android.webview.chromium.WebViewDelegate} interface and this
+ * factory class can be removed once we don't longer need to support WebView apk updates to devices
+ * running the API 21 version of the framework. At that point, we should use
+ * {@link android.webkit.WebViewDelegate android.webkit.WebViewDelegate} directly instead.
+ */
+class WebViewDelegateFactory {
+
+ /**
+ * Copy of {@link android.webkit.WebViewDelegate android.webkit.WebViewDelegate}'s interface.
+ * See {@link WebViewDelegateFactory} for the reasons why this copy is needed.
+ */
+ interface WebViewDelegate {
+ /** @see android.webkit.WebViewDelegate.OnTraceEnabledChangeListener */
+ interface OnTraceEnabledChangeListener {
+ void onTraceEnabledChange(boolean enabled);
+ }
+
+ /** @see android.webkit.WebViewDelegate#setOnTraceEnabledChangeListener */
+ void setOnTraceEnabledChangeListener(final OnTraceEnabledChangeListener listener);
+
+ /** @see android.webkit.WebViewDelegate#isTraceTagEnabled */
+ boolean isTraceTagEnabled();
+
+ /** @see android.webkit.WebViewDelegate#canInvokeDrawGlFunctor */
+ boolean canInvokeDrawGlFunctor(View containerView);
+
+ /** @see android.webkit.WebViewDelegate#invokeDrawGlFunctor */
+ void invokeDrawGlFunctor(View containerView, long nativeDrawGLFunctor,
+ boolean waitForCompletion);
+
+ /** @see android.webkit.WebViewDelegate#callDrawGlFunction */
+ void callDrawGlFunction(Canvas canvas, long nativeDrawGLFunctor);
+
+ /** @see android.webkit.WebViewDelegate#detachDrawGlFunctor */
+ void detachDrawGlFunctor(View containerView, long nativeDrawGLFunctor);
+
+ /** @see android.webkit.WebViewDelegate#getPackageId */
+ int getPackageId(Resources resources, String packageName);
+
+ /** @see android.webkit.WebViewDelegate#getApplication */
+ Application getApplication();
+
+ /** @see android.webkit.WebViewDelegate#getErrorString */
+ String getErrorString(Context context, int errorCode);
+
+ /** @see android.webkit.WebViewDelegate#addWebViewAssetPath */
+ void addWebViewAssetPath(Context context);
+ }
+
+ /**
+ * Creates a {@link WebViewDelegate com.android.webview.chromium.WebViewDelegate} that proxies
+ * requests to the given {@link android.webkit.WebViewDelegate android.webkit.WebViewDelegate}.
+ *
+ * @return the created delegate
+ */
+ static WebViewDelegate createProxyDelegate(android.webkit.WebViewDelegate delegate) {
+ return new ProxyDelegate(delegate);
+ }
+
+ /**
+ * Creates a {@link WebViewDelegate com.android.webview.chromium.WebViewDelegate} compatible
+ * with the API 21 version of the framework in which
+ * {@link android.webkit.WebViewDelegate android.webkit.WebViewDelegate} had not yet been
+ * introduced.
+ *
+ * @return the created delegate
+ */
+ static WebViewDelegate createApi21CompatibilityDelegate() {
+ return new Api21CompatibilityDelegate();
+ }
+
+ /**
+ * A {@link WebViewDelegate com.android.webview.chromium.WebViewDelegate} that proxies requests
+ * to a {@link android.webkit.WebViewDelegate android.webkit.WebViewDelegate}.
+ */
+ private static class ProxyDelegate implements WebViewDelegate {
+
+ android.webkit.WebViewDelegate delegate;
+
+ ProxyDelegate(android.webkit.WebViewDelegate delegate) {
+ this.delegate = delegate;
+ }
+
+ @Override
+ public void setOnTraceEnabledChangeListener(final OnTraceEnabledChangeListener listener) {
+ delegate.setOnTraceEnabledChangeListener(
+ new android.webkit.WebViewDelegate.OnTraceEnabledChangeListener() {
+ @Override
+ public void onTraceEnabledChange(boolean enabled) {
+ listener.onTraceEnabledChange(enabled);
+ ;
+ }
+ });
+ }
+
+ @Override
+ public boolean isTraceTagEnabled() {
+ return delegate.isTraceTagEnabled();
+ }
+
+ @Override
+ public boolean canInvokeDrawGlFunctor(View containerView) {
+ return delegate.canInvokeDrawGlFunctor(containerView);
+ }
+
+ @Override
+ public void invokeDrawGlFunctor(View containerView, long nativeDrawGLFunctor,
+ boolean waitForCompletion) {
+ delegate.invokeDrawGlFunctor(containerView, nativeDrawGLFunctor, waitForCompletion);
+ }
+
+ @Override
+ public void callDrawGlFunction(Canvas canvas, long nativeDrawGLFunctor) {
+ delegate.callDrawGlFunction(canvas, nativeDrawGLFunctor);
+ }
+
+ @Override
+ public void detachDrawGlFunctor(View containerView, long nativeDrawGLFunctor) {
+ delegate.detachDrawGlFunctor(containerView, nativeDrawGLFunctor);
+ }
+
+ @Override
+ public int getPackageId(Resources resources, String packageName) {
+ return delegate.getPackageId(resources, packageName);
+ }
+
+ @Override
+ public Application getApplication() {
+ return delegate.getApplication();
+ }
+
+ @Override
+ public String getErrorString(Context context, int errorCode) {
+ return delegate.getErrorString(context, errorCode);
+ }
+
+ @Override
+ public void addWebViewAssetPath(Context context) {
+ delegate.addWebViewAssetPath(context);
+ }
+ }
+
+ /**
+ * A {@link WebViewDelegate com.android.webview.chromium.WebViewDelegate} compatible with the
+ * API 21 version of the framework in which
+ * {@link android.webkit.WebViewDelegate android.webkit.WebViewDelegate} had not yet been
+ * introduced.
+ *
+ * <p>This class implements the
+ * {@link WebViewDelegate com.android.webview.chromium.WebViewDelegate} functionality by using
+ * reflection to call into hidden frameworks APIs released in the API-21 version of the
+ * framework.
+ */
+ private static class Api21CompatibilityDelegate implements WebViewDelegate {
+ /** Copy of Trace.TRACE_TAG_WEBVIEW */
+ private final static long TRACE_TAG_WEBVIEW = 1L << 4;
+
+ /** Hidden APIs released in the API 21 version of the framework */
+ private final Method mIsTagEnabledMethod;
+ private final Method mAddChangeCallbackMethod;
+ private final Method mGetViewRootImplMethod;
+ private final Method mInvokeFunctorMethod;
+ private final Method mCallDrawGLFunctionMethod;
+ private final Method mDetachFunctorMethod;
+ private final Method mGetAssignedPackageIdentifiersMethod;
+ private final Method mAddAssetPathMethod;
+ private final Method mCurrentApplicationMethod;
+ private final Method mGetStringMethod;
+ private final Method mGetLoadedPackageInfoMethod;
+
+ Api21CompatibilityDelegate() {
+ try {
+ // Important: This reflection essentially defines a snapshot of some hidden APIs
+ // at version 21 of the framework for compatibility reasons, and the reflection
+ // should not be changed even if those hidden APIs change in future releases.
+ mIsTagEnabledMethod = Trace.class.getMethod("isTagEnabled", long.class);
+ mAddChangeCallbackMethod = Class.forName("android.os.SystemProperties")
+ .getMethod("addChangeCallback", Runnable.class);
+ mGetViewRootImplMethod = View.class.getMethod("getViewRootImpl");
+ mInvokeFunctorMethod = Class.forName("android.view.ViewRootImpl")
+ .getMethod("invokeFunctor", long.class, boolean.class);
+ mDetachFunctorMethod = Class.forName("android.view.ViewRootImpl")
+ .getMethod("detachFunctor", long.class);
+ mCallDrawGLFunctionMethod = Class.forName("android.view.HardwareCanvas")
+ .getMethod("callDrawGLFunction", long.class);
+ mGetAssignedPackageIdentifiersMethod = AssetManager.class.getMethod(
+ "getAssignedPackageIdentifiers");
+ mAddAssetPathMethod = AssetManager.class.getMethod(
+ "addAssetPath", String.class);
+ mCurrentApplicationMethod = Class.forName("android.app.ActivityThread")
+ .getMethod("currentApplication");
+ mGetStringMethod = Class.forName("android.net.http.ErrorStrings")
+ .getMethod("getString", int.class, Context.class);
+ mGetLoadedPackageInfoMethod = Class.forName("android.webkit.WebViewFactory")
+ .getMethod("getLoadedPackageInfo");
+ } catch (Exception e) {
+ throw new RuntimeException("Invalid reflection", e);
+ }
+ }
+
+ @Override
+ public void setOnTraceEnabledChangeListener(final OnTraceEnabledChangeListener listener) {
+ try {
+ mAddChangeCallbackMethod.invoke(null, new Runnable() {
+ @Override
+ public void run() {
+ listener.onTraceEnabledChange(isTraceTagEnabled());
+ }
+ });
+ } catch (Exception e) {
+ throw new RuntimeException("Invalid reflection", e);
+ }
+ }
+
+ @Override
+ public boolean isTraceTagEnabled() {
+ try {
+ return ((Boolean) mIsTagEnabledMethod.invoke(null, TRACE_TAG_WEBVIEW));
+ } catch (Exception e) {
+ throw new RuntimeException("Invalid reflection", e);
+ }
+ }
+
+ @Override
+ public boolean canInvokeDrawGlFunctor(View containerView) {
+ try {
+ Object viewRootImpl = mGetViewRootImplMethod.invoke(containerView);
+ // viewRootImpl can be null during teardown when window is leaked.
+ return viewRootImpl != null;
+ } catch (Exception e) {
+ throw new RuntimeException("Invalid reflection", e);
+ }
+ }
+
+ @Override
+ public void invokeDrawGlFunctor(View containerView, long nativeDrawGLFunctor,
+ boolean waitForCompletion) {
+ try {
+ Object viewRootImpl = mGetViewRootImplMethod.invoke(containerView);
+ if (viewRootImpl != null) {
+ mInvokeFunctorMethod.invoke(viewRootImpl, nativeDrawGLFunctor, waitForCompletion);
+ }
+ } catch (Exception e) {
+ throw new RuntimeException("Invalid reflection", e);
+ }
+ }
+
+ @Override
+ public void callDrawGlFunction(Canvas canvas, long nativeDrawGLFunctor) {
+ try {
+ mCallDrawGLFunctionMethod.invoke(canvas, nativeDrawGLFunctor);
+ } catch (Exception e) {
+ throw new RuntimeException("Invalid reflection", e);
+ }
+ }
+
+ @Override
+ public void detachDrawGlFunctor(View containerView, long nativeDrawGLFunctor) {
+ try {
+ Object viewRootImpl = mGetViewRootImplMethod.invoke(containerView);
+ if (viewRootImpl != null) {
+ mDetachFunctorMethod.invoke(viewRootImpl, nativeDrawGLFunctor);
+ }
+ } catch (Exception e) {
+ throw new RuntimeException("Invalid reflection", e);
+ }
+ }
+
+ @Override
+ public int getPackageId(Resources resources, String packageName) {
+ try {
+ SparseArray packageIdentifiers =
+ (SparseArray) mGetAssignedPackageIdentifiersMethod.invoke(
+ resources.getAssets());
+ for (int i = 0; i < packageIdentifiers.size(); i++) {
+ final String name = (String) packageIdentifiers.valueAt(i);
+
+ if (packageName.equals(name)) {
+ return packageIdentifiers.keyAt(i);
+ }
+ }
+ } catch (Exception e) {
+ throw new RuntimeException("Invalid reflection", e);
+ }
+ throw new RuntimeException("Package not found: " + packageName);
+ }
+
+ @Override
+ public Application getApplication() {
+ try {
+ return (Application) mCurrentApplicationMethod.invoke(null);
+ } catch (Exception e) {
+ throw new RuntimeException("Invalid reflection", e);
+ }
+ }
+
+ @Override
+ public String getErrorString(Context context, int errorCode) {
+ try {
+ return (String) mGetStringMethod.invoke(null, errorCode, context);
+ } catch (Exception e) {
+ throw new RuntimeException("Invalid reflection", e);
+ }
+ }
+
+ @Override
+ public void addWebViewAssetPath(Context context) {
+ try {
+ PackageInfo info = (PackageInfo) mGetLoadedPackageInfoMethod.invoke(null);
+ mAddAssetPathMethod.invoke(context.getAssets(), info.applicationInfo.sourceDir);
+ } catch (Exception e) {
+ throw new RuntimeException("Invalid reflection", e);
+ }
+ }
+ }
+}
+
diff --git a/chromium/listing/res/values-bn-rBD/strings.xml b/chromium/listing/res/values-bn-rBD/strings.xml
new file mode 100644
index 0000000..b8b4505
--- /dev/null
+++ b/chromium/listing/res/values-bn-rBD/strings.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (c) 2014 The Chromium Authors. All rights reserved.
+
+ Use of this source code is governed by a BSD-style license that can be
+ found in the LICENSE file.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="webviewgoogle_play_store_title" msgid="6227907912304696478">"Android সিস্টেম WebView"</string>
+ <string name="webviewgoogle_play_store_tagline" msgid="825305078705915422">"Chrome কর্তৃক চালিত, অ্যাপ্লিকেশানগুলির জন্য ওয়েব সামগ্রী"</string>
+ <string name="webviewgoogle_play_store_description" msgid="3054088773113944489">"Android Webview হল Chrome কর্তৃক চালিত একটি সিস্টেম উপাদান যা Android অ্যাপ্লিকেশানগুলিকে ওয়েব সামগ্রীগুলির প্রদর্শন করতে মঞ্জুরি প্রদান করে৷ এই উপাদানটি আপনার ডিভাইসে আগে থেকেই ইনস্টল করা থাকে এবং আপনার কাছে আধুনিক সুরক্ষা আপডেট এবং অন্যান্য ত্রুটি সংশোধনগুলি আছে কিনা তা নিশ্চিত করতে সেটিকে আপ টু ডেট করে রাখা উচিৎ৷"</string>
+</resources>
diff --git a/chromium/listing/res/values-eu-rES/strings.xml b/chromium/listing/res/values-eu-rES/strings.xml
new file mode 100644
index 0000000..c71ae18
--- /dev/null
+++ b/chromium/listing/res/values-eu-rES/strings.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (c) 2014 The Chromium Authors. All rights reserved.
+
+ Use of this source code is governed by a BSD-style license that can be
+ found in the LICENSE file.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="webviewgoogle_play_store_title" msgid="6227907912304696478">"Android sistemaren Web-ikuspegia"</string>
+ <string name="webviewgoogle_play_store_tagline" msgid="825305078705915422">"Aplikazioetarako web-edukia, Chrome teknologiarekin"</string>
+ <string name="webviewgoogle_play_store_description" msgid="3054088773113944489">"Android Web-ikuspegia Chrome-ren teknologia darabilen sistemaren osagaia da eta web-edukia bistaratzea baimentzen die Android aplikazioei. Osagaia instalatuta dator gailuan eta eguneratuta izan behar da azken segurtasun-eguneratzeak eta bestelako konponketak eginda dituzula ziurtatzeko."</string>
+</resources>
diff --git a/chromium/listing/res/values-gl-rES/strings.xml b/chromium/listing/res/values-gl-rES/strings.xml
new file mode 100644
index 0000000..703ff13
--- /dev/null
+++ b/chromium/listing/res/values-gl-rES/strings.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (c) 2014 The Chromium Authors. All rights reserved.
+
+ Use of this source code is governed by a BSD-style license that can be
+ found in the LICENSE file.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="webviewgoogle_play_store_title" msgid="6227907912304696478">"Sistema de Android WebView"</string>
+ <string name="webviewgoogle_play_store_tagline" msgid="825305078705915422">"Contido da web para aplicacións con tecnoloxía de Chrome"</string>
+ <string name="webviewgoogle_play_store_description" msgid="3054088773113944489">"Android Webview é un compoñente do sistema con tecnoloxía de Chrome que permite ás aplicacións de Android visualizar contido web. Este compoñente está preinstalado no teu dispositivo e debe manterse actualizado para garantir que tes as últimas actualizacións de seguridade e outras correccións de erros."</string>
+</resources>
diff --git a/chromium/listing/res/values-is-rIS/strings.xml b/chromium/listing/res/values-is-rIS/strings.xml
new file mode 100644
index 0000000..2790d65
--- /dev/null
+++ b/chromium/listing/res/values-is-rIS/strings.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (c) 2014 The Chromium Authors. All rights reserved.
+
+ Use of this source code is governed by a BSD-style license that can be
+ found in the LICENSE file.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="webviewgoogle_play_store_title" msgid="6227907912304696478">"Android System WebView"</string>
+ <string name="webviewgoogle_play_store_tagline" msgid="825305078705915422">"Vefefni fyrir forrit, knúið af Chrome"</string>
+ <string name="webviewgoogle_play_store_description" msgid="3054088773113944489">"Android Webview er kerfisíhlutur knúinn af Chrome sem gerir Android forritum kleift að birta vefefni. Íhluturinn er foruppsettur í tækinu og þú ættir að halda honum uppfærðum til að tryggja að nýjustu öryggisuppfærslur og aðrar villuleiðréttingar séu til staðar."</string>
+</resources>
diff --git a/chromium/listing/res/values-it/strings.xml b/chromium/listing/res/values-it/strings.xml
index 26a160a..9c5f556 100644
--- a/chromium/listing/res/values-it/strings.xml
+++ b/chromium/listing/res/values-it/strings.xml
@@ -9,5 +9,5 @@
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="webviewgoogle_play_store_title" msgid="6227907912304696478">"Android System WebView"</string>
<string name="webviewgoogle_play_store_tagline" msgid="825305078705915422">"Contenuti web per le app, con tecnologia Chrome"</string>
- <string name="webviewgoogle_play_store_description" msgid="3054088773113944489">"Android Webview è un componente di sistema con tecnologia Chrome che consente alle app Android di visualizzare contenuti web. Questo componente è preinstallato sul dispositivo e deve essere costantemente aggiornato per disporre degli aggiornamenti della sicurezza più recenti e altre correzioni di bug."</string>
+ <string name="webviewgoogle_play_store_description" msgid="3054088773113944489">"Android Webview è un componente di sistema con tecnologia Chrome che consente alle app Android di mostrare contenuti web. Questo componente è preinstallato sul dispositivo e deve essere costantemente aggiornato per disporre degli aggiornamenti della sicurezza più recenti e altre correzioni di bug."</string>
</resources>
diff --git a/chromium/listing/res/values-ka-rGE/strings.xml b/chromium/listing/res/values-ka-rGE/strings.xml
index 3b4f12d..1ecabe0 100644
--- a/chromium/listing/res/values-ka-rGE/strings.xml
+++ b/chromium/listing/res/values-ka-rGE/strings.xml
@@ -8,6 +8,6 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="webviewgoogle_play_store_title" msgid="6227907912304696478">"Android System WebView"</string>
- <string name="webviewgoogle_play_store_tagline" msgid="825305078705915422">"ვებ-ქონთენთი აპებისთვის, Chrome-ს მხარდაჭერით"</string>
+ <string name="webviewgoogle_play_store_tagline" msgid="825305078705915422">"ვებ-ქონთენთი აპებისთვის, Chrome-ის მხარდაჭერით"</string>
<string name="webviewgoogle_play_store_description" msgid="3054088773113944489">"Android Webview სისტემური კომპონენტია, Chrome-ის მიერ მხარდაჭერილი, რომელიც Android-ის აპებს ვებ-ქონთენთის ჩვენების საშუალებას აძლევს. ეს კომპონენტი თქვენს მოწყობილობაზე წინასწარ არის დაყენებული და განახლებული უნდა იყოს, რათა მუდამ შეძლოთ უახლესი უსაფრთხოების განახლებებითა და ხარვეზების სხვა შესწორებებით სარგებლობა."</string>
</resources>
diff --git a/chromium/listing/res/values-kk-rKZ/strings.xml b/chromium/listing/res/values-kk-rKZ/strings.xml
new file mode 100644
index 0000000..7810222
--- /dev/null
+++ b/chromium/listing/res/values-kk-rKZ/strings.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (c) 2014 The Chromium Authors. All rights reserved.
+
+ Use of this source code is governed by a BSD-style license that can be
+ found in the LICENSE file.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="webviewgoogle_play_store_title" msgid="6227907912304696478">"Android System WebView"</string>
+ <string name="webviewgoogle_play_store_tagline" msgid="825305078705915422">"Қолданбаларға арналған веб-мазмұн, Chrome браузеріне негізделген"</string>
+ <string name="webviewgoogle_play_store_description" msgid="3054088773113944489">"Android Webview – Android қолданбаларына веб-мазмұнды көрсетуге мүмкіндік беретін Chrome браузеріне негізделген жүйелік құрамдас. Бұл құрамдас құрылғыңызда алдын ала орнатылған және соңғы қауіпсіздік жаңартуларын және басқа қателерді түзетулерді алып отыруды қамтамасыз ету үшін оны жаңартылған күйде сақтау керек."</string>
+</resources>
diff --git a/chromium/listing/res/values-kn-rIN/strings.xml b/chromium/listing/res/values-kn-rIN/strings.xml
new file mode 100644
index 0000000..dc9db21
--- /dev/null
+++ b/chromium/listing/res/values-kn-rIN/strings.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (c) 2014 The Chromium Authors. All rights reserved.
+
+ Use of this source code is governed by a BSD-style license that can be
+ found in the LICENSE file.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="webviewgoogle_play_store_title" msgid="6227907912304696478">"Android ಸಿಸ್ಟಂ ವೆಬ್‌ವೀಕ್ಷಣೆ"</string>
+ <string name="webviewgoogle_play_store_tagline" msgid="825305078705915422">"Chrome ಸಂಚಾಲಿತ, ಅಪ್ಲಿಕೇಶನ್‌ಗಳಿಗಾಗಿ ವೆಬ್ ವಿಷಯ"</string>
+ <string name="webviewgoogle_play_store_description" msgid="3054088773113944489">"Android ವೆಬ್‌ವೀಕ್ಷಣೆಯು Android ಅಪ್ಲಿಕೇಶನ್‌ಗಳಿಗೆ ವೆಬ್ ವಿಷಯವನ್ನು ಪ್ರದರ್ಶೀಸಲು ಅನುಮತಿಸುವ Chrome ನಿಂದ ಸಂಚಾಲಿತವಾಗಿರುವ ಸಿಸ್ಟಂನ ಅಂಶವಾಗಿದೆ. ಈ ಅಂಶವನ್ನು ನಿಮ್ಮ ಸಾಧನದಲ್ಲಿ ಮೊದಲೇ ಸ್ಥಾಪಿಸಲಾಗಿದ್ದು ಮತ್ತು ನೀವು ಇತ್ತೀಚಿನ ಭದ್ರತೆ ನವೀಕರಣಗಳು ಹಾಗೂ ಇತರೆ ದೋಷ ಪರಿಹಾರಗಳನ್ನು ಹೊಂದಿರುವಿರಿ ಎಂಬುದನ್ನು ಖಚಿತಪಡಿಸಲು ನವಿಕೃತವಾಗಿರಿಸಬೇಕಾಗಿದೆ."</string>
+</resources>
diff --git a/chromium/listing/res/values-ky-rKG/strings.xml b/chromium/listing/res/values-ky-rKG/strings.xml
new file mode 100644
index 0000000..67eb4f3
--- /dev/null
+++ b/chromium/listing/res/values-ky-rKG/strings.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (c) 2014 The Chromium Authors. All rights reserved.
+
+ Use of this source code is governed by a BSD-style license that can be
+ found in the LICENSE file.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="webviewgoogle_play_store_title" msgid="6227907912304696478">"Android тутумдук WebView"</string>
+ <string name="webviewgoogle_play_store_tagline" msgid="825305078705915422">"Chrome тарабынан чыгарылган колдонмолор үчүн желе мазмуну"</string>
+ <string name="webviewgoogle_play_store_description" msgid="3054088773113944489">"Android WebView Android колдонмолоруна желе мазмунун көрсөтүүгө мүмкүндүк берген Chrome\'дун тутумдук курамдык бөлүгү. Бул курамдык бөлүк түзмөгүңүздө күн мурунтан орнотулган жана эң акыркы коопсуздук жаңыртуулары жана мүчүлүштүктөрдү оңдоо каражаттары менен камсыз кылуу үчүн мезгил-мезгили менен жаңыртылып турушу керек."</string>
+</resources>
diff --git a/chromium/listing/res/values-mk-rMK/strings.xml b/chromium/listing/res/values-mk-rMK/strings.xml
new file mode 100644
index 0000000..86d5818
--- /dev/null
+++ b/chromium/listing/res/values-mk-rMK/strings.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (c) 2014 The Chromium Authors. All rights reserved.
+
+ Use of this source code is governed by a BSD-style license that can be
+ found in the LICENSE file.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="webviewgoogle_play_store_title" msgid="6227907912304696478">"Android System WebView"</string>
+ <string name="webviewgoogle_play_store_tagline" msgid="825305078705915422">"Веб-содржина за апликации, овозможена од Chrome"</string>
+ <string name="webviewgoogle_play_store_description" msgid="3054088773113944489">"Android Webview е системска компонента овозможена од Chrome која им дозволува на апликациите за Android да прикажуваат веб-содржина. Таа е претходно инсталирана на уредот и треба да се ажурира за сигурно да ги имате најновите ажурирања за безбедност и другите поправки на грешки."</string>
+</resources>
diff --git a/chromium/listing/res/values-ml-rIN/strings.xml b/chromium/listing/res/values-ml-rIN/strings.xml
new file mode 100644
index 0000000..b95de50
--- /dev/null
+++ b/chromium/listing/res/values-ml-rIN/strings.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (c) 2014 The Chromium Authors. All rights reserved.
+
+ Use of this source code is governed by a BSD-style license that can be
+ found in the LICENSE file.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="webviewgoogle_play_store_title" msgid="6227907912304696478">"Android സിസ്‌റ്റം വെബ്‌കാഴ്‌ച"</string>
+ <string name="webviewgoogle_play_store_tagline" msgid="825305078705915422">"Chrome നൽകുന്ന, അപ്ലിക്കേഷനുകൾക്കുള്ള വെബ് ഉള്ളടക്കം"</string>
+ <string name="webviewgoogle_play_store_description" msgid="3054088773113944489">"വെബ് ഉള്ളടക്കം ദൃശ്യമാകാൻ Android അപ്ലിക്കേഷനുകളെ അനുവദിക്കുന്ന Chrome-ന്റെ ഒരു സിസ്റ്റം ഘടകമാണ് Android വെബ്‌കാഴ്‌ച. നിങ്ങളുടെ ഉപകരണത്തിൽ ഈ ഘടകം മുൻകൂട്ടി ഇൻസ്റ്റാളുചെയ്‌തിട്ടുണ്ട്, നിങ്ങൾക്ക് ഏറ്റവും പുതിയ സുരക്ഷാ അപ്‌ഡേറ്റുകളും മറ്റ് ബഗ് പരിഹരിക്കലുകളുമുണ്ടെന്ന് ഉറപ്പുവരുത്താൻ അത് അപ്‌റ്റുഡേറ്റായി നിലനിർത്തണം."</string>
+</resources>
diff --git a/chromium/listing/res/values-mr-rIN/strings.xml b/chromium/listing/res/values-mr-rIN/strings.xml
new file mode 100644
index 0000000..299ef66
--- /dev/null
+++ b/chromium/listing/res/values-mr-rIN/strings.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (c) 2014 The Chromium Authors. All rights reserved.
+
+ Use of this source code is governed by a BSD-style license that can be
+ found in the LICENSE file.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="webviewgoogle_play_store_title" msgid="6227907912304696478">"Android प्रणाली WebView"</string>
+ <string name="webviewgoogle_play_store_tagline" msgid="825305078705915422">"Chrome द्वारे समर्थित, अॅप्स साठी वेब सामग्री"</string>
+ <string name="webviewgoogle_play_store_description" msgid="3054088773113944489">"Android Webview हा Chrome द्वारे समर्थित एक प्रणाली घटक आहे जो Android अॅप्सना वेब सामग्री प्रदर्शित करण्यासाठी अनुमती देतो. हा घटक आपल्या डिव्हाइसवर पूर्व-स्थापित केलेला आहे आणि आपल्याकडे नवीनतम सुरक्षितता अद्यतने आणि इतर दोष निराकरणे असल्याचे सुनिश्चित करण्यासाठी अद्ययावत ठेवला जावा."</string>
+</resources>
diff --git a/chromium/listing/res/values-my-rMM/strings.xml b/chromium/listing/res/values-my-rMM/strings.xml
new file mode 100644
index 0000000..b2c646c
--- /dev/null
+++ b/chromium/listing/res/values-my-rMM/strings.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (c) 2014 The Chromium Authors. All rights reserved.
+
+ Use of this source code is governed by a BSD-style license that can be
+ found in the LICENSE file.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="webviewgoogle_play_store_title" msgid="6227907912304696478">"Android စနစ် ဝက်ဘ်မြင်ကွင်း"</string>
+ <string name="webviewgoogle_play_store_tagline" msgid="825305078705915422">"Chrome မှ မောင်းနှင်ပေးသည့် ဝက်ဘ် အကြောင်းအရာများ"</string>
+ <string name="webviewgoogle_play_store_description" msgid="3054088773113944489">"အန်ဒရွိုက် ၀ကဘ်မြင်ကွင်းမှာ Chrome မှ မောင်းနှင်သည့် စနစ် အစိတ်အပိုင်း တစ်ခုဖြစ်ပြီး အန်ဒရွိုက်အား ဝက်ဘ် အကြောင်းအရာများကို ပြခွင့်ပြုသည်။ ထိုအပိုင်းကို သင်၏ ကိရိယာ ထဲမှာ ကြိုတပ်ဆင်ထားပြီ ဖြစ်ကာ သင့်ဆီမှာ နောက်ဆုံး လုံခြုံရေး မွမ်းမံမှုများ နှင့် အခြားသော ဘာဂ် ပြပြင်မှုများ ရှိနေတာကို စစ်ကြည့်ရန် လိုပါသည်။"</string>
+</resources>
diff --git a/chromium/listing/res/values-ne-rNP/strings.xml b/chromium/listing/res/values-ne-rNP/strings.xml
new file mode 100644
index 0000000..616c813
--- /dev/null
+++ b/chromium/listing/res/values-ne-rNP/strings.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (c) 2014 The Chromium Authors. All rights reserved.
+
+ Use of this source code is governed by a BSD-style license that can be
+ found in the LICENSE file.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="webviewgoogle_play_store_title" msgid="6227907912304696478">"Android प्रणाली WebView"</string>
+ <string name="webviewgoogle_play_store_tagline" msgid="825305078705915422">"अनुप्रयोगहरू लागि वेब सामाग्री, Chrome द्वारा संचालित"</string>
+ <string name="webviewgoogle_play_store_description" msgid="3054088773113944489">"Chrome द्वारा संचालित Android Webview एक प्रणाली घटक हो जसले वेब सामग्री प्रदर्शन गर्न Android अनुप्रयोगहरूलाई अनुमति दिन्छ। तपाईंको नवीनतम सुरक्षा अद्यावधिक र अन्य बग फिक्स सुनिश्चित गर्न यो घटक तपाईँको उपकरणमा पूर्व-स्थापित छ र अद्यावधिक राख्नुपर्छ।"</string>
+</resources>
diff --git a/chromium/listing/res/values-si-rLK/strings.xml b/chromium/listing/res/values-si-rLK/strings.xml
new file mode 100644
index 0000000..28050b1
--- /dev/null
+++ b/chromium/listing/res/values-si-rLK/strings.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (c) 2014 The Chromium Authors. All rights reserved.
+
+ Use of this source code is governed by a BSD-style license that can be
+ found in the LICENSE file.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="webviewgoogle_play_store_title" msgid="6227907912304696478">"Android System WebView"</string>
+ <string name="webviewgoogle_play_store_tagline" msgid="825305078705915422">"යෙදුම් සඳහා වෙබ් අන්තර්ගත, Chrome මඟින් බලගන්වනු ලැබේ"</string>
+ <string name="webviewgoogle_play_store_description" msgid="3054088773113944489">"Android Webview යනු Chrome මඟින් බලගන්නවන පද්ධති සංරචකයකි, එය Android යෙදුම් වලට වෙබ් අන්තර්ගත දර්ශනය කිරීමට ඉඩ දෙයි. මෙම සංරචකය ඔබගේ උපාංගයේ කළින්-ස්ථාපයන කර තිබේ සහ ඔබට නවතම ආරක්ෂක යාවත්කාලීන සහ වෙනත් දෝෂ සැදීම් තිබේ දැයි සහතික කරගැනීමට යාවත්කාලීනව තබා ගැනීමට අවශ්‍ය වේ."</string>
+</resources>
diff --git a/chromium/listing/res/values-sw/strings.xml b/chromium/listing/res/values-sw/strings.xml
index ad62752..1903f6b 100644
--- a/chromium/listing/res/values-sw/strings.xml
+++ b/chromium/listing/res/values-sw/strings.xml
@@ -9,5 +9,5 @@
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="webviewgoogle_play_store_title" msgid="6227907912304696478">"Mfumo wa Android wa WebView"</string>
<string name="webviewgoogle_play_store_tagline" msgid="825305078705915422">"Maudhui ya wavuti kwa programu, yanayoendeshwa na Chrome"</string>
- <string name="webviewgoogle_play_store_description" msgid="3054088773113944489">"Android Webview ni kijenzi cha mfumo kinachoendeshwa na Chrome kinachoruhusu programu za Android zionyeshe maudhui ya wavuti. Kijenzi hiki huwekwa awali kwenye kifaa chako na kinapaswa kusasishwa kila wakati ili kuhakikisha kina sasisho mpya za usalama na marekebisho mengine ya hitilafu."</string>
+ <string name="webviewgoogle_play_store_description" msgid="3054088773113944489">"Android Webview ni kijenzi cha mfumo kinachoendeshwa na Chrome kinachoruhusu programu za Android zionyeshe maudhui ya wavuti. Kijenzi hiki huwekwa awali kwenye kifaa chako na kinapaswa kusasishwa kila wakati ili kuhakikisha kwamba kina sasisho mpya za usalama na marekebisho mengine ya hitilafu."</string>
</resources>
diff --git a/chromium/listing/res/values-ta-rIN/strings.xml b/chromium/listing/res/values-ta-rIN/strings.xml
new file mode 100644
index 0000000..aef4a2a
--- /dev/null
+++ b/chromium/listing/res/values-ta-rIN/strings.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (c) 2014 The Chromium Authors. All rights reserved.
+
+ Use of this source code is governed by a BSD-style license that can be
+ found in the LICENSE file.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="webviewgoogle_play_store_title" msgid="6227907912304696478">"Android System WebView"</string>
+ <string name="webviewgoogle_play_store_tagline" msgid="825305078705915422">"பயன்பாடுகளுக்கான இணைய உள்ளடக்கம், வழங்குவது Chrome"</string>
+ <string name="webviewgoogle_play_store_description" msgid="3054088773113944489">"Android Webview என்பது Chrome வழங்கும் முறைமைக் கூறாகும். இது, இணைய உள்ளடக்கத்தை Android பயன்பாடுகள் காண்பிக்க அனுமதிக்கும். இந்தக் கூறு உங்கள் சாதனத்தில் ஏற்கனவே நிறுவப்பட்டிருக்கும். இதை எப்போதும் புதுப்பித்த நிலையில் வைத்திருந்து, சமீபத்திய பாதுகாப்புப் புதுப்பிப்புகள் மற்றும் பிழைத் திருத்தங்களைப் பெறவும்."</string>
+</resources>
diff --git a/chromium/listing/res/values-te-rIN/strings.xml b/chromium/listing/res/values-te-rIN/strings.xml
new file mode 100644
index 0000000..f6d34c8
--- /dev/null
+++ b/chromium/listing/res/values-te-rIN/strings.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (c) 2014 The Chromium Authors. All rights reserved.
+
+ Use of this source code is governed by a BSD-style license that can be
+ found in the LICENSE file.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="webviewgoogle_play_store_title" msgid="6227907912304696478">"Android సిస్టమ్ వెబ్‌వీక్షణ"</string>
+ <string name="webviewgoogle_play_store_tagline" msgid="825305078705915422">"అనువర్తనాల కోసం వెబ్ కంటెంట్, Chrome ఆధారితం"</string>
+ <string name="webviewgoogle_play_store_description" msgid="3054088773113944489">"Android వెబ్‌వీక్షణ అనేది వెబ్ కంటెంట్‌ను ప్రదర్శించడానికి Android అనువర్తనాలను అనుమతించే Chrome ఆధారితమైన సిస్టమ్‌లోని భాగం. ఈ భాగం మీ పరికరంలో ముందుగానే ఇన్‌స్టాల్ చేయబడి ఉంటుంది మరియు మీకు సరికొత్త భద్రతా నవీకరణలు మరియు ఇతర బగ్ పరిష్కారాలు ఉన్నాయని నిర్ధారించడానికి ఎప్పటికప్పుడు తాజాగా ఉంచాలి."</string>
+</resources>
diff --git a/chromium/listing/res/values-ur-rPK/strings.xml b/chromium/listing/res/values-ur-rPK/strings.xml
new file mode 100644
index 0000000..bc007ba
--- /dev/null
+++ b/chromium/listing/res/values-ur-rPK/strings.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (c) 2014 The Chromium Authors. All rights reserved.
+
+ Use of this source code is governed by a BSD-style license that can be
+ found in the LICENSE file.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="webviewgoogle_play_store_title" msgid="6227907912304696478">"‏Android سسٹم WebView"</string>
+ <string name="webviewgoogle_play_store_tagline" msgid="825305078705915422">"‏Chrome کے ذریعے تقویت یافتہ، ایپس کیلئے ویب مواد"</string>
+ <string name="webviewgoogle_play_store_description" msgid="3054088773113944489">"‏Android Webview ایک سسٹم عنصر ہے جو Chrome کے ذریعے تقویت یافتہ ہے جو Android ایپس کو ویب مواد ڈسپلے کرنے کی اجازت دیتا ہے۔ یہ عنصر آپ کے آلہ پر پہلے سے انسٹال ہوتا ہے اور اسے یہ یقینی بنانے کیلئے اپ ٹو ڈيٹ رکھنا چاہیے کہ آپ کے پاس تازہ ترین سیکیورٹی اپ ڈيٹس اور دیگر بگ اصلاحات ہیں۔"</string>
+</resources>
diff --git a/chromium/listing/res/values-uz-rUZ/strings.xml b/chromium/listing/res/values-uz-rUZ/strings.xml
new file mode 100644
index 0000000..9db3752
--- /dev/null
+++ b/chromium/listing/res/values-uz-rUZ/strings.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (c) 2014 The Chromium Authors. All rights reserved.
+
+ Use of this source code is governed by a BSD-style license that can be
+ found in the LICENSE file.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="webviewgoogle_play_store_title" msgid="6227907912304696478">"Android System WebView"</string>
+ <string name="webviewgoogle_play_store_tagline" msgid="825305078705915422">"Ilovalar uchun veb-kontent. Chrome asosida ishlaydi."</string>
+ <string name="webviewgoogle_play_store_description" msgid="3054088773113944489">"Android Webview bu – tizimning tarkibiy qismi bo‘lib, u Chrome asosida ishlaydi va Android ilovalarga veb-kontentni ko‘rsatish imkonini beradi. U qurilmangizga oldindan o‘rnatilgan bo‘ladi. Qurilmangizni so‘nggi xavfsizlik yangilanishlari va tuzatmalar bilan ta’minlash uchun uni doim yangilab turish lozim."</string>
+</resources>
diff --git a/chromium/listing/res/values-zh-rHK/strings.xml b/chromium/listing/res/values-zh-rHK/strings.xml
index 2e249e3..f67ebfd 100644
--- a/chromium/listing/res/values-zh-rHK/strings.xml
+++ b/chromium/listing/res/values-zh-rHK/strings.xml
@@ -9,5 +9,5 @@
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="webviewgoogle_play_store_title" msgid="6227907912304696478">"Android System WebView"</string>
<string name="webviewgoogle_play_store_tagline" msgid="825305078705915422">"讓應用程式顯示網頁內容,由 Chrome 提供技術支援"</string>
- <string name="webviewgoogle_play_store_description" msgid="3054088773113944489">"Android Webview 是一個由 Chrome 提供技術支援的系統元件,讓 Android 應用程式能夠顯示網頁內容。這個元件已經預載到您的裝置上,並需要保持更新,以確保您擁有最新的安全更新,並修正其他錯誤。"</string>
+ <string name="webviewgoogle_play_store_description" msgid="3054088773113944489">"Android Webview 是由 Chrome 提供技術支援的系統元件,讓 Android 應用程式顯示網頁內容。這個元件已經預載到您的裝置上,並需要保持更新,以確保您有最新的安全更新及其他錯誤修正。"</string>
</resources>
diff --git a/chromium/listing/res/values-zh-rTW/strings.xml b/chromium/listing/res/values-zh-rTW/strings.xml
index a209497..72e7677 100644
--- a/chromium/listing/res/values-zh-rTW/strings.xml
+++ b/chromium/listing/res/values-zh-rTW/strings.xml
@@ -8,6 +8,6 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="webviewgoogle_play_store_title" msgid="6227907912304696478">"Android System WebView"</string>
- <string name="webviewgoogle_play_store_tagline" msgid="825305078705915422">"讓應用程式可以顯示網頁內容,由 Chrome 提供技術支援"</string>
- <string name="webviewgoogle_play_store_description" msgid="3054088773113944489">"Android Webview 是一個由 Chrome 提供技術支援的系統元件,讓 Android 應用程式可以顯示網頁內容。這個元件已經預先安裝在您的裝置中,請時時保持更新,以確保您取得最新的安全更新檔和其他的錯誤修正檔。"</string>
+ <string name="webviewgoogle_play_store_tagline" msgid="825305078705915422">"可供應用程式顯示網頁內容,由 Chrome 提供技術支援"</string>
+ <string name="webviewgoogle_play_store_description" msgid="3054088773113944489">"Android Webview 是一項由 Chrome 提供技術支援的系統元件,Android 應用程式可透過這項元件顯示網頁內容。這個元件已經預先安裝在您的裝置中,請隨時保持最新狀態,以確保您取得最新的安全更新檔和其他的錯誤修正檔。"</string>
</resources>
diff --git a/chromium/package.mk b/chromium/package.mk
index 4f87464..2f890ca 100644
--- a/chromium/package.mk
+++ b/chromium/package.mk
@@ -62,11 +62,12 @@ LOCAL_MULTILIB := both
# See Bug 17409149.
LOCAL_DEX_PREOPT := false
-# TODO: filter webviewchromium_webkit_strings based on PRODUCT_LOCALES.
+# If this build is just for apps, skip building the platform-side dependencies.
+ifeq ($(TARGET_BUILD_APPS),)
LOCAL_REQUIRED_MODULES := \
- libwebviewchromium \
libwebviewchromium_loader \
libwebviewchromium_plat_support
+endif
LOCAL_PROGUARD_ENABLED := full
LOCAL_PROGUARD_FLAG_FILES := proguard.flags
diff --git a/chromium/proguard.flags b/chromium/proguard.flags
index 6401a8c..b19519f 100644
--- a/chromium/proguard.flags
+++ b/chromium/proguard.flags
@@ -80,6 +80,12 @@
*** startFinalizer(java.lang.Class,java.lang.Object);
}
+# Keep support framework support for SmartClip.
+-keep class com.android.webview.chromium.WebViewChromium {
+ public void extractSmartClipData(int,int,int,int);
+ public void setSmartClipResultHandler(android.os.Handler);
+}
+
# We need to explicitly keep classes and constructors referenced only in
# layout resources.
-keep class com.android.org.chromium.ui.ColorPickerAdvanced {
diff --git a/chromium/tests/UbWebViewJankTests/src/com/android/webview/chromium/tests/jank/WebViewFlingTest.java b/chromium/tests/UbWebViewJankTests/src/com/android/webview/chromium/tests/jank/WebViewFlingTest.java
index efd9f27..16eee7f 100644
--- a/chromium/tests/UbWebViewJankTests/src/com/android/webview/chromium/tests/jank/WebViewFlingTest.java
+++ b/chromium/tests/UbWebViewJankTests/src/com/android/webview/chromium/tests/jank/WebViewFlingTest.java
@@ -22,8 +22,10 @@ import android.os.SystemClock;
import android.support.test.jank.JankTest;
import android.support.test.jank.JankTestBase;
import android.support.test.jank.JankType;
+import android.support.test.uiautomator.By;
+import android.support.test.uiautomator.Direction;
import android.support.test.uiautomator.UiDevice;
-import android.support.test.uiautomator.UiObjectNotFoundException;
+import android.support.test.uiautomator.UiObject2;
import android.support.test.uiautomator.UiScrollable;
import android.support.test.uiautomator.UiSelector;
@@ -47,17 +49,14 @@ import java.io.IOException;
public class WebViewFlingTest extends JankTestBase {
private static final long TEST_DELAY_TIME_MS = 2 * 1000; // 2 seconds
- private static final long PAGE_LOAD_DELAY_TIMEOUT_MS = 10 * 1000; // 10 seconds
private static final long PAGE_LOAD_DELAY_TIME_MS = 20 * 1000; // 20 seconds
private static final int MIN_DATA_SIZE = 50;
private static final long DEFAULT_ANIMATION_TIME = 2 * 1000;
private static final String CHROMIUM_SHELL_APP = "com.android.webview.chromium.shell";
private static final String CHROMIUM_SHELL_ACTIVITY = CHROMIUM_SHELL_APP + ".JankActivity";
- private static final String AW_CONTAINER = "com.android.webview.chromium.shell:id/container";
+ private static final String RES_PACKAGE = "com.android.webview.chromium.shell";
private UiDevice mDevice;
- private UiScrollable mWebPageDisplay = null;
-
/**
* {@inheritDoc}
@@ -84,14 +83,19 @@ public class WebViewFlingTest extends JankTestBase {
}
@Override
- public void beforeLoop() throws UiObjectNotFoundException {
- getContainer().flingToBeginning(20);
+ public void beforeLoop() {
+ UiObject2 container = mDevice.findObject(By.res(RES_PACKAGE, "container"));
+
+ // Fling to the top
+ while (container.fling(Direction.UP)) {
+ }
+
SystemClock.sleep(TEST_DELAY_TIME_MS);
}
@JankTest(type=JankType.CONTENT_FRAMES, expectedFrames=MIN_DATA_SIZE)
- public void testBrowserPageFling() throws UiObjectNotFoundException, IOException {
- getContainer().flingForward();
+ public void testBrowserPageFling() throws IOException {
+ mDevice.findObject(By.res(RES_PACKAGE, "container")).fling(Direction.DOWN);
SystemClock.sleep(DEFAULT_ANIMATION_TIME);
}
@@ -101,16 +105,7 @@ public class WebViewFlingTest extends JankTestBase {
@Override
protected void tearDown() throws Exception {
mDevice.unfreezeRotation();
- super.tearDown();
- }
- private UiScrollable getContainer() {
- if (mWebPageDisplay == null) {
- mWebPageDisplay =
- new UiScrollable(new UiSelector().resourceId(AW_CONTAINER).instance(0));
- assertTrue("Failed to get web container",
- mWebPageDisplay.waitForExists(PAGE_LOAD_DELAY_TIMEOUT_MS));
- }
- return mWebPageDisplay;
+ super.tearDown();
}
}
diff --git a/chromium/version.mk b/chromium/version.mk
index 8737b0f..fe4b6ae 100644
--- a/chromium/version.mk
+++ b/chromium/version.mk
@@ -34,7 +34,7 @@
# and running them in emulation.
# TODO(torne): get this from Chromium automatically.
-version_milestone := 39
+version_milestone := 40
version_offset_milestone := $(shell echo $(version_milestone) \
| awk '{print $$1 - 36}')
diff --git a/nullwebview/java/com/android/webview/nullwebview/NullWebViewFactoryProvider.java b/nullwebview/java/com/android/webview/nullwebview/NullWebViewFactoryProvider.java
index 2f993cc..f157a95 100644
--- a/nullwebview/java/com/android/webview/nullwebview/NullWebViewFactoryProvider.java
+++ b/nullwebview/java/com/android/webview/nullwebview/NullWebViewFactoryProvider.java
@@ -23,12 +23,13 @@ import android.webkit.WebIconDatabase;
import android.webkit.WebStorage;
import android.webkit.WebView;
import android.webkit.WebViewDatabase;
+import android.webkit.WebViewDelegate;
import android.webkit.WebViewFactoryProvider;
import android.webkit.WebViewProvider;
public class NullWebViewFactoryProvider implements WebViewFactoryProvider {
- public NullWebViewFactoryProvider() {
+ public NullWebViewFactoryProvider(WebViewDelegate delegate) {
}
@Override