Always replace fragment content on deck selection.

We are creating a new StudyOptionsFragment instance and replacing
the content of the fragment on the right with it. There is no need to
check if the existing fragment is null or of the right type since we are
replacing it anyway. Also remove the check for different deck IDs since
it's possible to not have a StudyOptionsFragment loaded but still select
the same deck (e.g., when resuming activity).
Do not add font files with the wrong extension.

Since the user can put any arbitrary files in the fonts directory on the
SD card, simply ignore anything that is not a .ttf or .ttc file.

If any extraneous files are added as fonts, a corresponding @font-face
directive will be added to the stylesheet, which will actually cause a
pop-up to show up during review.

This is a fix for:
https://code.google.com/p/ankidroid/issues/detail?id=1575
Merge pull request #49 from flerda/v2.1-ttf-ttc

Do not add font files with the wrong extension.
Fix Daniel Svärd’s name. Semi-automatically remove trailing whitespace.
Merge pull request #46 from hssm/loadfragment

Always replace fragment content on deck selection.
Allow .otf as a valid file extension, too.
Make it easier to add further valid font file formats by using a private Array.
Also add method getFileExtension.
(edited)
Merge pull request #51 from ospalh/v2.1-dev-allow-otf

Allow .otf as a valid file extension, too.
Select the correct deck after sync in fragmented mode.
Disable text selection setting if we get a NPE when using clipboard.

Workaround for Issue 1746.
A Samsung bug leaves devices unable to use the clipboard. AnkiDroid
will crash while using the clipboard on those devices (i.e., every time
the reviewer opens). Here, we disable the text selection setting so
the clipboard isn't used and AnkiDroid can continue to review cards.
Merge pull request #52 from hssm/disable-clipboard

Disable text selection setting if we get a NPE when using clipboard.
Merge pull request #53 from hssm/Issue1235

Select the correct deck after sync in fragmented mode.
Select correct deck after delete in fragmented mode.
Show correct fragment view for custom study.
Don't show a custom study button in congrats view of filtered deck.
Merge pull request #55 from hssm/no-filtered-customstudy

Don't show a custom study button in congrats view of filtered deck.
Merge pull request #54 from hssm/Issue1497

Show correct fragment view for custom study.
Highlight the currently selected deck when the deck list is updated.

Only has visible effect in fragmented mode due to the choice mode set
in the list view.
Merge pull request #56 from hssm/decklist-select-after-update

Highlight the currently selected deck when the deck list is updated.
Merge pull request #57 from hssm/select-after-update

Select correct deck after delete in fragmented mode.
Show correct fragment view for custom study deck on tablet as well.