commit | b4e0a834cd101417a5f2213459de332bc233573b | [log] [tgz] |
---|---|---|
author | Chia-I Wu <olv@google.com> | Fri Sep 21 12:18:40 2018 -0700 |
committer | Chia-I Wu <olv@google.com> | Fri Sep 21 12:40:37 2018 -0700 |
tree | 3af53b800d61584b54851728a32cb7e400a23d41 | |
parent | 4d70c4ed3eeb472f3e54d04d1bcaee22ff405042 [diff] [blame] |
surfaceflinger: fix sorting in LayerProtoParser "return (lz > rz) ? 1 : -1;" is equivalent to "return true;" here. Test: dumpsys Change-Id: I13b2784c500684eaf68a8a9706e3e864d43d95f2
diff --git a/services/surfaceflinger/layerproto/LayerProtoParser.cpp b/services/surfaceflinger/layerproto/LayerProtoParser.cpp index a5bf9c1..bf12df6 100644 --- a/services/surfaceflinger/layerproto/LayerProtoParser.cpp +++ b/services/surfaceflinger/layerproto/LayerProtoParser.cpp
@@ -31,7 +31,7 @@ int32_t lz = lhs->z; int32_t rz = rhs->z; if (lz != rz) { - return (lz > rz) ? 1 : -1; + return lz < rz; } return lhs->id < rhs->id;