Snap for 8661790 from 77d12843bda4e7cf21c4b5723b017f03997e93cc to tm-release

Change-Id: I888285e56715dd5d5a2ffa92d9f02983e7418e93
diff --git a/arm/arch-arm-armv7-a-neon/shared/vndk-core/libcrypto.so b/arm/arch-arm-armv7-a-neon/shared/vndk-core/libcrypto.so
index cbb648b..1c29026 100755
--- a/arm/arch-arm-armv7-a-neon/shared/vndk-core/libcrypto.so
+++ b/arm/arch-arm-armv7-a-neon/shared/vndk-core/libcrypto.so
Binary files differ
diff --git a/arm/arch-arm-armv7-a-neon/shared/vndk-core/libgui.so b/arm/arch-arm-armv7-a-neon/shared/vndk-core/libgui.so
index e5f5d47..f7cf91b 100755
--- a/arm/arch-arm-armv7-a-neon/shared/vndk-core/libgui.so
+++ b/arm/arch-arm-armv7-a-neon/shared/vndk-core/libgui.so
Binary files differ
diff --git a/arm/include/external/boringssl/src/include/openssl/x509.h b/arm/include/external/boringssl/src/include/openssl/x509.h
index a75442f..9b45b4b 100644
--- a/arm/include/external/boringssl/src/include/openssl/x509.h
+++ b/arm/include/external/boringssl/src/include/openssl/x509.h
@@ -1587,5 +1587,8 @@
 #define X509_R_DELTA_CRL_WITHOUT_CRL_NUMBER 138
 #define X509_R_INVALID_FIELD_FOR_VERSION 139
 #define X509_R_INVALID_VERSION 140
+#define X509_R_NO_CERTIFICATE_FOUND 141
+#define X509_R_NO_CERTIFICATE_OR_CRL_FOUND 142
+#define X509_R_NO_CRL_FOUND 143
 
 #endif
