From c9392c1d814ed33137383518a8f5cb8ac8be8484 Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 9 Jan 2016 08:49:50 +0100 Subject: [PATCH] Use date as suffix for export file name --- app/src/main/java/eu/faircode/netguard/ActivitySettings.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/netguard/ActivitySettings.java b/app/src/main/java/eu/faircode/netguard/ActivitySettings.java index 7e09eb55..9094b202 100644 --- a/app/src/main/java/eu/faircode/netguard/ActivitySettings.java +++ b/app/src/main/java/eu/faircode/netguard/ActivitySettings.java @@ -61,7 +61,9 @@ import org.xmlpull.v1.XmlSerializer; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; +import java.text.SimpleDateFormat; import java.util.ArrayList; +import java.util.Date; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -521,7 +523,7 @@ public class ActivitySettings extends AppCompatActivity implements SharedPrefere Intent intent = new Intent(Intent.ACTION_CREATE_DOCUMENT); intent.addCategory(Intent.CATEGORY_OPENABLE); intent.setType("text/xml"); - intent.putExtra(Intent.EXTRA_TITLE, "netguard.xml"); + intent.putExtra(Intent.EXTRA_TITLE, "netguard_" + new SimpleDateFormat("yyyyMMdd").format(new Date().getTime()) + ".xml"); return intent; }