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 | 8bb49c1b307d2ac0f782803b389690cdaa2d0932 (patch) | |
tree | c3a10030e490b8ec4c520508f45bab231736170f /app/src/main | |
parent | e0ed0b56133f1fe4efe939751def9ac1f922847d (diff) |
ProfileService: Use deep copy to clone profiles
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 |