Revert "Improve tracking of exported sdk libraries"

Revert submission 11569833

Reason for revert:  Broke presubmit: b/157231582
Reverted Changes:
Ia99def91e:Improve tracking of exported sdk libraries
If91b4d106:java_sdk_library: Do not expose stubs implementati...
Id6d76e56c:java_sdk_library: Access outputs using tags

Change-Id: I3a07d412e795df512c430e4d2ed221f4d17e904a
diff --git a/java/aar.go b/java/aar.go
index c8daf83..0e103f2 100644
--- a/java/aar.go
+++ b/java/aar.go
@@ -379,11 +379,8 @@
 				sharedLibs = append(sharedLibs, exportPackage)
 			}
 
-			// If the module is (or possibly could be) a component of a java_sdk_library
-			// (including the java_sdk_library) itself then append any implicit sdk library
-			// names to the list of sdk libraries to be added to the manifest.
-			if component, ok := module.(SdkLibraryComponentDependency); ok {
-				sdkLibraries = append(sdkLibraries, component.OptionalImplicitSdkLibrary()...)
+			if _, ok := module.(SdkLibraryDependency); ok {
+				sdkLibraries = append(sdkLibraries, ctx.OtherModuleName(module))
 			}
 
 		case frameworkResTag: