This is to backport a security fix reported by b/27308057 and b/27335139. Also, add Analytics for these errors. Bug: b/27335139 Change-Id: Iaacb34e4983cdf9a85487222ae930cb64d80a193
b/11361756 Change-Id: I880d8f2089c1a50d13367b6fcf64344070280e27
b/8622751 Change-Id: Id079efcf34dce15b5f5057f937582c0e198d3d50