Added confirm dialog to the "mark unvalidated events as unknown" function.

This commit is contained in:
Graham Jones
2022-04-11 20:48:22 +01:00
parent 888bac243c
commit 9a07633276
6 changed files with 18 additions and 6 deletions

Binary file not shown.

View File

@@ -3,7 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
package="uk.org.openseizuredetector"
android:versionCode="100"
android:versionName="4.1.1">
android:versionName="4.0.3">
<!-- android:allowBackup="false" -->
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />

View File

@@ -428,8 +428,16 @@ public class LogManagerControlActivity extends AppCompatActivity {
return true;
case R.id.action_mark_unknown:
Log.i(TAG,"action_mark_unknown");
new AlertDialog.Builder(this)
.setTitle(R.string.mark_unverified_events_unknown_dialog_title)
.setMessage(R.string.mark_unverified_events_unknown_dialog_message)
.setIcon(android.R.drawable.ic_dialog_alert)
.setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
mLm.mWac.markUnverifiedEventsAsUnknown();
}})
.setNegativeButton(android.R.string.no, null)
.show();
default:
return super.onOptionsItemSelected(item);
}

View File

@@ -165,11 +165,13 @@ public abstract class WebApiConnection {
markEventsAsUnknown(eventList);
} else {
Log.e(TAG, "markEventsAsUnknown.updateEvent.callback - eventObj is null");
mUtil.showToast("markEventsAsUnknown.updateEvent.callback - eventObj is null");
}
}
});
} catch (JSONException e) {
Log.e(TAG,"markEventsAsUnknown.getEvent.callback: Error editing eventObj");
mUtil.showToast("markEventsAsUnknown.getEvent.callback: Error editing eventObj");
}
} else {
mUtil.showToast("Failed to Retrieve Event from Remote Database");
@@ -179,7 +181,7 @@ public abstract class WebApiConnection {
});
} else {
Log.i(TAG,"markEventsAsUnknown(): No more events to Modify");
mUtil.showToast("No unvalidated events to modify :)");
mUtil.showToast("No more unvalidated events to modify.");
}
return(true);

View File

@@ -3,9 +3,9 @@
<string name="app_name">OpenSeizureDetector</string>
<string name="changelog">
"\n
\nV4.1.1 - Changed remote database to be compatible with either OSD webAPI or future Firebase database.<br/>
\nV4.0.3 - Changed remote database to be compatible with either OSD webAPI or future Firebase database.<br/>
- Performance improvement by having separate events and datapoints tables in local database
\nV4.0.1 - fixed crash in Report Seizure function
\nV4.0.1, 4.0.2, - fixed repoted crashes
\nV4.0.0
- Introduced the &lt;b>Data Sharing&lt;/b> feature to allow users to share their seizure and false alarm data
with researchers to help improve the system.&lt;br/>
@@ -435,4 +435,6 @@
<string name="about_data_sharing">About Data Sharing</string>
<string name="privacy_policy">Privacy Policy</string>
<string name="mark_unverified_events_as_unknown">Mark Unverified Events as Unknown</string>
<string name="mark_unverified_events_unknown_dialog_title">Mark All Unverified Events as Unknown?</string>
<string name="mark_unverified_events_unknown_dialog_message">Please confirm that all genuine seizure events have been verified before marking all unverified events as type \'unknown\'. \n\nContinue to mark unverified events as Unknown?</string>
</resources>