package com.seewo.vcommons.system.onoffsetting;

import android.database.Cursor;
import java.io.Serializable;
import java.util.Calendar;

/* JADX INFO: loaded from: classes.dex */
public class Task implements Serializable {
    public static final String DEFAULT_INVALID_DAYS = "0000000";
    public static final int INVALID_TIME = -1;
    private static final long serialVersionUID = 1;
    public boolean autoPlay;
    public String command;
    public String daysOfWeek;
    public boolean enabled;
    public String forceChannel;
    public int groupId;
    public int id;
    public String message;
    public boolean openApp;
    public String rebootDays;
    public int rebootHour;
    public int rebootMinute;
    public String shutdownDays;
    public int shutdownHour;
    public int shutdownMinute;
    public String startupDays;
    public int startupHour;
    public int startupMinute;

    public Task(Cursor cursor) {
        this.id = cursor.getInt(0);
        this.groupId = cursor.getInt(1);
        this.startupHour = cursor.getInt(5);
        this.startupMinute = cursor.getInt(6);
        this.shutdownHour = cursor.getInt(7);
        this.shutdownMinute = cursor.getInt(8);
        this.daysOfWeek = cursor.getString(2);
        this.startupDays = cursor.getString(3);
        this.shutdownDays = cursor.getString(4);
        this.enabled = cursor.getInt(11) == 1;
        this.message = cursor.getString(9);
        this.command = cursor.getString(10);
        this.forceChannel = cursor.getString(12);
        this.autoPlay = cursor.getInt(13) == 1;
        this.openApp = cursor.getInt(14) == 1;
        if (b.a) {
            this.rebootDays = cursor.getString(15);
            this.rebootHour = cursor.getInt(16);
            this.rebootMinute = cursor.getInt(17);
        }
    }

    public String toString() {
        return "ID: " + this.id + " GROUP_ID: " + this.groupId + " DAYS: " + this.daysOfWeek + " STARTUP_DAYS: " + this.startupDays + " SHUTDOWN_DAYS: " + this.shutdownDays + " STARTUP_HOUR: " + this.startupHour + " STARTUP_MINUTE: " + this.startupMinute + " SHUTDOWN_HOUR: " + this.shutdownHour + " SHUTDOWN_MINUTE: " + this.shutdownMinute + " ENABLED: " + this.enabled + " MESSAGE: " + this.message + " COMMAND: " + this.command + " FORCE_CHANNEL_NAME: " + this.forceChannel + " AUTO_PLAY" + this.autoPlay + " OPEN_APP" + this.openApp + " REBOOT_DAYS" + this.rebootDays + " REBOOT_HOUR " + this.rebootHour + " REBOOT_MINUTE " + this.rebootMinute;
    }

    public Task(int i2) {
        this.id = -1;
        Calendar calendar = Calendar.getInstance();
        calendar.setTimeInMillis(System.currentTimeMillis());
        this.groupId = i2;
        this.startupHour = calendar.get(11);
        this.startupMinute = calendar.get(12);
        this.shutdownHour = -1;
        this.shutdownMinute = -1;
        this.daysOfWeek = DEFAULT_INVALID_DAYS;
        this.startupDays = DEFAULT_INVALID_DAYS;
        this.shutdownDays = DEFAULT_INVALID_DAYS;
        this.enabled = true;
        this.message = "";
        this.command = "";
        this.forceChannel = "";
        this.autoPlay = false;
        this.openApp = false;
        this.rebootDays = DEFAULT_INVALID_DAYS;
        this.rebootHour = -1;
        this.rebootMinute = -1;
    }

    public Task() {
        this.id = -1;
        this.groupId = -1;
        this.startupHour = -1;
        this.startupMinute = -1;
        this.shutdownHour = -1;
        this.shutdownMinute = -1;
        this.daysOfWeek = DEFAULT_INVALID_DAYS;
        this.startupDays = DEFAULT_INVALID_DAYS;
        this.shutdownDays = DEFAULT_INVALID_DAYS;
        this.enabled = false;
        this.message = "";
        this.command = "";
        this.forceChannel = "";
        this.autoPlay = false;
        this.openApp = false;
        this.rebootDays = DEFAULT_INVALID_DAYS;
        this.rebootHour = -1;
        this.rebootMinute = -1;
    }
}
