Changes Java/Kotlin AndroidLint API Finder check to also detect Protected methods.

These methods should be detected because they are technically public APIs that can be used by other modules, and this should have tests that accompany them before release.

Bug: b/185621990

Change-Id: I89b5ca05372ebcb06e3d3cf317b294e177c1d532
Test: The current tests in checks/src/test work in gradle, will work on getting these to work on Soong in the future. This may require a feature request since these tests are currently required to run in a Studio source tree.
diff --git a/checks/src/main/java/com/android/apifinder/ApiFinderDetector.kt b/checks/src/main/java/com/android/apifinder/ApiFinderDetector.kt
index 1c72a83..5132fcf 100644
--- a/checks/src/main/java/com/android/apifinder/ApiFinderDetector.kt
+++ b/checks/src/main/java/com/android/apifinder/ApiFinderDetector.kt
@@ -41,13 +41,13 @@
           private fun visitGenericMethod(
               method: PsiMethod, node: UElement, isModuleMethod: Boolean = false
           ) {
-              // Exclude non-public calls.
-              if (!method.hasModifier(JvmModifier.PUBLIC)) {
+              // Exclude non-public/protected calls.
+              if (!method.hasModifier(JvmModifier.PUBLIC) && !method.hasModifier(JvmModifier.PROTECTED)) {
                   return
               }
               var containingClass = method.containingClass
               while (containingClass != null) {
-                  if (!containingClass.hasModifier(JvmModifier.PUBLIC)) {
+                  if (!containingClass.hasModifier(JvmModifier.PUBLIC) && !containingClass.hasModifier(JvmModifier.PROTECTED)) {
                       return
                   }
                   containingClass = containingClass.containingClass