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

Commit 0bcc104a authored by Alex Sakhartchouk's avatar Alex Sakhartchouk Committed by Alex Vakulenko
Browse files

Move surface_flinger_view creation into init code.

We use it to receive buffers and trigger visibility.

Bug: None
Test: triggered permission
Change-Id: I41ed91a16fb6bfb27687476fbe43c17fc05bc870
parent ea572425
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -245,6 +245,10 @@ int ShellView::Initialize(JNIEnv* env, jobject app_context,
  if (!InitializeTouch())
    ALOGE("Failed to initialize virtual touchpad");

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

  return 0;
}

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

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

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