package com.huawei.hwmdemo.dependency.menu;

import com.huawei.hwmconf.presentation.dependency.IShareInterceptHandle;
import com.huawei.hwmconf.presentation.model.HWMShareInterceptInfo;
import com.huawei.hwmdemo.utils.DemoUtil;
import com.huawei.hwmfoundation.callback.IHwmCallback;


public class CustomShareInterceptHandle implements IShareInterceptHandle {


    @Override
    public void onSelfStartShareIntercept(IHwmCallback<HWMShareInterceptInfo> callback) {
        if (callback != null) {
            HWMShareInterceptInfo HWMShareInterceptInfo = new HWMShareInterceptInfo();
            HWMShareInterceptInfo.setInterrupt(true);
            HWMShareInterceptInfo.setInterruptReason("DemoTest");
            callback.onSuccess(HWMShareInterceptInfo);
            DemoUtil.showToast("已拦截共享");
        }
    }
}
