Added recovery for Uid and UserId device affinties on audioserver crash.
Bug: 148154786
Test: m -j
Test: setup device affinities and crash audioserver.
Change-Id: Iafb19d82b737e8f1f0d83f234112c016c224de17
There is a race that if two clients are acquiring the same
content provider at the same momment, the second one would
create a new ContentProviderRecord and then start a new process.
Bug: 148953992
Test: Manual
Change-Id: I3e95be32208a0869dc0b399da70f767abdd76fb4
This CL include following change:
- Add addDeviceToPlayMedia() to let MediaDevice can play current media
together.
- Add removeDeviceFromMedia() to let MediaDevice stop play media.
- Add getSelectableMediaDevice() to get the MediaDevice list that can be
added to current media.
- Add adjustSessionVolume() to let output switcher to change the volume
of RoutingSession.
- Add getSessionVolumeMax() and getSessionVolume() to get max and
current volume of session.
- Add ShadowRouter2Manager.java to implement test case.
- Add test case.
Bug: 142912244
Test: make -j42 RunSettingsLibRoboTests
Change-Id: I1bda5a1c3a788778c384adce851fc2ffa8c1aa73
Update KernelCpuUidTimeReader and its subclasses to support reading
frequency, active & cluster times from BPF maps rather than proc files
on devices that support this approach. BPF-based accounting offers
improved accuracy as it can detect every context switch, whereas the
proc files attribute a full tick period to whatever happens to be
running when the tick occurs.
Add a KernelCpuUidBpfMapReader class modeled on
KernelCpuProcStringReader, with singletons for reading each distinct
set of data. These follow the locking approach used by
KernelCpuProcStringReader to ensure thread safety, but they collect
data by calling libtimeinstate functions via JNI rather than reading
text from proc files. They also provide a getDataDimensions() function
to retrieve information currently provided by the header rows of the
proc files, such as the list of available freqs or the number of cores
on each cluster.
Extend the KernelCpu*TimeReaderTest classes to exercise the BPF path
for each reader class, and add a KernelCpuUidBpfMapReaderTest modeled
on KernelProcStringReaderTest.
Bug: 138317993
Test: KernelCpu*TimeReaderTests and KernelCpuUidBpfMapReaderTest pass
Test: no regressions in BatteryStatsTests
Change-Id: Ie7c0b11a47289e16f72fd6868de4185e858c7e4f
Signed-off-by: Connor O'Brien <connoro@google.com>
Removed recently added user id based routing for audio playback capture.
The original goal of the user id based routing was for the routing to be
controlled by audio policy and to controll where audio from a user
could play. The audio playback capture was added to match similar API
provided for audio playback capture based on application's uid.
Currently, there is no appropiate use case for capturing based on user
id. While this could prove useful in the future the appropiate use case
research must be completed. Updated comments for audio policy user id
based routing.
Bug: 149419551
Test: atest AudioPlaybackCaptureTest
Test: atest
com.google.android.gts.audio.AudioHostTest#testUserIdDeviceAffinity
Change-Id: I174cba618c4f66d11185e7ab5630094b4a8cb35b
Major changes include:
- Removing unused permission checks within StatsService. These
include ENFORCE_DUMP_AND_USAGE_STATS, checkDumpAndUsageStats,
kOpUsage, and kPermissionUsage.
- Converting from sp to shared_ptr
- Using libbinder_ndk functions instead of libbinder functions
(e.g. for installing death recipients, getting calling uids, etc.)
- New death recipients were added in StatsService,
ConfigManager, and SubscriberReporter.
- Using a unique token (timestamp) to identify shell subscribers
instead of IResultReceiver because IResultReceiver is not exposed by
libbinder_ndk. Currently, statsd cannot detect if perfd dies; we
will fix that later.
Bug: 145232107
Bug: 148609603
Test: m statsd
Test: m statsd_test
Test: bit stastd_test:*
Test: atest GtsStatsdHostTestCases
Change-Id: Ia1fda7280c22320bc4ebc8371acaadbe8eabcbd2
If the BLAST surface control was not returned, fail early instead of
trying to update the BLAST adapter
Bug: N/A
Test: build, boot, turn BLAST on, no crash
Change-Id: Ib921fdb8c5313519ff0b09304d1e0359fcc7c018
This has been added to make some HAL defects that have been observed
recently, with recognition continuing after a trigger, more visible.
Change-Id: Ifad568f973e0c619000b75e8f534ef480b10cbc8