package com.gh.gamecenter.core.utils

import android.app.Activity

object CurrentActivityHolder {

    @JvmStatic
    val activitySet by lazy { HashSet<Activity>() }

    @JvmStatic
    fun getCurrentActivity(): Activity? {
        return if (activitySet.isEmpty()) {
            null
        } else {
            activitySet.iterator().next()
        }
    }

}