package com.secspace.lib.common.utils;

import android.content.Context;
import android.util.Log;

public class SystemSettingsProviderUtil {
    private static final String TAG = "SystemSettingsProvider";

    public static boolean isWifiOn(Context context) {
        try {
            return android.provider.Settings.Global.getInt(context.getContentResolver(), "wifi_on", 0) == 1;
        } catch (Exception e) {
            Log.w(TAG, "isWifiOn Exception: " + e.toString());
        }
        return false;
    }

    public static boolean isBtOn(Context context) {
        try {
            return android.provider.Settings.Global.getInt(context.getContentResolver(), "bluetooth_on", 0) == 1;
        } catch (Exception e) {
            Log.w(TAG, "isBtOn Exception: " + e.toString());
        }
        return false;
    }
}
