File tree Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 2424- looper: Add ` remove_fd() ` to unregister events/callbacks for a file descriptor. (#416 )
2525- ** Breaking:** Use ` BorrowedFd ` and ` OwnedFd ` to clarify possible ownership transitions. (#417 )
2626- ** Breaking:** Upgrade to [ ` ndk-sys 0.5.0 ` ] ( ../ndk-sys/CHANGELOG.md#050-beta0-2023-08-15 ) . (#420 )
27+ - hardware_buffer: Add ` id() ` to retrieve a system-wide unique identifier for a ` HardwareBuffer ` . (#428 )
2728
2829# 0.7.0 (2022-07-24)
2930
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ api-level-27 = ["api-level-26"]
2727api-level-28 = [" api-level-27" ]
2828api-level-29 = [" api-level-28" ]
2929api-level-30 = [" api-level-29" ]
30+ api-level-31 = [" api-level-30" ]
3031
3132test = [" ffi/test" , " jni" , " all" ]
3233
Original file line number Diff line number Diff line change @@ -233,6 +233,13 @@ impl HardwareBuffer {
233233 res == 1
234234 }
235235
236+ /// Get the system-wide unique id for this [`HardwareBuffer`].
237+ #[ cfg( feature = "api-level-31" ) ]
238+ #[ doc( alias = "AHardwareBuffer_getId" ) ]
239+ pub fn id ( & self ) -> Result < u64 > {
240+ construct ( |res| unsafe { ffi:: AHardwareBuffer_getId ( self . as_ptr ( ) , res) } )
241+ }
242+
236243 /// Lock the [`HardwareBuffer`] for direct CPU access.
237244 ///
238245 /// This function can lock the buffer for either reading or writing. It may block if the
You can’t perform that action at this time.
0 commit comments