mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-23 00:13:16 +00:00
実際の情報を返すように
This commit is contained in:
parent
085e52d4b6
commit
557bc63f95
|
@ -1,6 +1,9 @@
|
|||
package one.nem.lacerta.data.impl;
|
||||
|
||||
import android.os.Build;
|
||||
|
||||
import one.nem.lacerta.data.repository.DeviceMeta;
|
||||
import one.nem.lacerta.data.model.DeviceMetaModel;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
|
@ -10,12 +13,14 @@ public class DeviceMetaImpl implements DeviceMeta{
|
|||
public DeviceMetaImpl() {
|
||||
}
|
||||
|
||||
public String getDeviceId() {
|
||||
return "device_id"; // DEBUG
|
||||
}
|
||||
|
||||
public String getDeviceApiLevel() {
|
||||
return "device_api_level"; // DEBUG
|
||||
public DeviceMetaModel getDeviceMeta() {
|
||||
DeviceMetaModel deviceMetaModel = new DeviceMetaModel(
|
||||
Build.MANUFACTURER,
|
||||
Build.MODEL,
|
||||
Build.VERSION.RELEASE,
|
||||
Build.VERSION.SDK_INT
|
||||
);
|
||||
return deviceMetaModel;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -4,9 +4,9 @@ public class DeviceMetaModel {
|
|||
private String DeviceManufacturer;
|
||||
private String DeviceModel;
|
||||
private String AndroidVersion;
|
||||
private String AndroidApiLevel;
|
||||
private int AndroidApiLevel;
|
||||
|
||||
public DeviceMetaModel(String DeviceManufacturer, String DeviceModel, String AndroidVersion, String AndroidApiLevel) {
|
||||
public DeviceMetaModel(String DeviceManufacturer, String DeviceModel, String AndroidVersion, int AndroidApiLevel) {
|
||||
this.DeviceManufacturer = DeviceManufacturer;
|
||||
this.DeviceModel = DeviceModel;
|
||||
this.AndroidVersion = AndroidVersion;
|
||||
|
@ -28,7 +28,7 @@ public class DeviceMetaModel {
|
|||
return AndroidVersion;
|
||||
}
|
||||
|
||||
public String getAndroidApiLevel() {
|
||||
public int getAndroidApiLevel() {
|
||||
return AndroidApiLevel;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package one.nem.lacerta.data.repository;
|
||||
|
||||
import one.nem.lacerta.data.model.DeviceMetaModel;
|
||||
|
||||
public interface DeviceMeta {
|
||||
String getDeviceId();
|
||||
String getDeviceApiLevel();
|
||||
DeviceMetaModel getDeviceMeta();
|
||||
}
|
Loading…
Reference in New Issue
Block a user