package com.remax.visualnovel.utils

import android.annotation.SuppressLint
import android.provider.Settings
import com.remax.visualnovel.app.base.app.CommonApplicationProxy

/**
 * Created by HJW on 2023/5/10
 */
class AppUtils {

    companion object {
        private var androidId = ""

        @SuppressLint("HardwareIds")
        fun getAndroidID() = androidId.ifEmpty {
            val id = Settings.Secure.getString(CommonApplicationProxy.application.contentResolver, Settings.Secure.ANDROID_ID)
            androidId = id
            if (id.isNullOrEmpty()) "" else id
        }
    }

}