From 0df7e69b9694a146ac541395e03b738b96672cb3 Mon Sep 17 00:00:00 2001 From: CappielloAntonio Date: Sat, 5 Feb 2022 23:29:27 +0100 Subject: [PATCH] Removed salt and token information from db --- .../play/database/AppDatabase.java | 4 +-- .../cappielloantonio/play/model/Server.java | 30 +------------------ 2 files changed, 3 insertions(+), 31 deletions(-) diff --git a/app/src/main/java/com/cappielloantonio/play/database/AppDatabase.java b/app/src/main/java/com/cappielloantonio/play/database/AppDatabase.java index 4a633ffa..bc1c86e2 100644 --- a/app/src/main/java/com/cappielloantonio/play/database/AppDatabase.java +++ b/app/src/main/java/com/cappielloantonio/play/database/AppDatabase.java @@ -21,9 +21,9 @@ import com.cappielloantonio.play.model.Server; @SuppressLint("RestrictedApi") @Database( - version = 32, + version = 33, entities = {Queue.class, Server.class, RecentSearch.class, Download.class, Playlist.class}, - autoMigrations = { @AutoMigration(from = 31, to = 32) } + autoMigrations = { @AutoMigration(from = 32, to = 33) } ) public abstract class AppDatabase extends RoomDatabase { private static final String TAG = "AppDatabase"; diff --git a/app/src/main/java/com/cappielloantonio/play/model/Server.java b/app/src/main/java/com/cappielloantonio/play/model/Server.java index d769d377..d1df6762 100644 --- a/app/src/main/java/com/cappielloantonio/play/model/Server.java +++ b/app/src/main/java/com/cappielloantonio/play/model/Server.java @@ -27,26 +27,18 @@ public class Server implements Parcelable { @ColumnInfo(name = "address") private String address; - @ColumnInfo(name = "token") - private String token; - - @ColumnInfo(name = "salt") - private String salt; - @ColumnInfo(name = "timestamp") private long timestamp; @ColumnInfo(name = "low_security", defaultValue = "false") private boolean lowSecurity; - public Server(@NonNull String serverId, String serverName, String username, String password, String address, String token, String salt, long timestamp, boolean lowSecurity) { + public Server(@NonNull String serverId, String serverName, String username, String password, String address, long timestamp, boolean lowSecurity) { this.serverId = serverId; this.serverName = serverName; this.username = username; this.password = password; this.address = address; - this.token = token; - this.salt = salt; this.timestamp = timestamp; this.lowSecurity = lowSecurity; } @@ -92,22 +84,6 @@ public class Server implements Parcelable { this.address = address; } - public String getToken() { - return token; - } - - public void setToken(String token) { - this.token = token; - } - - public String getSalt() { - return salt; - } - - public void setSalt(String salt) { - this.salt = salt; - } - public long getTimestamp() { return timestamp; } @@ -155,8 +131,6 @@ public class Server implements Parcelable { dest.writeString(serverName); dest.writeString(username); dest.writeString(address); - dest.writeString(token); - dest.writeString(salt); dest.writeLong(timestamp); } @@ -165,8 +139,6 @@ public class Server implements Parcelable { this.serverName = in.readString(); this.username = in.readString(); this.address = in.readString(); - this.token = in.readString(); - this.salt = in.readString(); this.timestamp = in.readLong(); }