For #25808: Suppress onBackPressed deprecation.
This commit is contained in:
parent
2e9fd871d6
commit
5ddeba154c
|
@ -70,6 +70,7 @@ class BookmarkSearchDialogFragment : AppCompatDialogFragment(), UserInteractionH
|
|||
|
||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||
return object : Dialog(requireContext(), this.theme) {
|
||||
@Deprecated("Deprecated in Java")
|
||||
override fun onBackPressed() {
|
||||
this@BookmarkSearchDialogFragment.onBackPressed()
|
||||
}
|
||||
|
|
|
@ -70,6 +70,7 @@ class HistorySearchDialogFragment : AppCompatDialogFragment(), UserInteractionHa
|
|||
|
||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||
return object : Dialog(requireContext(), this.theme) {
|
||||
@Deprecated("Deprecated in Java")
|
||||
override fun onBackPressed() {
|
||||
this@HistorySearchDialogFragment.onBackPressed()
|
||||
}
|
||||
|
|
|
@ -154,6 +154,7 @@ class SearchDialogFragment : AppCompatDialogFragment(), UserInteractionHandler {
|
|||
|
||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||
return object : Dialog(requireContext(), this.theme) {
|
||||
@Deprecated("Deprecated in Java")
|
||||
override fun onBackPressed() {
|
||||
this@SearchDialogFragment.onBackPressed()
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ class TabsTrayDialog(
|
|||
theme: Int,
|
||||
private val interactor: () -> BrowserTrayInteractor,
|
||||
) : Dialog(context, theme) {
|
||||
@Deprecated("Deprecated in Java")
|
||||
override fun onBackPressed() {
|
||||
if (interactor.invoke().onBackPressed()) {
|
||||
return
|
||||
|
|
|
@ -163,6 +163,7 @@ class TrackingProtectionPanelDialogFragment : AppCompatDialogFragment(), UserInt
|
|||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||
return if (args.gravity == Gravity.BOTTOM) {
|
||||
object : BottomSheetDialog(requireContext(), this.theme) {
|
||||
@Deprecated("Deprecated in Java")
|
||||
override fun onBackPressed() {
|
||||
this@TrackingProtectionPanelDialogFragment.onBackPressed()
|
||||
}
|
||||
|
@ -176,6 +177,7 @@ class TrackingProtectionPanelDialogFragment : AppCompatDialogFragment(), UserInt
|
|||
}
|
||||
} else {
|
||||
object : Dialog(requireContext()) {
|
||||
@Deprecated("Deprecated in Java")
|
||||
override fun onBackPressed() {
|
||||
this@TrackingProtectionPanelDialogFragment.onBackPressed()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue