fix potential crash on android M
This commit is contained in:
parent
76add6b7dc
commit
4140c01239
1 changed files with 8 additions and 8 deletions
|
@ -14,9 +14,9 @@ Subject: Enable android autofill
|
|||
chrome/browser/ui/tab_helpers.cc | 6 +-
|
||||
.../autofill/core/common/autofill_prefs.cc | 5 ++
|
||||
.../autofill/core/common/autofill_prefs.h | 1 +
|
||||
.../embedder_support/view/ContentView.java | 48 ++++++++++++++-
|
||||
.../embedder_support/view/ContentView.java | 48 +++++++++++++++
|
||||
.../chromium/ui/base/ViewAndroidDelegate.java | 8 +++
|
||||
13 files changed, 220 insertions(+), 3 deletions(-)
|
||||
13 files changed, 221 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
|
||||
--- a/chrome/android/BUILD.gn
|
||||
|
@ -401,16 +401,16 @@ diff --git a/components/embedder_support/android/java/src/org/chromium/component
|
|||
/**
|
||||
* The containing view for {@link WebContents} that exists in the Android UI hierarchy and exposes
|
||||
* the various {@link View} functionality to it.
|
||||
@@ -83,7 +89,7 @@ public class ContentView extends FrameLayout
|
||||
@@ -82,6 +88,8 @@ public class ContentView extends FrameLayout
|
||||
*/
|
||||
public static ContentView createContentView(Context context,
|
||||
@Nullable EventOffsetHandler eventOffsetHandler, @Nullable WebContents webContents) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
- return new ContentViewApi23(context, eventOffsetHandler, webContents);
|
||||
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
|
||||
+ return new ContentViewWithAutofill(context, eventOffsetHandler, webContents);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
return new ContentViewApi23(context, eventOffsetHandler, webContents);
|
||||
}
|
||||
return new ContentView(context, eventOffsetHandler, webContents);
|
||||
}
|
||||
@@ -549,4 +555,44 @@ public class ContentView extends FrameLayout
|
||||
@@ -549,4 +557,44 @@ public class ContentView extends FrameLayout
|
||||
if (wcax != null) wcax.onProvideVirtualStructure(structure, false);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue