package com.gh.common.provider

import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Route
import com.gh.common.util.PackageInstaller
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.core.provider.IPackageInstallerProvider
import com.lightgame.download.DownloadEntity

@Route(path = RouteConsts.provider.packageInstaller, name = "PackageInstaller暴露服务")
class PackageInstallerProviderImpl : IPackageInstallerProvider {

    override fun install(context: Context, downloadEntity: DownloadEntity, showUnzipToast: Boolean) {
        PackageInstaller.install(context, downloadEntity, showUnzipToast)
    }

    override fun uninstall(context: Context, path: String) {
        PackageInstaller.uninstall(context, path)
    }

    override fun init(context: Context?) {
        // Do nothing
    }
}