summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2018-02-18 08:20:48 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2018-02-18 08:20:48 +0000
commite2fad51de605eabb241c5762ee74a70054e4fb18 (patch)
tree524a72c1e0633eb00b7d3073be6a78bb67655151
parent5393d7f299dacd95371478d255fceb7a9e3560c4 (diff)
parent0dcaf0aebe2d86dcacc9affa0490d29c3f13ebf2 (diff)
downloadlibhardware-e2fad51de605eabb241c5762ee74a70054e4fb18.tar.gz
Snap for 4610834 from 0dcaf0aebe2d86dcacc9affa0490d29c3f13ebf2 to pi-release
Change-Id: Ic1abe962339d7ecb20847304c29236651397dc91
-rw-r--r--include/hardware/keymaster_defs.h3
-rw-r--r--modules/gralloc/framebuffer.cpp2
2 files changed, 5 insertions, 0 deletions
diff --git a/include/hardware/keymaster_defs.h b/include/hardware/keymaster_defs.h
index 6e812f29..25a4faac 100644
--- a/include/hardware/keymaster_defs.h
+++ b/include/hardware/keymaster_defs.h
@@ -112,6 +112,8 @@ typedef enum {
KM_TAG_ALLOW_WHILE_ON_BODY = KM_BOOL | 506, /* Allow key to be used after authentication timeout
* if device is still on-body (requires secure
* on-body sensor. */
+ KM_TAG_UNLOCKED_DEVICE_REQUIRED = KM_BOOL | 508, /* Require the device screen to be unlocked if the
+ * key is used. */
/* Application access control */
KM_TAG_ALL_APPLICATIONS = KM_BOOL | 600, /* Specified to indicate key is usable by all
@@ -452,6 +454,7 @@ typedef enum {
KM_ERROR_KEYMASTER_NOT_CONFIGURED = -64,
KM_ERROR_ATTESTATION_APPLICATION_ID_MISSING = -65,
KM_ERROR_CANNOT_ATTEST_IDS = -66,
+ KM_ERROR_DEVICE_LOCKED = -71,
KM_ERROR_UNIMPLEMENTED = -100,
KM_ERROR_VERSION_MISMATCH = -101,
diff --git a/modules/gralloc/framebuffer.cpp b/modules/gralloc/framebuffer.cpp
index 97964572..c1717115 100644
--- a/modules/gralloc/framebuffer.cpp
+++ b/modules/gralloc/framebuffer.cpp
@@ -332,6 +332,8 @@ int fb_device_open(hw_module_t const* module, const char* name,
const_cast<int&>(dev->device.minSwapInterval) = 1;
const_cast<int&>(dev->device.maxSwapInterval) = 1;
*device = &dev->device.common;
+ } else {
+ free(dev);
}
}
return status;