diff --git a/Celestia/build.gradle b/Celestia/build.gradle index 08abaabe..0a87b9bf 100644 --- a/Celestia/build.gradle +++ b/Celestia/build.gradle @@ -29,6 +29,10 @@ android { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + + ndk { + abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86_64' + } } } diff --git a/Celestia/src/main/cpp/gamesdk/include/common/gamesdk_common.h b/Celestia/src/main/cpp/gamesdk/include/common/gamesdk_common.h index 44ae9abb..8512262c 100644 --- a/Celestia/src/main/cpp/gamesdk/include/common/gamesdk_common.h +++ b/Celestia/src/main/cpp/gamesdk/include/common/gamesdk_common.h @@ -36,3 +36,6 @@ #define ANDROID_GAMESDK_MAJOR_VERSION(PACKED) ((PACKED) >> 16) #define ANDROID_GAMESDK_MINOR_VERSION(PACKED) ((PACKED)&0xff) #define ANDROID_GAMESDK_BUGFIX_VERSION(PACKED) (((PACKED) >> 8) & 0xff) + +#define AGDK_STRING_VERSION(MAJOR, MINOR, BUGFIX, GIT) \ +#MAJOR "." #MINOR "." #BUGFIX "." #GIT diff --git a/Celestia/src/main/cpp/gamesdk/include/swappy/swappyGL.h b/Celestia/src/main/cpp/gamesdk/include/swappy/swappyGL.h index c54414b3..4ad9a4c0 100644 --- a/Celestia/src/main/cpp/gamesdk/include/swappy/swappyGL.h +++ b/Celestia/src/main/cpp/gamesdk/include/swappy/swappyGL.h @@ -33,9 +33,6 @@ extern "C" { #endif -// Internal init function. Do not call directly. -bool SwappyGL_init_internal(JNIEnv *env, jobject jactivity); - /** * @brief Initialize Swappy, getting the required Android parameters from the * display subsystem via JNI. @@ -44,13 +41,7 @@ bool SwappyGL_init_internal(JNIEnv *env, jobject jactivity); * @return false if Swappy failed to initialize. * @see SwappyGL_destroy */ -static inline bool SwappyGL_init(JNIEnv *env, jobject jactivity) { - // This call ensures that the header and the linked library are from the - // same version (if not, a linker error will be triggered because of an - // undefined symbolP). - SWAPPY_VERSION_SYMBOL(); - return SwappyGL_init_internal(env, jactivity); -} +bool SwappyGL_init(JNIEnv *env, jobject jactivity); /** * @brief Check if Swappy was successfully initialized. diff --git a/Celestia/src/main/cpp/gamesdk/include/swappy/swappyGL_extra.h b/Celestia/src/main/cpp/gamesdk/include/swappy/swappyGL_extra.h index 6ba412db..155268fc 100644 --- a/Celestia/src/main/cpp/gamesdk/include/swappy/swappyGL_extra.h +++ b/Celestia/src/main/cpp/gamesdk/include/swappy/swappyGL_extra.h @@ -160,6 +160,10 @@ void SwappyGL_recordFrameStart(EGLDisplay display, EGLSurface surface); */ void SwappyGL_getStats(SwappyStats *swappyStats); +/** @brief Remove callbacks that were previously added using + * SwappyGL_injectTracer. */ +void SwappyGL_uninjectTracer(const SwappyTracer *t); + #ifdef __cplusplus }; #endif diff --git a/Celestia/src/main/cpp/gamesdk/include/swappy/swappyVk.h b/Celestia/src/main/cpp/gamesdk/include/swappy/swappyVk.h index 87781ffc..1ec50c80 100644 --- a/Celestia/src/main/cpp/gamesdk/include/swappy/swappyVk.h +++ b/Celestia/src/main/cpp/gamesdk/include/swappy/swappyVk.h @@ -131,16 +131,11 @@ bool SwappyVk_initAndGetRefreshCycleDuration_internal( * @return bool - true if the value returned by pRefreshDuration is * valid, otherwise false if an error. */ -static inline bool SwappyVk_initAndGetRefreshCycleDuration( - JNIEnv* env, jobject jactivity, VkPhysicalDevice physicalDevice, - VkDevice device, VkSwapchainKHR swapchain, uint64_t* pRefreshDuration) { - // This call ensures that the header and the linked library are from the - // same version (if not, a linker error will be triggered because of an - // undefined symbol). - SWAPPY_VERSION_SYMBOL(); - return SwappyVk_initAndGetRefreshCycleDuration_internal( - env, jactivity, physicalDevice, device, swapchain, pRefreshDuration); -} +bool SwappyVk_initAndGetRefreshCycleDuration(JNIEnv* env, jobject jactivity, + VkPhysicalDevice physicalDevice, + VkDevice device, + VkSwapchainKHR swapchain, + uint64_t* pRefreshDuration); /** * @brief Tell Swappy which ANativeWindow to use when calling to ANativeWindow_* diff --git a/Celestia/src/main/cpp/gamesdk/include/swappy/swappy_common.h b/Celestia/src/main/cpp/gamesdk/include/swappy/swappy_common.h index f6590d8c..ab7a1333 100644 --- a/Celestia/src/main/cpp/gamesdk/include/swappy/swappy_common.h +++ b/Celestia/src/main/cpp/gamesdk/include/swappy/swappy_common.h @@ -42,7 +42,7 @@ // Internal macros to track Swappy version, do not use directly. #define SWAPPY_MAJOR_VERSION 1 -#define SWAPPY_MINOR_VERSION 9 +#define SWAPPY_MINOR_VERSION 10 #define SWAPPY_BUGFIX_VERSION 0 #define SWAPPY_PACKED_VERSION \ ANDROID_GAMESDK_PACKED_VERSION(SWAPPY_MAJOR_VERSION, SWAPPY_MINOR_VERSION, \ @@ -50,13 +50,14 @@ // Internal macros to generate a symbol to track Swappy version, do not use // directly. -#define SWAPPY_VERSION_CONCAT_NX(PREFIX, MAJOR, MINOR, BUGFIX) \ - PREFIX##_##MAJOR##_##MINOR##_##BUGFIX -#define SWAPPY_VERSION_CONCAT(PREFIX, MAJOR, MINOR, BUGFIX) \ - SWAPPY_VERSION_CONCAT_NX(PREFIX, MAJOR, MINOR, BUGFIX) -#define SWAPPY_VERSION_SYMBOL \ - SWAPPY_VERSION_CONCAT(Swappy_version, SWAPPY_MAJOR_VERSION, \ - SWAPPY_MINOR_VERSION, SWAPPY_BUGFIX_VERSION) +#define SWAPPY_VERSION_CONCAT_NX(PREFIX, MAJOR, MINOR, BUGFIX, GITCOMMIT) \ + PREFIX##_##MAJOR##_##MINOR##_##BUGFIX##_##GITCOMMIT +#define SWAPPY_VERSION_CONCAT(PREFIX, MAJOR, MINOR, BUGFIX, GITCOMMIT) \ + SWAPPY_VERSION_CONCAT_NX(PREFIX, MAJOR, MINOR, BUGFIX, GITCOMMIT) +#define SWAPPY_VERSION_SYMBOL \ + SWAPPY_VERSION_CONCAT(Swappy_version, SWAPPY_MAJOR_VERSION, \ + SWAPPY_MINOR_VERSION, SWAPPY_BUGFIX_VERSION, \ + AGDK_GIT_COMMIT) /** @endcond */ @@ -100,16 +101,6 @@ typedef struct SwappyThreadFunctions { extern "C" { #endif -/** @cond INTERNAL */ - -// Internal function to track Swappy version bundled in a binary. Do not call -// directly. If you are getting linker errors related to Swappy_version_x_y, you -// probably have a mismatch between the header used at compilation and the -// actually library used by the linker. -void SWAPPY_VERSION_SYMBOL(); - -/** @endcond */ - /** * @brief Return the version of the Swappy library at runtime. */ @@ -125,6 +116,12 @@ uint32_t Swappy_version(); */ void Swappy_setThreadFunctions(const SwappyThreadFunctions* thread_functions); +/** + * @brief Return the full version of the Swappy library at runtime, e.g. + * "1.9.0_8a85ab7c46" + */ +const char* Swappy_versionString(); + #ifdef __cplusplus } // extern "C" #endif diff --git a/Celestia/src/main/cpp/gamesdk/libs/arm64-v8a/libswappy_static.a b/Celestia/src/main/cpp/gamesdk/libs/arm64-v8a/libswappy_static.a index 611e5fd2..d81001e4 100644 Binary files a/Celestia/src/main/cpp/gamesdk/libs/arm64-v8a/libswappy_static.a and b/Celestia/src/main/cpp/gamesdk/libs/arm64-v8a/libswappy_static.a differ diff --git a/Celestia/src/main/cpp/gamesdk/libs/armeabi-v7a/libswappy_static.a b/Celestia/src/main/cpp/gamesdk/libs/armeabi-v7a/libswappy_static.a index 0700ee61..523d660d 100644 Binary files a/Celestia/src/main/cpp/gamesdk/libs/armeabi-v7a/libswappy_static.a and b/Celestia/src/main/cpp/gamesdk/libs/armeabi-v7a/libswappy_static.a differ diff --git a/Celestia/src/main/cpp/gamesdk/libs/x86/libswappy_static.a b/Celestia/src/main/cpp/gamesdk/libs/x86/libswappy_static.a index d2ada074..b356cdf3 100644 Binary files a/Celestia/src/main/cpp/gamesdk/libs/x86/libswappy_static.a and b/Celestia/src/main/cpp/gamesdk/libs/x86/libswappy_static.a differ diff --git a/Celestia/src/main/cpp/gamesdk/libs/x86_64/libswappy_static.a b/Celestia/src/main/cpp/gamesdk/libs/x86_64/libswappy_static.a index b3647fa4..353c4f0e 100644 Binary files a/Celestia/src/main/cpp/gamesdk/libs/x86_64/libswappy_static.a and b/Celestia/src/main/cpp/gamesdk/libs/x86_64/libswappy_static.a differ diff --git a/app/build.gradle b/app/build.gradle index f73f3a14..c47db5c2 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -41,7 +41,7 @@ android { proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' ndk { - abiFilters 'armeabi-v7a', 'arm64-v8a' + abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86_64' } } } @@ -101,12 +101,12 @@ dependencies { implementation "androidx.fragment:fragment-ktx:1.4.1" implementation "com.google.android.material:material:$material_version" - implementation "com.google.code.gson:gson:2.8.9" + implementation "com.google.code.gson:gson:2.9.0" implementation "com.squareup.retrofit2:retrofit:2.9.0" implementation "com.squareup.retrofit2:converter-gson:2.9.0" implementation "com.squareup.okhttp3:okhttp:4.9.3" - implementation "net.lingala.zip4j:zip4j:2.9.1" + implementation "net.lingala.zip4j:zip4j:2.10.0" implementation 'androidx.webkit:webkit:1.4.0' diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index bb259382..e3e67325 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -14,8 +14,8 @@ xmlns:tools="http://schemas.android.com/tools" package="space.celestia.mobilecelestia" android:installLocation="auto" - android:versionCode="263" - android:versionName="1.5.7"> + android:versionCode="264" + android:versionName="1.5.8"> diff --git a/app/src/main/java/space/celestia/mobilecelestia/common/SeparatorRecyclerViewAdapter.kt b/app/src/main/java/space/celestia/mobilecelestia/common/SeparatorRecyclerViewAdapter.kt index bd0a26df..99b7bce5 100644 --- a/app/src/main/java/space/celestia/mobilecelestia/common/SeparatorRecyclerViewAdapter.kt +++ b/app/src/main/java/space/celestia/mobilecelestia/common/SeparatorRecyclerViewAdapter.kt @@ -204,7 +204,6 @@ fun List.transformed(): List { for (indexedSection in this.withIndex()) { val index = indexedSection.index val section = indexedSection.value - val spaceAdded = false val showHeader = section.header != null && section.header != "" val showFooter = section.footer != null && section.footer != "" diff --git a/app/src/main/java/space/celestia/mobilecelestia/eventfinder/EventFinderInputFragment.kt b/app/src/main/java/space/celestia/mobilecelestia/eventfinder/EventFinderInputFragment.kt index 09ecd043..a8b9abf0 100644 --- a/app/src/main/java/space/celestia/mobilecelestia/eventfinder/EventFinderInputFragment.kt +++ b/app/src/main/java/space/celestia/mobilecelestia/eventfinder/EventFinderInputFragment.kt @@ -55,7 +55,6 @@ class EventFinderInputFragment : NavigationFragment.SubFragment() { val ac = context as? Activity ?: return@EventFinderInputRecyclerViewAdapter val objects = listOf(AppCore.getLocalizedString("Earth", "celestia-data"), AppCore.getLocalizedString("Jupiter", "celestia-data")) val other = CelestiaString("Other", "") - val currentIndex = 0.coerceAtLeast(objects.indexOf(current)) ac.showOptions(CelestiaString("Please choose an object.", ""), (objects + other).toTypedArray()) { index -> if (index >= objects.size) { // User choose other, show text input for the object name diff --git a/app/src/main/java/space/celestia/mobilecelestia/travel/GoToInputFragment.kt b/app/src/main/java/space/celestia/mobilecelestia/travel/GoToInputFragment.kt index 14e26f04..d7fefac5 100644 --- a/app/src/main/java/space/celestia/mobilecelestia/travel/GoToInputFragment.kt +++ b/app/src/main/java/space/celestia/mobilecelestia/travel/GoToInputFragment.kt @@ -90,7 +90,6 @@ class GoToInputFragment : NavigationFragment.SubFragment() { listener?.onEditGoToObject(goToData) }, chooseUnitCallback = { current -> val ac = activity ?: return@GoToInputRecyclerViewAdapter - val index = distanceUnits.indexOf(current) ac.showOptions("", distanceUnits.map { value -> CelestiaString(value.name, "") }.toTypedArray(),) { newIndex -> val unit = distanceUnits[newIndex] adapter?.unit = unit diff --git a/build.gradle b/build.gradle index 30aab2bf..f2697cb7 100644 --- a/build.gradle +++ b/build.gradle @@ -16,8 +16,8 @@ buildscript { ext.core_ktx_version = '1.7.0' ext.core_appcompat_version = '1.4.1' ext.material_version = '1.5.0' - ext.glide_version = '4.12.0' - ext.kotlinx_coroutines_version = '1.6.0' + ext.glide_version = '4.13.1' + ext.kotlinx_coroutines_version = '1.6.1' repositories { google() @@ -25,7 +25,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:7.1.2' + classpath 'com.android.tools.build:gradle:7.1.3' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'com.google.dagger:hilt-android-gradle-plugin:2.38.1' }