/**
  * Called to start preempting. The given display will preempt all other displays for this isolate.
  *
  * @param displayId ID of the Display
  */
 public void startPreempting(int displayId) {
   foregroundEventProducer.sendDisplayBackgroundNotifyEvent(displayId);
   requestForeground(displayId, true);
 }
 /**
  * Called to end preempting.
  *
  * @param displayId ID of the Display
  */
 public void stopPreempting(int displayId) {
   foregroundEventProducer.sendDisplayBackgroundNotifyEvent(displayId);
   requestForeground(currentDisplayId, false);
 }
  /**
   * Called to request the foreground. This implementation does nothing.
   *
   * @param displayId ID of the Display
   * @param isAlert true if the current displayable is an Alert
   */
  public void requestForeground(int displayId, boolean isAlert) {
    NativeForegroundState.setState(internalSecurityToken, displayId);

    foregroundEventProducer.sendDisplayForegroundNotifyEvent(displayId);
  }