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

Unified Diff: chrome/browser/android/preferences/pref_service_bridge.cc

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/browser/android/preferences/pref_service_bridge.cc
diff --git a/chrome/browser/android/preferences/pref_service_bridge.cc b/chrome/browser/android/preferences/pref_service_bridge.cc
index 6846e0318c83cb4e8df3c49321959c30e393f6e2..c0e0560c968de5b1e516983a29bacb73506ff8fd 100644
--- a/chrome/browser/android/preferences/pref_service_bridge.cc
+++ b/chrome/browser/android/preferences/pref_service_bridge.cc
@@ -368,6 +368,12 @@ static jboolean GetNotificationsEnabled(JNIEnv* env,
return GetBooleanForContentSetting(CONTENT_SETTINGS_TYPE_NOTIFICATIONS);
}
+static jboolean GetNotificationsVibrateEnabled(
+ JNIEnv* env,
+ const JavaParamRef<jobject>& obj) {
+ return GetPrefService()->GetBoolean(prefs::kNotificationsVibrateEnabled);
+}
+
static jboolean GetAllowLocationEnabled(JNIEnv* env,
const JavaParamRef<jobject>& obj) {
return GetBooleanForContentSetting(CONTENT_SETTINGS_TYPE_GEOLOCATION);
@@ -822,6 +828,12 @@ static void SetNotificationsEnabled(JNIEnv* env,
allow ? CONTENT_SETTING_ASK : CONTENT_SETTING_BLOCK);
}
+static void SetNotificationsVibrateEnabled(JNIEnv* env,
+ const JavaParamRef<jobject>& obj,
+ jboolean enabled) {
+ GetPrefService()->SetBoolean(prefs::kNotificationsVibrateEnabled, enabled);
+}
+
static void SetCrashReportingEnabled(JNIEnv* env,
const JavaParamRef<jobject>& obj,
jboolean reporting) {

Powered by Google App Engine
This is Rietveld 408576698