From 0df380134f5a40e4f15624a5cfcd380ff39aee8b Mon Sep 17 00:00:00 2001 From: Sneha Datta Date: Wed, 28 Aug 2024 21:17:30 +0530 Subject: [PATCH] Migrate from onBackPressed in ResumeLessonActivityPresenter --- .../android/app/resumelesson/ResumeLessonActivityPresenter.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/oppia/android/app/resumelesson/ResumeLessonActivityPresenter.kt b/app/src/main/java/org/oppia/android/app/resumelesson/ResumeLessonActivityPresenter.kt index 210d49c887c..45dee2203d0 100644 --- a/app/src/main/java/org/oppia/android/app/resumelesson/ResumeLessonActivityPresenter.kt +++ b/app/src/main/java/org/oppia/android/app/resumelesson/ResumeLessonActivityPresenter.kt @@ -1,5 +1,6 @@ package org.oppia.android.app.resumelesson +import androidx.activity.OnBackPressedCallback import androidx.appcompat.app.AppCompatActivity import androidx.databinding.DataBindingUtil import androidx.fragment.app.Fragment @@ -73,8 +74,7 @@ class ResumeLessonActivityPresenter @Inject constructor( context = activity, ReadingTextSize.MEDIUM_TEXT_SIZE ) - @Suppress("DEPRECATION") // TODO(#5404): Migrate to a back pressed dispatcher. - activity.onBackPressed() + activity.onBackPressedDispatcher.onBackPressed() } }