diff --git a/arm/include/frameworks/native/libs/gui/include/gui/LayerState.h b/arm/include/frameworks/native/libs/gui/include/gui/LayerState.h
index 03e4aac..2a8d30d 100644
--- a/arm/include/frameworks/native/libs/gui/include/gui/LayerState.h
+++ b/arm/include/frameworks/native/libs/gui/include/gui/LayerState.h
@@ -61,6 +61,12 @@
  * Used to communicate layer information between SurfaceFlinger and its clients.
  */
 struct layer_state_t {
+    enum Permission {
+        ACCESS_SURFACE_FLINGER = 0x1,
+        ROTATE_SURFACE_FLINGER = 0x2,
+        INTERNAL_SYSTEM_WINDOW = 0x4,
+    };
+
     enum {
         eLayerHidden = 0x01,         // SURFACE_HIDDEN in SurfaceControl.java
         eLayerOpaque = 0x02,         // SURFACE_OPAQUE
@@ -128,6 +134,7 @@
     status_t read(const Parcel& input);
     bool hasBufferChanges() const;
     bool hasValidBuffer() const;
+    void sanitize(int32_t permissions);
 
     struct matrix22_t {
         float dsdx{0};
diff --git a/arm/include/frameworks/native/libs/gui/include/gui/SurfaceComposerClient.h b/arm/include/frameworks/native/libs/gui/include/gui/SurfaceComposerClient.h
index 0d1d1a3..76b6d44 100644
--- a/arm/include/frameworks/native/libs/gui/include/gui/SurfaceComposerClient.h
+++ b/arm/include/frameworks/native/libs/gui/include/gui/SurfaceComposerClient.h
@@ -590,6 +590,14 @@
         void setAnimationTransaction();
         void setEarlyWakeupStart();
         void setEarlyWakeupEnd();
+
+        /**
+         * Strip the transaction of all permissioned requests, required when
+         * accepting transactions across process boundaries.
+         *
+         * TODO (b/213644870): Remove all permissioned things from Transaction
+         */
+        void sanitize();
     };
 
     status_t clearLayerFrameStats(const sp<IBinder>& token) const;
diff --git a/arm64/arch-arm-armv8-a/shared/vndk-core/libcrypto.so b/arm64/arch-arm-armv8-a/shared/vndk-core/libcrypto.so
index 6f301f0..c2bd053 100755
--- a/arm64/arch-arm-armv8-a/shared/vndk-core/libcrypto.so
+++ b/arm64/arch-arm-armv8-a/shared/vndk-core/libcrypto.so
Binary files differ
diff --git a/arm64/arch-arm-armv8-a/shared/vndk-core/libgui.so b/arm64/arch-arm-armv8-a/shared/vndk-core/libgui.so
index a15f8e4..46003cc 100755
--- a/arm64/arch-arm-armv8-a/shared/vndk-core/libgui.so
+++ b/arm64/arch-arm-armv8-a/shared/vndk-core/libgui.so
Binary files differ
diff --git a/arm64/arch-arm64-armv8-a/shared/vndk-core/libcrypto.so b/arm64/arch-arm64-armv8-a/shared/vndk-core/libcrypto.so
index f518765..ccec980 100755
--- a/arm64/arch-arm64-armv8-a/shared/vndk-core/libcrypto.so
+++ b/arm64/arch-arm64-armv8-a/shared/vndk-core/libcrypto.so
Binary files differ
diff --git a/arm64/arch-arm64-armv8-a/shared/vndk-core/libgui.so b/arm64/arch-arm64-armv8-a/shared/vndk-core/libgui.so
index adc8879..d94989d 100755
--- a/arm64/arch-arm64-armv8-a/shared/vndk-core/libgui.so
+++ b/arm64/arch-arm64-armv8-a/shared/vndk-core/libgui.so
Binary files differ
diff --git a/arm64/include/external/boringssl/src/include/openssl/x509.h b/arm64/include/external/boringssl/src/include/openssl/x509.h
index a75442f..9b45b4b 100644
--- a/arm64/include/external/boringssl/src/include/openssl/x509.h
+++ b/arm64/include/external/boringssl/src/include/openssl/x509.h
@@ -1587,5 +1587,8 @@
 #define X509_R_DELTA_CRL_WITHOUT_CRL_NUMBER 138
 #define X509_R_INVALID_FIELD_FOR_VERSION 139
 #define X509_R_INVALID_VERSION 140
+#define X509_R_NO_CERTIFICATE_FOUND 141
+#define X509_R_NO_CERTIFICATE_OR_CRL_FOUND 142
+#define X509_R_NO_CRL_FOUND 143
 
 #endif
diff --git a/arm64/include/frameworks/native/libs/gui/include/gui/LayerState.h b/arm64/include/frameworks/native/libs/gui/include/gui/LayerState.h
index 03e4aac..2a8d30d 100644
--- a/arm64/include/frameworks/native/libs/gui/include/gui/LayerState.h
+++ b/arm64/include/frameworks/native/libs/gui/include/gui/LayerState.h
@@ -61,6 +61,12 @@
  * Used to communicate layer information between SurfaceFlinger and its clients.
  */
 struct layer_state_t {
+    enum Permission {
+        ACCESS_SURFACE_FLINGER = 0x1,
+        ROTATE_SURFACE_FLINGER = 0x2,
+        INTERNAL_SYSTEM_WINDOW = 0x4,
+    };
+
     enum {
         eLayerHidden = 0x01,         // SURFACE_HIDDEN in SurfaceControl.java
         eLayerOpaque = 0x02,         // SURFACE_OPAQUE
@@ -128,6 +134,7 @@
     status_t read(const Parcel& input);
     bool hasBufferChanges() const;
     bool hasValidBuffer() const;
+    void sanitize(int32_t permissions);
 
     struct matrix22_t {
         float dsdx{0};
diff --git a/arm64/include/frameworks/native/libs/gui/include/gui/SurfaceComposerClient.h b/arm64/include/frameworks/native/libs/gui/include/gui/SurfaceComposerClient.h
index 0d1d1a3..76b6d44 100644
--- a/arm64/include/frameworks/native/libs/gui/include/gui/SurfaceComposerClient.h
+++ b/arm64/include/frameworks/native/libs/gui/include/gui/SurfaceComposerClient.h
@@ -590,6 +590,14 @@
         void setAnimationTransaction();
         void setEarlyWakeupStart();
         void setEarlyWakeupEnd();
+
+        /**
+         * Strip the transaction of all permissioned requests, required when
+         * accepting transactions across process boundaries.
+         *
+         * TODO (b/213644870): Remove all permissioned things from Transaction
+         */
+        void sanitize();
     };
 
     status_t clearLayerFrameStats(const sp<IBinder>& token) const;
diff --git a/x86/arch-x86/shared/vndk-core/libcrypto.so b/x86/arch-x86/shared/vndk-core/libcrypto.so
index 7b83c3c..413b0ab 100755
--- a/x86/arch-x86/shared/vndk-core/libcrypto.so
+++ b/x86/arch-x86/shared/vndk-core/libcrypto.so
Binary files differ
diff --git a/x86/arch-x86/shared/vndk-core/libgui.so b/x86/arch-x86/shared/vndk-core/libgui.so
index a291604..6440104 100755
--- a/x86/arch-x86/shared/vndk-core/libgui.so
+++ b/x86/arch-x86/shared/vndk-core/libgui.so
Binary files differ
diff --git a/x86/include/external/boringssl/src/include/openssl/x509.h b/x86/include/external/boringssl/src/include/openssl/x509.h
index a75442f..9b45b4b 100644
--- a/x86/include/external/boringssl/src/include/openssl/x509.h
+++ b/x86/include/external/boringssl/src/include/openssl/x509.h
@@ -1587,5 +1587,8 @@
 #define X509_R_DELTA_CRL_WITHOUT_CRL_NUMBER 138
 #define X509_R_INVALID_FIELD_FOR_VERSION 139
 #define X509_R_INVALID_VERSION 140
+#define X509_R_NO_CERTIFICATE_FOUND 141
+#define X509_R_NO_CERTIFICATE_OR_CRL_FOUND 142
+#define X509_R_NO_CRL_FOUND 143
 
 #endif
diff --git a/x86/include/frameworks/native/libs/gui/include/gui/LayerState.h b/x86/include/frameworks/native/libs/gui/include/gui/LayerState.h
index 03e4aac..2a8d30d 100644
--- a/x86/include/frameworks/native/libs/gui/include/gui/LayerState.h
+++ b/x86/include/frameworks/native/libs/gui/include/gui/LayerState.h
@@ -61,6 +61,12 @@
  * Used to communicate layer information between SurfaceFlinger and its clients.
  */
 struct layer_state_t {
+    enum Permission {
+        ACCESS_SURFACE_FLINGER = 0x1,
+        ROTATE_SURFACE_FLINGER = 0x2,
+        INTERNAL_SYSTEM_WINDOW = 0x4,
+    };
+
     enum {
         eLayerHidden = 0x01,         // SURFACE_HIDDEN in SurfaceControl.java
         eLayerOpaque = 0x02,         // SURFACE_OPAQUE
@@ -128,6 +134,7 @@
     status_t read(const Parcel& input);
     bool hasBufferChanges() const;
     bool hasValidBuffer() const;
+    void sanitize(int32_t permissions);
 
     struct matrix22_t {
         float dsdx{0};
diff --git a/x86/include/frameworks/native/libs/gui/include/gui/SurfaceComposerClient.h b/x86/include/frameworks/native/libs/gui/include/gui/SurfaceComposerClient.h
index 0d1d1a3..76b6d44 100644
--- a/x86/include/frameworks/native/libs/gui/include/gui/SurfaceComposerClient.h
+++ b/x86/include/frameworks/native/libs/gui/include/gui/SurfaceComposerClient.h
@@ -590,6 +590,14 @@
         void setAnimationTransaction();
         void setEarlyWakeupStart();
         void setEarlyWakeupEnd();
+
+        /**
+         * Strip the transaction of all permissioned requests, required when
+         * accepting transactions across process boundaries.
+         *
+         * TODO (b/213644870): Remove all permissioned things from Transaction
+         */
+        void sanitize();
     };
 
     status_t clearLayerFrameStats(const sp<IBinder>& token) const;
diff --git a/x86_64/arch-x86-x86_64/shared/vndk-core/libcrypto.so b/x86_64/arch-x86-x86_64/shared/vndk-core/libcrypto.so
index 414b310..1b29093 100755
--- a/x86_64/arch-x86-x86_64/shared/vndk-core/libcrypto.so
+++ b/x86_64/arch-x86-x86_64/shared/vndk-core/libcrypto.so
Binary files differ
diff --git a/x86_64/arch-x86-x86_64/shared/vndk-core/libgui.so b/x86_64/arch-x86-x86_64/shared/vndk-core/libgui.so
index 506d7f5..06c44bc 100755
--- a/x86_64/arch-x86-x86_64/shared/vndk-core/libgui.so
+++ b/x86_64/arch-x86-x86_64/shared/vndk-core/libgui.so
Binary files differ
diff --git a/x86_64/arch-x86_64/shared/vndk-core/libcrypto.so b/x86_64/arch-x86_64/shared/vndk-core/libcrypto.so
index 87c1298..37e4839 100755
--- a/x86_64/arch-x86_64/shared/vndk-core/libcrypto.so
+++ b/x86_64/arch-x86_64/shared/vndk-core/libcrypto.so
Binary files differ
diff --git a/x86_64/arch-x86_64/shared/vndk-core/libgui.so b/x86_64/arch-x86_64/shared/vndk-core/libgui.so
index 6beee3b..7747ba1 100755
--- a/x86_64/arch-x86_64/shared/vndk-core/libgui.so
+++ b/x86_64/arch-x86_64/shared/vndk-core/libgui.so
Binary files differ
diff --git a/x86_64/include/external/boringssl/src/include/openssl/x509.h b/x86_64/include/external/boringssl/src/include/openssl/x509.h
index a75442f..9b45b4b 100644
--- a/x86_64/include/external/boringssl/src/include/openssl/x509.h
+++ b/x86_64/include/external/boringssl/src/include/openssl/x509.h
@@ -1587,5 +1587,8 @@
 #define X509_R_DELTA_CRL_WITHOUT_CRL_NUMBER 138
 #define X509_R_INVALID_FIELD_FOR_VERSION 139
 #define X509_R_INVALID_VERSION 140
+#define X509_R_NO_CERTIFICATE_FOUND 141
+#define X509_R_NO_CERTIFICATE_OR_CRL_FOUND 142
+#define X509_R_NO_CRL_FOUND 143
 
 #endif
diff --git a/x86_64/include/frameworks/native/libs/gui/include/gui/LayerState.h b/x86_64/include/frameworks/native/libs/gui/include/gui/LayerState.h
index 03e4aac..2a8d30d 100644
--- a/x86_64/include/frameworks/native/libs/gui/include/gui/LayerState.h
+++ b/x86_64/include/frameworks/native/libs/gui/include/gui/LayerState.h
@@ -61,6 +61,12 @@
  * Used to communicate layer information between SurfaceFlinger and its clients.
  */
 struct layer_state_t {
+    enum Permission {
+        ACCESS_SURFACE_FLINGER = 0x1,
+        ROTATE_SURFACE_FLINGER = 0x2,
+        INTERNAL_SYSTEM_WINDOW = 0x4,
+    };
+
     enum {
         eLayerHidden = 0x01,         // SURFACE_HIDDEN in SurfaceControl.java
         eLayerOpaque = 0x02,         // SURFACE_OPAQUE
@@ -128,6 +134,7 @@
     status_t read(const Parcel& input);
     bool hasBufferChanges() const;
     bool hasValidBuffer() const;
+    void sanitize(int32_t permissions);
 
     struct matrix22_t {
         float dsdx{0};
diff --git a/x86_64/include/frameworks/native/libs/gui/include/gui/SurfaceComposerClient.h b/x86_64/include/frameworks/native/libs/gui/include/gui/SurfaceComposerClient.h
index 0d1d1a3..76b6d44 100644
--- a/x86_64/include/frameworks/native/libs/gui/include/gui/SurfaceComposerClient.h
+++ b/x86_64/include/frameworks/native/libs/gui/include/gui/SurfaceComposerClient.h
@@ -590,6 +590,14 @@
         void setAnimationTransaction();
         void setEarlyWakeupStart();
         void setEarlyWakeupEnd();
+
+        /**
+         * Strip the transaction of all permissioned requests, required when
+         * accepting transactions across process boundaries.
+         *
+         * TODO (b/213644870): Remove all permissioned things from Transaction
+         */
+        void sanitize();
     };
 
     status_t clearLayerFrameStats(const sp<IBinder>& token) const;