Back to project page PhotoPicker.
The source code is released under:
GNU General Public License
If you think the Android project PhotoPicker listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.thuytrinh.photopicker.module; /*from w w w .ja va 2 s . co m*/ import android.content.Context; import dagger.ObjectGraph; public class ObjectLocator { private static ObjectLocator objectLocator; private ObjectGraph graph; private ObjectLocator() { } public static ObjectGraph getGraph(Context appContext) { if (objectLocator == null) { objectLocator = new ObjectLocator(); objectLocator.buildGraph(appContext); } return objectLocator.graph; } public static void setMockGraph(ObjectGraph mockGraph) { objectLocator = new ObjectLocator(); objectLocator.graph = mockGraph; } private void buildGraph(Context appContext) { graph = ObjectGraph.create(new AppModule(appContext)); } }