Merge "Update USB channel mask handling" into mnc-dev
diff --git a/include/hardware/bluetooth.h b/include/hardware/bluetooth.h
index 6f95684..da7f4b8 100644
--- a/include/hardware/bluetooth.h
+++ b/include/hardware/bluetooth.h
@@ -318,7 +318,7 @@
 
 /** Bluetooth Legacy PinKey Request callback */
 typedef void (*pin_request_callback)(bt_bdaddr_t *remote_bd_addr,
-                                        bt_bdname_t *bd_name, uint32_t cod);
+                                        bt_bdname_t *bd_name, uint32_t cod, bool min_16_digit);
 
 /** Bluetooth SSP Request callback - Just Works & Numeric Comparison*/
 /** pass_key - Shall be 0 for BT_SSP_PAIRING_VARIANT_CONSENT &
diff --git a/include/hardware/bt_sock.h b/include/hardware/bt_sock.h
index 69775e0..5d206d7 100644
--- a/include/hardware/bt_sock.h
+++ b/include/hardware/bt_sock.h
@@ -22,6 +22,7 @@
 #define BTSOCK_FLAG_AUTH (1 << 1)
 #define BTSOCK_FLAG_NO_SDP (1 << 2)
 #define BTSOCK_FLAG_AUTH_MITM (1 << 3)
+#define BTSOCK_FLAG_AUTH_16_DIGIT (1 << 4)
 
 typedef enum {
     BTSOCK_RFCOMM = 1,
diff --git a/include/hardware/fingerprint.h b/include/hardware/fingerprint.h
index 869502e..fd0d8f3 100644
--- a/include/hardware/fingerprint.h
+++ b/include/hardware/fingerprint.h
@@ -56,38 +56,12 @@
     uint32_t fid;
 } fingerprint_finger_id_t;
 
-/* The progress indication may be augmented by a bitmap encoded indication
-* of what finger area is considered as collected.
-* Bit numbers mapped to physical location:
-*
-*             distal
-*        +--+--+--+--+--+
-*        | 4| 3| 2| 1| 0|
-*        | 9| 8| 7| 6| 5|
-* medial |14|13|12|11|10| lateral
-*        |19|18|17|16|15|
-*        |24|23|22|21|20|
-*        +--+--+--+--+--+
-*            proximal
-*
-*/
-typedef uint32_t finger_map_bmp;
-
-typedef enum fingerprint_enroll_msg_type {
-    FINGERPRINT_ENROLL_MSG_NONE = 0,
-    FINGERPRINT_ENROLL_MSG_PREDEFINED = 1,  /* TODO: define standard enroll cues */
-    FINGERPRINT_ENROLL_MSG_BITMAP = 2,  /* typeof(fingerprint_enroll.msg) == *finger_map_bmp */
-    FINGERPRINT_ENROLL_MSG_VENDOR = 3
-} fingerprint_enroll_msg_type_t;
-
 typedef struct fingerprint_enroll {
     fingerprint_finger_id_t finger;
     /* samples_remaining goes from N (no data collected, but N scans needed)
      * to 0 (no more data is needed to build a template). */
     uint32_t samples_remaining;
-    fingerprint_enroll_msg_type_t msg_type;
-    size_t msg_size;
-    void *msg;
+    uint64_t msg; /* Vendor specific message. Used for user guidance */
 } fingerprint_enroll_t;
 
 typedef struct fingerprint_removed {
@@ -115,7 +89,7 @@
 } fingerprint_msg_t;
 
 /* Callback function type */
