Skip to content

Commit

Permalink
remove Deprecated method : getInstance
Browse files Browse the repository at this point in the history
  • Loading branch information
Qixingchen committed Sep 29, 2017
1 parent 725aaed commit fef610d
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lib/src/main/java/moe/xing/getimage/RxGetImage.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,27 @@
@SuppressWarnings("WeakerAccess")
public class RxGetImage {

private static RxGetImage sSingleton;
private SparseArray<Subscriber<? super File>> mSubscribers = new SparseArray<>();

public RxGetImage() {

}

/**
* 获取单例
*/
private static RxGetImage getInstance() {
if (sSingleton == null) {
synchronized (RxGetImage.class) {
if (sSingleton == null) {
sSingleton = new RxGetImage();
}
}
}
return sSingleton;
}

public static Builder newBuilder() {
return new Builder();
}
Expand Down

0 comments on commit fef610d

Please sign in to comment.