diff --git a/gradle.properties b/gradle.properties index b492b46..6758f56 100644 --- a/gradle.properties +++ b/gradle.properties @@ -19,4 +19,4 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 android.useAndroidX=true GROUP_ID=com.linkedin.shaky -VERSION_NAME=3.0.15-SNAPSHOT \ No newline at end of file +VERSION_NAME=4.0.0-SNAPSHOT \ No newline at end of file diff --git a/shaky/src/main/java/com/linkedin/android/shaky/CollectDataTask.java b/shaky/src/main/java/com/linkedin/android/shaky/CollectDataTask.java index f393e02..00caa76 100644 --- a/shaky/src/main/java/com/linkedin/android/shaky/CollectDataTask.java +++ b/shaky/src/main/java/com/linkedin/android/shaky/CollectDataTask.java @@ -57,14 +57,12 @@ protected Result doInBackground(Bitmap... params) { File screenshotDirectory = new File(screenshotDirectoryRoot); - if(delegate.enableDeletingOldScreenshots()) { - // delete any old screenshots that we may have left lying around - if (screenshotDirectory.exists()) { - File[] oldScreenshots = screenshotDirectory.listFiles(); - for (File oldScreenshot : oldScreenshots) { - if (!oldScreenshot.delete()) { - Log.e(TAG, "Could not delete old screenshot:" + oldScreenshot); - } + // delete any old screenshots that we may have left lying around + if (screenshotDirectory.exists()) { + File[] oldScreenshots = screenshotDirectory.listFiles(); + for (File oldScreenshot : oldScreenshots) { + if (!oldScreenshot.delete()) { + Log.e(TAG, "Could not delete old screenshot:" + oldScreenshot); } } } diff --git a/shaky/src/main/java/com/linkedin/android/shaky/ShakeDelegate.java b/shaky/src/main/java/com/linkedin/android/shaky/ShakeDelegate.java index 3d3b73d..cca7ba5 100644 --- a/shaky/src/main/java/com/linkedin/android/shaky/ShakeDelegate.java +++ b/shaky/src/main/java/com/linkedin/android/shaky/ShakeDelegate.java @@ -159,14 +159,4 @@ public boolean shouldUseBottomSheet() { * This method can be overridden to send data to a custom URL endpoint, etc. */ public abstract void submit(@NonNull Activity activity, @NonNull Result result); - - /** - * @return whether the captured screenshots in memory should be deleted or not before capturing - * a new one. - * Please note that, when disabled, it is the responsibility of the integrating app to delete - * the old screenshots as and when required. - */ - public boolean enableDeletingOldScreenshots() { - return true; - } }