-typedef void (*fingerprint_notify_t)(fingerprint_msg_t msg);
+typedef void (*fingerprint_notify_t)(const fingerprint_msg_t *msg);
 
 /* Synchronous operation */
 typedef struct fingerprint_device {
@@ -200,16 +174,16 @@
 
     /*
      * Fingerprint remove request:
-     * deletes a fingerprint template or a previously selected group.
-     * If the fingerprint id is 0 then the entire group is removed.
-     * notify() will be called for each template deleted with
+     * Deletes a fingerprint template.
+     * Works only within a path set by set_active_group().
+     * notify() will be called with details on the template deleted.
      * fingerprint_msg.type == FINGERPRINT_TEMPLATE_REMOVED and
-     * fingerprint_msg.data.removed.id indicating each template id removed.
+     * fingerprint_msg.data.removed.id indicating the template id removed.
      *
      * Function return: 0 if fingerprint template(s) can be successfully deleted
      *                 -1 otherwise.
      */
-    int (*remove)(struct fingerprint_device *dev, fingerprint_finger_id_t finger);
+    int (*remove)(struct fingerprint_device *dev, uint32_t gid, uint32_t fid);
 
     /*
      * Restricts the HAL operation to a set of fingerprints belonging to a
diff --git a/modules/fingerprint/fingerprint.c b/modules/fingerprint/fingerprint.c
index 33ede62..08b112b 100644
--- a/modules/fingerprint/fingerprint.c
+++ b/modules/fingerprint/fingerprint.c
@@ -53,12 +53,12 @@
 }
 
 static int fingerprint_remove(struct fingerprint_device __unused *dev,
-                                fingerprint_finger_id_t __unused fingerprint_id) {
+                                uint32_t __unused gid, uint32_t __unused fid) {
     return FINGERPRINT_ERROR;
 }
 
 static int fingerprint_set_active_group(struct fingerprint_device __unused *dev,
-                                        uint32_t __unused gid) {
+                                        uint32_t __unused gid, const char __unused *store_path) {
     return FINGERPRINT_ERROR;
 }
 
diff --git a/tests/camera2/CameraMultiStreamTests.cpp b/tests/camera2/CameraMultiStreamTests.cpp
index 0f8d578..3e29ad6 100644
--- a/tests/camera2/CameraMultiStreamTests.cpp
+++ b/tests/camera2/CameraMultiStreamTests.cpp
@@ -92,7 +92,7 @@
     sp<SurfaceComposerClient> mComposerClient;
     sp<SurfaceControl> mSurfaceControl;
 
-    void CreateOnScreenSurface(sp<ANativeWindow>& surface) {
+    void CreateOnScreenSurface(sp<Surface>& surface) {
         mComposerClient = new SurfaceComposerClient;
         ASSERT_EQ(NO_ERROR, mComposerClient->initCheck());
 
@@ -175,7 +175,7 @@
                 int width,
                 int height,
                 const sp<CameraDeviceBase>& device,
-                CameraStreamParams param, sp<ANativeWindow> surface,
+                CameraStreamParams param, sp<Surface> surface,
                 bool useCpuConsumer)
             : mDevice(device),
               mWidth(width),
@@ -188,11 +188,11 @@
                 mCpuConsumer = new CpuConsumer(consumer, param.mHeapCount);
                 mCpuConsumer->setName(String8(
                         "CameraMultiStreamTest::mCpuConsumer"));
-                mNativeWindow = new Surface(producer);
+                mSurface = new Surface(producer);
             } else {
                 // Render the stream to screen.
                 mCpuConsumer = NULL;
-                mNativeWindow = surface;
+                mSurface = surface;
             }
 
             mFrameListener = new FrameListener();
@@ -207,7 +207,7 @@
          */
         void SetUp() {
             ASSERT_EQ(OK,
-                mDevice->createStream(mNativeWindow,
+                mDevice->createStream(mSurface,
                     mWidth, mHeight, mFormat, HAL_DATASPACE_UNKNOWN,
                     CAMERA3_STREAM_ROTATION_0, &mStreamId));
 
@@ -225,14 +225,14 @@
                 mDevice->deleteStream(mStreamId);
             }
             // Clear producer before consumer.
-            mNativeWindow.clear();
+            mSurface.clear();
             mCpuConsumer.clear();
         }
 
     private:
         sp<FrameListener>       mFrameListener;
         sp<CpuConsumer>         mCpuConsumer;
-        sp<ANativeWindow>       mNativeWindow;
+        sp<Surface>             mSurface;
         sp<CameraDeviceBase>    mDevice;
         int                     mStreamId;
         int                     mWidth;
@@ -334,7 +334,7 @@
             int height,
             const sp<CameraDeviceBase>& device,
             CameraStreamParams param = DEFAULT_STREAM_PARAMETERS,
-            sp<ANativeWindow> surface = NULL,
+            sp<Surface> surface = NULL,
             bool useCpuConsumer = true) {
         param.mFormat = MapAutoFormat(param.mFormat);
         return new CameraStream(width, height, device,
@@ -583,7 +583,7 @@
     // Preview stream: small resolution, render on the screen.
     sp<CameraStream> previewStream;
     {
-        sp<ANativeWindow> surface;
+        sp<Surface> surface;
         ASSERT_NO_FATAL_FAILURE(CreateOnScreenSurface(/*out*/surface));
         previewStream = CreateStream(
                 previewSize.width,
diff --git a/tests/camera2/CameraStreamFixture.h b/tests/camera2/CameraStreamFixture.h
index e234f7e..fc5fb36 100644
--- a/tests/camera2/CameraStreamFixture.h
+++ b/tests/camera2/CameraStreamFixture.h
@@ -131,7 +131,7 @@
         CameraModuleFixture::TearDown();
 
         deleteOutputResolutions();
-        mNativeWindow.clear();
+        mSurface.clear();
         mCpuConsumer.clear();
         mFrameListener.clear();
     }
@@ -250,12 +250,12 @@
         mCpuConsumer = new CpuConsumer(consumer, p.mHeapCount);
         mCpuConsumer->setName(String8("CameraStreamTest::mCpuConsumer"));
 
-        mNativeWindow = new Surface(producer);
+        mSurface = new Surface(producer);
 
         int format = MapAutoFormat(p.mFormat);
 
         ASSERT_EQ(OK,
-            device->createStream(mNativeWindow,
+            device->createStream(mSurface,
                 mWidth, mHeight, format,
                 HAL_DATASPACE_UNKNOWN,
                 CAMERA3_STREAM_ROTATION_0,
@@ -364,7 +364,7 @@
 
     android::sp<FrameListener>       mFrameListener;
     android::sp<CpuConsumer>         mCpuConsumer;
-    android::sp<ANativeWindow>       mNativeWindow;
+    android::sp<Surface>             mSurface;
     KeyedVector<int32_t, Vector<int32_t>* > mOutputResolutions;
 
 private: