Support DepIsInSameApex using provider.

Bug: 377723687
Test: Unit tests and compare the ninja and mk files generated.
Change-Id: I8ec5e8a3a06d078602ebaa902cacb70987f1deda
diff --git a/java/app_import.go b/java/app_import.go
index dc1aa74..a122510 100644
--- a/java/app_import.go
+++ b/java/app_import.go
@@ -628,7 +628,15 @@
 	return Bool(a.properties.Privileged)
 }
 
-func (a *AndroidAppImport) OutgoingDepIsInSameApex(tag blueprint.DependencyTag) bool {
+func (m *AndroidAppImport) GetDepInSameApexChecker() android.DepInSameApexChecker {
+	return AppImportDepInSameApexChecker{}
+}
+
+type AppImportDepInSameApexChecker struct {
+	android.BaseDepInSameApexChecker
+}
+
+func (m AppImportDepInSameApexChecker) OutgoingDepIsInSameApex(tag blueprint.DependencyTag) bool {
 	// android_app_import might have extra dependencies via uses_libs property.
 	// Don't track the dependency as we don't automatically add those libraries
 	// to the classpath. It should be explicitly added to java_libs property of APEX