Skip to content

Commit cd7ae2c

Browse files
committed
Merge pull request #134 from ParsePlatform/wangmengyan.public_add/remove_interceptor_method
Public add/remove interceptor method
2 parents 8850e95 + 7e3740d commit cd7ae2c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Parse/src/main/java/com/parse/Parse.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -615,10 +615,11 @@ private static void initializeParseHttpClientsWithParseNetworkInterceptors() {
615615
* Add a {@link ParseNetworkInterceptor}. You must invoke
616616
* {@code addParseNetworkInterceptor(ParseNetworkInterceptor)} before
617617
* {@link #initialize(Context)}. You can add multiple {@link ParseNetworkInterceptor}.
618+
*
618619
* @param interceptor
619620
* {@link ParseNetworkInterceptor} to be added.
620621
*/
621-
/* package */ static void addParseNetworkInterceptor(ParseNetworkInterceptor interceptor) {
622+
public static void addParseNetworkInterceptor(ParseNetworkInterceptor interceptor) {
622623
if (isInitialized()) {
623624
throw new IllegalStateException("`Parse#addParseNetworkInterceptor(ParseNetworkInterceptor)`"
624625
+ " must be invoked before `Parse#initialize(Context)`");
@@ -632,11 +633,12 @@ private static void initializeParseHttpClientsWithParseNetworkInterceptors() {
632633
/**
633634
* Remove a given {@link ParseNetworkInterceptor}. You must invoke
634635
* {@code removeParseNetworkInterceptor(ParseNetworkInterceptor)} before
635-
* {@link #initialize(Context)} .
636+
* {@link #initialize(Context)}.
637+
*
636638
* @param interceptor
637639
* {@link ParseNetworkInterceptor} to be removed.
638640
*/
639-
/* package */ static void removeParseNetworkInterceptor(ParseNetworkInterceptor interceptor) {
641+
public static void removeParseNetworkInterceptor(ParseNetworkInterceptor interceptor) {
640642
if (isInitialized()) {
641643
throw new IllegalStateException("`Parse#addParseNetworkInterceptor(ParseNetworkInterceptor)`"
642644
+ " must be invoked before `Parse#initialize(Context)`");

0 commit comments

Comments
 (0)