Utilize BundleCompat and IntentCompat methods

This commit is contained in:
TacoTheDank 2023-10-31 16:35:56 -04:00 committed by Stypox
parent f3b458c803
commit 76f1e588f7
No known key found for this signature in database
GPG key ID: 4BDF1B40A49FDD23
4 changed files with 9 additions and 4 deletions

View file

@ -27,6 +27,7 @@ import android.util.Log;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.os.BundleCompat;
import org.schabi.newpipe.BuildConfig;
import org.schabi.newpipe.MainActivity;
@ -82,7 +83,8 @@ public final class StateSaver {
return null;
}
final SavedState savedState = outState.getParcelable(KEY_SAVED_STATE);
final SavedState savedState = BundleCompat.getParcelable(
outState, KEY_SAVED_STATE, SavedState.class);
if (savedState == null) {
return null;
}