Refactor the calls to other system services to an interface
to allow more testing.
Add test for callbacks to BatteryStatsService and
SchedulingPolicyService.
bug: 138381810
bug: 139440234
test: presubmit
Change-Id: I04408ad5a126e9f4083b5806b228449cb432acf6
- Fix ResourceManagerSerivce handling of adding same-type
resource in multiple calls, combine entries with the same
<type, subtype>. This is not required in existing usage,
bug could be required if we allow same type to be added
incrementally (eg. memory usage).
- Add api for removing some resources. Currently we can
add resources in multiple calls, but removeResource always
remove all resources of that client. We need this to toggle
battery stat On/Off based on actual usage of the codec.
- Add unit tests for the above.
bug: 138381810
test: ResourceManagerService_test; CTS ResourceManangerTest.
Change-Id: Icdba6c6b4c517755291668c52764169aac3071ea
We can't track video stats accurately if it's reported from
app side MediaCodec. If the app dies, video stats get stuck
in On state forever. This can be easily triggered by forcefully
kill and app that uses MediaCodec from app side (instead of
through mediaserver's Recorder or Player service), eg.
launch GoogleCamera app and switch to Video tab, and kill it
from adb shell.
In order to track MediaCodec usage from apps we need to move
the battery stats reporting from MediaCodec into ResourceManager.
bug: 138381810
test:
1. test if app uses MediaCodec directly and it dies off, the video
off is received: launch GoogleCamera app, swipe to Video tab,
"dumpsys batterystats --history" and see +video; now adb shell
kill GoogleCamera, dumpsys should show -video.
2. test app that uses MediaCodec through mediaserver: use Chrome
(which uses MediaPlayer) to play some website with video, kills
Chrome from adb shell, and check -video is received.
In anycase it shouldn't stuck in On state.
3. ResourceManagerService_test
Change-Id: I164b31681c4e72e8cce02342641dbec14b8df374
(cherry picked from commit 47db2ff19c)
mediaserver is no longer forced to 32-bit mode, floating to primary
architecture which is usually 64 bits.
Bug: 16890215
Test: boot, record video, android.media.cts.MediaPlayerTest
Change-Id: If5265e251a4201e7037ddaa2f36fa998936622aa
This converts mediaserver, mediametrics and screenrecord and the
libraries they depend on to Android.bp
See build/soong/README.md for more information.
Bug: 122331945
Bug: 80410283
Test: boot blueline
Test: youtube
Test: screenrecord
Change-Id: I132b8b4f7965449df68fb1544034a7241c594a63
Keep track of cpuset change requests in ResourceManagerService,
and request changing of cpuset via SchedulingPolicyService.
Bug: 72841545
Test:
1)Using modified Youtube/Exoplayer (that uses softMediaCodec
to decode VP9 profile2), manually verify the following:
- media.codec is put into top-app cpuset playing VP9 1080p HDR
- media.codec is put back into foreground after done
- media.codec stays in foreground cpuset playing other content
- kill the app process, verify media.codec is put back to
foreground until new instances request top-app
- kill mediaserver process, verify media.codec is put back to
foreground until new instances request top-app
- kill media.codec process, starting playback again, verify new
media.codec's cpuset can be changed correctly
- kill system_server process (using 'adb shell stop &&
adb shell start'), verify media.codec is put back to
foreground. Restart playback and verify the cpuset can be
changed correctly.
2) CTS post submit tests
Change-Id: Iba50ede1c08b695821fe4f56dbfc5694eab54e7b
* Owners are selected from top CL approvals or owners.
They will be suggested to review/approve future CLs.
* OWNERS files are recognized by the new find-owners plugin, see .md files in
https://gerrit.googlesource.com/plugins/find-owners/+/master/src/main/resources/Documentation/
Test: build/make/tools/checkowners.py -c -v OWNERS
Change-Id: I7c848855a2d7a0d7f33123ea4ef5c2d03977b495
Test: make systemimage
Change-Id: I5f83786afe3f2c65819b127b041cb74fc4c989ac
Merged-In: I5f83786afe3f2c65819b127b041cb74fc4c989ac
Signed-off-by: YOUNG HO CHA <ganadist@gmail.com>
(cherry picked from commit 2ee7aab4a3)
Test: verify that build has no failures
Change-Id: Ib249b276c6295e55eb54fa37b6d15486415dfbed
Merged-In: Ib249b276c6295e55eb54fa37b6d15486415dfbed
(cherry picked from commit 5f5ee1110d)
Move various things around so mediadrmserver doesn't need
libstagefright and libmedia
Test: build/boot
Change-Id: I48b713cd679b992cb6ad1262c20394a9892d7027
Merged-In: I48b713cd679b992cb6ad1262c20394a9892d7027
(cherry picked from commit 75571e4bc7)
- Ensure OMX handle is freed even if binder death notification comes
first.
- Add DeathRecipient in ResourceManagerService so that it could
handle dead clients properly.
Fix: 28824626
Fix: 34252788
Test: adb shell am instrument -e size small -w 'android.media.cts/android.support.test.runner.AndroidJUnitRunner'
Change-Id: Ifc441a2771b5674749ff65a4520177dda115b292
Move various things around so mediadrmserver doesn't need
libstagefright and libmedia
Test: build/boot
Change-Id: I48b713cd679b992cb6ad1262c20394a9892d7027
* 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: I9aac64b379ddb77a9abb4b03a6648f38e2a756ab
Background) getService() has internal 5 seconds of waiting logic when
service does not exist. So, changed with checkService().
Bug:26564748
Change-Id: I0d124b3b277401713c0f3e0b99da08b3affce1e0
move the ring buffer implementation from libcameraservice to media include.
also add line prefix support to the service log.
Bug: 20637674
Change-Id: Ib6b32f31abe92c42644ef7012f1e3d46220ccfbd