This client requires both HIDL client and server to be of the same
ABI version (e.g. 32-bit).
EffectHalHidl::process and EffectHalHidl::processReverse are stubs.
Some extra warnings are logged due to unimplemented functions
in the legacy HAL.
Bug: 30222631
Change-Id: Id074131dec6d6c4f1031695abcf3ea066e92a5af
Test: Play Music (play / EQ), YouTube, Loopback RTLT, Ok Google on N5X
and don't register the sniffers in every process that plays media,
but only in the extractor process.
Bug: 33166870
Change-Id: Id269d1eab8be1549542adad3037729a63b5ebaef
CodecBase instances do not post reply messages back to MediaCodec
explicitly --- Callback does the job instead.
Bug: 32133435
Test: adb shell am instrument -e size small -w 'android.media.cts/android.support.test.runner.AndroidJUnitRunner'
Test: Play an encrypted content in Play Movies
Change-Id: I210993a3bbc306f970b8e9395a91e8697cfa832e
Currently if stop is followed by a reset from another thread,
we unblock the stop first (to avoid ANR) without waiting for
kWhatShutdownCompleted, and proceed with the reset request.
But this could cause release to return too early when the
kWhatShutdownCompleted for the stop is received. When this
happens, the reset() will unregister ACodec's handlers before
the real shutdown with deallocation is processed, causing
a codec node instance to be leaked.
To solve this problem, separate kWhatShutdownCompleted into
two messages kWhatStopCompleted and kWhatReleaseCompleted.
Release should only return upon kWhatReleaseCompleted.
Also initializing the fence fd in the metadata buffer (even
though it's not used) to avoid warning in freeBuffer.
bug: 32750454
bug: 32971559
Change-Id: If218c853955729a2a2f2e8356908115a79c442e3
TypeTraits.h includes some additional type utility templates not
covered by <type_traits>.
Flagged.h is a template that allows adding flags to an arbitrary
type, and combine additional flags into that.
Bug: 32885576
Change-Id: I13faa6d265cc06df76609b255704d0cf22e2d904
Added functions that are helpful for building parameter query
strings to be used with HAL's 'get_parameter' methods.
Test: make
Change-Id: I66a4e94d65660b04ded4abb59a89d8288056a920
- Add setPortMode to centralize port mode configuration
- Remove storeMetaDataInBuffers and enableNativeBuffers. These are
no longer exposed to the client. Metadata mode and native/secure
buffer mode will be enabled by OMX as needed by the port mode.
- Move handling of legacy adpative experiment (legacy metadata mode)
to OMX side. Legacy mode will now appear the same as non-metadata
mode to client.
bug: 31399200
Change-Id: Iaf33bd7c30fab4acbc19e9fb8c19e322f9b4a0a0
In buffer array mode, the buffer reference is kept in clients of
MediaCodec, so allocating new buffer for new input/output does not
work in that case.
Bug: 32577275
Bug: 32579231
Test: use screenrecord and investigate the output file.
Test: cts-tradefed run cts-dev -m CtsMediaTestCases -t android.media.cts.EncodeDecodeTest
Change-Id: I26d89f6b5735094062b8a2027bcab4754576d574
This will be needed for the default implementation of the audio HAL
in TREBLE for parsing supported formats etc. provided by HAL in
a form of string literals.
As a bonus, remove some hand-written type conversions in AudioFlinger
used in dumps.
Example changes in the dump output:
HAL format: 0x1 (pcm16) ==> HAL format: 0x1 (AUDIO_FORMAT_PCM_16_BIT)
Processing format: 0x5 (pcmfloat) ==> Processing format: 0x5 (AUDIO_FORMAT_PCM_FLOAT)
Output device: 0x2 (SPEAKER) ==> Output device: 0x2 (AUDIO_DEVICE_OUT_SPEAKER)
Input device: 0 (NONE) ==> Input device: 0 (AUDIO_DEVICE_NONE)
AudioStreamOut: 0x... flags 0x6 (PRIMARY|FAST) ==>
AudioStreamOut: 0x... flags 0x6 (AUDIO_OUTPUT_FLAG_PRIMARY|AUDIO_OUTPUT_FLAG_FAST)
Test: make & run
Change-Id: I9cde640e6827b7aa6d62e9caade9e738227e299f
1. Remove the restriction that MPEG4Writer could only write at most one video
track and one audio track.
2. Allow muxing mutiple metadata tracks into the file. Did not put a limit on
each sample's metadata size now.
3. metadata mime format must start from prefix "application/".
4. metadata's format/layout is defined by the application.
5. Generated MP4 file use TextMetaDataSampleEntry defined in section 12.3.3.2
of the ISOBMFF to signal the metadata's mime format.
Test: Manual test.
Bug: 28536560
Change-Id: I97829e235e598e35fcad31f948eea5943f8c4fd5
The Vorbis decoder needs the number of samples in a page added to
the end of the encoded data, which SimpleDecodingSource wasn't doing.
This affected Vorbis decoding using OpenSL ES.
Bug: 32258336
Test: ran CTS and OpenSLES tests
Change-Id: I436e4a1ee998ce4581eb540bea8b66154960a4e7
- Use OMXBuffer to parcel different buffer types.
- Only leave one useBuffer, emptyBuffer and fillBuffer.
- Remove the update metadata calls.
bug: 31399200
Change-Id: I307e59415c3c5be61772210431bd8225ce6b75a3
- Buffers are (roughly) owned by themselves.
- As a corollary, remove output format change related events
and replace by inspecting formats associated with each buffers.
Bug: 32133435
Test: gts-tradefed run gts -m GtsExoPlayerTestCases
Test: (manual) Run Play Movies app to play a secure content.
Change-Id: I6b57da61c2d71acd0d5be4281de823ba1c95b72f
DeviceHalInterface transitioned to "capabilities" model
(similar to the one already used by streams, e.g. 'supportsDrain').
No direct checking of the HAL version is needed.
AudioPolicy uses its own version read from the configuration,
and these values never checked against the actual HAL version,
thus it does not need versions and macroses from hardware/*.
Test: make & run on N6P
Change-Id: Ic4a56bfa19a9a61edac2b9f9a163fd8f63a0ff87
It is preferred to use the constants from AudioParameter
(which can now serve as an abstraction layer similar to libaudiohal).
Grepped for usages of defines and just string values
and replaced with references to AudioParameter.
Since the parameter definitions are being moved to system/audio.h,
update includes in AudioParemeter and stagefright Utils.
Change-Id: I2addb983707d866b16f39d45d0e14b802595e292
Test: make
There can be different use cases with the code that imports
headers from audio_effects (each subsequent case is a more
specialized version of the previous one):
1. The code only needs access to general structures
like effect_descriptor_t:
==> include system/audio_effect.h
Example: AudioSystem in libmedia
2. The code that needs access to effect UUID and parameter
enums:
==> include system/audio_effects/effect_foo.h
Examples: media framework effects interfaces, libwilhelm
3. The code that needs to call into HAL:
==> include hardware/audio_effect.h
Examples: libaudiohal (implementation part) and libeffects
4. The code that implements a particular effect:
==> include audio_effects/effect_foo.h
Examples: cts/.../CTSTestEffect.cpp
stuff in hardware/, vendor/
Note that AudioPolicy still deals with the effects HAL directly,
this needs to be fixed.
Change-Id: I963335ede6a196f9225caf21e1a01d03635e363c
Test: make
Best guess determination whether the AudioTrack
has started playing.
Test: Photos app with pause and play.
Bug: 30502030
Change-Id: I03c0ae78037ec05f3025ed009ef67bd376b176ba
Most of the time it's not needed, may be needed when
USE_LEGACY_AUDIO_POLICY is enabled.
Test: make
Change-Id: Id25eafc05352f07614965913d367d484f2673fbd
- Define SecureBuffer to encapsulate secure buffers containing
decrypted data.
- ACodec and MediaCodec use SecureBuffer to communicate between
themselves.
Bug: 32133435
Test: Play an encrypted content in Play Movies
Change-Id: Ic70f7f78aad15bd91ab8ccd31c340bc7964ab1b3
Also remove some outstanding dependencies on hardware/audio.h.
Most of the time, only constants and structs from audio_effects.h
are used, and no actual calls into HAL are made. Move these
definitions into system/audio_effect.h, and generate constants
from TREBLE HAL definition.
For parameters, always use values from AudioParameter class.
There are still some outstanding includes of hardware/audio.h
in code that directly deals with audio modules. Need to extend
libaudiohal interfaces to support required functionality.
Test: make
Change-Id: I0bcdf8ae199485d4d65f3eeb7e7a3b9b5cdb6ab6
- Create GraphicBufferSource in IOMX regardless of persistency.
- Remove createInputSurface on IOMXNode, only keep setInputSurface
which accepts either a persistent or non-persistent surface.
- Instead of holding a IGraphicBufferConsumer, hold
IGraphicBufferSource across session as the persistent surface.
- Fix up GraphicBufferSource to allow usage across sessions.
GraphicBufferSource itself becomes agnostic to persistency.
- Remove max encoder input buffers profiling code.
bug: 31399200
Change-Id: I15ed52cc64509fd87736372a580abf7b51bf4de7
frameworks/av must not depend on hardware/ (except for the code
from libaudiohal that actually calls into HAL).
This CL deals with simple cases where depending on system/audio.h
is enough.
Change-Id: Ia2cb66cc8c92316ce5ab884a008d5e531263c2e4
Test: make
Only keep useBuffer. Pass in quirks requirement for now, once
we have access to MediaCodecList XML info in OMX, we can remove
the quirks from IOMX.
Also remove a few unused variables on BufferMeta.
bug: 31399200
Change-Id: I93bef964ce034d4aeb1f5d13a75f130108e4e648
This is no longer needed, the IOMXNode is already a binder,
we can just link to that.
bug: 31399200
Change-Id: Ic5dd5330dab448ae126aaec694f71f22857b3169
Previous CL which introduced UK tones was incorrect since "uk" is not a
valid ISO country code. This change checks for the "gb" country code
instead.
Change-Id: I1f99a7ec5dd24a112b2b1b486fe613f965fba7ff
Fix: 31003209
Because PlaybackThread calls StreamOutHal::setCallback inside
the constructor, onFirstRef gets called while the vtable pointer
is set to PlaybackThread's vtable, not to its subclass vtable.
onFirstRef launches a thread which starts calling methods
that are abstract in PlaybackThread.
Fixed by changing the type of StreamOutHal::setCallback argument
from "sp" to "wp", as creating a weak pointer does not increase
strong refs count and thus doesn't call onFirstRef.
Bug: 31856492
Change-Id: I0d51bc73ca88b4b235260ed773870ecb7dac55d0
Test: added logging to verify the order of calls
- Separate node interface from IOMX. Client allocates the
node through IOMX, and once it has the node interface,
it can interact with the node directly. There is no need
to go through IOMX and refer to the node by id.
- Simplify OMX, remove id-to-instance mapping on server
side, and move the callback dispatch into node instance
(as dispatcher is per-node).
- Keep track of node generation on client side to ensure
that message handling ignores messages directed at an
expired node.
- Remove MuxOMX, always use IOMX from media.codec.
- Minor whitespace reformatting.
bug: 31399200
Change-Id: I8aef6ec1fa5aba861da7d121960ed2974a963d81
MediaCodecBuffer is meant to replace ABuffer and MediaBuffer in
communication between framework components. As the first step, replace
use of ABuffer in MediaCodec with MediaCodecBuffer, and adjust related
classes accordingly.
MediaCodec.getBuffer() and related APIs now returns MediaCodecBuffers;
thus change MediaCodec clients to use MediaCodecBuffer accordingly.
Test: manually tested for key use cases (Camera, YouTube and Play Movies)
Change-Id: Iba7ce131645e75ce5ddbf497fb793ab38b7f245b
The warnings were being hidden by the use of -isystem to include
frameworks/native/include.
Bug: 31752268
Test: m -j
Change-Id: I0eea5b59e7bd696d9aff44c8680361c99474e634
The warnings were being hidden by the use of -isystem to include
frameworks/native/include.
Bug: 31752268
Test: m -j
Change-Id: I0eea5b59e7bd696d9aff44c8680361c99474e634
Moved the HAL access abstraction layer to a separate library so it
can be used both by audioflinger and libnbaio.
Bug: 30222631
Test: manual with Loopback app, Hangouts, YouTube
Change-Id: Id622c2f1aa8f55a775d34f369a596c2c4d29d5be
Create two interfaces from GraphicBufferSource:
a) IGraphicBufferSource for client (ACodec) to configure the graphic
buffer source. IOMX no longer routes these messages and OMX internal
options are removed.
b) IOMXBufferSource for IOMX to send OMX specific callbacks.
Added an |origTimestamp| argument to emptyGraphicBuffer, and restore
the original PTS inside OMX to avoid going back to GraphicBufferSource
to patch the output PTS. In the longer term, we should consider moving
the max PTS gap entirely into OMX (probably as an extension index).
Define newly introduced interfaces using AIDL to facilitate code
development.
bug: 31399200
Change-Id: Ibaf6ca1a0737ba6ba9f83bedc3b06ef358db36cb
int64_t aligns differently in x86 vs x64, which presents
problems when communicating across Binder.
Use packed struct to avoid problems.
Bug: 30472583
Change-Id: Iacdad792e19c19899cde5289238b5aa8981a9a7a
ANativeWindow is a struct, not a class, and the incorrect forward
declaration causes a warning when -isystem is removed from
system/core/include.
Test: m -j native
Bug: 31492149
Change-Id: I3516aa98defe1944a9776c07f52f4ee580366988
- Prohibit direct set/getParam/Settings for extensions meant for
OMXNodeInstance alone. This disallows enabling metadata mode
without the knowledge of OMXNodeInstance.
- Do not share metadata mode buffers cross process.
- Disallow setting up metadata mode/tunneling/input surface
after first sendCommand.
- Disallow store-meta for input cross process.
- Disallow emptyBuffer for surface input (via IOMX).
- Fix checking for input surface.
Bug: 29422020
Change-Id: I801c77b80e703903f62e42d76fd2e76a34e4bc8e
Updated logic for exit request when effect is disabled.
This CL includes some original changes suggested by:
ganxiaolin <ganxiaolin@xiaomi.com>
Bug: 30684284
Change-Id: I77768e8204e712f3fd9d0a9bf768de3cb578d6ce
This is a preliminary to separate GraphicBufferSource from IOMX.
- Use IOMX instead of internal OMXNodeInstance.
- Keep track of codec buffers by buffer_id, do not write to the
OMX buffer headers directly
- Upon data space change, notify IOMX to handle it
bug: 31399200
Change-Id: I86534d7602294f70da582457b5af2eb9b6a58eda
* changes:
mediarecorder: fix timestamp adjustment for early pause/resume
Revert "media: Mediarecorder drops the mediabuffer with negative adjusted timestamp."
* Add explicit keyword to conversion constructors.
Bug: 28341362
* Use const reference type for read-only parameters.
Bug: 30407689
Test: build with WITH_TIDY=1
Change-Id: I265f3b094e08d5705b506b3fbba51439c134af84
* Add explicit keyword to conversion constructors.
* Or add NOLINT to implicit conversion constructors.
Bug: 28341362
* Use const reference type for read-only parameters.
Bug: 30407689
* Use const reference type to avoid unnecessary copy.
Bug: 30413862
Test: build with WITH_TIDY=1
Change-Id: I7a15ac1e37973fe2c661f577a6106b913653de40
Merged-In: I7a15ac1e37973fe2c661f577a6106b913653de40
* Add explicit keyword to conversion constructors.
* Or add NOLINT to implicit conversion constructors.
Bug: 28341362
* Use const reference type for read-only parameters.
Bug: 30407689
* Use const reference type to avoid unnecessary copy.
Bug: 30413862
Test: build with WITH_TIDY=1
Change-Id: I7a15ac1e37973fe2c661f577a6106b913653de40
FrameRenderTracker is never s standalone object, so it's unnecessary.
This avoids allocating a few extra heap objects. More importantly
it no longer interferes with my attempts to understand RefBase
objects that are deallocated without acquiring a strong reference.
Change-Id: I008b04b085fbab1efa4e8948efdcca14b26c247f
When extracting thumbnail image from a video, try to allocate single buffer
in both input and output ports.
Bug:29197670
Change-Id: I7c0722e7fe6f1ecd5f0b8addedeeda8d3b03249f
Store temporal layer-count in MP4 meta-keys.
Enhance MPEG4Extractor to parse layer-count and make it available in
file-meta.
For AVC, parse SVC-extension NALs (if available), to extract
the layer-id and make it avialble in buffer-meta.
Bug: 27596987
Change-Id: I84a8914b470a0aadec0e02692296b1915a6c776e
(cherry picked from commit 09c8bb3d3b01d213fb845cd9c24c5e18443d7626)
Encoder may prepend extension NALs (eg: AVC SVC extension NAL
for temporal layer info) to the VCL NAL.
Look out for non-VCL NALUs preceeding the slice NALs and write
them out separately.
Search for a limited size since such NALs are of small size.
Bug: 27596987
Change-Id: I434c5252098faca99c0ee18e6bc5f43a67718eba
(cherry picked from commit 7941196cf2f21c1a59c5cb2e8b93bbb6f7ff463c)
BufferQueue now needs reconnect to allow dequeuing all buffers from
a BufferQueue.
Use getConsumerName instead of connect failure to detect that we
are connecting to the same surface.
Bug: 29422927
Change-Id: I4fc4d1ec9fd452ec027cab60b06e4af88d53d830
Verify that the requested flags are compatible with the input
or output flags when creating and AudioRecord or AudioTrack
Get rid of IAudioFlinger::track_flags_t which was redundant
with audio_input_flags_t and audio_output_flags_t.
Change-Id: I0dd9232f857b2737e99a8c668806e45bce09cdbd
am: 27ae987f00
* commit '27ae987f0067b7adbf0ef28f723b14d8111fd1c9':
ACodec: track crop and data space for each output graphic buffer
Change-Id: I5ee7cf89fc5fce605f87e9fe46143481c617d310
am: fe73b95aae
* commit 'fe73b95aaef79ad312d9dfdb6c8873bd50c6c19e':
ACodec: track crop and data space for each output graphic buffer
Change-Id: I981a3aa4739e02ee2335f3a90a0c5f14c6c16581
- This prevents issues if buffers are rendered out of order, or
if output surface changes during use.
- Remember last crop and data space for native window to avoid
constantly setting them for each frame.
Bug: 28692500
Change-Id: Ie0d771c83007aad585d9db6c0c26fff8b9ed696e
am: a0e10ff02b
* commit 'a0e10ff02b156738c0e5441104821b220eea3d68':
audioflinger: Pass pid of process creating track or opening record
Change-Id: I728ffba8938a82f8b8f7b773febafd5e466c8e4d
Make sure we use the correct PID and UID when checking
android.permission.CAPTURE_AUDIO_OUTPUT permission from audio
policy service.
Bug: 28772898
Change-Id: I8f0c45bf7a5728b4364a451eefb6c025892ae9a5
AudioFlinger allocates a Client heap for each unique pid.
If two applications use mediaplayer APIs, the same Client heap
is reused as the pid used is not the application pid but that
of mediaserver. With this change, the pid of the application
pid is used to decide the heap to be used.
Bug: 23525542
Bug: 28772898
Change-Id: I31a695b0b321eff6e2aca80c3bc4aeb3e1cd9ac7
Memory heap check updated and restored to mediaserver,
added as new option to audioserver.
Requires properties to be set (example for audioserver):
$ adb shell setprop libc.debug.malloc.program audioserver
$ adb shell setprop libc.debug.malloc.options backtrace=8
$ adb shell pkill audioserver
...
and to dump:
$ adb shell dumpsys media.audio_flinger -m
Bug: 28909124
Bug: 27500825
Change-Id: Ifa8c2c02b022daf1a799ee4a1d75282a3c921763
am: 0dc8be97f0
* commit '0dc8be97f0fbee707b69b24b3a8d914f88c77423':
stagefright: get stream header information from MPEG2 video tracks
Change-Id: I968fe600b13c6f0ba30a016b0c427fce45be1c6b
am: 47d8891199
* commit '47d8891199f40a3a89c2910e4407f82a125df43b':
stagefright: fill in profile/level when reassembling AVCC
Change-Id: I7f14c4b0c320d76f3d87a2cee8474b9060ac36da
- parse btrt mp4 box
- write max and avg. bitrates into avcc
- fix the use of "bit-rate" vs. the correct "bitrate"
- document ESDS better
- fix some spacing
Bug: 28671284
Change-Id: I94961a095c6d162af38b7999cc946f899a1b1b09
am: 98268270da
* commit '98268270da9e728f706d4d44260950dc5d1ed6c4':
Pass VP9 Codec Specific Data from the Container
Change-Id: I112db5e859ed47776ca2b1b022c8dc618eb37bab
- specify requested metadata mode from producers to OMX
- (pass requested metadata in IOMX::storeMetadataInBuffers)
- use correct logic for native handle source
- use native handle source for encoded meta buffers
Bug: 22775369
Change-Id: I58b03acd3e9a5367d5010d7f87b7af5cae23362c
WebM container now has a provision to specify the VP9 Profile
and Level information in the container. Pass it to the Decoder as
Codec-Specific-Data. The software VP9 decoder will merely ignore
it.
Bug: 28152818
Bug: 28380207
Bug: 25684127
Change-Id: I77e2dc333093a346df6671e5f8d6d918ed45f7fb
- FromParcel() now takes as an optional parameter the maximum recursion depth.
(The default value is currently set to 255.) On the event that the input
parcel has AMessage nested deeper than the maximum recursion depth,
FromParcel() will return NULL.
- Also, when the input parcel has items that are not recognized by FromParcel(),
NULL will be returned. (The old behavior was to invoke TRESPASS, which would
cause the process to stop.)
Bug: 28332724
Change-Id: I722097f7d1711668f197651d7e8135d703f6c91f
dumpsys media.extractor was printing the remote source instead of starting at
the local source.
Bug: 22775369
Change-Id: I5026218515bf7ceb8485005ed7d89638a9c1963b
am: 260ae76207
* commit '260ae76207ab15948113418e7ea05f1ca2dae71b':
media: Drop CSD buffer if VP9 decoder does not advertise profiles.
Change-Id: I93cec7f910a72e64e52baed6e75194a24e137f26
When HAL out_get_presentation_position returns error,
use server position adjusted for latency.
Bug: 28250436
Change-Id: I3dbcb9b7c4e56d34e7e161d1a02d8f64afd602b9
Add new binder calls to pass video native handle so the video native
handle can be passed between 32-bit and 64-bit processes.
Remove problematic code that used IMemory to pass video native
handle because the sizes of VideoNativeMetadata are different in
32-bit and 64-bit processes.
Bug: 28403412
Change-Id: I3341b1812ecc41d61846bb72ca926ecb1674c9ec
am: d0389b874d
* commit 'd0389b874d592b960bdc456c2514a36b082c2c94':
Can now indicate the desired number of notifications (sub-buffers)
Change-Id: I56e20dbd5f386b53af87acc9a5fe111f60147a5b
per fast track buffer when using the default buffer size.
There is no change for normal tracks, or fast tracks with a non-default buffer size.
Also fix related bugs:
Notification period was not set correctly when fast multiplier is not 1.
Incorrect warning when client adjusted notification frames.
Bug: 27819623
Bug: 28117362
Change-Id: Ifc2121e874f51718cd56ec04e4bd5f89f4963132
Part of media security hardening
MediaDrm was temporarily allowed to
run in either mediaserver or mediadrmserver
while all nexus devices were implementing
support for the native_handle representation
of secure buffers. Now that all nexus
devices support native_handle, the MediaDrm
stack can be removed from mediaserver.
b/22990512
Change-Id: Ie5d83bfeb4c4a824e1d0edb4c9452c782d6fd386
Padding and delay in the file are expressed in terms of the base
sample rate, not in terms of the (doubled) SBR rate.
Change-Id: I3b59ec6281889d24a888c6a079731b05a120807f
Add the UK ringback tone for when the device is in
the UK and the network declines to play a ringback tone.
Change-Id: Iecbc420dd18b019e9201745a9ddc84b060dc9dba
Fix: 26583561
excessive memory allocation.
Details:
DataSource.h
- Added function getVector() for reading from a data source into
a Vector object, whose capacity grows only as much as needed
(in case of EOS or reading error).
SampleTable.h
- Changed the type of mTimeToSample from uint32_t* to
Vector<uint32_t>.
SampleTable.cpp
- In setTimeToSample, modified the code to use getVector()
instead of readAt(). If the input source has a corrupt
time-to-sample table size that is too big, EOS will be reached
before the whole table is read, and the return value from
getVector() will be false.
- Also, tightened the bound for the provided time-to-sample table
size to guarantee that the table does not take more than
UINT_MAX32 bytes in memory.
Bug: 28076789
Change-Id: Id207f369ab7b27787d83f5d8fc48dc53ed9fcdc9
returning prvalue does not make sense as object will be immediately
destructed. Instead create a move constructor for Locked.
Bug: 27901970
Change-Id: I4013804b1a4af4b5ecb6ab5347d44cfd3b2898ba
isInRange() does its own overflow checks, and the compiler's overflow
checks get in the way of that.
Bug: 27852836
Change-Id: I9b699332ca139980031306e74735bcb0a341e3da