Redefine content position in milliseconds instead of seconds.

Bug: 9380827
Change-Id: I92a2df6ae2aeb2257625d75c8ba9e0791568bf7e
diff --git a/v7/mediarouter/src/android/support/v7/media/MediaControlIntent.java b/v7/mediarouter/src/android/support/v7/media/MediaControlIntent.java
index 4f0b1e9..bcf7c58 100644
--- a/v7/mediarouter/src/android/support/v7/media/MediaControlIntent.java
+++ b/v7/mediarouter/src/android/support/v7/media/MediaControlIntent.java
@@ -269,7 +269,8 @@
      * to which the new playback request should be appended.  If omitted, a new queue
      * is created.
      * <li>{@link #EXTRA_ITEM_CONTENT_POSITION} <i>(optional)</i>: specifies the initial
-     * content playback position.
+     * content playback position as a long integer number of milliseconds from
+     * the beginning of the content.
      * <li>{@link #EXTRA_ITEM_METADATA} <i>(optional)</i>: specifies metadata associated
      * with the content such as the title of a song.
      * <li>{@link #EXTRA_ITEM_HTTP_HEADERS} <i>(optional)</i>: specifies HTTP headers to
@@ -398,7 +399,8 @@
      * <li>{@link #EXTRA_ITEM_ID} <i>(required)</i>: specifies the media item id of
      * the media item to seek.
      * <li>{@link #EXTRA_ITEM_CONTENT_POSITION} <i>(required)</i>: specifies the new
-     * content position for playback.
+     * content position for playback as a long integer number of milliseconds from
+     * the beginning of the content.
      * </ul>
      *
      * <h3>Result data</h3>
@@ -597,14 +599,13 @@
             "android.media.intent.extra.ITEM_STATUS";
 
     /**
-     * Double extra: Media item content position.
+     * Long extra: Media item content position.
      * <p>
      * Used with {@link #ACTION_PLAY} to specify the starting playback position.
      * </p><p>
      * Used with {@link #ACTION_SEEK} to set a new playback position.
      * </p><p>
-     * The value is a double-precision floating point number of seconds
-     * from the beginning of the content.
+     * The value is a long integer number of milliseconds from the beginning of the content.
      * <p>
      *
      * @see #ACTION_PLAY
diff --git a/v7/mediarouter/src/android/support/v7/media/MediaItemStatus.java b/v7/mediarouter/src/android/support/v7/media/MediaItemStatus.java
index 3a3e422..776538f 100644
--- a/v7/mediarouter/src/android/support/v7/media/MediaItemStatus.java
+++ b/v7/mediarouter/src/android/support/v7/media/MediaItemStatus.java
@@ -174,23 +174,23 @@
     }
 
     /**
-     * Gets the content playback position as a floating point number of seconds
+     * Gets the content playback position as a long integer number of milliseconds
      * from the beginning of the content.
      *
-     * @return The content playback position in seconds, or -1 if unknown.
+     * @return The content playback position in milliseconds, or -1 if unknown.
      */
-    public double getContentPosition() {
-        return mBundle.getDouble(KEY_CONTENT_POSITION, -1);
+    public long getContentPosition() {
+        return mBundle.getLong(KEY_CONTENT_POSITION, -1);
     }
 
     /**
-     * Gets the total duration of the content to be played as a floating point number
-     * of seconds.
+     * Gets the total duration of the content to be played as a long integer number of
+     * milliseconds.
      *
-     * @return The content duration in seconds, or -1 if unknown.
+     * @return The content duration in milliseconds, or -1 if unknown.
      */
-    public double getContentDuration() {
-        return mBundle.getDouble(KEY_CONTENT_DURATION, -1);
+    public long getContentDuration() {
+        return mBundle.getLong(KEY_CONTENT_DURATION, -1);
     }
 
     /**
@@ -302,20 +302,20 @@
         }
 
         /**
-         * Sets the content playback position as a floating point number of seconds
+         * Sets the content playback position as a long integer number of milliseconds
          * from the beginning of the content.
          */
-        public Builder setContentPosition(double positionSeconds) {
-            mBundle.putDouble(KEY_CONTENT_POSITION, positionSeconds);
+        public Builder setContentPosition(long positionMilliseconds) {
+            mBundle.putLong(KEY_CONTENT_POSITION, positionMilliseconds);
             return this;
         }
 
         /**
-         * Sets the total duration of the content to be played as a floating point number
-         * of seconds.
+         * Sets the total duration of the content to be played as a long integer number
+         * of milliseconds.
          */
-        public Builder setContentDuration(double durationSeconds) {
-            mBundle.putDouble(KEY_CONTENT_DURATION, durationSeconds);
+        public Builder setContentDuration(long durationMilliseconds) {
+            mBundle.putLong(KEY_CONTENT_DURATION, durationMilliseconds);
             return this;
         }