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

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

Issue 2702023002: Migrate web notifications to ChromeNotificationBuilder (Closed)
Patch Set: rebase; assert false on noop compat builder methods 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
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 b4b1c02364cf86e494bc702290d2f78fac0debdd..64bbd511f4312cfd94b2f297196514b589f596d8 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;
@@ -608,34 +606,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")

Powered by Google App Engine
This is Rietveld 408576698