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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/notifications/channels/Channel.java

Issue 2859233002: [Android] Refactor our notification channel definitions (Closed)
Patch Set: Nits, and made ChannelsUpdaterTest more powerful again by mocking resources Created 3 years, 7 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/notifications/channels/Channel.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/notifications/channels/Channel.java b/chrome/android/java/src/org/chromium/chrome/browser/notifications/channels/Channel.java
new file mode 100644
index 0000000000000000000000000000000000000000..63d0c8cc089d09b7657b990dbe8cd37a7ddd7b9d
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/notifications/channels/Channel.java
@@ -0,0 +1,41 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.chrome.browser.notifications.channels;
+
+/**
+ * Helper class that corresponds to the Android NotificationChannel class,
+ * which we cannot use directly until our compileSdkVersion is bumped to O.
+ *
+ * Only the methods & properties we use have been added, others may be added if the need arises.
+ */
+public class Channel {
+ private final String mId;
+ private final CharSequence mName;
+ private final int mImportance;
+ private final String mGroupId;
+
+ public Channel(String id, CharSequence name, int importance, String groupId) {
+ mId = id;
+ mName = name;
+ mImportance = importance;
+ mGroupId = groupId;
+ }
+
+ public String getId() {
+ return mId;
+ }
+
+ public CharSequence getName() {
+ return mName;
+ }
+
+ public int getImportance() {
+ return mImportance;
+ }
+
+ public String getGroupId() {
+ return mGroupId;
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698