Rename SongSelector to LibraryActivity

This commit is contained in:
Christopher Eby 2011-09-21 16:34:00 -05:00
parent eb7930543c
commit 8e83d85a59
6 changed files with 15 additions and 15 deletions

View File

@ -41,7 +41,7 @@ THE SOFTWARE.
android:theme="@style/NoBackground"
android:launchMode="singleTop" />
<activity
android:name="SongSelector"
android:name="LibraryActivity"
android:launchMode="singleTop"
android:theme="@android:style/Theme.Black.NoTitleBar" />
<activity

View File

@ -34,7 +34,7 @@ import android.preference.PreferenceManager;
*/
public class LaunchActivity extends Activity {
/**
* Launch either the PlaybackActivity or SongSelector, depending on user
* Launch either the PlaybackActivity or LibraryActivity, depending on user
* settings.
*/
@Override
@ -44,7 +44,7 @@ public class LaunchActivity extends Activity {
SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(this);
boolean selector = settings.getBoolean("selector_on_startup", false);
startActivity(new Intent(this, selector ? SongSelector.class : FullPlaybackActivity.class));
startActivity(new Intent(this, selector ? LibraryActivity.class : FullPlaybackActivity.class));
finish();
}
}

View File

@ -55,9 +55,9 @@ import android.widget.TextView;
import android.widget.Toast;
/**
* The library activity.
* The library activity where songs to play can be selected from the library.
*/
public class SongSelector extends PlaybackActivity implements AdapterView.OnItemClickListener, TextWatcher, TabHost.OnTabChangeListener {
public class LibraryActivity extends PlaybackActivity implements AdapterView.OnItemClickListener, TextWatcher, TabHost.OnTabChangeListener {
/**
* The number of tabs in the song selector.
*/
@ -260,8 +260,8 @@ public class SongSelector extends PlaybackActivity implements AdapterView.OnItem
* Adds songs matching the data from the given intent to the song timelime.
*
* @param intent An intent created with
* {@link SongSelector#createClickIntent(MediaAdapter,MediaView)}.
* @param action One of SongSelector.ACTION_*
* {@link LibraryActivity#createClickIntent(MediaAdapter,MediaView)}.
* @param action One of LibraryActivity.ACTION_*
*/
private void pickSongs(Intent intent, int action)
{
@ -285,7 +285,7 @@ public class SongSelector extends PlaybackActivity implements AdapterView.OnItem
* from the view and switching to the appropriate tab.
*
* @param intent An intent created with
* {@link SongSelector#createClickIntent(MediaAdapter,MediaView)}.
* {@link LibraryActivity#createClickIntent(MediaAdapter,MediaView)}.
*/
private void expand(Intent intent)
{
@ -465,7 +465,7 @@ public class SongSelector extends PlaybackActivity implements AdapterView.OnItem
* Builds a media query based off the data stored in the given intent.
*
* @param intent An intent created with
* {@link SongSelector#createClickIntent(MediaAdapter,MediaView)}.
* {@link LibraryActivity#createClickIntent(MediaAdapter,MediaView)}.
* @param empty If true, use the empty projection (only query id).
*/
private QueryTask buildQueryFromIntent(Intent intent, boolean empty)
@ -537,7 +537,7 @@ public class SongSelector extends PlaybackActivity implements AdapterView.OnItem
*
* @param playlistId The id of the playlist to add to.
* @param intent An intent created with
* {@link SongSelector#createClickIntent(MediaAdapter,MediaView)}.
* {@link LibraryActivity#createClickIntent(MediaAdapter,MediaView)}.
*/
private void addToPlaylist(long playlistId, Intent intent)
{
@ -553,7 +553,7 @@ public class SongSelector extends PlaybackActivity implements AdapterView.OnItem
* informing the user of this.
*
* @param intent An intent created with
* {@link SongSelector#createClickIntent(MediaAdapter,MediaView)}.
* {@link LibraryActivity#createClickIntent(MediaAdapter,MediaView)}.
*/
private void delete(Intent intent)
{

View File

@ -49,7 +49,7 @@ public class MediaAdapter extends CursorAdapter implements SectionIndexer {
/**
* The activity that owns this adapter.
*/
private SongSelector mActivity;
private LibraryActivity mActivity;
/**
* The type of media represented by this adapter. Must be one of the
* MediaUtils.FIELD_* constants. Determines which content provider to query for
@ -112,7 +112,7 @@ public class MediaAdapter extends CursorAdapter implements SectionIndexer {
* @param hasHeader Wether this view has a header row.
* @param limiter An initial limiter to use
*/
public MediaAdapter(SongSelector activity, int type, boolean expandable, boolean hasHeader, Limiter limiter)
public MediaAdapter(LibraryActivity activity, int type, boolean expandable, boolean hasHeader, Limiter limiter)
{
super(activity, null, false);

View File

@ -375,7 +375,7 @@ public class PlaybackActivity extends Activity implements Handler.Callback, View
*/
public void openLibrary()
{
startActivity(new Intent(this, SongSelector.class));
startActivity(new Intent(this, LibraryActivity.class));
}
public void enqueue(int type)

View File

@ -353,7 +353,7 @@ public final class PlaybackService extends Service implements Handler.Callback,
} else if ("controls_in_selector".equals(key)) {
ArrayList<PlaybackActivity> activities = sActivities;
for (PlaybackActivity activity : activities) {
if (activity instanceof SongSelector)
if (activity instanceof LibraryActivity)
activity.finish();
}
} else if ("notification_inverted_color".equals(key)) {