summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInseob Kim <inseob@google.com>2019-07-30 18:24:39 +0900
committerInseob Kim <inseob@google.com>2019-08-20 17:32:13 +0900
commit512d12fb5919de1db5ce7be456c1fc0bfce1bdd1 (patch)
tree97a7d5d1f83ed399134f2aca7c3ec365dd76f569
parent9d588cee02ffd3cc6ed6a1491f98809901035e20 (diff)
downloadnative-512d12fb5919de1db5ce7be456c1fc0bfce1bdd1.tar.gz
Implement sysprop_library API stability check
sysprop_library now checks the API stability itself, cutting dependency on java_sdk_library. Under the directory {module_dir}/api, {module_name}-current.txt and {module_name}-latest.txt hold API signatures. When sysprop_library is built, or a user run "m {module_name}-check-api" command, API check is performed. First, current.txt must have exactly same signature with built sysprop_library module. Second, current.txt must be compatible with latest.txt. Build system emits a handy error message to generate/update those API files, in case of missing or mismatching. Also, a script file for freezing API files is introduced. Bug: 131637873 Test: 1) m && boot blueline Test: 2) m {sysprop_library} performs API check Test: 3) manual test for check-api, freezing api Change-Id: I7812db716ca42055caa70385c71a90de49fc1afc Merged-In: I7812db716ca42055caa70385c71a90de49fc1afc (cherry picked from commit 0bbb2a1e5a5d8a67591b731a2497dd0ce0305a26)
-rw-r--r--services/surfaceflinger/sysprop/api/SurfaceFlingerProperties-current.txt128
-rw-r--r--services/surfaceflinger/sysprop/api/SurfaceFlingerProperties-latest.txt128
-rw-r--r--services/surfaceflinger/sysprop/api/current.txt1
-rw-r--r--services/surfaceflinger/sysprop/api/removed.txt1
-rw-r--r--services/surfaceflinger/sysprop/api/system-current.txt43
-rw-r--r--services/surfaceflinger/sysprop/api/system-removed.txt1
-rw-r--r--services/surfaceflinger/sysprop/api/test-current.txt1
-rw-r--r--services/surfaceflinger/sysprop/api/test-removed.txt1
8 files changed, 256 insertions, 48 deletions
diff --git a/services/surfaceflinger/sysprop/api/SurfaceFlingerProperties-current.txt b/services/surfaceflinger/sysprop/api/SurfaceFlingerProperties-current.txt
new file mode 100644
index 0000000000..061168467d
--- /dev/null
+++ b/services/surfaceflinger/sysprop/api/SurfaceFlingerProperties-current.txt
@@ -0,0 +1,128 @@
+props {
+ module: "android.sysprop.SurfaceFlingerProperties"
+ prop {
+ api_name: "default_composition_dataspace"
+ type: Long
+ prop_name: "ro.surface_flinger.default_composition_dataspace"
+ }
+ prop {
+ api_name: "default_composition_pixel_format"
+ type: Integer
+ prop_name: "ro.surface_flinger.default_composition_pixel_format"
+ }
+ prop {
+ api_name: "display_primary_blue"
+ type: DoubleList
+ prop_name: "ro.surface_flinger.display_primary_blue"
+ }
+ prop {
+ api_name: "display_primary_green"
+ type: DoubleList
+ prop_name: "ro.surface_flinger.display_primary_green"
+ }
+ prop {
+ api_name: "display_primary_red"
+ type: DoubleList
+ prop_name: "ro.surface_flinger.display_primary_red"
+ }
+ prop {
+ api_name: "display_primary_white"
+ type: DoubleList
+ prop_name: "ro.surface_flinger.display_primary_white"
+ }
+ prop {
+ api_name: "enable_protected_contents"
+ prop_name: "ro.surface_flinger.protected_contents"
+ }
+ prop {
+ api_name: "force_hwc_copy_for_virtual_displays"
+ prop_name: "ro.surface_flinger.force_hwc_copy_for_virtual_displays"
+ }
+ prop {
+ api_name: "has_HDR_display"
+ prop_name: "ro.surface_flinger.has_HDR_display"
+ }
+ prop {
+ api_name: "has_wide_color_display"
+ prop_name: "ro.surface_flinger.has_wide_color_display"
+ }
+ prop {
+ api_name: "max_frame_buffer_acquired_buffers"
+ type: Long
+ prop_name: "ro.surface_flinger.max_frame_buffer_acquired_buffers"
+ }
+ prop {
+ api_name: "max_virtual_display_dimension"
+ type: Long
+ prop_name: "ro.surface_flinger.max_virtual_display_dimension"
+ }
+ prop {
+ api_name: "present_time_offset_from_vsync_ns"
+ type: Long
+ prop_name: "ro.surface_flinger.present_time_offset_from_vsync_ns"
+ }
+ prop {
+ api_name: "primary_display_orientation"
+ type: Enum
+ prop_name: "ro.surface_flinger.primary_display_orientation"
+ enum_values: "ORIENTATION_0|ORIENTATION_90|ORIENTATION_180|ORIENTATION_270"
+ }
+ prop {
+ api_name: "running_without_sync_framework"
+ prop_name: "ro.surface_flinger.running_without_sync_framework"
+ }
+ prop {
+ api_name: "set_idle_timer_ms"
+ type: Integer
+ prop_name: "ro.surface_flinger.set_idle_timer_ms"
+ }
+ prop {
+ api_name: "set_touch_timer_ms"
+ type: Integer
+ prop_name: "ro.surface_flinger.set_touch_timer_ms"
+ }
+ prop {
+ api_name: "start_graphics_allocator_service"
+ prop_name: "ro.surface_flinger.start_graphics_allocator_service"
+ }
+ prop {
+ api_name: "support_kernel_idle_timer"
+ prop_name: "ro.surface_flinger.support_kernel_idle_timer"
+ }
+ prop {
+ api_name: "use_color_management"
+ prop_name: "ro.surface_flinger.use_color_management"
+ }
+ prop {
+ api_name: "use_context_priority"
+ prop_name: "ro.surface_flinger.use_context_priority"
+ }
+ prop {
+ api_name: "use_smart_90_for_video"
+ prop_name: "ro.surface_flinger.use_smart_90_for_video"
+ }
+ prop {
+ api_name: "use_vr_flinger"
+ prop_name: "ro.surface_flinger.use_vr_flinger"
+ }
+ prop {
+ api_name: "vsync_event_phase_offset_ns"
+ type: Long
+ prop_name: "ro.surface_flinger.vsync_event_phase_offset_ns"
+ }
+ prop {
+ api_name: "vsync_sf_event_phase_offset_ns"
+ type: Long
+ prop_name: "ro.surface_flinger.vsync_sf_event_phase_offset_ns"
+ }
+ prop {
+ api_name: "wcg_composition_dataspace"
+ type: Long
+ prop_name: "ro.surface_flinger.wcg_composition_dataspace"
+ }
+ prop {
+ api_name: "wcg_composition_pixel_format"
+ type: Integer
+ prop_name: "ro.surface_flinger.wcg_composition_pixel_format"
+ }
+}
diff --git a/services/surfaceflinger/sysprop/api/SurfaceFlingerProperties-latest.txt b/services/surfaceflinger/sysprop/api/SurfaceFlingerProperties-latest.txt
new file mode 100644
index 0000000000..061168467d
--- /dev/null
+++ b/services/surfaceflinger/sysprop/api/SurfaceFlingerProperties-latest.txt
@@ -0,0 +1,128 @@
+props {
+ module: "android.sysprop.SurfaceFlingerProperties"
+ prop {
+ api_name: "default_composition_dataspace"
+ type: Long
+ prop_name: "ro.surface_flinger.default_composition_dataspace"
+ }
+ prop {
+ api_name: "default_composition_pixel_format"
+ type: Integer
+ prop_name: "ro.surface_flinger.default_composition_pixel_format"
+ }
+ prop {
+ api_name: "display_primary_blue"
+ type: DoubleList
+ prop_name: "ro.surface_flinger.display_primary_blue"
+ }
+ prop {
+ api_name: "display_primary_green"
+ type: DoubleList
+ prop_name: "ro.surface_flinger.display_primary_green"
+ }
+ prop {
+ api_name: "display_primary_red"
+ type: DoubleList
+ prop_name: "ro.surface_flinger.display_primary_red"
+ }
+ prop {
+ api_name: "display_primary_white"
+ type: DoubleList
+ prop_name: "ro.surface_flinger.display_primary_white"
+ }
+ prop {
+ api_name: "enable_protected_contents"
+ prop_name: "ro.surface_flinger.protected_contents"
+ }
+ prop {
+ api_name: "force_hwc_copy_for_virtual_displays"
+ prop_name: "ro.surface_flinger.force_hwc_copy_for_virtual_displays"
+ }
+ prop {
+ api_name: "has_HDR_display"
+ prop_name: "ro.surface_flinger.has_HDR_display"
+ }
+ prop {
+ api_name: "has_wide_color_display"
+ prop_name: "ro.surface_flinger.has_wide_color_display"
+ }
+ prop {
+ api_name: "max_frame_buffer_acquired_buffers"
+ type: Long
+ prop_name: "ro.surface_flinger.max_frame_buffer_acquired_buffers"
+ }
+ prop {
+ api_name: "max_virtual_display_dimension"
+ type: Long
+ prop_name: "ro.surface_flinger.max_virtual_display_dimension"
+ }
+ prop {
+ api_name: "present_time_offset_from_vsync_ns"
+ type: Long
+ prop_name: "ro.surface_flinger.present_time_offset_from_vsync_ns"
+ }
+ prop {
+ api_name: "primary_display_orientation"
+ type: Enum
+ prop_name: "ro.surface_flinger.primary_display_orientation"
+ enum_values: "ORIENTATION_0|ORIENTATION_90|ORIENTATION_180|ORIENTATION_270"
+ }
+ prop {
+ api_name: "running_without_sync_framework"
+ prop_name: "ro.surface_flinger.running_without_sync_framework"
+ }
+ prop {
+ api_name: "set_idle_timer_ms"
+ type: Integer
+ prop_name: "ro.surface_flinger.set_idle_timer_ms"
+ }
+ prop {
+ api_name: "set_touch_timer_ms"
+ type: Integer
+ prop_name: "ro.surface_flinger.set_touch_timer_ms"
+ }
+ prop {
+ api_name: "start_graphics_allocator_service"
+ prop_name: "ro.surface_flinger.start_graphics_allocator_service"
+ }
+ prop {
+ api_name: "support_kernel_idle_timer"
+ prop_name: "ro.surface_flinger.support_kernel_idle_timer"
+ }
+ prop {
+ api_name: "use_color_management"
+ prop_name: "ro.surface_flinger.use_color_management"
+ }
+ prop {
+ api_name: "use_context_priority"
+ prop_name: "ro.surface_flinger.use_context_priority"
+ }
+ prop {
+ api_name: "use_smart_90_for_video"
+ prop_name: "ro.surface_flinger.use_smart_90_for_video"
+ }
+ prop {
+ api_name: "use_vr_flinger"
+ prop_name: "ro.surface_flinger.use_vr_flinger"
+ }
+ prop {
+ api_name: "vsync_event_phase_offset_ns"
+ type: Long
+ prop_name: "ro.surface_flinger.vsync_event_phase_offset_ns"
+ }
+ prop {
+ api_name: "vsync_sf_event_phase_offset_ns"
+ type: Long
+ prop_name: "ro.surface_flinger.vsync_sf_event_phase_offset_ns"
+ }
+ prop {
+ api_name: "wcg_composition_dataspace"
+ type: Long
+ prop_name: "ro.surface_flinger.wcg_composition_dataspace"
+ }
+ prop {
+ api_name: "wcg_composition_pixel_format"
+ type: Integer
+ prop_name: "ro.surface_flinger.wcg_composition_pixel_format"
+ }
+}
diff --git a/services/surfaceflinger/sysprop/api/current.txt b/services/surfaceflinger/sysprop/api/current.txt
deleted file mode 100644
index d802177e24..0000000000
--- a/services/surfaceflinger/sysprop/api/current.txt
+++ /dev/null
@@ -1 +0,0 @@
-// Signature format: 2.0
diff --git a/services/surfaceflinger/sysprop/api/removed.txt b/services/surfaceflinger/sysprop/api/removed.txt
deleted file mode 100644
index d802177e24..0000000000
--- a/services/surfaceflinger/sysprop/api/removed.txt
+++ /dev/null
@@ -1 +0,0 @@
-// Signature format: 2.0
diff --git a/services/surfaceflinger/sysprop/api/system-current.txt b/services/surfaceflinger/sysprop/api/system-current.txt
deleted file mode 100644
index 6ae3ac15ee..0000000000
--- a/services/surfaceflinger/sysprop/api/system-current.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-// Signature format: 2.0
-package android.sysprop {
-
- public final class SurfaceFlingerProperties {
- method public static java.util.Optional<java.lang.Long> default_composition_dataspace();
- method public static java.util.Optional<java.lang.Integer> default_composition_pixel_format();
- method public static java.util.List<java.lang.Double> display_primary_blue();
- method public static java.util.List<java.lang.Double> display_primary_green();
- method public static java.util.List<java.lang.Double> display_primary_red();
- method public static java.util.List<java.lang.Double> display_primary_white();
- method public static java.util.Optional<java.lang.Boolean> enable_protected_contents();
- method public static java.util.Optional<java.lang.Boolean> force_hwc_copy_for_virtual_displays();
- method public static java.util.Optional<java.lang.Boolean> has_HDR_display();
- method public static java.util.Optional<java.lang.Boolean> has_wide_color_display();
- method public static java.util.Optional<java.lang.Long> max_frame_buffer_acquired_buffers();
- method public static java.util.Optional<java.lang.Long> max_virtual_display_dimension();
- method public static java.util.Optional<java.lang.Long> present_time_offset_from_vsync_ns();
- method public static java.util.Optional<android.sysprop.SurfaceFlingerProperties.primary_display_orientation_values> primary_display_orientation();
- method public static java.util.Optional<java.lang.Boolean> running_without_sync_framework();
- method public static java.util.Optional<java.lang.Integer> set_idle_timer_ms();
- method public static java.util.Optional<java.lang.Integer> set_touch_timer_ms();
- method public static java.util.Optional<java.lang.Boolean> start_graphics_allocator_service();
- method public static java.util.Optional<java.lang.Boolean> support_kernel_idle_timer();
- method public static java.util.Optional<java.lang.Boolean> use_color_management();
- method public static java.util.Optional<java.lang.Boolean> use_context_priority();
- method public static java.util.Optional<java.lang.Boolean> use_smart_90_for_video();
- method public static java.util.Optional<java.lang.Boolean> use_vr_flinger();
- method public static java.util.Optional<java.lang.Long> vsync_event_phase_offset_ns();
- method public static java.util.Optional<java.lang.Long> vsync_sf_event_phase_offset_ns();
- method public static java.util.Optional<java.lang.Long> wcg_composition_dataspace();
- method public static java.util.Optional<java.lang.Integer> wcg_composition_pixel_format();
- }
-
- public enum SurfaceFlingerProperties.primary_display_orientation_values {
- method public String getPropValue();
- enum_constant public static final android.sysprop.SurfaceFlingerProperties.primary_display_orientation_values ORIENTATION_0;
- enum_constant public static final android.sysprop.SurfaceFlingerProperties.primary_display_orientation_values ORIENTATION_180;
- enum_constant public static final android.sysprop.SurfaceFlingerProperties.primary_display_orientation_values ORIENTATION_270;
- enum_constant public static final android.sysprop.SurfaceFlingerProperties.primary_display_orientation_values ORIENTATION_90;
- }
-
-}
-
diff --git a/services/surfaceflinger/sysprop/api/system-removed.txt b/services/surfaceflinger/sysprop/api/system-removed.txt
deleted file mode 100644
index d802177e24..0000000000
--- a/services/surfaceflinger/sysprop/api/system-removed.txt
+++ /dev/null
@@ -1 +0,0 @@
-// Signature format: 2.0
diff --git a/services/surfaceflinger/sysprop/api/test-current.txt b/services/surfaceflinger/sysprop/api/test-current.txt
deleted file mode 100644
index d802177e24..0000000000
--- a/services/surfaceflinger/sysprop/api/test-current.txt
+++ /dev/null
@@ -1 +0,0 @@
-// Signature format: 2.0
diff --git a/services/surfaceflinger/sysprop/api/test-removed.txt b/services/surfaceflinger/sysprop/api/test-removed.txt
deleted file mode 100644
index d802177e24..0000000000
--- a/services/surfaceflinger/sysprop/api/test-removed.txt
+++ /dev/null
@@ -1 +0,0 @@
-// Signature format: 2.0