Created
August 20, 2017 19:59
-
-
Save konalegi/9047787ddfc1faf64e2a36a2e6f510c4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void removeOldPhotos(final Activity activity){ | |
iterateOverGalleryPhotos(activity, new IPhotoFromGallery() { | |
@Override | |
public void onPhoto(Cursor cursor, long photoAgeInMillis) { | |
if (photoAgeInMillis < SEVENTY_TWO_HOURS_IN_MILLIS) return; | |
if (isFromBcePublicFolder(cursor)){ | |
getFileFromCursor(cursor).delete(); | |
removeFileFromGallery(activity, cursor); | |
} | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment