* Add explicit to conversion constructors/operators
Bug: 28341362
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,google-explicit-constructor
Change-Id: Id2493c1e248e774042dc67f39ada6bb3a4521d0c
The hasBpfSupport() check from BpfUtils is not used by the native helper
in framework. Remove them.
Bug: 111441138
Test: Build without failure.
Change-Id: Icdd01bf1a03efd7883e4939d0d730303ec1004e7
The bpf support library in android is renamed to libbpf_android to make
it compatible with external bcc project. Fix the Android.bp file here to
prevent build break.
Bug: 112334572
Test: No build breakage.
Change-Id: I183eb99d30afdf5c77b8c491c0c79013e2ed89ee
Ensure that this file descriptor cannot leak across exec boundaries, in
the unlikely event that system_server does an exec().
Test: device boots and no problems.
Change-Id: I45691b7780026ea288e57db73fcc88820a2b06b1
The bpf project now have a new project directory in system/bpf instead
of inside netd. The network related bpf library is renamed to
libnetdbpf. Fix the dependency issue in framework to make sure no
regression.
Test: -m CtsNetTestCases -t android.net.cts.TrafficStatsTest
Bug: 112334572
Change-Id: Ibd477bf17d18d516aa520fb1569f4a395ef9abf0
This change only replaces libsuspend's suspend loop with the one in
android.system.suspend@1.0.
Native wake lock behavior is unaffected as they are still handled via
/sys/power/wake_[un]lock.
Bug: 78888165
Test: device boots, suspends when left alone
Change-Id: I5e1e9048b0fc316aa6692687684ac11f44466f7e
We implement ArcVideoBridge as HIDL for both ArcCodec and
ArcVideoEncoder. This CL removes the original implementaion.
Bug: 111683541
Test: pass one Media CTS and check ArcVideoEncoder and ArcCodec works
Change-Id: I5e5e350d73c0dcc7cbd5da481b5841396e52b844
Merged-In: I5e5e350d73c0dcc7cbd5da481b5841396e52b844
(cherry picked from commit cb529e771396512152991bcc415da28914a266c2)
When we get sidebandStream from TvInput, we only store the address of
native handle, the address point to native_handle_t in _hidl_replay.
After openStream is finished, the _hidl_replay will be freed
automatically, therefore we will use the freed memory in
setSidebandStrem, It will cause the writeNativeHandle fail in
setSidebandStrem.
Change-Id: Idd2e8343670ef5a3048836f1db978cd7c04378b7
system_server crashed because the system_error "resource_deadlock_would_occur"
occurred while calling thread::join(). It is caused by the value of thread is same
with the calling thread. Correct it using std::this_thread::get_id() to check
whether it is the same thread with the calling thread.
Bug: 70603039
Test step:
Step 1 : Flash DUT and boot it.
Step 2 : Connect with PC via USB.
Step 3 : Run the following adb command and check the DUT:
adb shell
su
ps -A | grep broadcastradio
kill xxx(the process id of android.hardware.broadcastradio@intel-service)
Change-Id: Ia21282c4cc631a0788496081b1821be28929fae6
Signed-off-by: Lei,RayX <rayx.lei@intel.com>
Also, while we're here, reduce logs verbosity.
Test: open car.Media app with radio service selected, tune to a station
(requires a patch with image support against radio app)
Bug: 75970985
Change-Id: I4e56dcdc8bacbb5e63f67eba4a0b0a126245b415
class_init is running under application main thread. A sequence
of 10 back to back HIDL calls is a power up vulnerability, as
watchdog may kick in if application main thread is taking too
long.
Bug: 63707763
Fixes: 63707763
Test: Tested on Taimen and verified GPS works.
Change-Id: Ia8833e7bc5f2bd6186c1f74f84c5387640cc44df
The broadcastradio HAL 1.x requires waiting for onConfigChanged callback
to indicate the initialization is done, while HAL 2.0 does not have the
config setting (at the tuner session level) at all.
This change makes it possible to cleanly workaround race condition in the
radio app retaining support for both HAL revisions. Future versions of the
RadioManager will provide a method to open a session without taking care
about these nuances.
Bug: 74353024
Test: manual
Change-Id: I5de2d5e5c33626fcf0cfbbaf121d0b13e53d0bae
Match upstream Linux kernel support for UAC2 jack detection.
The patch that was included upstream names USB input and
output jack controls by ending them in
"Input Jack" or "Output Jack" respectively.
see 5a222e84945 ('ALSA: usb-audio: UAC2 jack detection') in
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git
Update UsbAlsaJackDetector appropriately.
Test: Verified on a UAC2 device with the above kernel patch,
tinymix -D 1 produced:
...
2 BOOL 1 Headset - Input Jack Off
...
9 BOOL 1 Headset - Output Jack On
With a headset connected, and when the jack was unplugged, Youtube
paused.
Bug: 70632415
Change-Id: I2e5dd48c7a9d174aabbb3a3315496fb30f7a545a
The current model for setting up a functionfs
function is:
UsbDeviceManager#setCurrentFunctions() ->
intent is sent to MtpReceiver to write the descriptors ->
init/hal waits for descriptors to write, then pulls up gadget ->
Gadget is configured, a USB_STATE intent starts MtpServer
The main downside of this is a lack of reliability because
the Mtp process could be killed at any point. Normally, a
gadget is unbound if its control endpoint is closed. no_disconnect
works around this, but is still a little janky. In addition, the
extra intent delays the startup of the gadget.
With the new model, UsbDeviceManager writes the descriptors
on initialization. Since it is a system service, it won't be killed.
UsbDeviceManager#setCurrentFunctions() ->
init/hal pulls up gadget ->
Gadget is configured, a USB_STATE intent starts MtpServer
MtpServer calls UsbManager#getControlFd to get a dup of the control
endpoint.
Also modify permissions so system server can access mtp files.
Bug: 72877174
Test: Change usb configurations to ptp/mtp
Change-Id: Id17d2b5930f4e1f37ec1b4f00add9d594174ad49
This change fixes a few minor gaps preventing the reference radio app
from accessing HAL 1.1 and 2.0 devices:
- createAmFmSelector not detecting the radio band
- don't allow configuration-dependant operations before the configuration
is applied
- allow the initial configuration to be auto-selected
Bug: 74353024
Test: manual
Change-Id: If47872c1bf4cf57c6c39715218d90df9701c372d
Passing the GnssMeasurement JavaObject as reference
Harmonizing variable name styles for 1.0 vs. 1.1
Change-Id: Ia28c159cbda91f89e7387bcf3c404c41375e6be8
Fixes: 74021441
Test: Runs on device, and works with GnssLogger
(cherry picked from commit 7155f8a9f61a68c3a33a72893d01f64f0d890bd8)
Working with both 1.0 and 1.1 IGnssMeasurementCallback's
Also formally deprecating the Carrier Phase fields
Bug: 71908529
Test: Gnss & Measurements still run on device (w/1.0 HAL)
Change-Id: I229350217a6fb61ca403e0515e1fd9d8fed2cc1b
Move handling of location and SV status updates to
existing handler thread.
Change SV status JNI output for thread safety.
Synchronize updates to LocationExtras (many entry
points)
Adding some DeleteLocalRef cleanups
Bug: 72481417
Fixes: 72949246
Fixes: 73090867
Test: GPS works on device, and adb shell dumpsys location
shows extras
Change-Id: I3eda8884597ad1cdf5aec6d1b7c33ab49401410f
- For network location, send a single request and inject it.
- For fused location, send a 'streaming' request for 30 sec duration and
1 Hz updates.
Bug: 72405645
Test: locally added a cts in LocationManager to trigger the flow.
Change-Id: I8ce73976e4e62836037bf3563f239719c9a89305
Adds support for ALSA jack detection for USB.
Spawns a new thread for ALSA jack detection on device
insert. If the device doesn't support ALSA jack detection,
the thread terminates.
Test: UAC2 audio accessory and a kernel
which supports USB ALSA Jack detection, switching between
speaker and USB works perfectly with plug/unplug at jack.
Bug: 68337205
Bug: 70632415
Change-Id: I1800660ad4d2341f19ce7be6d6b01f81a7f2d1a6