check-flagged-apis: add support for method with parameters

Teach check-flagged-apis to parse methods containing parameters.

Bug: 334870672
Test: atest --host check-flagged-apis-test
Change-Id: I171660b914b73fd85e03ed9300c2c81f33d80d61
diff --git a/tools/check-flagged-apis/src/com/android/checkflaggedapis/Main.kt b/tools/check-flagged-apis/src/com/android/checkflaggedapis/Main.kt
index 0f2fbef..e15e7fa 100644
--- a/tools/check-flagged-apis/src/com/android/checkflaggedapis/Main.kt
+++ b/tools/check-flagged-apis/src/com/android/checkflaggedapis/Main.kt
@@ -178,7 +178,6 @@
 }
 
 internal fun parseApiSignature(path: String, input: InputStream): Set<Pair<Symbol, Flag>> {
-  // TODO(334870672): add support for metods
   val output = mutableSetOf<Pair<Symbol, Flag>>()
   val visitor =
       object : BaseItemVisitor() {
@@ -203,11 +202,7 @@
               append(".")
               append(method.name())
               append("(")
-              // TODO(334870672): replace this early return with proper parsing of the command line
-              // arguments, followed by translation to Lname/of/class; + III format
-              if (!method.parameters().isEmpty()) {
-                return
-              }
+              method.parameters().joinTo(this, separator = "") { it.type().internalName() }
               append(")")
             }
             val symbol = Symbol.create(name)