Let's say that I have a mainActivity
and a reference to it everywhere.
I switch activities later in the app and I'm not sure which is currently 'on the top' and if it's a mainActivity
.
Is it wrong to call mainActivity.runOnUIThread()
when there's another activity visible? Would it work without any errors in the future? Or should I call it only on the current activity?
Technically, there's one UI thread so...