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