title: Not getting the user's name when anonymous linking with google account
body: <p>I have two way method for signing-in, one is normal <strong>Google sign-in</strong> and other is <strong>Anonymous Sign-in</strong>. In my google sign-in there is no problem and everything works fine even the user's credentials are also coming great including name, email and firebase id.
  Now the problem is that when I link my anonymous account to the google id using firebase, it is also working fine but at the time of getting credentials all I'm getting is null when <strong>getDisplayName()</strong> is called. </p>
  
  <p><strong>NOTE:</strong> I'm getting the firebase id and email correctly but the name is coming null.</p>
  
  <p>This is my log output here : </p>
  
  <pre><code>11-15 12:58:26.712 21983-21983/in.pinelane.myhovi E/userName: null
  11-15 12:58:26.712 21983-21983/in.pinelane.myhovi E/userEmail: xyz@gmail.com
  </code></pre>
  
  <p>Since my code is working fine but still no luck, code goes like this : </p>
  
  <pre><code>private void linkGuestWithCredential(AuthCredential credentials) {
  
      firebaseAuth.getCurrentUser().linkWithCredential(credentials)
              .addOnCompleteListener(new OnCompleteListener&lt;AuthResult&gt;() {
                  @Override
                  public void onComplete(@NonNull Task&lt;AuthResult&gt; task) {
                      if( task.isSuccessful()){
                          mProgress.dismiss();
                          Log.d(TAG, "linkWithCredential:success");
  
                          FirebaseUser permanentUser = task.getResult().getUser();
                          callAnonymousUpdateApi(permanentUser);
  
                          Intent signIntent = new Intent(LoginActivity.this, MainActivity.class);
                          signIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
                          startActivity(signIntent);
                          Toast.makeText(LoginActivity.this, "Welcome to MyHovi!", Toast.LENGTH_LONG)
                                  .show();
                          finish();
                          overridePendingTransition(R.anim.right_enter, R.anim.left_exit);
  
                      }else{
                          mProgress.dismiss();
                          Log.e(TAG, "linkWithCredential:failure", task.getException());
                          Toast.makeText(getApplicationContext(), "Sign-in failed", Toast.LENGTH_SHORT)
                                  .show();
                      }
                  }
              });
  </code></pre>
  
  <p>In the <strong>callAnonymousUpdateApi(permanentUSer)</strong> I'm actually getting the credentials :</p>
  
  <pre><code>private void callAnonymousUpdateApi(FirebaseUser permanentUser) {
  
      final String name = permanentUser.getDisplayName();
      final String email = permanentUser.getEmail();
      final String firebaseId = permanentUser.getUid();
  
      RequestParams params = new RequestParams();
      params.add("user_id", userId);
      params.add("name", name);
      params.add("email", email);
      params.add("firebase_id", firebaseId);
      params.add("user_complete", "true");
  }
  </code></pre>
  
  <p>What I have tried so far is : </p>
  
  <ol>
  <li><p>Changing <code>FirebseUser permanentUSer = task.getResult().getUser();</code> to <code>FirebseUser permanentUSer = FirebaseAuth.getInstance().getCurrentUser();</code></p></li>
  <li><p>Tried the same thing in different way that is in the callAnonymousUpdateApi(FirebaseUser permanentUser) what I've done is trying the to get the name as <code>final String name = FirebaseAuth.getInstance().getCurrentUser().getDisplayName();</code></p></li>
  </ol>
  
  <p>but still no luck, any help would be highly appreciated. Thanks</p>