Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Unified Diff: android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java

Issue 2738663003: Fix TODOs related to SDK 24 (Closed)
Patch Set: Re-revert fix TODOs related to SDK 24 Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java
diff --git a/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java b/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java
index 0ea08497cb7717c0143ce83d383b73c463d12917..66779333e88e2b0175f4f0dcb441510308e16486 100644
--- a/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java
+++ b/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java
@@ -1695,8 +1695,7 @@ class WebViewChromium implements WebViewProvider, WebViewProvider.ScrollDelegate
mAwContents.setLayoutParams(layoutParams);
}
- // Overrides WebViewProvider.ViewDelegate.onActivityResult (not in system api jar yet).
- // crbug.com/543272.
+ @Override
public void onActivityResult(final int requestCode, final int resultCode, final Intent data) {
if (checkNeedsPost()) {
mFactory.addTask(new Runnable() {
@@ -1730,8 +1729,7 @@ class WebViewChromium implements WebViewProvider, WebViewProvider.ScrollDelegate
mAwContents.onConfigurationChanged(newConfig);
}
- //TODO(hush): add override after release.
- //@Override
+ @Override
public boolean onDragEvent(final DragEvent event) {
mFactory.startYourEngines(false);
if (checkNeedsPost()) {
@@ -2213,14 +2211,16 @@ class WebViewChromium implements WebViewProvider, WebViewProvider.ScrollDelegate
@Override
public void super_startActivityForResult(Intent intent, int requestCode) {
- // TODO(hush): Use mWebViewPrivate.super_startActivityForResult
- // after N release. crbug.com/543272.
- try {
- Method startActivityForResultMethod =
- View.class.getMethod("startActivityForResult", Intent.class, int.class);
- startActivityForResultMethod.invoke(mWebView, intent, requestCode);
- } catch (Exception e) {
- throw new RuntimeException("Invalid reflection", e);
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
+ mWebViewPrivate.super_startActivityForResult(intent, requestCode);
+ } else {
+ try {
+ Method startActivityForResultMethod =
+ View.class.getMethod("startActivityForResult", Intent.class, int.class);
+ startActivityForResultMethod.invoke(mWebView, intent, requestCode);
+ } catch (Exception e) {
+ throw new RuntimeException("Invalid reflection", e);
+ }
}
}
« no previous file with comments | « android_webview/apk/java/proguard.flags ('k') | android_webview/java/src/org/chromium/android_webview/AwContents.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698