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

Commit df7f160d authored by Matías Hernández's avatar Matías Hernández
Browse files

Add method to create a deep copy of a ZenMode

Bug: 353946788
Test: atest com.android.settings.notification.modes
Flag: android.app.modes_ui
Change-Id: I0612840e6d375f66cad900c1915c49d785b7ce48
parent 71724c7f
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -158,6 +158,11 @@ public class ZenMode implements Parcelable {
        mIsManualDnd = isManualDnd;
    }

    /** Creates a deep copy of this object. */
    public ZenMode copy() {
        return new ZenMode(mId, new AutomaticZenRule.Builder(mRule).build(), mStatus, mIsManualDnd);
    }

    @NonNull
    public String getId() {
        return mId;