summaryrefslogtreecommitdiff
path: root/libs/binder/ActivityManager.cpp
AgeCommit message (Collapse)Author
2024-06-27Migrate from libutils SystemClock.h to std::chrono Tomasz Wasilczyk
Bug: 341997808 Test: mma Change-Id: Ib4d60eeaaac73566cc79d473f6551e9abd20e69a
2023-06-02activity_manager: use waitForService instead of getService Yifei Zhang
Test: build & boot Bug: 284487308 Change-Id: I9f81398c1350749d55e6f97e84dffbc38fcdcd62
2023-05-08Camera / UidObserver: Add the ability to subscribe to specific UIDs Austin Borger
UidObserver sends updates about the state of all packages installed on the system. In the case of the cameraserver, we only care about a handful of them. The current status quo is to filter out these callbacks but there is a significant IPC cost that is not addressed by that approach. This patch adds new entrypoints to ActivityManagerService to listen only to specified UIDs. This set of uids can be updated dynamically. Change-Id: I669f27b94fb691187bb77942f53ebc02cb90ace4 Bug: 274486653 Test: -- on physical device: -- testCamera2AccessCallbackInSplitMode x10 -- ActivityManagerServiceTest -- ActivityManagerProcessStateTest -- ActivityManagerFgsBgStartTest -- UidObserverControllerTest -- Alternate focus in split screen between Camera2 + GCA x20 Ignore-AOSP: Soak time in U
2020-11-17ActivityManager: return status for register/unregisterUidObserver Chong Zhang
bug: 172942349 bug: 159172726 Change-Id: I1420d5a9e14aca4f70e8c6cbd26613dd85db51f1
2020-11-04Add NDK PermissionManager checkPermission Chong Zhang
bug: 172283477 bug: 159172726 Change-Id: I532722772f6a86ef4f94a95146df34603278bb45
2020-08-28Revert "Add setSchedPolicyCgroup to AM binder" Rick Yiu
This reverts commit b12941cf9b1e3c3456eb44a19927570d99ba108d. Reason for revert: may have problem under race condition Change-Id: I67941e7b5026484df856554dc66e1ae0c621a93c
2020-05-07Add setSchedPolicyCgroup to AM binder Rick Yiu
Add setSchedPolicyCgroup function to native Activity Manager binder interface. Bug: 139521784 Test: function works Change-Id: Icc89e0c4d33993d2ccb80f5d63efb9f6fdd5ba40
2020-05-04Revert "Add isUidActiveOrForeground for camera/audio to use." Hui Yu
Revert submission 10829580-isUidForeground Reason for revert: In CameraService.cpp, before this change, around "am.isUidActive", there was up to 300 ms retry. After this change, the code could move forward fast without retry, but at "mAppOpsManager->startOpNoThrow" call, for the same reason as uid is not updated fast enough, "mAppOpsManager->startOpNoThrow" could also fail. This CL does not really fix the root cause, but it changes the timing and now the code fails at "mAppOpsManager->startOpNoThrow" call. Also the timing change may also cause recent multiple CTS test failures. Bug: 154570809, 155032617, 154849083 Reverted Changes: Iffed63293:Add isUidActiveOrForeground() for camera/audio to ... I3685e0c8d:Add isUidActiveOrForeground() for camera/audio to ... I51ed1fe78:Add isUidActiveOrForeground for camera/audio to us... Change-Id: I9fbeb190c5a0ac640ad5be8140fe4aaeb7cfe33d
2020-03-25Add isUidActiveOrForeground for camera/audio to use. Hui Yu
The new interface isUidActiveOrForeground will call AM.isUidActiveOrForeground() which check isUidActive() first, if flase, then check isUidForeground. Bug: 151185692, 151777097, 109950150 Test: manual test. Change-Id: I51ed1fe780dbead0688e73a37c6c762f84e8bf23
2019-09-27Remove extraneous semicolon. Steven Moreland
Bug: N/A Test: build w/o -Wno-c++98-compat-extra-semi Change-Id: I632d6df9a03485e547a6e7f14df0f1c068066c1e
2018-11-27Activity manager: native callback for process state Eric Laurent
Make getUidProcessState() callback in IActivityManager.aidl available to native processes. Test: Manual test with audio recording apps pushed to background and back to top. Bug: 111438757 Change-Id: I16d001dcaeb3e9a38743aa7b301445c94fe5dc99
2018-06-07[binder] Replace NULL/0 with nullptr Yi Kong
Fixes -Wzero-as-null-pointer-constant warning. clang-tidy -checks=modernize-use-nullptr -p compile_commands.json -fix ... Test: m Bug: 68236239 Change-Id: I3181bc5683796423a98b0f9b94daf30880c07bdc
2018-03-28Add API to query if a UID is active Svet Ganov
Test: cts-tradefed run cts-dev -m CtsCameraTestCases Bug: 72863398 Change-Id: I8e5021f2ef4cd77fc89ae3b47cc32ad6913da0d6
2018-03-20ActivityManager: Add link/unlinkToDeath Eino-Ville Talvala
Native services aren't killed when the system service dies, so they may need to be able to tell when ActivityManager has died. Test: adb shell stop; adb shell start; verify camera service still allows camera use. No regression to camera CTS. Bug: 74230547 Change-Id: Iaa078b2f9a1d9c7be305b7667e3055a8ce52aa21
2018-02-22Don't block long time gettng system service Svetoslav Ganov
Test: run google/template/local --template:map test google/continuous/boot-successive --no-first-boot --successive-boot --boot-count 10 --granular-boot-info -f SystemServerTiming_StartServices,SystemServerTiming_StartAudioService bug:72322854 Change-Id: Ie287e0a8f1ed10f9a535b489cef6f3db184e41cb
2018-01-21Wait longer for the activity service Svet Ganov
Test: manual Change-Id: I4cdbaa756bd26986265bca4e3a0919083ea23336
2017-12-26Don't record audio if UID is idle - native framework Ganesh Mahendran
If a UID is in an idle state we don't allow recording to protect user's privacy. If the UID is in an idle state we allow recording but report empty data (all zeros in the byte array) and once the process goes in an active state we report the real mic data. This avoids the race between the app being notified aboout its lifecycle and the audio system being notified about the state of a UID. Test: Added - AudioRecordTest#testRecordNoDataForIdleUids Passing - cts-tradefed run cts-dev -m CtsMediaTestCases -t android.media.cts.AudioRecordTest bug:63938985 Change-Id: I10db89c09498b487ce483d1868123fca95589b34