Assigned
Status Update
Comments
[Deleted User] <[Deleted User]> #2
IMPORTANT! Please note that if you released your library to stable with these calls, the APIs must maintain binary compatibility moving forward.
That means the restricted APIs need to be made public or @RestrictTo(LIBRARY_GROUP_PREFIX) (e.g. effectively public for the purposes of compatibility).
You CANNOT simply remove the call to the restricted API.
That means the restricted APIs need to be made public or @RestrictTo(LIBRARY_GROUP_PREFIX) (e.g. effectively public for the purposes of compatibility).
You CANNOT simply remove the call to the restricted API.
Description
Crash in BrowseSupportFragment::ExpandPreLayout onPreDraw
Version used: androidx.leanback:leanback 1.0.0
Devices/Android versions reproduced on: low memory, different android versions
our investigation
Can you please change these line
if (getView() == null || getContext() == null) {
at the onPreDraw() method from the private ExpandPreLayout class in BrowseSupportFragment?
We need an additional check for
isSavedState()/hasSavedState()
to prevent the following user crash on low memory television devices:What happend?
The user is on a
RowSupportFragment
, so the Navigation is not expanded. The user clicked on a card to open the Detailscreen and play the selected Media. On low memory devices, so Activity with theBrowseSupportFragment
is destroyed, the user navigates back and goto homescreen via homebutton. At this point, the ExpandPreLayout is called and try to run the given callback from thestartHeadersTransitionInternal()
viaonExpandTransitionStart()
. The Fragment is destroyed and so the App crashes with the given fatal exception.Steps to reproduce:
We had a
BrowseSupportFragment
which contains the navigation. In this we add aThread.sleep(1500)
toonViewCreated()
andonResume()
to simulate low performing devices. We enable developer options and set "Don't Keep Activities" to true. No we can select a menu entry, navigate to aRowSupportFragment
, open a Card and play the media. After this, we navigate back to the main screen and push the home button to leave the app with the playing media. The media is already playing and the app crashes few moments later.