am 00869af8: am aaf67d95: am e95af4ab: Merge "TIF: Use copied track list for onTracksChanged() callback" into mnc-dev

* commit '00869af85d0df92b00155ecf84311eccbd1647cf':
  TIF: Use copied track list for onTracksChanged() callback
This commit is contained in:
Terry Heo
2015-07-21 00:40:31 +00:00
committed by Android Git Automerger

View File

@@ -385,13 +385,14 @@ public abstract class TvInputService extends Service {
trackIdSet.clear();
// TODO: Validate the track list.
final List<TvTrackInfo> tracksCopy = new ArrayList<>(tracks);
executeOrPostRunnable(new Runnable() {
@Override
public void run() {
try {
if (DEBUG) Log.d(TAG, "notifyTracksChanged");
if (mSessionCallback != null) {
mSessionCallback.onTracksChanged(tracks);
mSessionCallback.onTracksChanged(tracksCopy);
}
} catch (RemoteException e) {
Log.w(TAG, "error in notifyTracksChanged", e);