Если заглянуть во внутренности startActivityForResult()
:
2659 public void startActivityForResult(Intent intent, int requestCode) {
2660 if (mParent == null) {
2661 Instrumentation.ActivityResult ar =
2662 mInstrumentation.execStartActivity(
2663 this, mMainThread.getApplicationThread(), mToken, this,
2664 intent, requestCode);
2665 if (ar != null) {
2666 mMainThread.sendActivityResult(
2667 mToken, mEmbeddedID, requestCode, ar.getResultCode(),
2668 ar.getResultData());
2669 }
2670 if (requestCode >= 0) {
2671 // If this start is requesting a result, we can avoid making
2672 // the activity visible until the result is received. Setting
2673 // this code during onCreate(Bundle savedInstanceState) or onResume() will keep the
2674 // activity hidden during this time, to avoid flickering.
2675 // This can only be done when a result is requested because
2676 // that guarantees we will get information back when the
2677 // activity is finished, no matter what happens to it.
2678 mStartedActivity = true;
2679 }
2680 } else {
2681 mParent.startActivityFromChild(this, intent, requestCode);
2682 }
2683 }
И посмотреть далее, по цепочке вызовов (Instrumentation.execStartActivity()
и т.д.), то становится очевидно, что вызов startActivityForResult()
всегда передаёт ActivityManager
(а точнее, обёртке над ним — ActivityManagerNative
) контекст потока, создавшего текущую Activity
, то бишь UI-thread, а стало быть, и запускаемая новая Activity
всегда будет запущена в UI-thread, поскольку именно передаваемый контекст потока используется менеджером для биндинга сообщений и прочей магии.
И да, вы правы, работать с UI крайне желательно из UI-thread. Но операция запуска Activity
работой с UI не является — это лишь команда ActivityManager
'у создать новый компонент и забиндить на него очередь сообщений. А общаться с сервисами вы можете в любом потоке.