libbufferstreams: Add a StreamConfig type (and associated trait methods)
This type will be used to create publishers and subscribers, and
contains enough information to create AHardwareBuffers.
Bug: 296100790, 296450062
Test: atest libbufferstreams-internal_test
Change-Id: I12a2aa59e8931ab77c658371d16450f3618de8ce
diff --git a/libs/bufferstreams/rust/Android.bp b/libs/bufferstreams/rust/Android.bp
index ff95148..3acd304 100644
--- a/libs/bufferstreams/rust/Android.bp
+++ b/libs/bufferstreams/rust/Android.bp
@@ -12,13 +12,25 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+rust_defaults {
+ name: "libbufferstreams_defaults",
+ srcs: ["src/lib.rs"],
+ rustlibs: [
+ "libnativewindow_rs",
+ ],
+ edition: "2021",
+}
+
rust_library {
name: "libbufferstreams",
crate_name: "bufferstreams",
- srcs: ["src/lib.rs"],
- edition: "2021",
- rlibs: [
- "libnativewindow_rs",
- ],
+ defaults: ["libbufferstreams_defaults"],
min_sdk_version: "30",
}
+
+rust_test {
+ name: "libbufferstreams-internal_test",
+ crate_name: "bufferstreams",
+ defaults: ["libbufferstreams_defaults"],
+ test_suites: ["general-tests"],
+}