diff options
author | Samuel Holland <samuel@sholland.org> | 2017-07-31 21:20:04 -0500 |
---|---|---|
committer | Samuel Holland <samuel@sholland.org> | 2017-07-31 21:20:04 -0500 |
commit | 0ea5ae605c327836a298747a6f18f446ebecdc73 (patch) | |
tree | c3a10030e490b8ec4c520508f45bab231736170f /app/src/main | |
parent | ca708ba3827bcf7e7cc0e480bbf690e3755e9c90 (diff) |
ProfileService: Use deep copy to clone profiles
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'app/src/main')
-rw-r--r-- | app/src/main/java/com/wireguard/android/ProfileService.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/src/main/java/com/wireguard/android/ProfileService.java b/app/src/main/java/com/wireguard/android/ProfileService.java index a459dba5..8925fb50 100644 --- a/app/src/main/java/com/wireguard/android/ProfileService.java +++ b/app/src/main/java/com/wireguard/android/ProfileService.java @@ -90,7 +90,9 @@ public class ProfileService extends Service { @Override public Profile copyProfileForEditing(Profile profile) { - return null; + if (!profiles.contains(profile)) + return null; + return profile.copy(); } @Override |