mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-20 00:29:11 +01:00
Show backup progress as a percentage.
This commit is contained in:
committed by
Greyson Parrelli
parent
4f73e36d72
commit
8014a70134
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user