What does the second block below run() in the anonymous class new Runnable() { that has no identifier or declaration preceding it mean:
public BackgroundThread(final Runnable runnable)
{
super(new Runnable() {
final Runnable val$runnable;
public void run()
{
Process.setThreadPriority(10);
runnable.run();
}
{
runnable = runnable1;
super();
}
});
}
Edit: yes it is decompiled code.
It’s an instance initializer – called as part of the constructor. In an anonymous inner class, you can’t explicitly declare a constructor, so instance initializers are sometimes used instead. In this case it’s pretty pointless, as the
runmethod could just userunnabledirectly – it would still be captured at the same time.(This code doesn’t look like it’s complete or valid, actually – given that the instance initializer mentions
runnable1which doesn’t appear anywhere else. I’d also not expect the instance initializer to include asuper()call. Is this possibly decompiled code?)