package com.workspaceonesdk;

import android.app.Application;
import android.content.Intent;

import com.airwatch.app.AWApplication;
import com.airwatch.util.Logger;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.security.cert.X509Certificate;

public class WorkspaceOneSdkApplication extends AWApplication {

    private static final String TAG = WorkspaceOneSdkApplication.class.getSimpleName();

    @Override
    public void onCreate(@NotNull Application application) {
        super.onCreate(application);
    }

    @Override
    public void onSSLPinningRequestFailure(@NotNull String host, @Nullable X509Certificate x509Certificate) {
        Logger.v(TAG, "SSLPinning request failed for host: "+host);
    }

    @NotNull
    @Override
    public Intent getMainActivityIntent() {
        return new Intent(getApplicationContext(), WorkspaceOneSdkActivity.class);
    }

    @Override
    public void onSSLPinningValidationFailure(@NotNull String host, @Nullable X509Certificate x509Certificate) {
        Logger.v(TAG, "SSLPinning validation failed for host: "+host);
    }
}
