Pass correct window type and app id to hw composer.
1. Set -1 as default value for window type and app id.
2. When send layer information to hal, layers inherit type and app id from parent node when
parent node has valid type/appId.
3. Add window type and app id to SurfaceFlinger dumpsys.
Bug: 74622357
Test: Manual test. Several things verified:
1. Android settings layer, status bar layer, nav bar layer have valid window type and appId
when start android settings.
2. Layers without buffer have window type -1 and app id -1.
3. When send layers to hal, Chrome SurfaceView layer inherit type and app id from
its parent (MainActivity layer).
Change-Id: I8d6ad274ca18b61d1bbf6b28f7def5160b55b1e7
Merged-In: I8d6ad274ca18b61d1bbf6b28f7def5160b55b1e7
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp
index 38f0eb7..3cf49d6 100644
--- a/libs/gui/SurfaceComposerClient.cpp
+++ b/libs/gui/SurfaceComposerClient.cpp
@@ -609,8 +609,8 @@
PixelFormat format,
uint32_t flags,
SurfaceControl* parent,
- uint32_t windowType,
- uint32_t ownerUid)
+ int32_t windowType,
+ int32_t ownerUid)
{
sp<SurfaceControl> s;
createSurfaceChecked(name, w, h, format, &s, flags, parent, windowType, ownerUid);
@@ -625,8 +625,8 @@
sp<SurfaceControl>* outSurface,
uint32_t flags,
SurfaceControl* parent,
- uint32_t windowType,
- uint32_t ownerUid)
+ int32_t windowType,
+ int32_t ownerUid)
{
sp<SurfaceControl> sur;
status_t err = NO_ERROR;