/*
 *     Food Inspector - Choose well to eat better
 *     Copyright (C) 2016  Frédéric Letellier
 *
 *     This program is free software: you can redistribute it and/or modify
 *     it under the terms of the GNU Affero General Public License as published
 *     by the Free Software Foundation, either version 3 of the License, or
 *     (at your option) any later version.
 *
 *     This program is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *     GNU Affero General Public License for more details.
 *
 *     You should have received a copy of the GNU Affero General Public License
 *     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package com.fredericletellier.foodinspector.events;

public class EventsFilter {

    private EventsFilterType mEventsFilterType;

    protected EventsFilter(EventsFilterType eventsFilterType) {
        this.mEventsFilterType = eventsFilterType;
    }

    public EventsFilterType getEventsFilterType() {
        return mEventsFilterType;
    }

}


@@ -864,114 +864,423 @@
 s;%0A%0A
-public class EventsFilter %7B%0A%0A    private EventsFilterType mEventsFilterType;%0A%0A    protected EventsFilter(E
+import android.os.Bundle;%0A%0Aimport com.fredericletellier.foodinspector.BuildConfig;%0A%0Apublic class EventsFilter %7B%0A%0A    public final static String KEY_EVENTS_FILTER = BuildConfig.APPLICATION_ID + %22EVENTS_FILTER%22;%0A    private EventsFilterType eventsFilterType = EventsFilterType.ALL_EVENTS;%0A    private Bundle filterExtras;%0A%0A    protected EventsFilter(Bundle extras) %7B%0A        this.filterExtras = extras;%0A        this.e
 vent
@@ -1283,33 +1283,36 @@
 ventsFilterType 
-e
+= (E
 ventsFilterType)
@@ -1316,59 +1316,276 @@
 pe) 
-%7B
+extras.getSerializable(KEY_EVENTS_FILTER);
 %0A    
+%7D%0A%0A
     
-this.mEventsFilterType = eventsFilterType
+public static EventsFilter from(EventsFilterType eventsFilterType)%7B%0A        Bundle bundle = new Bundle();%0A        bundle.putSerializable(KEY_EVENTS_FILTER, eventsFilterType);%0A        return new EventsFilter(bundle)
 ;%0A  
@@ -1660,10 +1660,9 @@
 urn 
-mE
+e
 vent
@@ -1681,11 +1681,82 @@
 %0A    %7D%0A%0A
-%7D%0A%0A
+    public Bundle getFilterExtras() %7B%0A        return filterExtras;%0A    %7D%0A%7D

Add more feature for EventsFilter