Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ android {

lintOptions {
lintConfig = file("lint.xml")
baseline file("lint-baseline.xml")
disable 'GradleDependency', 'AndroidGradlePluginVersion'
}

Expand Down
55 changes: 0 additions & 55 deletions app/lint-baseline.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package org.mozilla.reference.browser.settings
import android.graphics.Color
import android.os.Bundle
import android.view.MenuItem
import androidx.activity.OnBackPressedCallback
import androidx.activity.SystemBarStyle
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
Expand All @@ -23,6 +24,21 @@ class SettingsActivity :
super.onCreate(savedInstanceState)
window.setupPersistentInsets(true)

onBackPressedDispatcher.addCallback(
this,
object : OnBackPressedCallback(true) {
override fun handleOnBackPressed() {
val handled = supportFragmentManager.fragments.any {
it is UserInteractionHandler && it.onBackPressed()
}
if (!handled) {
remove()
onBackPressedDispatcher.onBackPressed()
}
}
},
)

if (savedInstanceState == null) {
with(supportFragmentManager.beginTransaction()) {
replace(R.id.container, SettingsFragment())
Expand All @@ -46,15 +62,4 @@ class SettingsActivity :
override fun updateTitle(titleResId: Int) {
setTitle(titleResId)
}

@Suppress("MissingSuperCall", "OVERRIDE_DEPRECATION")
override fun onBackPressed() {
supportFragmentManager.fragments.forEach {
if (it is UserInteractionHandler && it.onBackPressed()) {
return
} else {
super.onBackPressedDispatcher.onBackPressed()
}
}
}
}
1 change: 1 addition & 0 deletions app/src/main/res/layout/fragment_browser.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:src="@drawable/mozac_ic_font"
android:contentDescription="@string/reader_view_appearance_button"
android:visibility="gone"
android:layout_marginRight="16dp"
android:layout_marginLeft="16dp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/ic_icon_background"/>
<foreground android:drawable="@drawable/ic_icon_foreground"/>
<monochrome android:drawable="@drawable/ic_icon_foreground"/>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tragic. I might try to sketch up a monochrome icon at some point. 😄

</adaptive-icon>
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/ic_icon_background"/>
<foreground android:drawable="@drawable/ic_icon_foreground"/>
<monochrome android:drawable="@drawable/ic_icon_foreground"/>
</adaptive-icon>
Binary file removed app/src/main/res/mipmap-hdpi/ic_launcher.png
Binary file not shown.
Binary file removed app/src/main/res/mipmap-hdpi/ic_launcher_round.png
Binary file not shown.
Binary file removed app/src/main/res/mipmap-mdpi/ic_launcher.png
Binary file not shown.
Binary file removed app/src/main/res/mipmap-mdpi/ic_launcher_round.png
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xhdpi/ic_launcher.png
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Binary file not shown.
Binary file not shown.
4 changes: 4 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,10 @@
<string name="synced_tabs_reauth">Please re-authenticate.</string>
<string name="synced_tabs_enable_tab_syncing">Please enable tab syncing.</string>

<!-- Reader View -->
<!-- Content description for the button that opens reader view appearance controls -->
<string name="reader_view_appearance_button">Reader view appearance</string>

<!-- Add-on Preferences -->
<!-- Preference to customize the configured AMO (addons.mozilla.org) collection -->
<string name="preferences_customize_amo_collection">Custom Add-on collection</string>
Expand Down