title: Synchronized method called by Android Activity onCreate method
body: <p>Is the following situation poor design or am I overlooking something important?</p>
  
  <p>Here is the code</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity … {
  
    …
  
    @Override
    public void onCreate(Bundle savedInstanceState){
       …
       buildGoogleApiClient();
    }
  
    /**
     * Builds a GoogleApiClient. Uses the addApi() method to request the LocationServices API.
     */
      protected synchronized void buildGoogleApiClient() {
          mGoogleApiClient = new GoogleApiClient.Builder(this)
                  .addConnectionCallbacks(this)
                  .addOnConnectionFailedListener(this)
                  .addApi(LocationServices.API)
                  .build();
      }
  }
  </code></pre>
  
  <p>Why is <code>buildGoogleApiClient</code> <code>synchronized</code> when it’s ever only called from inside <code>onCreate</code>?</p>
  
  <p>I know it cannot hurt, but that's hardly the point of the question. What I need to know is: <strong>Why is it necessary?</strong></p>
  
  <p><strong>Edit</strong></p>
  
  <p>source to full code: <a href="https://github.com/googlesamples/android-play-location/blob/master/BasicLocationSample/app/src/main/java/com/google/android/gms/location/sample/basiclocationsample/MainActivity.java" rel="nofollow">https://github.com/googlesamples/android-play-location/blob/master/BasicLocationSample/app/src/main/java/com/google/android/gms/location/sample/basiclocationsample/MainActivity.java</a></p>