Merge "TIF: Use copied track list for onTracksChanged() callback" into mnc-dev
This commit is contained in:
@@ -385,13 +385,14 @@ public abstract class TvInputService extends Service {
|
|||||||
trackIdSet.clear();
|
trackIdSet.clear();
|
||||||
|
|
||||||
// TODO: Validate the track list.
|
// TODO: Validate the track list.
|
||||||
|
final List<TvTrackInfo> tracksCopy = new ArrayList<>(tracks);
|
||||||
executeOrPostRunnable(new Runnable() {
|
executeOrPostRunnable(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
if (DEBUG) Log.d(TAG, "notifyTracksChanged");
|
if (DEBUG) Log.d(TAG, "notifyTracksChanged");
|
||||||
if (mSessionCallback != null) {
|
if (mSessionCallback != null) {
|
||||||
mSessionCallback.onTracksChanged(tracks);
|
mSessionCallback.onTracksChanged(tracksCopy);
|
||||||
}
|
}
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
Log.w(TAG, "error in notifyTracksChanged", e);
|
Log.w(TAG, "error in notifyTracksChanged", e);
|
||||||
|
|||||||
Reference in New Issue
Block a user