Moved system logging to use sqlite database rather than file - removed need for access external strage permission.
This commit is contained in:
@@ -69,27 +69,15 @@
|
||||
android:checked="false"
|
||||
android:onClick="onRadioButtonClicked"
|
||||
android:text="@string/local_data" />
|
||||
</RadioGroup>
|
||||
|
||||
<LinearLayout
|
||||
android:visibility="gone"
|
||||
android:id="@+id/local_data_ll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/EventsInLocalDb"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<ListView
|
||||
android:id="@+id/eventLogListView"
|
||||
<RadioButton
|
||||
android:id="@+id/syslog_rb"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp" />
|
||||
</LinearLayout>
|
||||
android:checked="false"
|
||||
android:onClick="onRadioButtonClicked"
|
||||
android:text="@string/system_logs" />
|
||||
</RadioGroup>
|
||||
|
||||
<LinearLayout
|
||||
android:visibility="visible"
|
||||
@@ -107,7 +95,7 @@
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/check_seizures_message"
|
||||
/>
|
||||
/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -138,7 +126,48 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:visibility="gone"
|
||||
android:id="@+id/local_data_ll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/EventsInLocalDb"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<ListView
|
||||
android:id="@+id/eventLogListView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:visibility="gone"
|
||||
android:id="@+id/syslog_ll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/system_logs"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<ListView
|
||||
android:id="@+id/sysLogListView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
31
app/src/main/res/layout/syslog_entry_layout.xml
Normal file
31
app/src/main/res/layout/syslog_entry_layout.xml
Normal file
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<TextView
|
||||
android:id="@+id/syslog_entry_date_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="date" />
|
||||
<TextView
|
||||
android:id="@+id/syslog_level_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="---" />
|
||||
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="date"
|
||||
android:id="@+id/syslog_entry_text_tv" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -61,12 +61,12 @@
|
||||
android:title="@string/test_sms_alarm_notification" />
|
||||
</group>
|
||||
<group android:id="@+id/grp5">
|
||||
<item
|
||||
<!--<item
|
||||
android:id="@+id/action_logs"
|
||||
android:enabled="true"
|
||||
android:icon="@drawable/ic_action_settings"
|
||||
android:showAsAction="never|withText"
|
||||
android:title="@string/view_log_entries" />
|
||||
android:title="@string/view_log_entries" /> -->
|
||||
<!--
|
||||
<item
|
||||
android:enabled="false"
|
||||
|
||||
@@ -348,4 +348,5 @@
|
||||
<string name="prune_database">Prune Database</string>
|
||||
<string name="check_seizures_message">Please select the events highlighted in pink to say if they are real seizures or false alarms</string>
|
||||
<string name="error_server_not_running">ERROR: OpenSeizureDetector Server is not running - please re-start it</string>
|
||||
<string name="system_logs">System Logs</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user