Skip to content

Commit

Permalink
Don't set the layer property when using settings.
Browse files Browse the repository at this point in the history
When using the layer settings to trace, don't also set the global
layer property.

This is something that should have been part of #2700, but must
have been lost in one of the merges/rebases.
  • Loading branch information
pmuetschard committed Apr 9, 2019
1 parent 9c36629 commit da96dc6
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions gapii/client/adb.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,23 +126,16 @@ func Start(ctx context.Context, p *android.InstalledPackage, a *android.Activity
return nil, cleanup.Invoke(ctx), log.Err(ctx, err, "Setting up the layer")
}
cleanup = cleanup.Then(cu)
}

// FileDir may fail here. This happens if/when the app is non-debuggable.
// Don't set up vulkan tracing here, since the loader will not try and load the layer
// if we aren't debuggable regardless.
var m *flock.Mutex
if o.APIs&VulkanAPI != uint32(0) {
m, err = reserveVulkanDevice(ctx, d)
} else if isVulkan {
m, err := reserveVulkanDevice(ctx, d)
if err != nil {
return nil, cleanup.Invoke(ctx), log.Err(ctx, err, "Setting up for tracing Vulkan")
}
cleanup = cleanup.Then(func(ctx context.Context) {
releaseVulkanDevice(ctx, d, m)
})
}

cleanup = cleanup.Then(func(ctx context.Context) {
releaseVulkanDevice(ctx, d, m)
})

var additionalArgs []android.ActionExtra
if o.AdditionalFlags != "" {
additionalArgs = append(additionalArgs, android.CustomExtras(text.Quote(text.SplitArgs(o.AdditionalFlags))))
Expand Down

0 comments on commit da96dc6

Please sign in to comment.