From 2c7606b72164617851e6f2af5169ae22500fdab4 Mon Sep 17 00:00:00 2001 From: Steven Moreland Date: Fri, 20 Mar 2020 15:53:29 -0700 Subject: [PATCH] graphics common: fix AIDL BufferUsage calculation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This was hitting integer sanitization, which we are trying to turn on: Before:     VENDOR_MASK_HI = -65536L, After:     VENDOR_MASK_HI = -281474976710656L, Bug: 148149098 Test: manually check output (see above). Change-Id: I1e2d7c0225aec8bf67375eb6b0cdc919b4ece847 Merged-In: I1e2d7c0225aec8bf67375eb6b0cdc919b4ece847 (cherry picked from commit d9eb0d743c0c154c32600b22343cfebc466e4ac4) --- .../aidl/android/hardware/graphics/common/BufferUsage.aidl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphics/common/aidl/android/hardware/graphics/common/BufferUsage.aidl b/graphics/common/aidl/android/hardware/graphics/common/BufferUsage.aidl index 5f9888a854..d978f46345 100644 --- a/graphics/common/aidl/android/hardware/graphics/common/BufferUsage.aidl +++ b/graphics/common/aidl/android/hardware/graphics/common/BufferUsage.aidl @@ -110,5 +110,5 @@ enum BufferUsage { /** bits 32-47 must be zero and are reserved for future versions */ /** bits 48-63 are reserved for vendor extensions */ - VENDOR_MASK_HI = 0xffff << 48, + VENDOR_MASK_HI = (1L * 0xffff) << 48, }