mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 19:49:11 +03:00
28 lines
719 B
Java
28 lines
719 B
Java
|
package ru.gravit.launcher;
|
||
|
|
||
|
import com.google.gson.Gson;
|
||
|
|
||
|
public class OshiHWID implements HWID {
|
||
|
public static Gson gson = new Gson();
|
||
|
public long totalMemory = 0;
|
||
|
public String serialNumber;
|
||
|
public String HWDiskSerial;
|
||
|
|
||
|
@Override
|
||
|
public String getSerializeString() {
|
||
|
return gson.toJson(this);
|
||
|
}
|
||
|
public int getLevel() //Уровень доверия, насколько уникальные значения
|
||
|
{
|
||
|
int result = 0;
|
||
|
if(totalMemory != 0) result++;
|
||
|
if(serialNumber != null) result+=5;
|
||
|
if(HWDiskSerial != null) result+=8;
|
||
|
return result;
|
||
|
}
|
||
|
@Override
|
||
|
public boolean isNull() {
|
||
|
return getLevel() < 2;
|
||
|
}
|
||
|
}
|