package com.gh.gamecenter.setting.provider

import android.app.Activity
import android.app.Application
import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Route
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.core.provider.IAppProvider
import com.gh.gamecenter.core.provider.IFlavorProvider
import com.gh.gamecenter.setting.HaloApp
import com.gh.gamecenter.setting.R

@Route(path = RouteConsts.provider.app, name = "Application暴露服务")
class AppProviderImpl : IAppProvider {
    override fun init(context: Context?) {
        // Do nothing
    }

    override fun getAppName(): String {
        return HaloApp.getInstance().getString(R.string.app_name)
    }

    override fun getGid(): String {
        return ""
    }

    override fun refreshGid() {
        // Do nothing
    }

    override fun getOaid(): String {
        return ""
    }

    override fun getChannel(): String {
        return ""
    }

    override fun setChannel(channel: String) {
        // Do nothing
    }

    override fun getUserAgent(): String {
        return ""
    }

    override fun getServerUserMark(): String {
        return ""
    }

    override fun getDeviceRamSize(): Long {
        return 0L
    }

    override fun getTemporaryLocalDeviceId(): String {
        return ""
    }

    override fun getFlavorProvider(): IFlavorProvider {
        return object : IFlavorProvider {
            override fun getChannelStr(application: Application): String {
                return ""
            }

            override fun init(application: Application, activity: Activity, activateRatio: Int) {
                // do nothing
            }

            override fun logEvent(content: String) {
                // do nothing
            }
        }
    }


    override fun isUserAcceptPrivacyPolicy(context: Context): Boolean {
        return true
    }

    override fun put(key: String, any: Any) {
        // do nothing
    }

    override fun get(key: String, isRemove: Boolean): Any? {
        return null
    }

    override fun getIsBrandNewInstall(): Boolean {
        return false
    }
}