Add a rate limiter to the getRunningAppProcesses() call

Allow at most 400 calls per second to system_server and
return a cached value at other times. This is distributed
as 4 calls every 10 ms.

Bug: 360374604
Test: Take a trace to verify AIDL call doesn't exceed
      4 every 10ms.
Flag: android.app.rate_limit_get_running_app_processes

Change-Id: I0781949fe3fcef170e8a3c09f6de4aeba4c2989d
2 files changed