Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit eb7603da authored by Yuting Fang's avatar Yuting Fang Committed by yutingfang
Browse files

Revert "Revert "Batch noteOperation binder calls in the client t..."

The binder API AppOpsService#noteOperation has significant high call volume. One of the reasons is the clients are often making burst calls like 2k ~ 3k/second. This CL adds a buffer on the client side that aggregates same noteOp calls within a second and sends aggregated count asynchrnously to the system service. On the client side, it also uses op mode cache introduced in ag/29819090 to return op mode.

Note: This CL doesn't change current contract of onNotedOp callback. Client will still receive a callback for every noteOp call, including self, sync, async callback. To reduce the async callback spam, there is another flag that controls whether we can reduce the number of callbacks to 1.

Flag: android.permission.flags.note_op_batching_enabled
Flag: android.permission.flags.rate_limit_batched_note_op_async_callbacks_enabled
Bug: 366013082
Test: atest AppOpsLoggingTest

Change-Id: I182dd073aaa4fb4e23539e848846f6193728dd1e
parent 98696ca2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment