From 557bc63f955031803696d045cc43dd2fa20629a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Sun, 10 Dec 2023 19:21:21 +0900 Subject: [PATCH] =?UTF-8?q?=E5=AE=9F=E9=9A=9B=E3=81=AE=E6=83=85=E5=A0=B1?= =?UTF-8?q?=E3=82=92=E8=BF=94=E3=81=99=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nem/lacerta/data/impl/DeviceMetaImpl.java | 17 +++++++++++------ .../nem/lacerta/data/model/DeviceMetaModel.java | 6 +++--- .../nem/lacerta/data/repository/DeviceMeta.java | 5 +++-- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/data/src/main/java/one/nem/lacerta/data/impl/DeviceMetaImpl.java b/data/src/main/java/one/nem/lacerta/data/impl/DeviceMetaImpl.java index 650a7ccc..6fc0bdae 100644 --- a/data/src/main/java/one/nem/lacerta/data/impl/DeviceMetaImpl.java +++ b/data/src/main/java/one/nem/lacerta/data/impl/DeviceMetaImpl.java @@ -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; } } diff --git a/data/src/main/java/one/nem/lacerta/data/model/DeviceMetaModel.java b/data/src/main/java/one/nem/lacerta/data/model/DeviceMetaModel.java index 166e6993..38231fda 100644 --- a/data/src/main/java/one/nem/lacerta/data/model/DeviceMetaModel.java +++ b/data/src/main/java/one/nem/lacerta/data/model/DeviceMetaModel.java @@ -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; } } diff --git a/data/src/main/java/one/nem/lacerta/data/repository/DeviceMeta.java b/data/src/main/java/one/nem/lacerta/data/repository/DeviceMeta.java index 6d6bc2b2..586dfdd1 100644 --- a/data/src/main/java/one/nem/lacerta/data/repository/DeviceMeta.java +++ b/data/src/main/java/one/nem/lacerta/data/repository/DeviceMeta.java @@ -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(); } \ No newline at end of file