The onDestroyView method is used to unregister the application observer
from the dialog. However the parent got called first which destroys the
view of the dialog. This could lead to Null Pointer Exceptions when
the listener tries to update the UI of the dialog right after it was
destroyed.
The VolumeControllerDialogFragmentListener was created twice as creation
was triggered on both the down and up event of the volume keys. This has
been changed to only trigger on down events.
The applicationObserver was never unregistered resulting in a memory leak
and even worse, crashes when destroyed dialogs still got called through
the applicationOnVolumeChanged callback.
Also changed the view resource identifiers used by the controller dialog
as it used the same resource identifiers as the now playing panel.
Refactored MusicListFragment and PVRListFragment to use AbstractTabsFragment
Fixed scrolling in a nested scroll view using espresso
Fixed issue with setting and checking Kodi major version
There's no need to have so many classes to handle the hardware volume keys. This PR simplifies it, without duplicating any more code than was already duplicated.