title: get notified when requestSync function completed
body: <p>im trying to start the calendar sync programatically using this code</p>
  
  <pre><code>Bundle bundle = new Bundle();
  bundle.putBoolean(ContentResolver.SYNC_EXTRAS_EXPEDITED, true);
  bundle.putBoolean(ContentResolver.SYNC_EXTRAS_FORCE, true);
  bundle.putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true);
  bundle.putBoolean(ContentResolver.SYNC_EXTRAS_IGNORE_SETTINGS, true);
  
  ContentResolver.requestSync(accounts[0], "com.android.calendar", bundle);
  </code></pre>
  
  <p>i want a way so i can know when sync complete so i can read data from the calendar
  i tried doing this </p>
  
  <pre><code>while (ContentResolver.isSyncActive(accounts[0], "com.android.calendar")) {
  System.out.println("looping: " + i);
  }
  
  readLocalCalendar();
  readLocalEvents();
  </code></pre>
  
  <p>but the system exit the loop before the sync ends and i can still see the sync sign at the status bar, so any help so i can read calendar events after sync completle done ??</p>
  
  <p>thanks</p>