Use date as suffix for export file name

This commit is contained in:
M66B 2016-01-09 08:49:50 +01:00
parent ecf83ac813
commit c9392c1d81
1 changed files with 3 additions and 1 deletions

View File

@ -61,7 +61,9 @@ import org.xmlpull.v1.XmlSerializer;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.OutputStream; import java.io.OutputStream;
import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;
import java.util.List; import java.util.List;
@ -521,7 +523,7 @@ public class ActivitySettings extends AppCompatActivity implements SharedPrefere
Intent intent = new Intent(Intent.ACTION_CREATE_DOCUMENT); Intent intent = new Intent(Intent.ACTION_CREATE_DOCUMENT);
intent.addCategory(Intent.CATEGORY_OPENABLE); intent.addCategory(Intent.CATEGORY_OPENABLE);
intent.setType("text/xml"); 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; return intent;
} }