@Nullable
    public static String getSystemServiceName(@NonNull Context context,
                                              @NonNull Class<?> serviceClass) {
        if (Build.VERSION.SDK_INT >= 23) {
            return context.getSystemServiceName(serviceClass);
        }
        return LegacyServiceMapHolder.SERVICES.get(serviceClass);
    }
Gets the name of the system-level service that is represented by the specified class.

@param context      Context to retrieve service name from.
@param serviceClass The class of the desired service.
@return The service name or null if the class is not a supported system service.
@see Context#getSystemServiceName(Class)
android/android_framework/base/src/main/java/github/tornaco/android/thanos/core/compat/ContextCompat.java