title: AlarmManager doesn't work in sleep mode when launchMode is on
body: <p>I have a activity A, and I have to call activity A again by AlarmManager. After that phone goes to sleep and wakes up by alarmmanager 30 mins later. The code is as follow:</p>
  
  <pre><code>public void wakeup(){
      Intent i = new Intent(mcontext, activity_form.class);
      PendingIntent operation = PendingIntent.getActivity(mcontext, 0, i, Intent.FLAG_ACTIVITY_NEW_TASK);
      Calendar cal = Calendar.getInstance();
      cal.add(Calendar.MINUTE, 30);
      AlarmManager am =  (AlarmManager)mcontext.getSystemService(Activity.ALARM_SERVICE);    
      am.set(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(), operation);
  } 
  public void sleep(){
      pm = (PowerManager)mcontext.getSystemService(Context.POWER_SERVICE);
      pm.goToSleep(SystemClock.uptimeMillis());   
  }
  </code></pre>
  
  <p>However, I don't want to create activity A again, so I hope my activity is singleton, and I add this in my Manifest.xml</p>
  
  <pre><code>android:launchMode="singleInstance" 
  or
  android:launchMode="singleTask"
  </code></pre>
  
  <p>30 mins later, I see wakeup call in logcat, but phone doesn't wake up. If I delete android:launchMode, it's okay and wake up successfully. However, I will create activity A again.<br>
  A -> set alarm -> sleep -> wake up -> A' But my hope is A -> set alarm -> sleep -> wake up -> A<br>
  I have no idea about that, thank you a lot. </p>