Added missing duration field to database record insertion.

This addresses AOSP Google Code Issue 15841.
When an audio recording sample is saved to the media
database, attributes like audio title are stored in a
database record.  However, the duration of the sample
was not being stored.  Therefore, an application that
queried attributes for a sample would get an incorrect
record; the record would contain a default duration of
0 ms.  The fix was to add the recorded sample's length
to the list of attributes put into the database record.
Note that the sample's length is in seconds and had to
be converted to milliseconds as described in the
documentation for the duration audio column.

This bug could have been prevented if the database
schema for duration audio column required a non-null
value with no default.

Change-Id: I80e4f8feb7d9f1050baf1e7c44323123b9d6b6b0
Signed-off-by: Sahil Verma <vermasque@gmail.com>
1 file changed