diff options
author | 2018-07-25 19:30:34 -0500 | |
---|---|---|
committer | 2018-07-26 05:17:43 +0200 | |
commit | 9652fe99df68db5c483ea8e170f6e09f06a5e0d1 (patch) | |
tree | d88fa5ef4fa4e53d605e6bce9d788960a80642de /app/src/main/java/com/wireguard/util | |
parent | Application: use proper completablefuture for backend (diff) | |
download | wireguard-android-9652fe99df68db5c483ea8e170f6e09f06a5e0d1.tar.xz wireguard-android-9652fe99df68db5c483ea8e170f6e09f06a5e0d1.zip |
TunnelDetailFragment now restores state correctly after process death
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to '')
-rw-r--r-- | app/src/main/java/com/wireguard/util/KeyedList.java | 4 | ||||
-rw-r--r-- | app/src/main/java/com/wireguard/util/SortedKeyedList.java | 4 |
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(); |