mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-30 05:10:14 +00:00
Remove the Canonical Address Database
This was a holdover from Signal's origins as a pure SMS app. It causes problems, depends on undefined device specific behavior, and should no longer be necessary now that we have all the information we need to E164 all numbers. // FREEBIE
This commit is contained in:
@@ -11,7 +11,7 @@ public class EarlyReceiptCache {
|
||||
|
||||
private final LRUCache<Placeholder, Long> cache = new LRUCache<>(100);
|
||||
|
||||
public synchronized void increment(long timestamp, String address) {
|
||||
public synchronized void increment(long timestamp, Address address) {
|
||||
Log.w(TAG, this+"");
|
||||
Log.w(TAG, String.format("Early receipt: %d,%s", timestamp, address));
|
||||
Placeholder tuple = new Placeholder(timestamp, address);
|
||||
@@ -24,7 +24,7 @@ public class EarlyReceiptCache {
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized long remove(long timestamp, String address) {
|
||||
public synchronized long remove(long timestamp, Address address) {
|
||||
Long count = cache.remove(new Placeholder(timestamp, address));
|
||||
Log.w(TAG, this+"");
|
||||
Log.w(TAG, String.format("Checking early receipts (%d, %s): %d", timestamp, address, count));
|
||||
@@ -34,9 +34,9 @@ public class EarlyReceiptCache {
|
||||
private class Placeholder {
|
||||
|
||||
private final long timestamp;
|
||||
private final @NonNull String address;
|
||||
private final @NonNull Address address;
|
||||
|
||||
private Placeholder(long timestamp, @NonNull String address) {
|
||||
private Placeholder(long timestamp, @NonNull Address address) {
|
||||
this.timestamp = timestamp;
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user