Show backup progress as a percentage.

This commit is contained in:
Cody Henthorne
2021-12-14 14:31:44 -05:00
committed by Greyson Parrelli
parent 4f73e36d72
commit 8014a70134
15 changed files with 310 additions and 46 deletions

View File

@@ -34,6 +34,13 @@ public class AvatarHelper {
private static final String AVATAR_DIRECTORY = "avatars";
public static long getAvatarCount(@NonNull Context context) {
File avatarDirectory = context.getDir(AVATAR_DIRECTORY, Context.MODE_PRIVATE);
String[] results = avatarDirectory.list();
return results == null ? 0 : results.length;
}
/**
* Retrieves an iterable set of avatars. Only intended to be used during backup.
*/