package com.hh.arome.common.scan.idcard.manymodels;

import android.app.Activity;
import android.content.Context;

import androidx.fragment.app.FragmentActivity;

import com.hh.arome.common.scan.idcard.abstractidcard.IIDCardScan;
import com.hh.arome.common.scan.idcard.callback.IDCardInitResultCallback;
import com.hh.arome.common.scan.idcard.callback.IDCardScanResultCallback;

public class NullIDCardScan implements IIDCardScan {


    //用volatile关键字确保 instance 在多线程下的可见性
    private static volatile NullIDCardScan instance = null;

    //将构造方法私有化，禁止外部通过构造方法创建实例
    private NullIDCardScan() {}

    //提供一个公共的访问方法，用于获取该类的唯一实例
    public static NullIDCardScan getInstance(Context context) {
        //如果instance为空，就进行实例化
        if (instance == null) {
            //保证多线程下只有一个线程进行实例化
            synchronized (NullIDCardScan.class) {
                //第二次判断，避免多线程下创建多个实例
                if (instance == null) {
                    instance = new NullIDCardScan(context);
                }
            }
        }
        return instance;
    }


    Context mContext;
    Activity mActivity;

    public NullIDCardScan(Context context) {
        if (context instanceof FragmentActivity) {
            this.mActivity = (Activity) context;
        }
        this.mContext = context;
        init();
    }

    private void init() {


    }


    @Override
    public void initIDCard(IDCardInitResultCallback idCardInitResultCallback) {

    }

    @Override
    public void startIDCardScan(IDCardScanResultCallback idCardScanResultCallback) {

    }

    @Override
    public void resumeIDCardScan() {

    }

    @Override
    public void pauseIDCardScan() {

    }

    @Override
    public void stopIDCardScan() {

    }

    @Override
    public void destoryIDCardScan() {

    }
}
