package com.seewo.vcommons.data;

import android.content.Context;
import android.content.Intent;
import com.seewo.vcommons.utils.BoardTypeUtils;

/* JADX INFO: loaded from: classes.dex */
public class FreeformUtils {
    private static final String PROPERTY_FREEFORM_SWITCH;
    private static final String PROPERTY_SUPPORT_FREEFORM;

    static {
        String str;
        String str2;
        if (BoardTypeUtils.isCtmProperty()) {
            str = BoardTypeUtils.isSupportSELinux() ? "persist.ctm.freeform" : "persist.cvte.freeform";
        } else {
            str = "persist.sys.freeform";
        }
        PROPERTY_FREEFORM_SWITCH = str;
        if (BoardTypeUtils.isCtmProperty()) {
            str2 = BoardTypeUtils.isSupportSELinux() ? "persist.ctm.support.freeform" : "persist.support.freeform";
        } else {
            str2 = "persist.sys.support.freeform";
        }
        PROPERTY_SUPPORT_FREEFORM = str2;
    }

    private FreeformUtils() {
    }

    public static boolean isFreeformSwitchEnable() {
        return PropertiesUtils.getProperty(PROPERTY_FREEFORM_SWITCH, false);
    }

    public static boolean setFreeformSwitchEnable(boolean z) {
        return PropertiesUtils.setProperty(PROPERTY_FREEFORM_SWITCH, String.valueOf(z));
    }

    public static boolean isSupproFreeformMode() {
        return PropertiesUtils.getProperty(PROPERTY_SUPPORT_FREEFORM, false);
    }

    public static void miniAllTaskSize(Context context, boolean z) {
        miniAllTaskSize(context, z, -1);
    }

    public static void miniAllTaskSize(Context context, boolean z, int i) {
        Intent intent = new Intent("com.seewo.freeform.TASK_MINSIZE");
        intent.putExtra("show", z);
        intent.putExtra("taskId", i);
        context.sendBroadcast(intent);
    }
}
