leanback: fix NPE of transition listener and clean up
We actually can not support setListener(null) because transition
class only provides addListener() and removeListener(). Details fragment
adds a transition listener with null callback to the sharedelemententer
transition. The bug was not discovered because leanback theme always
specifies the sharedElementReturn transition. When sharedElementReturn
transition is not specified. When pressing back, the null callback listener
of sharedElementEnter transition are cloned into sharedElementReturn transition.
Now we switch to use addListener/removeListener and change
TransitionHelper methods to static.
Bug 24202013
Change-Id: I7cc918013e4a357a59987ea9727bc03c15cb0097
19 files changed