Skip to content

Commit

Permalink
[android] cleanup, notes.
Browse files Browse the repository at this point in the history
  • Loading branch information
gubatron committed Feb 8, 2016
1 parent 81e3e38 commit 4bbacdd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,6 @@ public boolean onCreateOptionsMenu(final Menu menu) {
// Theme the search icon
mResources.setSearchIcon(menu);

//getMenuInflater().inflate(R.menu.new_playlist, menu);

final SearchView searchView = (SearchView)menu.findItem(R.id.menu_search).getActionView();
// Add voice search
final SearchManager searchManager = (SearchManager)getSystemService(Context.SEARCH_SERVICE);
Expand Down Expand Up @@ -443,7 +441,7 @@ private final static class PlaybackStatus extends BroadcastReceiver {
* Constructor of <code>PlaybackStatus</code>
*/
public PlaybackStatus(final BaseActivity activity) {
mReference = new WeakReference<BaseActivity>(activity);
mReference = new WeakReference<>(activity);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
import com.andrew.apollo.widgets.ProfileTabCarousel;
import com.andrew.apollo.widgets.ProfileTabCarousel.Listener;
import com.frostwire.android.R;
import com.frostwire.android.gui.adapters.menu.CreateNewPlaylistMenuAction;

/**
* The {@link Activity} is used to display the data for specific
Expand Down Expand Up @@ -145,7 +144,9 @@ public void onClick(final View v) {
});
// Set up the action bar
final ActionBar actionBar = getActionBar();
actionBar.setDisplayHomeAsUpEnabled(true);
if (actionBar != null) {
actionBar.setDisplayHomeAsUpEnabled(true);
}

/* Set up the artist profile */
if (isArtist()) {
Expand Down Expand Up @@ -307,6 +308,10 @@ public boolean onOptionsItemSelected(final MenuItem item) {
return true;

case FragmentMenuItems.PLAYLIST_SELECTED: {
// TODO: Possibly refactor this entire block to just use
// getIntent().getLongArrayExtra(Config.TRACKS)
// Not sure yet if it'll work for all cases.

// Add to existing playlist or to new playlist
if (isAlbum()) {
long playlistId = -1;
Expand All @@ -315,6 +320,7 @@ public boolean onOptionsItemSelected(final MenuItem item) {
playlistId = item.getIntent().getLongExtra("playlist", -1);
}

// TODO: ReDo this by passing list of tracks to Activity on intent.
System.out.println("It is an album! Add it to playlist id.");
if (playlistId != -1) {
System.out.println("playlist we're adding to: " + playlistId);
Expand All @@ -335,7 +341,7 @@ public boolean onOptionsItemSelected(final MenuItem item) {
return true;

} else if (isArtist()){

// TODO:
}
return true;
}
Expand Down

0 comments on commit 4bbacdd

Please sign in to comment.