Fix benign overflow in AudioTrackShared

Bug: 24340611
Change-Id: Idc1e6ae09839475379bf0ab27943ae2de6f80bfa
(cherry picked from commit 0c27d279a1a99d175b84cc530ce2bfb0665b308b)
diff --git a/media/libmedia/AudioTrackShared.cpp b/media/libmedia/AudioTrackShared.cpp
index 151a81e..a5b516c 100644
--- a/media/libmedia/AudioTrackShared.cpp
+++ b/media/libmedia/AudioTrackShared.cpp
@@ -38,7 +38,7 @@
 // In general, this means (new_self) returned is max(self, other) + 1.
 
 static uint32_t incrementSequence(uint32_t self, uint32_t other) {
-    int32_t diff = self - other;
+    int32_t diff = (int32_t) self - other;
     if (diff >= 0 && diff < INT32_MAX) {
         return self + 1; // we're already ahead of other.
     }