From 727ecf76f7b18f98873ccd060dee81fb1de94fa9 Mon Sep 17 00:00:00 2001 From: santimunin Date: Tue, 22 May 2012 14:53:15 +0000 Subject: [PATCH] =?UTF-8?q?2012-05-22=20Santiago=20Mun=C3=ADn=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * PandroidEventviewerService.java, PandroidEventviewerActivity.java: Added group filter. * res/layout/main.xml: Enabled group spinner. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6335 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- extras/pandroid_event_viewer/ChangeLog | 5 ++++ .../pandroid_event_viewer/res/layout/main.xml | 4 +-- .../PandroidEventviewerActivity.java | 19 +++++++++----- .../PandroidEventviewerService.java | 26 ++++++++++++++----- 4 files changed, 39 insertions(+), 15 deletions(-) diff --git a/extras/pandroid_event_viewer/ChangeLog b/extras/pandroid_event_viewer/ChangeLog index 3810db9b96..5ffbaece07 100644 --- a/extras/pandroid_event_viewer/ChangeLog +++ b/extras/pandroid_event_viewer/ChangeLog @@ -1,3 +1,8 @@ +2012-05-22 Santiago Munín + + * PandroidEventviewerService.java, PandroidEventviewerActivity.java: Added group filter. + * res/layout/main.xml: Enabled group spinner. + 2012-05-21 Santiago Munín * EventList.java, PopupValidationEvent.java: Removed references to Core as an object. diff --git a/extras/pandroid_event_viewer/res/layout/main.xml b/extras/pandroid_event_viewer/res/layout/main.xml index 0e140af472..39cde43529 100644 --- a/extras/pandroid_event_viewer/res/layout/main.xml +++ b/extras/pandroid_event_viewer/res/layout/main.xml @@ -51,7 +51,7 @@ android:layout_width="fill_parent" android:layout_height="wrap_content" > - + + /> (); @@ -184,16 +184,14 @@ public class PandroidEventviewerService extends IntentService { * @param context * @return Api call. */ - public String serializeParams2Api(Context context) { + public String serializeParams2Api(Context context, boolean total) { SharedPreferences preferences = context.getSharedPreferences( context.getString(R.string.const_string_preferences), Activity.MODE_PRIVATE); String filterAgentName = preferences.getString("filterAgentName", ""); - /* - * TODO no api parameter, waiting for it int filterIDGroup = - * preferences.getInt("filterIDGroup", 0); - */ + + int idGroup = preferences.getInt("filterIDGroup", 0); int filterSeverity = preferences.getInt("filterSeverity", -1); int filterStatus = preferences.getInt("filterStatus", 3); String filterEventSearch = preferences.getString("filterEventSearch", @@ -238,13 +236,27 @@ public class PandroidEventviewerService extends IntentService { return_var += filterEventSearch; // The free search in the text event // description. return_var += "|"; - return_var += Integer.toString(0); // The pagination of list events + return_var += Integer.toString(100); // The pagination of list events return_var += "|"; return_var += Long.toString(0); // The offset of list events + return_var += "|"; + if (total) { + return_var += "total"; + } else { + return_var += "-1"; + } + return_var += "|"; + return_var += Integer.toString(idGroup); Log.i(TAG + " serializeParams2Api", return_var); return return_var; + //;|-1|||||1337666333||3||20|0|total|-1 + //;|-1|||||1337695530||3||0 |0| |12 + //;|-1|||||1337695739||3||0 |0|-1 |2 + //;|-1|||||1337666333||3||20|0|-1 |2 + //;|-1|||||1337695739||3||0 |0|-1 |12 + //;|-1|||||1337666333||3||20|0|-1|-1 } /**