title: PARTIAL_WAKE_LOCK and ON_AFTER_RELEASE doesn't turn screen on
body: <p>I created a BroadcastReceiver to turn the screen on from an AlarmManager. Here is the code of my <code>OnReceive</code>.</p>
  
  <pre><code>@Override
  public void onReceive(Context arg0, Intent arg1) {
      Log.i("", "OnReceive");
  
      // Initializes the PowerManager.
      PowerManager powerManager = (PowerManager) arg0
              .getSystemService(Context.POWER_SERVICE);
  
      // Wakes device.
      WakeLock wakeLock = powerManager.newWakeLock(
              PowerManager.FULL_WAKE_LOCK
                      | PowerManager.ACQUIRE_CAUSES_WAKEUP
                      | PowerManager.ON_AFTER_RELEASE, "Stretching");
      wakeLock.acquire();
      wakeLock.release();
      wakeLock = null;
  
      // Calls activity.
      Intent intent = new Intent(arg0, TrainingActivity.class);
      intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
      arg0.startActivity(intent);
  }
  </code></pre>
  
  <p>The problem occurs because <code>FULL_WAKE_LOCK</code> is deprecated, so I tried to use <code>PARTIAL_WAKE_LOCK</code>, but then the screen doesn't turn on. What should I use instead?
  I searched this <a href="https://stackoverflow.com/questions/10352911/how-to-turn-screen-on-during-partial-wake-lock">How to turn screen on during partial wake lock</a> but it is also using <code>FULL_WAKE_LOCK</code>.</p>