How and when does a service get automatically restarted in Android
<p>According to the docs (ref: <a href="http://developer.android.com/reference/android/app/Service.html#ProcessLifecycle" rel="nofollow">http://developer.android.com/reference/android/app/Service.html#ProcessLifecycle</a>), android will automatically restart a service that is killed due to low memory.</p>

<p>To quote:</p>

<blockquote>
  <p>Note this means that most of the time your service is running, it may be killed by the system if it is under heavy memory pressure. If this happens, the system will later try to restart the service.</p>
</blockquote>

<p>My questions are:
(1) How does the system decide which services to restart?
(2) When is "later"?</p>
