title: Android - Firebase - TaskSnapshot - Method should only be accessed within private scope?
body: <p>Everything was working great... until I came back to work from a 3 month break and updated my Firebase from 9.8 to 10.0.1</p>
  
  <p>Now all of my calls to <code>TaskSnapshot</code> are giving me an error.</p>
  
  <p>Here is the example code that worked fine before:</p>
  
  <pre><code>OnSuccessListener&lt;UploadTask.TaskSnapshot&gt; successListener = new OnSuccessListener&lt;UploadTask.TaskSnapshot&gt;() {
      @Override
      public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {
          attachments.add(fileName + "*-*" + taskSnapshot.getDownloadUrl().toString());
  
          numberOfCallbacks++;
          if (numberOfFiles == numberOfCallbacks) {
              currentUpload = false;
              onClickSendAlert(sendingView);
          }
      }
  };
  </code></pre>
  
  <p>The error that I now get is regarding <code>taskSnapshot.getDownloadUrl()</code>.</p>
  
  <p>Android Studio underlines that line in red and says:</p>
  
  <blockquote>
    <p>This method should only be accessed from tests or within private scope</p>
  </blockquote>
  
  <p>Can someone explain why this is happening? I have been researching all day for two days straight now and can't for the life of me figure this out (embarrassing).</p>
  
  <p>For what it's worth, this code is used to upload a file to Firebase Storage, then when it is complete (<code>OnSuccess</code>), it gets the download URL and stores it in the Firebase Database. This worked great before I updated to 10.0.1. I get the same error on my download tasks in another module.</p>
  
  <p>Here is a screenshot to give you a better visual of my situation:</p>
  
  <p><a href="https://i.stack.imgur.com/2yHZZ.png"><img src="https://i.stack.imgur.com/2yHZZ.png" alt="enter image description here"></a></p>