Fix bug where layers aren't shown in SurfaceFlinger dump. am: a2b9fab57a am: bc347bc71f

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/15787838

Change-Id: I2bdddd40799122216ad99e1c172d895445c8f980