diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/database/DBHelper.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/database/DBHelper.java index 5bf4947232..0ca8560642 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/database/DBHelper.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/database/DBHelper.java @@ -1,6 +1,6 @@ -/* Copyright (C) 2015-2024 Andreas Shimokawa, Carsten Pfeiffer, Damien +/* Copyright (C) 2015-2026 Andreas Shimokawa, Carsten Pfeiffer, Damien Gaignon, Daniel Dakhno, Daniele Gobbetti, Felix Konstantin Maurer, JohnnySun, - José Rebelo, Petr Vaněk + José Rebelo, Petr Vaněk, Thomas Kuehne This file is part of Gadgetbridge. @@ -122,10 +122,10 @@ public class DBHelper { * be created in the database. *
* Note: so far there is only ever a single user; there is no multi-user support yet
- * @return the User entity
+ * @return the {@link User} entity
*/
@NonNull
- public static User getUser(DaoSession session) {
+ public static User getUser(@NonNull final DaoSession session) {
ActivityUser prefsUser = new ActivityUser();
UserDao userDao = session.getUserDao();
User user;
@@ -287,11 +287,12 @@ public class DBHelper {
}
/**
- * Finds the corresponding Device entity for the given GBDevice.
- * @return the corresponding Device entity, or null if none
+ * Finds the corresponding {@link Device} entity for the given {@link GBDevice}.
+ * @return the corresponding {@link Device} entity, or {@code null} if none
+ * @see #getDevice(GBDevice, DaoSession)
*/
@Nullable
- public static Device findDevice(GBDevice gbDevice, DaoSession session) {
+ public static Device findDevice(@NonNull final GBDevice gbDevice, @NonNull final DaoSession session) {
DeviceDao deviceDao = session.getDeviceDao();
Query