public final void onResume ( @ NonNull final Object serviceListener ) { logd ( "onResume" ) ; mServiceListener = serviceListener ; mState = State . RESUMED ; if ( ! mStoredResults . isEmpty ( ) ) { logd ( "has undelivered results" ) ; final List < SoftReference < OperationDelivery < ? > > > oldResults = new ArrayList <> ( mStoredResults ) ; mStoredResults . clear ( ) ; for ( SoftReference < OperationDelivery < ? > > result : oldResults ) { final OperationDelivery < ? > delivery = result . get ( ) ; if ( delivery != null ) { deliverResult ( delivery ) ; } } logd ( "no more undelivered results" ) ; } else { logd ( "has no undelivered results" ) ; } }
This method must be called by a bound GUI element when it passes its own onResume state .