diff --git a/nearby/service/java/com/android/server/nearby/NearbyService.java b/nearby/service/java/com/android/server/nearby/NearbyService.java
deleted file mode 100644
index b851c72..0000000
--- a/nearby/service/java/com/android/server/nearby/NearbyService.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.server.nearby;
-
-import android.content.Context;
-import android.util.Log;
-
-import com.android.server.SystemService;
-import com.android.server.nearby.common.locator.LocatorContextWrapper;
-import com.android.server.nearby.fastpair.FastPairManager;
-import com.android.server.nearby.provider.FastPairDataProvider;
-
-/**
- * Service implementing nearby functionality. The actual implementation is delegated to
- * {@link NearbyServiceImpl}.
- */
-public class NearbyService extends SystemService {
-
-    public static final String TAG = "NearbyService";
-    private static final boolean DBG = true;
-
-    private final Context mContext;
-    private final NearbyServiceImpl mImpl;
-    private final FastPairManager mFastPairManager;
-    private LocatorContextWrapper mLocatorContextWrapper;
-
-    public NearbyService(Context contextBase) {
-        super(contextBase);
-        mContext = contextBase;
-        mImpl = new NearbyServiceImpl(contextBase);
-        mLocatorContextWrapper = new LocatorContextWrapper(contextBase, null);
-        mFastPairManager = new FastPairManager(mLocatorContextWrapper);
-    }
-
-    @Override
-    public void onStart() {
-        if (DBG) {
-            Log.d(TAG, "Publishing NearbyService");
-        }
-        publishBinderService(Context.NEARBY_SERVICE, mImpl);
-    }
-
-    @Override
-    public void onBootPhase(int phase) {
-        if (phase == PHASE_THIRD_PARTY_APPS_CAN_START) {
-            onSystemThirdPartyAppsCanStart();
-        } else if (phase == PHASE_BOOT_COMPLETED) {
-            // the nearby service must be functioning after this boot phase.
-            mImpl.onSystemReady();
-            mFastPairManager.initiate();
-        }
-    }
-
-    private void onSystemThirdPartyAppsCanStart() {
-        // Ensures that a fast pair data provider exists which will work in direct boot.
-        FastPairDataProvider.init(mContext);
-    }
-}
diff --git a/nearby/service/java/com/android/server/nearby/NearbyServiceImpl.java b/nearby/service/java/com/android/server/nearby/NearbyServiceImpl.java
index 04e73a5..17261b0 100644
--- a/nearby/service/java/com/android/server/nearby/NearbyServiceImpl.java
+++ b/nearby/service/java/com/android/server/nearby/NearbyServiceImpl.java
@@ -16,7 +16,8 @@
 
 package com.android.server.nearby;
 
-import static com.android.server.nearby.NearbyService.TAG;
+import static com.android.server.SystemService.PHASE_BOOT_COMPLETED;
+import static com.android.server.SystemService.PHASE_THIRD_PARTY_APPS_CAN_START;
 
 import android.annotation.Nullable;
 import android.bluetooth.BluetoothAdapter;
@@ -30,16 +31,21 @@
 import android.nearby.ScanRequest;
 import android.util.Log;
 
+import com.android.server.nearby.common.locator.LocatorContextWrapper;
+import com.android.server.nearby.fastpair.FastPairManager;
 import com.android.server.nearby.injector.Injector;
 import com.android.server.nearby.provider.DiscoveryProviderManager;
+import com.android.server.nearby.provider.FastPairDataProvider;
 
 /**
- * Implementation of {@link com.android.server.nearby.NearbyService}.
+ * Service implementing nearby functionality.
  */
 public class NearbyServiceImpl extends INearbyManager.Stub {
+    public static final String TAG = "NearbyService";
 
     private final Context mContext;
     private final SystemInjector mSystemInjector;
+    private final FastPairManager mFastPairManager;
     private final BroadcastReceiver mBluetoothReceiver = new BroadcastReceiver() {
         @Override
         public void onReceive(Context context, Intent intent) {
@@ -61,6 +67,8 @@
         mContext = context;
         mSystemInjector = new SystemInjector(context);
         mProviderManager = new DiscoveryProviderManager(context, mSystemInjector);
+        final LocatorContextWrapper lcw = new LocatorContextWrapper(context, null);
+        mFastPairManager = new FastPairManager(lcw);
     }
 
     @Override
@@ -73,10 +81,25 @@
         mProviderManager.unregisterScanListener(listener);
     }
 
-    void onSystemReady() {
-        mSystemInjector.initializeBluetoothAdapter();
-        mContext.registerReceiver(mBluetoothReceiver,
-                new IntentFilter(BluetoothAdapter.ACTION_STATE_CHANGED));
+    /**
+     * Called by the service initializer.
+     *
+     * {@see com.android.server.SystemService#onBootPhase}.
+     */
+    public void onBootPhase(int phase) {
+        switch (phase) {
+            case PHASE_THIRD_PARTY_APPS_CAN_START:
+                // Ensures that a fast pair data provider exists which will work in direct boot.
+                FastPairDataProvider.init(mContext);
+                break;
+            case PHASE_BOOT_COMPLETED:
+                // The nearby service must be functioning after this boot phase.
+                mSystemInjector.initializeBluetoothAdapter();
+                mContext.registerReceiver(mBluetoothReceiver,
+                        new IntentFilter(BluetoothAdapter.ACTION_STATE_CHANGED));
+                mFastPairManager.initiate();
+                break;
+        }
     }
 
     private static final class SystemInjector implements Injector {
