From 749aaebf8af624d2764deed6b059c285dd82b9da Mon Sep 17 00:00:00 2001 From: Ryan Prichard Date: Thu, 19 Jul 2018 20:32:19 -0700 Subject: Restore __ANDROID_API__ guards for core APIs This commit restores the __ANDROID_API__ guards removed in "Add __INTRODUCED_IN to core APIs.", commit 9db409b053460e065cefb1d1caefe048f90cfff0. Add a guard to surface_texture.h. In choreographer.h, declare the types even for older APIs. Bug: http://b/111668906 Test: builds Change-Id: Ia013f48a109310f9f8ca6a3211f28fcb69dd602d Merged-In: Ia013f48a109310f9f8ca6a3211f28fcb69dd602d (cherry picked from commit 92b1ebea095f9cac70b81ae7382ae69583c9914d) --- include/android/configuration.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/android/configuration.h') diff --git a/include/android/configuration.h b/include/android/configuration.h index 81aedca9d8..ef6c5a2f81 100644 --- a/include/android/configuration.h +++ b/include/android/configuration.h @@ -675,6 +675,7 @@ int32_t AConfiguration_getUiModeNight(AConfiguration* config); */ void AConfiguration_setUiModeNight(AConfiguration* config, int32_t uiModeNight); +#if __ANDROID_API__ >= 13 /** * Return the current configuration screen width in dp units, or * ACONFIGURATION_SCREEN_WIDTH_DP_ANY if not set. @@ -707,7 +708,9 @@ int32_t AConfiguration_getSmallestScreenWidthDp(AConfiguration* config) __INTROD * Set the configuration's smallest screen width in dp units. */ void AConfiguration_setSmallestScreenWidthDp(AConfiguration* config, int32_t value) __INTRODUCED_IN(13); +#endif /* __ANDROID_API__ >= 13 */ +#if __ANDROID_API__ >= 17 /** * Return the configuration's layout direction, or * ACONFIGURATION_LAYOUTDIR_ANY if not set. @@ -718,6 +721,7 @@ int32_t AConfiguration_getLayoutDirection(AConfiguration* config) __INTRODUCED_I * Set the configuration's layout direction. */ void AConfiguration_setLayoutDirection(AConfiguration* config, int32_t value) __INTRODUCED_IN(17); +#endif /* __ANDROID_API__ >= 17 */ /** * Perform a diff between two configurations. Returns a bit mask of -- cgit v1.2.3-59-g8ed1b