package com.secspace.lib.common.arouter.libwork;

import android.app.Activity;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;

import com.alibaba.android.arouter.facade.template.IProvider;

/**
 * Created by cyw_m on 2018/4/24.
 */

public interface IWorkApi extends IProvider {

    void startExitService();

    void resetMdm();

    void installPackage(String path);

    void setSilentActiveAdmin(ComponentName componentName);

    void forceExitRelease(Context context);

    boolean isVAPrivatise();

    boolean isRomUpdate();

    /**
     * 需要优化插件
     *
     * @return
     */
    boolean isNeedOptimize();

    /**
     * 需要更新插件
     *
     * @return
     */
    boolean isNeedUpdate();

    /**
     * 优化应用
     */
    void optimizeSpace();

    /**
     * 显示优化应用弹窗
     *
     * @param ctx
     * @param current
     * @param all
     */
    void showOptimizeDialog(Activity ctx, int current, int all);

    /**
     * 取消优化应用弹窗
     *
     * @param ctx
     */
    void dismissOptimizeDialog(Activity ctx);


    void updateSecSpace();

    /**
     * 安全域更新时域内预置的应用更新弹窗
     *
     * @param ctx
     * @param current
     * @param all
     */
    void showPresetAppUpdateDialog(Activity ctx, int current, int all);

    void dismissPresetAppUpdateDialog(Activity ctx);


    void setDeviceOwnerApp();

    void showMiddleWareDeviceOwnerCheckDialog(Activity activity);

    /**
     * 通过配置文件获取版本描述
     *
     * @return
     */
    String getVersionDesc();

    /**
     * 是否正在初始化安装应用或者优化应用
     *
     * @return
     */
    boolean isInPreInstalling();

    void scanFile(Uri uri);

    void scanFile(String[] paths);

    void sendBroadcast(Intent intent);

    boolean isNoExitAllowed();

    void initDisallowedUninstallApps(Context context);
}
