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

Commit 4e610a05 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge changes Id3875cd9,Ia8ca7fd6,I254079fd

* changes:
  Cleanup unused areas of NotifEntry and related
  Remove unused autoredacted member from NotifEntry
  Remove last ranking-derived member from NotifEntry
parents fe913dbe 9ebf382b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -184,7 +184,7 @@ public class BubbleData {
            Log.d(TAG, "notificationEntryUpdated: " + entry);
        }
        Bubble bubble = getBubbleWithKey(entry.getKey());
        suppressFlyout = !entry.isVisuallyInterruptive || suppressFlyout;
        suppressFlyout = !entry.getRanking().visuallyInterruptive() || suppressFlyout;

        if (bubble == null) {
            // Create a new bubble
+0 −10
Original line number Diff line number Diff line
@@ -39,7 +39,6 @@ import com.android.launcher3.icons.ShadowGenerator;
import com.android.systemui.Interpolators;
import com.android.systemui.R;
import com.android.systemui.statusbar.notification.collection.NotificationEntry;
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow;

/**
 * A floating object on the screen that can post message updates.
@@ -141,15 +140,6 @@ public class BubbleView extends FrameLayout {
        mUserBadgedAppIcon = appIcon;
    }

    /**
     * @return the {@link ExpandableNotificationRow} view to display notification content when the
     * bubble is expanded.
     */
    @Nullable
    public ExpandableNotificationRow getRowView() {
        return (mBubble != null) ? mBubble.getEntry().getRow() : null;
    }

    /** Changes the dot's visibility to match the bubble view's state. */
    void updateDotVisibility(boolean animate) {
        updateDotVisibility(animate, null /* after */);
+18 −14
Original line number Diff line number Diff line
@@ -85,11 +85,6 @@ import java.util.Objects;
 * clean this up in the future.
 */
public final class NotificationEntry {
    private static final long LAUNCH_COOLDOWN = 2000;
    private static final long REMOTE_INPUT_COOLDOWN = 500;
    private static final long INITIALIZATION_DELAY = 400;
    private static final long NOT_LAUNCHED_YET = -LAUNCH_COOLDOWN;
    private static final int COLOR_INVALID = 1;

    private final String mKey;
    private StatusBarNotification mSbn;
@@ -109,13 +104,11 @@ public final class NotificationEntry {
    * TODO: Remove every member beneath this line if possible
    */

    public boolean noisy;
    public StatusBarIconView icon;
    public StatusBarIconView expandedIcon;
    public StatusBarIconView centeredIcon;
    public StatusBarIconView aodIcon;
    private boolean interruption;
    public boolean autoRedacted; // whether the redacted notification was generated by us
    public int targetSdk;
    private long lastFullScreenIntentLaunchTime = NOT_LAUNCHED_YET;
    public CharSequence remoteInputText;
@@ -155,12 +148,6 @@ public final class NotificationEntry {
     */
    private boolean hasSentReply;

    /**
     * Whether this notification has changed in visual appearance since the previous post.
     * New notifications are interruptive by default.
     */
    public boolean isVisuallyInterruptive;

    /**
     * Whether this notification is shown to the user as a high priority notification: visible on
     * the lock screen/status bar and in the top section in the shade.
@@ -236,10 +223,15 @@ public final class NotificationEntry {
            throw new IllegalArgumentException("New key " + ranking.getKey()
                    + " doesn't match existing key " + mKey);
        }

        mRanking = ranking;
        isVisuallyInterruptive = ranking.visuallyInterruptive();
    }


    /*
     * Convenience getters for SBN and Ranking members
     */

    public NotificationChannel getChannel() {
        return mRanking.getChannel();
    }
@@ -287,6 +279,12 @@ public final class NotificationEntry {
    }


    /*
     * Old methods
     *
     * TODO: Remove as many of these as possible
     */

    public void setInterruption() {
        interruption = true;
    }
@@ -961,4 +959,10 @@ public final class NotificationEntry {
            this.index = index;
        }
    }

    private static final long LAUNCH_COOLDOWN = 2000;
    private static final long REMOTE_INPUT_COOLDOWN = 500;
    private static final long INITIALIZATION_DELAY = 400;
    private static final long NOT_LAUNCHED_YET = -LAUNCH_COOLDOWN;
    private static final int COLOR_INVALID = 1;
}
+0 −1
Original line number Diff line number Diff line
@@ -248,7 +248,6 @@ public class NotificationRowBinderImpl implements NotificationRowBinder {

        // TODO: should updates to the entry be happening somewhere else?
        entry.setIconTag(R.id.icon_is_pre_L, entry.targetSdk < Build.VERSION_CODES.LOLLIPOP);
        entry.autoRedacted = entry.getSbn().getNotification().publicVersion == null;

        entry.setRow(row);
        row.setOnActivatedListener(mPresenter);