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

Commit df559727 authored by Matías Hernández's avatar Matías Hernández Committed by Android (Google) Code Review
Browse files

Merge "Add test-only ZenModesBackend.setInstance()" into main

parents 5780ff3e 5a775198
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ import android.service.notification.ZenModeConfig;
import android.util.Log;

import androidx.annotation.DrawableRes;
import androidx.annotation.VisibleForTesting;

import com.android.settingslib.R;

@@ -61,6 +62,12 @@ public class ZenModesBackend {
        return sInstance;
    }

    /** Replaces the singleton instance of {@link ZenModesBackend} by the provided one. */
    @VisibleForTesting(otherwise = VisibleForTesting.NONE)
    public static void setInstance(@Nullable ZenModesBackend backend) {
        sInstance = backend;
    }

    ZenModesBackend(Context context) {
        mContext = context;
        mNotificationManager = context.getSystemService(NotificationManager.class);