Move NetworkControllerImpl to @LongRunning thread to prevent @Background from being stuck

Fixes: 246456655
Test: Manual
  1. Reboot the device
  2. Open the QS panel right after boot
Change-Id: I21dab08e46f1bbe3089d47bb7ea497c98cea24ff
This commit is contained in:
Anton Potapov
2022-12-02 18:05:06 +00:00
parent 53827bfa31
commit 4db94a0a62

View File

@@ -68,7 +68,7 @@ import com.android.systemui.Dumpable;
import com.android.systemui.R;
import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.dagger.SysUISingleton;
import com.android.systemui.dagger.qualifiers.Background;
import com.android.systemui.dagger.qualifiers.LongRunning;
import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.demomode.DemoMode;
import com.android.systemui.demomode.DemoModeController;
@@ -224,12 +224,15 @@ public class NetworkControllerImpl extends BroadcastReceiver
/**
* Construct this controller object and register for updates.
*
* {@code @LongRunning} looper and bgExecutor instead {@code @Background} ones are used to
* address the b/246456655. This can be reverted after b/240663726 is fixed.
*/
@Inject
public NetworkControllerImpl(
Context context,
@Background Looper bgLooper,
@Background Executor bgExecutor,
@LongRunning Looper bgLooper,
@LongRunning Executor bgExecutor,
SubscriptionManager subscriptionManager,
CallbackHandler callbackHandler,
DeviceProvisionedController deviceProvisionedController,