Here's a minimum representative sample which illustrates the problem:

Now this code is 100% contrived. One could imagine doInBackground using an Executor or hell, AsyncTask. But for the purposes of the bug it actually needs no implementation.
For copy/paste:
@WorkerThread static void doSomething() {}
static void doInBackground(Runnable r) {}
@Override protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
doInBackground(new Runnable() {
@Override public void run() {
doSomething();
}
});
doInBackground(() -> doSomething());
doInBackground(MainActivity::doSomething);
}
Now I don't know about the implementation of this library, but it seems like it is exposing the code inside of the lambda to lint as if it were a part of the surrounding method rather than nested in a context similar to an anonymous class. Ideally the behavior would be exactly that as an anonymous class but I don't know if you have all the information needed for that or not.
Here's a minimum representative sample which illustrates the problem:

Now this code is 100% contrived. One could imagine
doInBackgroundusing anExecutoror hell,AsyncTask. But for the purposes of the bug it actually needs no implementation.For copy/paste:
Now I don't know about the implementation of this library, but it seems like it is exposing the code inside of the lambda to lint as if it were a part of the surrounding method rather than nested in a context similar to an anonymous class. Ideally the behavior would be exactly that as an anonymous class but I don't know if you have all the information needed for that or not.