aboutsummaryrefslogtreecommitdiff
path: root/libs/utils/WordPressUtils/src/main/java/org/wordpress/android/util/SystemServiceFactory.java
blob: 4ba0c96ed5893fba66d3e5e6dda54f1c469ebd67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package org.wordpress.android.util;

import android.content.Context;

import org.wordpress.android.util.AppLog.T;

public class SystemServiceFactory {
    public static SystemServiceFactoryAbstract sFactory;

    public static Object get(Context context, String name) {
        if (sFactory == null) {
            sFactory = new SystemServiceFactoryDefault();
        }
        AppLog.v(T.UTILS, "instantiate SystemService using sFactory: " + sFactory.getClass());
        return sFactory.get(context, name);
    }
}