For some time in my ListenableWorker class I have used the following:
public ListenableFuture<Result> startWork() {
ResolvableFuture<Result> resolvableFuture = ResolvableFuture.create();
startSomeAsyncStuff(resolvableFuture);
return resolvableFuture;
}
Basically, I start some asynchronous work, passing resolvableFuture into that function. When the async work is done, I call the following on that resolvableFuture object passed from my ListenableWorker:
resolvableFuture.set(Result.success());
This has worked well, and still appears to, but I'm now seeing the following lint error message against ResolvableFuture.create():
ResolvableFuture can only be called from within the same library group prefix
It still compiles, but this warning bothers me. What is the correct way to do this now?