public class FuDeviceUtils
extends java.lang.Object
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
DEVICE_LEVEL_HIGH |
static int |
DEVICE_LEVEL_LOW |
static int |
DEVICE_LEVEL_MID |
static int |
DEVICEINFO_UNKNOWN
The default return value of any method in this class when an
error occurs or when processing fails (Currently set to -1).
|
static java.lang.String[] |
lowDevice |
static java.lang.String[] |
middleDevice |
static java.lang.String |
Nexus_6P |
static java.lang.String |
TAG |
static java.lang.String[] |
upscaleDevice |
| 构造器和说明 |
|---|
FuDeviceUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static long |
getAvailMemory(android.content.Context context)
获取当前剩余内存(ram)
|
static java.lang.String |
getBrand()
获取厂商信息
|
static int |
getCPUMaxFreqKHz()
Method for reading the clock speed of a CPU core on the device.
|
static java.lang.String |
getDeviceName()
获取设备名
|
static java.lang.String |
getHardWare()
获取硬件信息(cpu型号)
|
static java.lang.String |
getModel()
获取手机机型
|
static int |
getNumberOfCPUCores()
Reads the number of CPU cores from the first available information from
/sys/devices/system/cpu/possible, /sys/devices/system/cpu/present,
then /sys/devices/system/cpu/. |
static long |
getTotalMemory(android.content.Context c)
Calculates the total RAM of the device through Android API or /proc/meminfo.
|
static boolean |
isNexus6P() |
static int |
judgeDeviceLevel(android.content.Context context)
Level judgement based on current memory and CPU.
|
public static final java.lang.String TAG
public static final int DEVICE_LEVEL_HIGH
public static final int DEVICE_LEVEL_MID
public static final int DEVICE_LEVEL_LOW
public static final int DEVICEINFO_UNKNOWN
public static final java.lang.String[] upscaleDevice
public static final java.lang.String[] lowDevice
public static final java.lang.String[] middleDevice
public static final java.lang.String Nexus_6P
public static long getTotalMemory(android.content.Context c)
c - - Context object for current running activity.public static int getCPUMaxFreqKHz()
/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq or /proc/cpuinfo.public static int getNumberOfCPUCores()
/sys/devices/system/cpu/possible, /sys/devices/system/cpu/present,
then /sys/devices/system/cpu/.public static long getAvailMemory(android.content.Context context)
context - public static java.lang.String getBrand()
public static java.lang.String getModel()
public static java.lang.String getHardWare()
public static int judgeDeviceLevel(android.content.Context context)
context - - Context object.public static boolean isNexus6P()
public static java.lang.String getDeviceName()