実際の情報を返すように

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

View File

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

View File

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