Minor patches fix
This commit is contained in:
parent
8fad0f33cf
commit
d70fb848e2
3 changed files with 6 additions and 27 deletions
|
@ -18,14 +18,14 @@ diff --git a/components/background_task_scheduler/internal/android/java/src/org/
|
|||
persistableBundle.putString(key, null);
|
||||
} else if (obj instanceof Boolean) {
|
||||
- persistableBundle.putBoolean(key, (Boolean) obj);
|
||||
+ if Build.VERSION.SDK_INT == Build.VERSION_CODES.LOLLIPOP {
|
||||
+ if (Build.VERSION.SDK_INT == Build.VERSION_CODES.LOLLIPOP) {
|
||||
+ failedKeys.add(key);
|
||||
+ } else {
|
||||
+ persistableBundle.putBoolean(key, (Boolean) obj);
|
||||
+ }
|
||||
} else if (obj instanceof boolean[]) {
|
||||
- persistableBundle.putBooleanArray(key, (boolean[]) obj);
|
||||
+ if Build.VERSION.SDK_INT == Build.VERSION_CODES.LOLLIPOP {
|
||||
+ if (Build.VERSION.SDK_INT == Build.VERSION_CODES.LOLLIPOP) {
|
||||
+ failedKeys.add(key);
|
||||
+ } else {
|
||||
+ persistableBundle.putBooleanArray(key, (boolean[]) obj);
|
||||
|
|
|
@ -6,15 +6,14 @@ Subject: Add vibration flag
|
|||
chrome/browser/about_flags.cc | 4 ++++
|
||||
chrome/browser/flag_descriptions.cc | 3 +++
|
||||
chrome/browser/flag_descriptions.h | 3 +++
|
||||
.../internal/BundleToPersistableBundleConverter.java | 4 ++--
|
||||
content/child/runtime_features.cc | 1 +
|
||||
content/public/common/content_features.cc | 3 +++
|
||||
content/public/common/content_features.h | 2 ++
|
||||
third_party/blink/public/platform/web_runtime_features.h | 1 +
|
||||
.../blink/renderer/modules/vibration/vibration_controller.cc | 4 ++++
|
||||
.../blink/renderer/modules/vibration/vibration_controller.cc | 3 +++
|
||||
.../blink/renderer/platform/exported/web_runtime_features.cc | 4 ++++
|
||||
.../blink/renderer/platform/runtime_enabled_features.json5 | 4 ++++
|
||||
11 files changed, 31 insertions(+), 2 deletions(-)
|
||||
10 files changed, 28 insertions(+)
|
||||
|
||||
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
--- a/chrome/browser/about_flags.cc
|
||||
|
@ -56,25 +55,6 @@ diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptio
|
|||
#if defined(OS_CHROMEOS)
|
||||
extern const char kDeprecateLowUsageCodecsName[];
|
||||
extern const char kDeprecateLowUsageCodecsDescription[];
|
||||
diff --git a/components/background_task_scheduler/internal/android/java/src/org/chromium/components/background_task_scheduler/internal/BundleToPersistableBundleConverter.java b/components/background_task_scheduler/internal/android/java/src/org/chromium/components/background_task_scheduler/internal/BundleToPersistableBundleConverter.java
|
||||
--- a/components/background_task_scheduler/internal/android/java/src/org/chromium/components/background_task_scheduler/internal/BundleToPersistableBundleConverter.java
|
||||
+++ b/components/background_task_scheduler/internal/android/java/src/org/chromium/components/background_task_scheduler/internal/BundleToPersistableBundleConverter.java
|
||||
@@ -85,13 +85,13 @@ class BundleToPersistableBundleConverter {
|
||||
if (obj == null) {
|
||||
persistableBundle.putString(key, null);
|
||||
} else if (obj instanceof Boolean) {
|
||||
- if Build.VERSION.SDK_INT == Build.VERSION_CODES.LOLLIPOP {
|
||||
+ if (Build.VERSION.SDK_INT == Build.VERSION_CODES.LOLLIPOP) {
|
||||
failedKeys.add(key);
|
||||
} else {
|
||||
persistableBundle.putBoolean(key, (Boolean) obj);
|
||||
}
|
||||
} else if (obj instanceof boolean[]) {
|
||||
- if Build.VERSION.SDK_INT == Build.VERSION_CODES.LOLLIPOP {
|
||||
+ if (Build.VERSION.SDK_INT == Build.VERSION_CODES.LOLLIPOP) {
|
||||
failedKeys.add(key);
|
||||
} else {
|
||||
persistableBundle.putBooleanArray(key, (boolean[]) obj);
|
||||
diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.cc
|
||||
--- a/content/child/runtime_features.cc
|
||||
+++ b/content/child/runtime_features.cc
|
||||
|
@ -133,13 +113,12 @@ diff --git a/third_party/blink/renderer/modules/vibration/vibration_controller.c
|
|||
|
||||
// Maximum number of entries in a vibration pattern.
|
||||
const unsigned kVibrationPatternLengthMax = 99;
|
||||
@@ -142,6 +143,9 @@ bool VibrationController::vibrate(Navigator& navigator,
|
||||
@@ -142,6 +143,8 @@ bool VibrationController::vibrate(Navigator& navigator,
|
||||
// reference to |window| or |navigator| was retained in another window.
|
||||
if (!navigator.DomWindow())
|
||||
return false;
|
||||
+ if (!RuntimeEnabledFeatures::VibrationEnabled())
|
||||
+ return false;
|
||||
+ }
|
||||
return From(navigator).Vibrate(pattern);
|
||||
}
|
||||
|
||||
|
|
|
@ -30381,7 +30381,7 @@ diff --git a/third_party/blink/renderer/modules/payments/skip_to_gpay_utils.cc b
|
|||
diff --git a/third_party/blink/renderer/modules/vibration/vibration_controller.cc b/third_party/blink/renderer/modules/vibration/vibration_controller.cc
|
||||
--- a/third_party/blink/renderer/modules/vibration/vibration_controller.cc
|
||||
+++ b/third_party/blink/renderer/modules/vibration/vibration_controller.cc
|
||||
@@ -180,12 +180,12 @@ bool VibrationController::Vibrate(const VibrationPattern& pattern) {
|
||||
@@ -179,12 +179,12 @@ bool VibrationController::Vibrate(const VibrationPattern& pattern) {
|
||||
message =
|
||||
"Blocked call to navigator.vibrate inside a cross-origin "
|
||||
"iframe because the frame has never been activated by the user: "
|
||||
|
|
Loading…
Add table
Reference in a new issue