madsleejensen / react-native-image-sequence

native implementation for creating frame based image animations
MIT License
107 stars 67 forks source link

Fix Android deprecation warning #34

Open sbeca opened 5 years ago

sbeca commented 5 years ago

IMPORTANT: This PR relies on PR #33.

When I build the Android version of an application I'm developing that is using react-native-image-sequence, I get the following notes during the Gradle build stage:

> Task :react-native-fs:compileDebugJavaWithJavac
Note: /Users/scott/Documents/SVN/TotallyRealProjectName/node_modules/react-native-fs/android/src/main/java/com/rnfs/RNFSManager.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

Which expands out to the following with full deprecation warning details enabled:

> Task :react-native-image-sequence:compileDebugJavaWithJavac
/Users/scott/Documents/SVN/TotallyRealProjectName/node_modules/react-native-image-sequence/android/src/main/java/dk/madslee/imageSequence/RCTResourceDrawableIdHelper.java:47: warning: [deprecation] getDrawable(int) in Resources has been deprecated
            return context.getResources().getDrawable(resId);
                                         ^
1 warning

This PR fixes that deprecation warning.