@Override public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) { // For device picker, disable Context Menu if (mScreenType != SCREEN_TYPE_SETTINGS) { return; } CachedBluetoothDevice cachedDevice = getDeviceFromMenuInfo(menuInfo); if (cachedDevice == null) return; cachedDevice.onCreateContextMenu(menu); }