Specify default_to_stubs property in org.apache.http.legacy module definition

Set default_to_stubs to true for the java_sdk_library
org.apache.http.legacy to prevent accidental linking against
implementation.

This module is implicitly added as a dependency for source java modules
via the class loader context. Specifying the default_to_stubs property
in this module has the following benefits:

- Prevent accidental linking against the implementation library

Although it is unlikely that the java_sdk_library "magic" will return
the implementation jar for the rdep of this module given that this
module does not belong to any apexes, specifying this property clarifies
and ensures that this module always returns the stubs to the rdeps even
when they do not specify sdk_version.

- Prevent this module from being flagged by the container validation
  check

https://r.android.com/3183620 allows the top level sdk library to be
recognized as a stubs-providing module when it sets either
`default_to_stubs` or `api_only` property to true. Based on this change,
specifying `default_to_stubs` to true for org.apache.http.legacy allows
minimizing the allowlist of currently existing violations and prevents
future module additions from being blocked by the container check, given
that this module is implicitly added as a dependency by the build
system.

Test: m nothing
Bug: 354029496
Change-Id: I54137c4f4af2b2a6cd6d3da3f6a8393e4030c01a
1 file changed