remove fastscroll legacy code

This commit is contained in:
Adrian Ulrich committed 2014-04-12 22:19:09 +02:00
1 parent 98cd32189c
commit b77eaea1e7
4 files changed
+1 -55

No files matched your search

@@ -76,15 +76,6 @@ public class CompatHoneycomb {
ab.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
}
/**
* Call {@link ListView#setFastScrollAlwaysVisible(boolean)} on the given
* ListView with value true.
*/
public static void setFastScrollAlwaysVisible(ListView view)
{
view.setFastScrollAlwaysVisible(true);
}
/**
* Call {@link MenuItem#setActionView(View)} on the given MenuItem.
*/
@@ -156,14 +156,6 @@ public class LibraryActivity
* The adapter for the currently visible list.
*/
private LibraryAdapter mCurrentAdapter;
/**
* If true, return target GINGERBREAD from getApplicationInfo().
*/
boolean mFakeTarget;
/**
* ApplicationInfo with targetSdkVersion set to Gingerbread.
*/
private ApplicationInfo mFakeInfo;
@Override
public void onCreate(Bundle state)
@@ -1124,20 +1116,4 @@ public class LibraryActivity
}
}
@Override
public ApplicationInfo getApplicationInfo()
{
ApplicationInfo info;
if (mFakeTarget) {
info = mFakeInfo;
if (info == null) {
info = new ApplicationInfo(super.getApplicationInfo());
info.targetSdkVersion = Build.VERSION_CODES.GINGERBREAD;
mFakeInfo = info;
}
} else {
info = super.getApplicationInfo();
}
return info;
}
}
@@ -347,7 +347,7 @@ public class LibraryPagerAdapter
view.setAdapter(adapter);
if (type != MediaUtils.TYPE_FILE)
loadSortOrder((MediaAdapter)adapter);
enableFastScroll(view);
view.setFastScrollAlwaysVisible(true); // also enables fastscroll
adapter.setFilter(mFilter);
mAdapters[type] = adapter;
@@ -740,12 +740,6 @@ public class LibraryPagerAdapter
adapter.setSortMode(mode);
requestRequery(adapter);
// Force a new FastScroller to be created so the scroll sections
// are updated.
ListView view = mLists[mTabOrder[mCurrentPage]];
view.setFastScrollEnabled(false);
enableFastScroll(view);
Handler handler = mWorkerHandler;
handler.sendMessage(handler.obtainMessage(MSG_SAVE_SORT, adapter));
}
@@ -818,18 +812,4 @@ public class LibraryPagerAdapter
mActivity.onItemClicked(intent);
}
/**
* Enables FastScroller on the given list, ensuring it is always visible
* and suppresses the match drag position feature in newer versions of
* Android.
*
* @param list The list to enable.
*/
private void enableFastScroll(ListView list)
{
mActivity.mFakeTarget = true;
list.setFastScrollEnabled(true);
CompatHoneycomb.setFastScrollAlwaysVisible(list);
mActivity.mFakeTarget = false;
}
}
@@ -312,7 +312,6 @@ public final class PlaybackService extends Service
SongTimeline mTimeline;
private Song mCurrentSong;
boolean mPlayingBeforeCall;
/**
* Stores the saved position in the current song from saved state. Should
* be seeked to when the song is loaded into MediaPlayer. Used only during