Factor out remoteauth dependencies to variables

This will allow using different values for the variables without having
merge conflicts in the dependencies list for each build rule.

Bug: 295788084
Test: m
Change-Id: I7b64a5a01d1f8139e7ce30ce95903d71cb09de9f
diff --git a/service-t/Android.bp b/service-t/Android.bp
index 83caf35..08527a3 100644
--- a/service-t/Android.bp
+++ b/service-t/Android.bp
@@ -19,6 +19,8 @@
     default_applicable_licenses: ["Android-Apache-2.0"],
 }
 
+service_remoteauth_pre_jarjar_lib = "service-remoteauth-pre-jarjar"
+
 // Include build rules from Sources.bp
 build = ["Sources.bp"]
 
@@ -56,7 +58,7 @@
         "service-connectivity-pre-jarjar",
         "service-nearby-pre-jarjar",
         "service-thread-pre-jarjar",
-        "service-remoteauth-pre-jarjar",
+        service_remoteauth_pre_jarjar_lib,
         "ServiceConnectivityResources",
         "unsupportedappusage",
     ],
diff --git a/service-t/src/com/android/server/ConnectivityServiceInitializer.java b/service-t/src/com/android/server/ConnectivityServiceInitializer.java
index 2da067a..624c5df 100644
--- a/service-t/src/com/android/server/ConnectivityServiceInitializer.java
+++ b/service-t/src/com/android/server/ConnectivityServiceInitializer.java
@@ -17,7 +17,6 @@
 package com.android.server;
 
 import android.content.Context;
-import android.remoteauth.RemoteAuthManager;
 import android.util.Log;
 
 import com.android.modules.utils.build.SdkLevel;
@@ -90,8 +89,8 @@
         }
 
         if (mRemoteAuthService != null) {
-            Log.i(TAG, "Registering " + RemoteAuthManager.REMOTE_AUTH_SERVICE);
-            publishBinderService(RemoteAuthManager.REMOTE_AUTH_SERVICE, mRemoteAuthService,
+            Log.i(TAG, "Registering " + RemoteAuthService.SERVICE_NAME);
+            publishBinderService(RemoteAuthService.SERVICE_NAME, mRemoteAuthService,
                     /* allowIsolated= */ false);
         }
     }
@@ -157,8 +156,7 @@
         } catch (UnsupportedOperationException e) {
             // RemoteAuth is not yet supported in all branches
             // TODO: remove catch clause when it is available.
-            Log.i(TAG, "Skipping unsupported service "
-                    + RemoteAuthManager.REMOTE_AUTH_SERVICE);
+            Log.i(TAG, "Skipping unsupported service " + RemoteAuthService.SERVICE_NAME);
             return null;
         }
     }