java_sdk_library_import: Delegate OutputFiles to impl library if needed

Bug: 230846030
Test: m nothing
      # Cherry pick into build with prebuilts enabled to verify.
Merged-In: I5ac9b1cdd2fc61efbc988e84556202ff6cd57146
Change-Id: I5ac9b1cdd2fc61efbc988e84556202ff6cd57146
(cherry picked from commit 1e940d5b449148105e33d75cbef4bbde307bf1f9)
diff --git a/java/sdk_library.go b/java/sdk_library.go
index fb03255..2c67767 100644
--- a/java/sdk_library.go
+++ b/java/sdk_library.go
@@ -2224,7 +2224,15 @@
 }
 
 func (module *SdkLibraryImport) OutputFiles(tag string) (android.Paths, error) {
-	return module.commonOutputFiles(tag)
+	paths, err := module.commonOutputFiles(tag)
+	if paths != nil || err != nil {
+		return paths, err
+	}
+	if module.implLibraryModule != nil {
+		return module.implLibraryModule.OutputFiles(tag)
+	} else {
+		return nil, nil
+	}
 }
 
 func (module *SdkLibraryImport) GenerateAndroidBuildActions(ctx android.ModuleContext) {