// Path: app/src/main/java/org/indywidualni/centrumfm/MyApplication.java
// public class MyApplication extends Application {
// 
//     private static Context mContext;
//     private Tracker mTracker;
// 
//     public static Context getContextOfApplication() {
//         return mContext;
//     }
// 
//     @Override
//     public void onCreate() {
//         mContext = getApplicationContext();
//         super.onCreate();
//     }
// 
//     /**
//      * Gets the default {@link Tracker} for this {@link Application}.
//      *
//      * @return tracker
//      */
//     synchronized public Tracker getDefaultTracker() {
//         if (mTracker == null) {
//             // To enable debug logging use: adb shell setprop log.tag.GAv4 DEBUG
//             GoogleAnalytics analytics = GoogleAnalytics.getInstance(this);
//             analytics.setDryRun(BuildConfig.DEBUG);
// 
//             mTracker = analytics.newTracker(R.xml.global_tracker);
//             mTracker.enableAutoActivityTracking(true);
//             mTracker.enableExceptionReporting(true);
//         }
//         return mTracker;
//     }
// 
// }


import android.util.Log;
import org.indywidualni.centrumfm.MyApplication;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
package org.indywidualni.centrumfm.util;




@SuppressWarnings("UnusedDeclaration")
public abstract class Serializer {

    /**
     * Serialize serializable object to a file
     *
     * @param source   the given object
     * @param filename filename (without .ser)
     * @param <T>      type of the given object
     */
    public static <T> void serialize(T source, String filename) {
        FileOutputStream fos;
        ObjectOutputStream oos = null;

        // serialization
        try {
            fos = new FileOutputStream(MyApplication.getContextOfApplication()
                    .getFilesDir().getPath() + File.separator + filename + ".ser");
            oos = new ObjectOutputStream(fos);
// Path: app/src/main/java/org/indywidualni/centrumfm/MyApplication.java
// public class MyApplication extends Application {
// 
//     private static Context mContext;
//     private Tracker mTracker;
// 
//     public static Context getContextOfApplication() {
//         return mContext;
//     }
// 
//     @Override
//     public void onCreate() {
//         mContext = getApplicationContext();
//         super.onCreate();
//     }
// 
//     /**
//      * Gets the default {@link Tracker} for this {@link Application}.
//      *
//      * @return tracker
//      */
//     synchronized public Tracker getDefaultTracker() {
//         if (mTracker == null) {
//             // To enable debug logging use: adb shell setprop log.tag.GAv4 DEBUG
//             GoogleAnalytics analytics = GoogleAnalytics.getInstance(this);
//             analytics.setDryRun(BuildConfig.DEBUG);
// 
//             mTracker = analytics.newTracker(R.xml.global_tracker);
//             mTracker.enableAutoActivityTracking(true);
//             mTracker.enableExceptionReporting(true);
//         }
//         return mTracker;
//     }
// 
// }


// Path: app/src/main/java/org/indywidualni/centrumfm/util/Serializer.java
import android.util.Log;
import org.indywidualni.centrumfm.MyApplication;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;

package org.indywidualni.centrumfm.util;




@SuppressWarnings("UnusedDeclaration")
public abstract class Serializer {

    /**
     * Serialize serializable object to a file
     *
     * @param source   the given object
     * @param filename filename (without .ser)
     * @param <T>      type of the given object
     */
    public static <T> void serialize(T source, String filename) {
        FileOutputStream fos;
        ObjectOutputStream oos = null;

        // serialization
        try {
            fos = new FileOutputStream(MyApplication.getContextOfApplication()
                    .getFilesDir().getPath() + File.separator + filename + ".ser");
            oos = new ObjectOutputStream(fos);
            oos.writeObject(source);