実際の情報を返すように

This commit is contained in:
ろむねこ 2023-12-10 19:21:21 +09:00
parent 085e52d4b6
commit 557bc63f95
No known key found for this signature in database
GPG Key ID: FA1F39A1BA37D168
3 changed files with 17 additions and 11 deletions

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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();
}