summaryrefslogtreecommitdiffhomepage
path: root/app/src/main/java
diff options
context:
space:
mode:
authorSamuel Holland <samuel@sholland.org>2017-07-31 21:20:04 -0500
committerSamuel Holland <samuel@sholland.org>2017-07-31 21:20:04 -0500
commit8bb49c1b307d2ac0f782803b389690cdaa2d0932 (patch)
treec3a10030e490b8ec4c520508f45bab231736170f /app/src/main/java
parente0ed0b56133f1fe4efe939751def9ac1f922847d (diff)
ProfileService: Use deep copy to clone profiles
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/com/wireguard/android/ProfileService.java4
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