Removed salt and token information from db

This commit is contained in:
CappielloAntonio 2022-02-05 23:29:27 +01:00
parent db4bc39ea6
commit 0df7e69b96
2 changed files with 3 additions and 31 deletions

View file

@ -21,9 +21,9 @@ import com.cappielloantonio.play.model.Server;
@SuppressLint("RestrictedApi") @SuppressLint("RestrictedApi")
@Database( @Database(
version = 32, version = 33,
entities = {Queue.class, Server.class, RecentSearch.class, Download.class, Playlist.class}, 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 { public abstract class AppDatabase extends RoomDatabase {
private static final String TAG = "AppDatabase"; private static final String TAG = "AppDatabase";

View file

@ -27,26 +27,18 @@ public class Server implements Parcelable {
@ColumnInfo(name = "address") @ColumnInfo(name = "address")
private String address; private String address;
@ColumnInfo(name = "token")
private String token;
@ColumnInfo(name = "salt")
private String salt;
@ColumnInfo(name = "timestamp") @ColumnInfo(name = "timestamp")
private long timestamp; private long timestamp;
@ColumnInfo(name = "low_security", defaultValue = "false") @ColumnInfo(name = "low_security", defaultValue = "false")
private boolean lowSecurity; 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.serverId = serverId;
this.serverName = serverName; this.serverName = serverName;
this.username = username; this.username = username;
this.password = password; this.password = password;
this.address = address; this.address = address;
this.token = token;
this.salt = salt;
this.timestamp = timestamp; this.timestamp = timestamp;
this.lowSecurity = lowSecurity; this.lowSecurity = lowSecurity;
} }
@ -92,22 +84,6 @@ public class Server implements Parcelable {
this.address = address; 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() { public long getTimestamp() {
return timestamp; return timestamp;
} }
@ -155,8 +131,6 @@ public class Server implements Parcelable {
dest.writeString(serverName); dest.writeString(serverName);
dest.writeString(username); dest.writeString(username);
dest.writeString(address); dest.writeString(address);
dest.writeString(token);
dest.writeString(salt);
dest.writeLong(timestamp); dest.writeLong(timestamp);
} }
@ -165,8 +139,6 @@ public class Server implements Parcelable {
this.serverName = in.readString(); this.serverName = in.readString();
this.username = in.readString(); this.username = in.readString();
this.address = in.readString(); this.address = in.readString();
this.token = in.readString();
this.salt = in.readString();
this.timestamp = in.readLong(); this.timestamp = in.readLong();
} }