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

Commit 0e547fec authored by Alexander Roederer's avatar Alexander Roederer
Browse files

Add VisibleForTesting annotation to NRU

Adds VisibleForTesting annotation to
NotificationRankingUpdate.isFdNotNullAndClosed, to check that this
function is only used in tests.

Test: atest NotificationRankingUpdate
Bug: 249848655
Change-Id: I034337c2a79c77053bf927bfd82588563fab7b19
parent 0aa032ee
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import android.system.ErrnoException;
import android.system.OsConstants;

import androidx.annotation.NonNull;
import androidx.annotation.VisibleForTesting;

import com.android.internal.config.sysui.SystemUiSystemPropertiesFlags;

@@ -138,6 +139,7 @@ public class NotificationRankingUpdate implements Parcelable {
     *
     * @hide
     */
    @VisibleForTesting(otherwise = VisibleForTesting.NONE)
    public final boolean isFdNotNullAndClosed() {
        return mRankingMapFd != null && mRankingMapFd.getFd() == -1;
    }