package com.foxx.androidcast.ota;

/*********************************************************************
 * OtaRuntimeSettings.java
 * Created at: Wed 20 May 2026 14:31:55 +0200
 * Updated at: Wed 20 May 2026 15:17:13 +0200 by Anton Afanasyeu <a.afanasieff@gmail.com>
 * Commit: 5d8e82d2e60a21fff3138d2a394ee4e8b4c6dcb8
 * class OtaRuntimeSettings
 * Contributors:
 *    - Anton Afanasyeu <a.afanasieff@gmail.com> (2 commits, 27 lines)
 *    - Cursor Agent (project assistant)
 * Digest: SHA256	46adf91da6c2173e02da82fed4e9702001ab6eb3319eb7612808087bc9879097
**********************************************************************/
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/** Runtime OTA configuration loaded from files/private preferences. */
public final class OtaRuntimeSettings {
    public static final long DEFAULT_CHECK_INTERVAL_MS = 60_000L;

    public final List<String> sourceUrls;
    public final long checkIntervalMs;
    public final boolean trusted;

    OtaRuntimeSettings(List<String> sourceUrls, long checkIntervalMs, boolean trusted) {
        this.sourceUrls = Collections.unmodifiableList(new ArrayList<>(sourceUrls));
        this.checkIntervalMs = Math.max(10_000L, checkIntervalMs);
        this.trusted = trusted;
    }
}
