The Y chromosome in Drosophila is a strange thing, and it has several unique features. While, just as in humans, male flies are XY and females XX, flies differ in the the Y chomosome doesn't determine "maleness". Rather the sex of the fly is determined by the ratio of X chromosomes to the number of sets of autosomes (the X:A ratio). If the X:A ratio is 1, then the fly is female, if it is 0.5, the fly is male. So an X0 fly (i.e. one with a single X chromosome with no Y chromosome) develops as a male. [This can be quite useful in the laboratory] What then is the Y chromosome for? It is required for male fertility but not viability. This means that XY flies are fertile males, XX fies are fertile females, XXY flies are fertile females and X0 flies are sterile males.
One might expect then that whatever genes are located on the Y chromosome are related mainly to fertility, or are genetically redundant. In fact there are very few known genes on the Drosophila melanogaster Y chromosome - 12, in fact, and many if not all are related to fertility in males. 12 genes is really not many for a chromosome, and it turns out that the Y chromosome is pretty much composed of genetically inert heterochromatin and largely comprises simple sequence repetitive DNA.