Use getApplicationContext() instead of getContext() in ENQUEUE, ENQUEUE_NEXT, START_HERE_ON_BACKGROUND, and START_HERE_ON_POPUP entries to prevent NullPointerException when the fragment's activity context becomes null during configuration changes (e.g. device rotation). The fragment context can become null when the activity is destroyed during rotation, but the async callback from fetchItemInfoIfSparse still holds a reference to the now-detached fragment. Using Application context ensures a stable, non-null context throughout the async operation lifecycle. |
||
|---|---|---|
| .. | ||
| sampledata | ||
| schemas/org.schabi.newpipe.database.AppDatabase | ||
| src | ||
| build.gradle.kts | ||
| lint.xml | ||
| proguard-rules.pro | ||