Skip to content

Commit

Permalink
Remove check for > 1 frame when seeking (#831)
Browse files Browse the repository at this point in the history
* Dependency versions bump

* Remove check for > 1 frame when seeking, fixes #830
  • Loading branch information
koral-- authored Aug 29, 2023
1 parent c10c4f1 commit 9080ef9
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 23 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#### 1.2.28
- 2023-08-29 - [commits](https://github.com/koral--/android-gif-drawable/compare/v1.2.27...v1.2.28)
- Remove check for > 1 frame when seeking, fixes [(#830)](https://github.com/koral--/android-gif-drawable/pull/830), thanks @hgourvest for reporting
- Update dependency versions
- Update Android Gradle plugin to 8.1.1

#### 1.2.27
- 2023-07-03 - [commits](https://github.com/koral--/android-gif-drawable/compare/v1.2.26...v1.2.27)
- Revert java to 1.8, fixes [(#826)](https://github.com/koral--/android-gif-drawable/pull/826), thanks @droplet-js for reporting
Expand Down
5 changes: 3 additions & 2 deletions android-gif-drawable/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,10 @@ def isDevelopmentBuild() {
}

tasks.register('archiveSymbols', Tar) {
from new File(buildDir, 'intermediates/cmake/release/obj')
def buildDirectory = layout.buildDirectory.asFile.get()
from new File(buildDirectory, 'intermediates/cmake/release/obj')
archiveBaseName = "${project.archivesBaseName}-symbols"
destinationDirectory = new File(buildDir, 'libs')
destinationDirectory = new File(buildDirectory, 'libs')
archiveExtension = 'tar.gz'
compression = Compression.GZIP
}
Expand Down
4 changes: 2 additions & 2 deletions android-gif-drawable/src/main/c/control.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ __unused JNIEXPORT void JNICALL
Java_pl_droidsonroids_gif_GifInfoHandle_seekToTime(JNIEnv *env, jclass __unused handleClass,
jlong gifInfo, jint desiredPos, jobject jbitmap) {
GifInfo *info = (GifInfo *) (intptr_t) gifInfo;
if (info == NULL || info->gifFilePtr->ImageCount == 1) {
if (info == NULL) {
return;
}

Expand Down Expand Up @@ -113,7 +113,7 @@ __unused JNIEXPORT void JNICALL
Java_pl_droidsonroids_gif_GifInfoHandle_seekToFrame(JNIEnv *env, jclass __unused handleClass,
jlong gifInfo, jint desiredIndex, jobject jbitmap) {
GifInfo *info = (GifInfo *) (intptr_t) gifInfo;
if (info == NULL || info->gifFilePtr->ImageCount == 1) {
if (info == NULL) {
return;
}

Expand Down
18 changes: 9 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
buildscript {
ext {
versions = [
compileSdk : 33,
compileSdk : 34,
targetSdk : 33,
minSdk : 17,
ndk : '25.2.9519653',
Expand All @@ -10,21 +10,21 @@ buildscript {
androidxAnnotations: '1.6.0',
androidxTest : '1.5.0',
androidxTestRunner : '1.5.2',
coroutines : '1.7.1',
leakCanary : '2.11',
kotlin : '1.8.22',
coroutines : '1.7.3',
leakCanary : '2.12',
kotlin : '1.9.10',
intellijAnnotations: '13.0',
material : '1.9.0',
androidXextJunit : '1.1.5',
androidGradlePlugin: '8.0.2',
androidGradlePlugin: '8.1.1',
junit : '4.13.2',
mockito : '5.4.0',
robolectric : '4.8.1',
assertj3 : '3.14.0',
mockito : '5.5.0',
robolectric : '4.10.3',
assertj3 : '3.24.2',
assertj1 : '1.7.1',
concurrentunit : '0.4.6',
openglApi : 'gl1.1-android-2.1_r1',
mockwebserver : '4.9.0',
mockwebserver : '4.9.2',
relinker : '1.4.5',
mavenPublishPlugin : '0.21.0',
]
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RELEASE_SIGNING_ENABLED=true

GROUP=pl.droidsonroids.gif
POM_ARTIFACT_ID=android-gif-drawable
VERSION_NAME=1.2.27
VERSION_NAME=1.2.28

POM_NAME=android-gif-drawable
POM_DESCRIPTION=Views and Drawable for displaying animated GIFs for Android
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
25 changes: 17 additions & 8 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand All @@ -80,13 +80,11 @@ do
esac
done

APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

APP_NAME="Gradle"
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -133,22 +131,29 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -193,6 +198,10 @@ if "$cygwin" || "$msys" ; then
done
fi


# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
Expand Down
1 change: 1 addition & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

Expand Down

0 comments on commit 9080ef9

Please sign in to comment.