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/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h
index 996d686..f2fa5b9 100644
--- a/services/surfaceflinger/Layer.h
+++ b/services/surfaceflinger/Layer.h
@@ -203,8 +203,8 @@
         Region requestedTransparentRegion;
         android_dataspace dataSpace;
 
-        uint32_t appId;
-        uint32_t type;
+        int32_t appId;
+        int32_t type;
 
         // If non-null, a Surface this Surface's Z-order is interpreted relative to.
         wp<Layer> zOrderRelativeOf;
@@ -285,7 +285,7 @@
     void deferTransactionUntil(const sp<IBinder>& barrierHandle, uint64_t frameNumber);
     void deferTransactionUntil(const sp<Layer>& barrierLayer, uint64_t frameNumber);
     bool setOverrideScalingMode(int32_t overrideScalingMode);
-    void setInfo(uint32_t type, uint32_t appId);
+    void setInfo(int32_t type, int32_t appId);
     bool reparentChildren(const sp<IBinder>& layer);
     void reparentChildrenForDrawing(const sp<Layer>& layer);
     bool reparent(const sp<IBinder>& newParentHandle);