package pxds.vazp

import android.app.usage.UsageEvents
import android.app.usage.UsageStats
import android.graphics.drawable.Drawable
import com.google.gson.ExclusionStrategy
import com.google.gson.FieldAttributes
import com.google.gson.GsonBuilder
import com.test.basd.supercleanermax.R
import pxds.lmmd.zmwf.Khko.string

data class Rorl(
    val icIcon: Drawable, val appName: String, val pkg: String, var isSelected: Boolean = false, var installTime: Long = 0, var appSize: Long = -1L, var lastUsedTime: Long = -1L, ) {
    var pinYin: String = ""
    var usageEvents: List<UsageEvents.Event>? = null
    var usageStats: List<UsageStats>? = null

    var launchTimes = 0
    var foregroundTimes = 0
    var backgroundTimes = 0
    var isRunning = false
    var screenTime: Long = 0

    companion object {
        val appBeanGson = GsonBuilder().setExclusionStrategies(object : ExclusionStrategy {
            override fun shouldSkipField(f: FieldAttributes): Boolean {
                val skipField = arrayOf(R.string.ޗޠޒޣޜ_D.string())
                return skipField.contains(f.name)
            }

            override fun shouldSkipClass(clazz: Class<*>): Boolean {

                return false
            }

        }).create()
    }
}
