code: @Override
  	public <D, F, P> Promise<D, F, P> when(Promise<D, F, P> promise) {
  		if (promise instanceof AndroidDeferredObject) {
  			return promise;
  		}
  		return new AndroidDeferredObject<D, F, P>(promise).promise();
  	}
docs: If a non-Android friendly promise is passed in, wrap it with {@link AndroidDeferredObject}
  so that callbacks can be executed in the UI thread.