gn2bp: add proto_in_dir to include dirs

Test: //net:net
Change-Id: I395201fe91c2c8e4fa194574f567dc1e58de561f
diff --git a/tools/gn2bp/Android.bp.swp b/tools/gn2bp/Android.bp.swp
index 0392e15..85436c1 100644
--- a/tools/gn2bp/Android.bp.swp
+++ b/tools/gn2bp/Android.bp.swp
@@ -1941,6 +1941,7 @@
     ],
     export_include_dirs: [
         ".",
+        "net/cert",
         "protos",
     ],
 }
@@ -2110,6 +2111,7 @@
     ],
     export_include_dirs: [
         ".",
+        "net/base",
         "protos",
     ],
 }
@@ -2851,6 +2853,7 @@
     ],
     export_include_dirs: [
         ".",
+        "net/nqe/proto",
         "protos",
     ],
 }
@@ -2978,6 +2981,7 @@
     ],
     export_include_dirs: [
         ".",
+        "net/third_party/quiche/src/quiche/quic/test_tools",
         "protos",
     ],
 }
diff --git a/tools/gn2bp/gen_android_bp b/tools/gn2bp/gen_android_bp
index b4f2cda..db2691d 100755
--- a/tools/gn2bp/gen_android_bp
+++ b/tools/gn2bp/gen_android_bp
@@ -102,10 +102,7 @@
 
 # Additional arguments to apply to Android.bp rules.
 additional_args = {
-    'cronet_aml_net_third_party_quiche_net_quic_proto_gen_headers': [
-        # This is needed for cached_network_parameters_proto.h
-        ('export_include_dirs', {'net/third_party/quiche/src'}),
-    ],
+    # TODO: remove if not needed.
 }
 
 
@@ -558,6 +555,10 @@
   # to still do the old #include "perfetto/..." rather than
   # #include "protos/perfetto/...".
   header_module.export_include_dirs = {'.', 'protos'}
+  # Since the .cc file and .h get created by a different gerule target, they
+  # are not put in the same intermediate path, so local includes do not work
+  # without explictily exporting the include dir.
+  header_module.export_include_dirs.add(target.proto_in_dir)
 
   source_module.genrule_srcs.add(':' + source_module.name)
   source_module.genrule_headers.add(header_module.name)