diff --git a/app/src/main/java/uk/org/openseizuredetector/LogManagerControlActivity.java b/app/src/main/java/uk/org/openseizuredetector/LogManagerControlActivity.java index e098c09..e0e4518 100644 --- a/app/src/main/java/uk/org/openseizuredetector/LogManagerControlActivity.java +++ b/app/src/main/java/uk/org/openseizuredetector/LogManagerControlActivity.java @@ -54,6 +54,7 @@ public class LogManagerControlActivity extends AppCompatActivity { private UiTimer mUiTimer; private ArrayList> mEventsList; private ArrayList> mRemoteEventsList; + private ArrayList>> mGroupedRemoteEventsList; // Each item is a list of event objects, similar to mRemoteEventsList private ArrayList> mSysLogList; private SdServiceConnection mConnection; private OsdUtil mUtil; @@ -281,6 +282,7 @@ public class LogManagerControlActivity extends AppCompatActivity { Log.v(TAG, "getRemoteEvents - skipping warning or NDA record"); } } + createGroupedEventsList(); Log.v(TAG, "getRemoteEvents() - set mRemoteEventsList(). Updating UI"); updateUi(); } catch (JSONException e) { @@ -293,6 +295,15 @@ public class LogManagerControlActivity extends AppCompatActivity { }); } + private void createGroupedEventsList() { + /** + * Reads the complete list of remote events mRemoteEventsList and creates a new list mGroupedRemoteEventsList + * where each item is a list of events that comprise a group based on time (all events within a 3 minute period are grouped together). + */ + Log.i(TAG, "createGroupedEventsList()"); + mGroupedRemoteEventsList = new ArrayList>>(); + // FIXME - Make this do something! + } private void updateUi() { Log.i(TAG, "updateUi()");