From a3a13dd9dc69280f84b60321388ce4b8f674f012 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Sun, 20 Sep 2015 22:33:42 +0100 Subject: Export logs to SD card preference --- .../conversations/ui/ExportLogsPreference.java | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/main/java/eu/siacs/conversations/ui/ExportLogsPreference.java (limited to 'src/main/java/eu/siacs/conversations/ui/ExportLogsPreference.java') diff --git a/src/main/java/eu/siacs/conversations/ui/ExportLogsPreference.java b/src/main/java/eu/siacs/conversations/ui/ExportLogsPreference.java new file mode 100644 index 00000000..a4e178bd --- /dev/null +++ b/src/main/java/eu/siacs/conversations/ui/ExportLogsPreference.java @@ -0,0 +1,29 @@ +package eu.siacs.conversations.ui; + +import android.content.Context; +import android.content.Intent; +import android.preference.Preference; +import android.util.AttributeSet; + +import eu.siacs.conversations.services.ExportLogsService; + +public class ExportLogsPreference extends Preference { + + public ExportLogsPreference(Context context, AttributeSet attrs, int defStyleAttr) { + super(context, attrs, defStyleAttr); + } + + public ExportLogsPreference(Context context, AttributeSet attrs) { + super(context, attrs); + } + + public ExportLogsPreference(Context context) { + super(context); + } + + protected void onClick() { + final Intent startIntent = new Intent(getContext(), ExportLogsService.class); + getContext().startService(startIntent); + super.onClick(); + } +} \ No newline at end of file -- cgit v1.2.3