package com.secspace.lib.common.utils;

import android.content.Context;

import com.secspace.lib.common.env.Providers;

import static com.secspace.lib.common.env.Providers.ProviderHost.PROVIDER_HOST_AUTHORITY;

/**
 * IpcPrefs should be named as IpcInternal
 */
public class IpcPrefs {
    public static boolean isInSecSpace(Context context) {
        return new ProviderCall.Builder(context, PROVIDER_HOST_AUTHORITY)
                .methodName(Providers.ProviderHost.METHOD_IF_IN_SECSPACE)
                .call()
                .getBoolean(Providers.ProviderHost.METHOD_IF_IN_SECSPACE);
    }

    public static boolean isSecSpaceOutWorking(Context context) {
        return new ProviderCall.Builder(context, PROVIDER_HOST_AUTHORITY)
                .methodName(Providers.ProviderHost.METHOD_IS_OUTWORKING_SECSPACE)
                .call()
                .getBoolean(Providers.ProviderHost.METHOD_IS_OUTWORKING_SECSPACE);
    }
}
