diff options
author | 2020-05-04 17:40:52 +0000 | |
---|---|---|
committer | 2020-05-04 18:07:46 +0000 | |
commit | 94ea7ac7e071de6904a3ec7c0deec7efac93b6e3 (patch) | |
tree | bdc9dd6570f61d35a8f3b94a2b2f454249249aa4 /libs/binder/IActivityManager.cpp | |
parent | ef6532c9d46439e4773435c10624d097a53978df (diff) |
Revert "Add isUidActiveOrForeground for camera/audio to use."
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
Diffstat (limited to 'libs/binder/IActivityManager.cpp')
-rw-r--r-- | libs/binder/IActivityManager.cpp | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/libs/binder/IActivityManager.cpp b/libs/binder/IActivityManager.cpp index 9e1249baf4..1eb5363ae2 100644 --- a/libs/binder/IActivityManager.cpp +++ b/libs/binder/IActivityManager.cpp @@ -104,18 +104,6 @@ public: } return reply.readInt32(); } - - virtual bool isUidActiveOrForeground(const uid_t uid, const String16& callingPackage) - { - Parcel data, reply; - data.writeInterfaceToken(IActivityManager::getInterfaceDescriptor()); - data.writeInt32(uid); - data.writeString16(callingPackage); - remote()->transact(IS_UID_ACTIVE_OR_FOREGROUND_TRANSACTION, data, &reply); - // fail on exception - if (reply.readExceptionCode() != 0) return false; - return reply.readInt32() == 1; - } }; // ------------------------------------------------------------------------------------ |