Commit 5978dcb6 authored by Geoffrey Métais's avatar Geoffrey Métais

Fix build and phone ringer option

parent e3ce8766
......@@ -28,10 +28,8 @@ import;
import android.os.Build;
import android.os.Bundle;
import android.view.ContextMenu;
import android.view.ContextMenu.ContextMenuInfo;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
......@@ -156,20 +154,19 @@ public class AudioAlbumFragment extends PlaybackServiceFragment implements Adapt
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) {
MenuInflater inflater = getActivity().getMenuInflater();
inflater.inflate(, menu);
int position = 0;
if (menuInfo instanceof AdapterViewCompat.AdapterContextMenuInfo)
position = ((AdapterViewCompat.AdapterContextMenuInfo)menuInfo).position;
if (menuInfo instanceof AdapterView.AdapterContextMenuInfo)
position = ((AdapterView.AdapterContextMenuInfo)menuInfo).position;
setContextMenuItems(menu, v, position);
private void setContextMenuItems(Menu menu, View v, int position) {
menu.setGroupVisible(, false);
if (!AndroidDevices.isPhone())
menu.setGroupVisible(, true);
menu.setGroupVisible(, AndroidDevices.isPhone());
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