Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0ffbc3ab authored by Ibrahim Yilmaz's avatar Ibrahim Yilmaz Committed by Android (Google) Code Review
Browse files

Revert "Only extract RON content model for RON style notifications."

This reverts commit 3a0c8759.

Reason for revert: Notification.java should be RON agnostic.

Change-Id: Iaf35494145eb65ad4ce7d7ebf68110766697e60c
parent 3a0c8759
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -6844,9 +6844,6 @@ package android.app {
    method public android.app.Notification.MessagingStyle.Message setData(String, android.net.Uri);
  }
  @FlaggedApi("android.app.api_rich_ongoing") public abstract static class Notification.RichOngoingStyle extends android.app.Notification.Style {
  }
  public abstract static class Notification.Style {
    ctor @Deprecated public Notification.Style();
    method public android.app.Notification build();
+0 −12
Original line number Diff line number Diff line
@@ -10919,18 +10919,6 @@ public class Notification implements Parcelable
        }
    }
    /**
     * An object that can apply a rich ongoing notification style to a {@link Notification.Builder}
     * object.
     */
    @FlaggedApi(Flags.FLAG_API_RICH_ONGOING)
    public abstract static class RichOngoingStyle extends Notification.Style {
        /**
         * @hide
         */
        public RichOngoingStyle() {}
    }
    /**
     * Notification style for custom views that are decorated by the system
     *
+3 −7
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@
package com.android.systemui.statusbar.notification.row

import android.app.Notification
import android.app.Notification.RichOngoingStyle
import android.app.PendingIntent
import android.content.Context
import android.util.Log
@@ -69,14 +68,12 @@ class RichOngoingNotificationContentExtractorImpl @Inject constructor() :
        builder: Notification.Builder,
        systemUIContext: Context,
        packageContext: Context
    ): RichOngoingContentModel? {
        if (builder.style !is RichOngoingStyle) return null

    ): RichOngoingContentModel? =
        try {
            val sbn = entry.sbn
            val notification = sbn.notification
            val icon = IconModel(notification.smallIcon)
            return if (sbn.packageName == "com.google.android.deskclock") {
            if (sbn.packageName == "com.google.android.deskclock") {
                when (notification.channelId) {
                    "Timers v2" -> {
                        parseTimerNotification(notification, icon)
@@ -93,8 +90,7 @@ class RichOngoingNotificationContentExtractorImpl @Inject constructor() :
            } else null
        } catch (e: Exception) {
            Log.e("RONs", "Error parsing RON", e)
            return null
        }
            null
        }

    /**