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

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

Batch noteOperation binder calls in the client to reduce call volume

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: I35d0d917cb2180bd8c54cfbd68d19fbbb16459a2
parent 28d89f58
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