Add performance tests for @EnforcePermission
The performance tests reuse the service from the end-to-end tests (which
provides some basic permission methods). Two methods are added: one
without permission check and one with manual permission checks (i.e.,
calling Context.enforceCallingPermission directly).
A perfetto configuration is added (as opposed to using the default
trace_config_detailed.textproto). This configuration samples the service
and test processes at regular interval. It helps confirming the actual
call stack within the binder calls.
Bug: 269684922
Bug: 269721152
Test: atest EnforcePermissionPerfTests
Change-Id: I7c1bc6e178b083ac663df3b0372cdd22e377248e
diff --git a/tests/EnforcePermission/service-app/Android.bp b/tests/EnforcePermission/service-app/Android.bp
index a4ac1d7..7878215 100644
--- a/tests/EnforcePermission/service-app/Android.bp
+++ b/tests/EnforcePermission/service-app/Android.bp
@@ -21,6 +21,14 @@
default_applicable_licenses: ["frameworks_base_license"],
}
+android_library {
+ name: "EnforcePermissionTestLib",
+ srcs: [
+ "src/**/*.java",
+ ":frameworks-enforce-permission-test-aidl",
+ ],
+}
+
android_test_helper_app {
name: "EnforcePermissionTestHelper",
srcs: [