summaryrefslogtreecommitdiff
path: root/libs/binder/IActivityManager.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Use String8/16 c_str [binder]" into main am: a79915269d am: ↵Treehugger Robot2023-08-251-2/+2
|\ | | | | | | | | | | | | | | | | 13da0f9a0f am: 7e5716d5fd am: 5f539c068f Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2704458 Change-Id: I0d5bef0a9dbdd4555a3ec3e6487917911655dab4 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| * Merge "Use String8/16 c_str [binder]" into main am: a79915269d am: 13da0f9a0fTreehugger Robot2023-08-251-2/+2
| |\ | | | | | | | | | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2704458 Change-Id: Id556a973fcdfbc8b6fae559148c0616625ab25bb Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| | * Use String8/16 c_str [binder]Tomasz Wasilczyk2023-08-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current String8::string() has two problems: it may suggest it's returning a std::string and also prevents a drop-in replacement with std::string. Bug: 295394788 Test: make checkbuild Change-Id: I1eb6ddebe3faede57f3e6f046da572a79056125a
* | | Merge "Updating transaction code to use correct transaction for state ↵Kunal Malhotra2023-08-171-1/+1
|\ \ \ | | | | | | | | | | | | changed AIDL call" into udc-qpr-dev
| * | | Updating transaction code to use correct transaction for state changedKunal2023-08-151-1/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AIDL call Bug: 295297692 Test: Built and flashed build to device and verified that log calls for audioserver are correct. Ignore-AOSP-First: Will cherrypick this as needed Change-Id: I1593d816f2e25eb6abcbc53a3696c42aa334119a
* / / Updating log lines in FGS logger transaction codeKunal2023-08-161-6/+3
|/ / | | | | | | | | | | | | | | | | | | | | Bug: 295297692 Test: Built and flashed build to device and verified that log calls for audioserver are correct. Ignore-AOSP-First: Will cherrypick this as needed The Constraints object will hold the network constraints for the new Change-Id: I1baa640f64411ad0ad7ccae06beefdd284d6e777
* | Merge "Updating CPP ActivityManager interface to be one way" into udc-devKunal Malhotra2023-05-121-3/+6
|\ \
| * | Updating CPP ActivityManager interface to be one wayKunal Malhotra2023-05-121-3/+6
| | | | | | | | | | | | | | | | | | | | | Ignore-AOSP-First: This code will go into AOSP later with U. Test: manual testing on device Bug: 279787820 Change-Id: I53b895982816144c00290bbb550b6bb290d86c30
* | | Camera / UidObserver: Add the ability to subscribe to specific UIDsAustin Borger2023-05-081-0/+52
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* / Adding in FGS Logger AIDL methods for use in C++ codeKunal Malhotra2023-03-131-0/+47
|/ | | | | | Test: manual testing on device Bug: b/263304156 Change-Id: I3b934cbc72dae718479e45a2a794046745a3ca2f
* Merge "remove extra semicolons [-Wextra-semi]" am: b0379e376d am: 9baa2fe651 ↵Treehugger Robot2020-11-251-1/+1
|\ | | | | | | | | | | | | | | am: 0ee3c1e24a Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1508298 Change-Id: Iacc3bffe2b560f841b3ef223f2b6e5c2e05d6f2b
| * remove extra semicolons [-Wextra-semi]Jooyung Han2020-11-251-1/+1
| | | | | | | | | | | | Bug: n/a Test: no errors with -Werror,-Wextra-semi Change-Id: If523cadea4c6f02a9155fb7482ba5463fff7854a
| * Remove extraneous semicolon.Steven Moreland2019-09-271-1/+1
| | | | | | | | | | | | | | Bug: N/A Test: build w/o -Wno-c++98-compat-extra-semi Merged-In: I632d6df9a03485e547a6e7f14df0f1c068066c1e Change-Id: I632d6df9a03485e547a6e7f14df0f1c068066c1e
* | ActivityManager: return status for register/unregisterUidObserverChong Zhang2020-11-171-4/+12
| | | | | | | | | | | | bug: 172942349 bug: 159172726 Change-Id: I1420d5a9e14aca4f70e8c6cbd26613dd85db51f1
* | Add NDK PermissionManager checkPermissionChong Zhang2020-11-041-0/+19
| | | | | | | | | | | | | | bug: 172283477 bug: 159172726 Change-Id: I532722772f6a86ef4f94a95146df34603278bb45
* | Revert "Add setSchedPolicyCgroup to AM binder"Rick Yiu2020-08-281-11/+0
| | | | | | | | | | | | | | | | This reverts commit b12941cf9b1e3c3456eb44a19927570d99ba108d. Reason for revert: may have problem under race condition Change-Id: I67941e7b5026484df856554dc66e1ae0c621a93c
* | Add setSchedPolicyCgroup to AM binderRick Yiu2020-05-071-0/+11
| | | | | | | | | | | | | | | | | | Add setSchedPolicyCgroup function to native Activity Manager binder interface. Bug: 139521784 Test: function works Change-Id: Icc89e0c4d33993d2ccb80f5d63efb9f6fdd5ba40
* | Revert "Add isUidActiveOrForeground for camera/audio to use."Hui Yu2020-05-041-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Add isUidActiveOrForeground for camera/audio to use.Hui Yu2020-03-251-0/+12
| | | | | | | | | | | | | | | | | | 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
* | Remove extraneous semicolon.Steven Moreland2019-09-271-1/+1
|/ | | | | | Bug: N/A Test: build w/o -Wno-c++98-compat-extra-semi Change-Id: I632d6df9a03485e547a6e7f14df0f1c068066c1e
* Activity manager: native callback for process stateEric Laurent2018-11-271-1/+15
| | | | | | | | | | | 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
* Add API to query if a UID is activeSvet Ganov2018-03-281-0/+12
| | | | | | | | Test: cts-tradefed run cts-dev -m CtsCameraTestCases Bug: 72863398 Change-Id: I8e5021f2ef4cd77fc89ae3b47cc32ad6913da0d6
* Don't record audio if UID is idle - native frameworkGanesh Mahendran2017-12-261-0/+22
| | | | | | | | | | | | | | | | | | 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
* Add the missing Parcel.writeInterfaceToken call.Sudheer Shanka2017-03-031-0/+1
| | | | | | | Bug: 35950090 Test: Verified that it fixes the following error. Parcel : **** enforceInterface() expected 'android.app.IActivityManager' but read '' Change-Id: Id70da2d2ba7198e4d5d14aeabe00328c4eb6ef14
* libbinder: replace dup() with fcntl(F_DUPFD_CLOEXEC)Nick Kralevich2016-12-171-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | Replace calls to dup() with fcntl(F_DUPFD_CLOEXEC). The only difference between the two is that O_CLOEXEC is set on the newly duped file descriptor. This helps address file descriptor leaks crossing an exec() boundary in multi-threaded processes, and potentially fixes the following non-reproducible SELinux denials which may be occurring because of FD leakage from netd to clatd/dnsmasq. avc: denied { use } for comm="clatd" path="socket:[860297]" dev="sockfs" ino=860297 scontext=u:r:clatd:s0 tcontext=u:r:untrusted_app:s0:c512,c768 tclass=fd permissive=0 avc: denied { read write } for comm="clatd" path="socket:[1414454]" dev="sockfs" ino=1414454 scontext=u:r:clatd:s0 tcontext=u:r:system_server:s0 tclass=tcp_socket permissive=0 avc: denied { use } for comm="clatd" path="socket:[681600]" dev="sockfs" ino=681600 scontext=u:r:clatd:s0 tcontext=u:r:priv_app:s0:c512,c768 tclass=fd permissive=0 Test: Device boots and no obvious problems Change-Id: I9dcd9911a093f329c6f12e39d2c49ef3df651ae5
* Add native interface for activity manager service.Sudheer Shanka2016-11-261-0/+61
Fix the un/marshalling code at frameworks/av/media/libmediaplayerservice and move it here. Bug: 30977067 Test: Verified that transaction works fine. Change-Id: Ice6bd1c8ebc8116147b0ca3f65a293d013edfc4c