Commit 816be027 authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Better syntax

parent f5e0f948
...@@ -184,7 +184,7 @@ public class SlidingTabLayout extends HorizontalScrollView { ...@@ -184,7 +184,7 @@ public class SlidingTabLayout extends HorizontalScrollView {
if (tabView == null) { if (tabView == null) {
tabView = createDefaultTabView(getContext()); tabView = createDefaultTabView(getContext());
} }
if (tabTitleView == null && TextView.class.isInstance(tabView)) { if (tabTitleView == null && tabView instanceof TextView) {
tabTitleView = (TextView) tabView; tabTitleView = (TextView) tabView;
} }
if (mDistributeEvenly) { if (mDistributeEvenly) {
......
...@@ -230,7 +230,7 @@ public class AudioAlbumsSongsFragment extends Fragment implements SwipeRefreshLa ...@@ -230,7 +230,7 @@ public class AudioAlbumsSongsFragment extends Fragment implements SwipeRefreshLa
boolean useAllItems = id == R.id.audio_list_browser_play_all; boolean useAllItems = id == R.id.audio_list_browser_play_all;
boolean append = id == R.id.audio_list_browser_append; boolean append = id == R.id.audio_list_browser_append;
if (ExpandableListContextMenuInfo.class.isInstance(menuInfo)) { if (menuInfo instanceof ExpandableListContextMenuInfo) {
ExpandableListContextMenuInfo info = (ExpandableListContextMenuInfo) menuInfo; ExpandableListContextMenuInfo info = (ExpandableListContextMenuInfo) menuInfo;
groupPosition = ExpandableListView.getPackedPositionGroup(info.packedPosition); groupPosition = ExpandableListView.getPackedPositionGroup(info.packedPosition);
} }
......
...@@ -420,11 +420,10 @@ public class AudioBrowserFragment extends MediaBrowserFragment implements SwipeR ...@@ -420,11 +420,10 @@ public class AudioBrowserFragment extends MediaBrowserFragment implements SwipeR
boolean useAllItems = id == R.id.audio_list_browser_play_all; boolean useAllItems = id == R.id.audio_list_browser_play_all;
boolean append = id == R.id.audio_list_browser_append; boolean append = id == R.id.audio_list_browser_append;
if (ExpandableListContextMenuInfo.class.isInstance(menuInfo)) { if (menuInfo instanceof ExpandableListContextMenuInfo) {
ExpandableListContextMenuInfo info = (ExpandableListContextMenuInfo) menuInfo; ExpandableListContextMenuInfo info = (ExpandableListContextMenuInfo) menuInfo;
groupPosition = ExpandableListView.getPackedPositionGroup(info.packedPosition); groupPosition = ExpandableListView.getPackedPositionGroup(info.packedPosition);
} } else
else
groupPosition = position; groupPosition = position;
if (id == R.id.audio_list_browser_delete) { if (id == R.id.audio_list_browser_delete) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment