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 } /**