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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java

Issue 2039953002: Add a preference for disabling vibration in notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Address Dan's comments. Created 4 years, 6 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: chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java
index 0f273251fcc1b5eef8babcc710f8911293d52c67..989fd17b96272651ffd221cf39bb2416f43e89c0 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java
@@ -313,6 +313,13 @@ public boolean isNotificationsEnabled() {
}
/**
+ * @return whether vibration is enabled for notifications.
+ */
+ public boolean isNotificationsVibrateEnabled() {
+ return nativeGetNotificationsVibrateEnabled();
+ }
+
+ /**
* @return whether geolocation information can be shared with content.
*/
public boolean isAllowLocationEnabled() {
@@ -853,6 +860,10 @@ public void setNotificationsEnabled(boolean allow) {
nativeSetNotificationsEnabled(allow);
}
+ public void setNotificationsVibrateEnabled(boolean enabled) {
+ nativeSetNotificationsVibrateEnabled(enabled);
+ }
+
public void setAllowLocationEnabled(boolean allow) {
nativeSetAllowLocationEnabled(allow);
}
@@ -1158,8 +1169,10 @@ private native void nativeRequestInfoAboutOtherFormsOfBrowsingHistory(
private native void nativeSetProtectedMediaIdentifierEnabled(boolean enabled);
private native boolean nativeGetAllowLocationEnabled();
private native boolean nativeGetNotificationsEnabled();
+ private native boolean nativeGetNotificationsVibrateEnabled();
private native void nativeSetAllowLocationEnabled(boolean allow);
private native void nativeSetNotificationsEnabled(boolean allow);
+ private native void nativeSetNotificationsVibrateEnabled(boolean enabled);
private native void nativeSetPasswordEchoEnabled(boolean enabled);
private native void nativeSetCrashReportingEnabled(boolean reporting);
private native boolean nativeIsCrashReportingEnabled();

Powered by Google App Engine
This is Rietveld 408576698