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

Unified Diff: base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java

Issue 2702023002: Migrate web notifications to ChromeNotificationBuilder (Closed)
Patch Set: rebase Created 3 years, 10 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
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/notifications/ChromeNotificationBuilder.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java
diff --git a/base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java b/base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java
index 4a2161644b19d8987443c6a1ede3542e7d51000a..825bce7cc860035fffd2b4d64372d4277bfa1039 100644
--- a/base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java
+++ b/base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java
@@ -7,7 +7,6 @@ package org.chromium.base;
import android.annotation.TargetApi;
import android.app.Activity;
import android.app.ActivityManager;
-import android.app.Notification;
import android.app.PendingIntent;
import android.content.ContentResolver;
import android.content.Context;
@@ -34,7 +33,6 @@ import android.view.ViewGroup.MarginLayoutParams;
import android.view.Window;
import android.view.WindowManager;
import android.view.inputmethod.InputMethodSubtype;
-import android.widget.RemoteViews;
import android.widget.TextView;
import java.io.File;
@@ -602,34 +600,6 @@ public class ApiCompatibilityUtils {
}
/**
- * @see android.app.Notification.Builder#setContent(RemoteViews)
- */
- @SuppressWarnings("deprecation")
- public static void setContentViewForNotificationBuilder(
- Notification.Builder builder, RemoteViews views) {
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
- builder.setCustomContentView(views);
- } else {
- builder.setContent(views);
- }
- }
-
- /**
- * @see android.app.Notification#bigContentView
- */
- @SuppressWarnings("deprecation")
- public static Notification notificationWithBigContentView(
- Notification.Builder builder, RemoteViews view) {
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
- return builder.setCustomBigContentView(view).build();
- } else {
- Notification notification = builder.build();
- notification.bigContentView = view;
- return notification;
- }
- }
-
- /**
* @see android.view.inputmethod.InputMethodSubType#getLocate()
*/
@SuppressWarnings("deprecation")
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/notifications/ChromeNotificationBuilder.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698