summaryrefslogtreecommitdiffhomepage
path: root/app/src/main/java/com/wireguard/util
diff options
context:
space:
mode:
authorEric Kuck <eric@bluelinelabs.com>2018-07-25 19:30:34 -0500
committerJason A. Donenfeld <Jason@zx2c4.com>2018-07-26 05:17:43 +0200
commit9652fe99df68db5c483ea8e170f6e09f06a5e0d1 (patch)
treed88fa5ef4fa4e53d605e6bce9d788960a80642de /app/src/main/java/com/wireguard/util
parent62d8beff9693080225fe550d82f105ba3cde5df2 (diff)
TunnelDetailFragment now restores state correctly after process death
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'app/src/main/java/com/wireguard/util')
-rw-r--r--app/src/main/java/com/wireguard/util/KeyedList.java4
-rw-r--r--app/src/main/java/com/wireguard/util/SortedKeyedList.java4
2 files changed, 8 insertions, 0 deletions
diff --git a/app/src/main/java/com/wireguard/util/KeyedList.java b/app/src/main/java/com/wireguard/util/KeyedList.java
index c4ee975e..aab8ff21 100644
--- a/app/src/main/java/com/wireguard/util/KeyedList.java
+++ b/app/src/main/java/com/wireguard/util/KeyedList.java
@@ -5,6 +5,8 @@
package com.wireguard.util;
+import android.support.annotation.Nullable;
+
import java.util.Collection;
import java.util.List;
@@ -18,8 +20,10 @@ public interface KeyedList<K, E extends Keyed<? extends K>> extends List<E> {
boolean containsKey(K key);
+ @Nullable
E get(K key);
+ @Nullable
E getLast(K key);
int indexOfKey(K key);
diff --git a/app/src/main/java/com/wireguard/util/SortedKeyedList.java b/app/src/main/java/com/wireguard/util/SortedKeyedList.java
index f166cd92..a57e9739 100644
--- a/app/src/main/java/com/wireguard/util/SortedKeyedList.java
+++ b/app/src/main/java/com/wireguard/util/SortedKeyedList.java
@@ -5,6 +5,8 @@
package com.wireguard.util;
+import android.support.annotation.Nullable;
+
import java.util.Collection;
import java.util.Comparator;
import java.util.Set;
@@ -17,10 +19,12 @@ import java.util.Set;
public interface SortedKeyedList<K, E extends Keyed<? extends K>> extends KeyedList<K, E> {
Comparator<? super K> comparator();
+ @Nullable
K firstKey();
Set<K> keySet();
+ @Nullable
K lastKey();
Collection<E> values();