diff options
author | Jae Seo <jaeseo@google.com> | 2015-06-21 17:39:02 -0700 |
---|---|---|
committer | Jae Seo <jaeseo@google.com> | 2015-06-21 17:39:02 -0700 |
commit | 777718220cdacb82e984c7ea8915e36ea203e5a2 (patch) | |
tree | 50cf7ada8f7b86695cf3427d686e27b59fc0eee0 /media/java/android | |
parent | 392f2d3b5d8407f7920e437a2d0db900251b4f81 (diff) | |
download | frameworks_base-777718220cdacb82e984c7ea8915e36ea203e5a2.zip frameworks_base-777718220cdacb82e984c7ea8915e36ea203e5a2.tar.gz frameworks_base-777718220cdacb82e984c7ea8915e36ea203e5a2.tar.bz2 |
TIF: Use equals() instead of '==' for String comparisons
Change-Id: Iea6e3d5f5146e2e3a37c52db5a0a9706540ddb23
Diffstat (limited to 'media/java/android')
-rw-r--r-- | media/java/android/media/tv/TvInputManager.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/media/java/android/media/tv/TvInputManager.java b/media/java/android/media/tv/TvInputManager.java index 38f2d04..45e6b0b 100644 --- a/media/java/android/media/tv/TvInputManager.java +++ b/media/java/android/media/tv/TvInputManager.java @@ -29,6 +29,7 @@ import android.os.Looper; import android.os.Message; import android.os.ParcelFileDescriptor; import android.os.RemoteException; +import android.text.TextUtils; import android.util.ArrayMap; import android.util.Log; import android.util.Pools.Pool; @@ -1652,14 +1653,16 @@ public final class TvInputManager { */ boolean updateTrackSelection(int type, String trackId) { synchronized (mMetadataLock) { - if (type == TvTrackInfo.TYPE_AUDIO && trackId != mSelectedAudioTrackId) { + if (type == TvTrackInfo.TYPE_AUDIO + && !TextUtils.equals(trackId, mSelectedAudioTrackId)) { mSelectedAudioTrackId = trackId; return true; - } else if (type == TvTrackInfo.TYPE_VIDEO && trackId != mSelectedVideoTrackId) { + } else if (type == TvTrackInfo.TYPE_VIDEO + && !TextUtils.equals(trackId, mSelectedVideoTrackId)) { mSelectedVideoTrackId = trackId; return true; } else if (type == TvTrackInfo.TYPE_SUBTITLE - && trackId != mSelectedSubtitleTrackId) { + && !TextUtils.equals(trackId, mSelectedSubtitleTrackId)) { mSelectedSubtitleTrackId = trackId; return true; } |