From 0ea5ae605c327836a298747a6f18f446ebecdc73 Mon Sep 17 00:00:00 2001 From: Samuel Holland Date: Mon, 31 Jul 2017 21:20:04 -0500 Subject: ProfileService: Use deep copy to clone profiles Signed-off-by: Jason A. Donenfeld --- app/src/main/java/com/wireguard/android/ProfileService.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app/src/main') 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 -- cgit v1.2.3