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

Commit 86c20077 authored by András Kurucz's avatar András Kurucz Committed by Android (Google) Code Review
Browse files

Merge "Remove unused code from the NotificationEntry" into main

parents f75041e2 e9315659
Loading
Loading
Loading
Loading
+0 −32
Original line number Diff line number Diff line
@@ -49,7 +49,6 @@ import android.os.SystemClock;
import android.service.notification.NotificationListenerService.Ranking;
import android.service.notification.SnoozeCriterion;
import android.service.notification.StatusBarNotification;
import android.util.ArraySet;
import android.view.ContentInfo;

import androidx.annotation.NonNull;
@@ -150,10 +149,8 @@ public final class NotificationEntry extends ListEntry {
    private int mCachedContrastColor = COLOR_INVALID;
    private int mCachedContrastColorIsFor = COLOR_INVALID;
    private InflationTask mRunningTask = null;
    private Throwable mDebugThrowable;
    public CharSequence remoteInputTextWhenReset;
    public long lastRemoteInputSent = NOT_LAUNCHED_YET;
    public final ArraySet<Integer> mActiveAppOps = new ArraySet<>(3);

    private final MutableStateFlow<CharSequence> mHeadsUpStatusBarText =
            StateFlowKt.MutableStateFlow(null);
@@ -189,11 +186,6 @@ public final class NotificationEntry extends ListEntry {
     */
    private boolean mBlockable;

    /**
     * The {@link SystemClock#elapsedRealtime()} when this notification entry was created.
     */
    public long mCreationElapsedRealTime;

    /**
     * Whether this notification has ever been a non-sticky HUN.
     */
@@ -264,13 +256,8 @@ public final class NotificationEntry extends ListEntry {
        mKey = sbn.getKey();
        setSbn(sbn);
        setRanking(ranking);
        mCreationElapsedRealTime = SystemClock.elapsedRealtime();
    }

    @VisibleForTesting
    public void setCreationElapsedRealTime(long time) {
        mCreationElapsedRealTime = time;
    }
    @Override
    public NotificationEntry getRepresentativeEntry() {
        return this;
@@ -581,19 +568,6 @@ public final class NotificationEntry extends ListEntry {
        return mRunningTask;
    }

    /**
     * Set a throwable that is used for debugging
     *
     * @param debugThrowable the throwable to save
     */
    public void setDebugThrowable(Throwable debugThrowable) {
        mDebugThrowable = debugThrowable;
    }

    public Throwable getDebugThrowable() {
        return mDebugThrowable;
    }

    public void onRemoteInputInserted() {
        lastRemoteInputSent = NOT_LAUNCHED_YET;
        remoteInputTextWhenReset = null;
@@ -749,12 +723,6 @@ public final class NotificationEntry extends ListEntry {
        return row != null && row.areChildrenExpanded();
    }


    //TODO: probably less confusing to say "is group fully visible"
    public boolean isGroupNotFullyVisible() {
        return row == null || row.isGroupNotFullyVisible();
    }

    public NotificationGuts getGuts() {
        if (row != null) return row.getGuts();
        return null;