@Override
  public void onPause() {
    super.onPause();
    wakeLock.release();
    renderView.pause();
    screen.pause();

    if (isFinishing()) {
      screen.dispose();
    }
  }
  @Override
  public void setScreen(Screen screen) {
    if (screen == null) {
      throw new IllegalArgumentException("Screen must not be null");
    }

    this.screen.pause();
    this.screen.dispose();
    screen.resume();
    screen.update(0);
    this.screen = screen;
  }
 @Override
 public void onResume() {
   super.onResume();
   wakeLock.acquire();
   screen.resume();
   renderView.resume();
 }