Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 54f2ee40 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge changes I41ed91a1,Ic6de9a1b

* changes:
  Move surface_flinger_view creation into init code.
  Remove access to the backlight brightness
parents 99360367 0bcc104a
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -211,11 +211,15 @@ bool HardwareComposer::Resume() {
    layer->Initialize(hwc2_hidl_.get(), &native_display_metrics_);
    layer->Initialize(hwc2_hidl_.get(), &native_display_metrics_);
  }
  }


#if ENABLE_BACKLIGHT_BRIGHTNESS
  // TODO(hendrikw): This isn't required at the moment. It's possible that there
  //                 is another method to access this when needed.
  // Open the backlight brightness control sysfs node.
  // Open the backlight brightness control sysfs node.
  backlight_brightness_fd_ = LocalHandle(kBacklightBrightnessSysFile, O_RDWR);
  backlight_brightness_fd_ = LocalHandle(kBacklightBrightnessSysFile, O_RDWR);
  ALOGW_IF(!backlight_brightness_fd_,
  ALOGW_IF(!backlight_brightness_fd_,
           "HardwareComposer: Failed to open backlight brightness control: %s",
           "HardwareComposer: Failed to open backlight brightness control: %s",
           strerror(errno));
           strerror(errno));
#endif // ENABLE_BACKLIGHT_BRIGHTNESS


  // Open the vsync event node for the primary display.
  // Open the vsync event node for the primary display.
  // TODO(eieio): Move this into a platform-specific class.
  // TODO(eieio): Move this into a platform-specific class.
+4 −4
Original line number Original line Diff line number Diff line
@@ -245,6 +245,10 @@ int ShellView::Initialize(JNIEnv* env, jobject app_context,
  if (!InitializeTouch())
  if (!InitializeTouch())
    ALOGE("Failed to initialize virtual touchpad");
    ALOGE("Failed to initialize virtual touchpad");


  surface_flinger_view_.reset(new SurfaceFlingerView);
  if (!surface_flinger_view_->Initialize(this))
    return 1;

  return 0;
  return 0;
}
}


@@ -262,10 +266,6 @@ int ShellView::AllocateResources() {
  if (!program_ || !overlay_program_ || !controller_program_)
  if (!program_ || !overlay_program_ || !controller_program_)
    return 1;
    return 1;


  surface_flinger_view_.reset(new SurfaceFlingerView);
  if (!surface_flinger_view_->Initialize(this))
    return 1;

  reticle_.reset(new Reticle());
  reticle_.reset(new Reticle());
  if (!reticle_->Initialize())
  if (!reticle_->Initialize())
    return 1;
    return 1;