File tree Expand file tree Collapse file tree
rxjava-contrib/rxjava-android/src/main/java/rx/operators Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -87,18 +87,24 @@ private boolean shouldForwardNotification(Subscriber<? super T> sub) {
8787
8888 private void handleLostBinding (Subscriber <? super T > sub , String context ) {
8989 if (sub == null ) {
90- Log . d ( LOG_TAG , "subscriber gone; skipping " + context );
90+ log ( "subscriber gone; skipping " + context );
9191 } else {
9292 final R r = boundRef .get ();
9393 if (r != null ) {
9494 // the predicate failed to validate
95- Log . d ( LOG_TAG , "bound component has become invalid; skipping " + context );
95+ log ( "bound component has become invalid; skipping " + context );
9696 } else {
97- Log . d ( LOG_TAG , "bound component gone; skipping " + context );
97+ log ( "bound component gone; skipping " + context );
9898 }
9999 }
100- Log . d ( LOG_TAG , "unsubscribing..." );
100+ log ( "unsubscribing..." );
101101 unsubscribe ();
102102 }
103+
104+ private void log (String message ) {
105+ if (Log .isLoggable (LOG_TAG , Log .DEBUG )) {
106+ Log .d (LOG_TAG , message );
107+ }
108+ }
103109 }
104110}
You can’t perform that action at this time.
0 commit comments