CompletableFutere doesn’t work , have another way for await something complete then… in android?

Solution for CompletableFutere doesn’t work , have another way for await something complete then… in android?
is Given Below:

i try put a list Picture to strorage ,when it complete i will retrive a list uri of Pictures.i use CompletableFutere but it doesn’t work,i retrieve null Arraylist, and i want to ask have another way can use in this case.
Thanks so much and have a good day!
this is all of code.

                    @Override
                    public void onImagesSelected(List<Uri> uriList) {
                        if (uriList != null && !uriList.isEmpty()) {
                            pictureAdapter.setData(uriList);
                            FirebaseStorage storage = FirebaseStorage.getInstance();
                            ExecutorService executor = Executors.newFixedThreadPool(2);
                            ArrayList<String> listgetPictures = new ArrayList<>();
                           CompletableFuture.runAsync(new Runnable() {
                               @Override
                               public void run() {
                                   for (int i = 0; i < uriList.size(); i++) {
                                       StorageReference reference = storage.getReference().child(uid).child("listPictures").child("picture_" + i);
                                       reference.putFile(uriList.get(i)).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {
                                           @Override
                                           public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {
                                               reference.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {
                                                   @Override
                                                   public void onSuccess(Uri uri) {
                                                       listgetPictures.add(uri.toString());
                                                   }
                                               });
                                           }
                                       });
                                   }
                               }
                           }).thenRun(new Runnable() {
                               @Override
                               public void run() {
                                   SharedPreferences.Editor editor = sharedPreferences.edit();
                                   String listPictures = gson.toJson(listgetPictures);
                                   editor.putString("pictures", listPictures);
                                   editor.apply();
                                   Log.d("PP",listPictures);
                               }
                           });

                        }
                    }
                });