Skip to content
Snippets Groups Projects
Commit 79e3b593 authored by Kangping Dong's avatar Kangping Dong Committed by Gerrit Code Review
Browse files

Merge "[Thread] start / initialize Thread service early" into main

parents 96aa4824 56354a96
No related branches found
No related tags found
No related merge requests found
......@@ -48,17 +48,20 @@ public class ThreadNetworkService extends IThreadNetworkManager.Stub {
}
/**
* Called by the service initializer.
* Called by {@link com.android.server.ConnectivityServiceInitializer}.
*
* @see com.android.server.SystemService#onBootPhase
*/
public void onBootPhase(int phase) {
if (phase == SystemService.PHASE_BOOT_COMPLETED) {
if (phase == SystemService.PHASE_SYSTEM_SERVICES_READY) {
mControllerService = ThreadNetworkControllerService.newInstance(mContext);
mControllerService.initialize();
} else if (phase == SystemService.PHASE_BOOT_COMPLETED) {
// Country code initialization is delayed to the BOOT_COMPLETED phase because it will
// call into Wi-Fi and Telephony service whose country code module is ready after
// PHASE_ACTIVITY_MANAGER_READY and PHASE_THIRD_PARTY_APPS_CAN_START
mCountryCode = ThreadNetworkCountryCode.newInstance(mContext, mControllerService);
mCountryCode.initialize();
mShellCommand = new ThreadNetworkShellCommand(mCountryCode);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment