Skip to content
Merged
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- Compatibility updates for Android 15 & 16

## [1.3.1] - 2025-10-05
### Changed
- Updated translations
Expand Down
6 changes: 0 additions & 6 deletions app/detekt-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
<ID>MaxLineLength:CameraErrorHandler.kt$CameraErrorHandler$VideoRecordEvent.Finalize.ERROR_INSUFFICIENT_STORAGE -&gt; context.toast(R.string.video_capture_insufficient_storage_error)</ID>
<ID>MaxLineLength:ImageUtil.kt$ImageUtil$require(image.format == ImageFormat.YUV_420_888) { "Incorrect image format of the input image proxy: " + image.format }</ID>
<ID>MaxLineLength:MainActivity.kt$MainActivity$if</ID>
<ID>MaxLineLength:MainActivity.kt$MainActivity$safeInsetBottom + navigationBarHeight + resources.getDimensionPixelSize(org.fossify.commons.R.dimen.bigger_margin)</ID>
<ID>MaxLineLength:MainActivity.kt$MainActivity$}</ID>
<ID>MaxLineLength:SettingsActivity.kt$SettingsActivity$it.beGoneIf(settingsUseEnglishHolder.isGone() &amp;&amp; settingsPurchaseThankYouHolder.isGone() &amp;&amp; settingsLanguageHolder.isGone())</ID>
<ID>MaxLineLength:SettingsActivity.kt$SettingsActivity$settingsUseEnglishHolder.beVisibleIf((config.wasUseEnglishToggled || Locale.getDefault().language != "en") &amp;&amp; !isTiramisuPlus())</ID>
Expand All @@ -85,12 +84,7 @@
<ID>NestedBlockDepth:MediaOutputHelper.kt$MediaOutputHelper$private fun getUriForFilePath(path: String): Uri?</ID>
<ID>NestedBlockDepth:PhotoProcessor.kt$PhotoProcessor$override fun doInBackground(vararg params: ByteArray): String</ID>
<ID>NestedBlockDepth:VideoQualityManager.kt$VideoQualityManager$fun initSupportedQualities(cameraProvider: ProcessCameraProvider)</ID>
<ID>ReturnCount:ImageSaver.kt$ImageSaver$@SuppressLint("RestrictedApi") private fun saveImageToTempFile(): File?</ID>
<ID>ReturnCount:MediaActionSound.kt$MediaActionSound$private fun loadSound(sound: SoundState): Int</ID>
<ID>ReturnCount:MediaOutputHelper.kt$MediaOutputHelper$private fun getFileDescriptorMediaOutput(): MediaOutput.FileDescriptorMediaOutput?</ID>
<ID>ReturnCount:MediaOutputHelper.kt$MediaOutputHelper$private fun getUriForFilePath(path: String): Uri?</ID>
<ID>ReturnCount:PhotoProcessor.kt$PhotoProcessor$override fun doInBackground(vararg params: ByteArray): String</ID>
<ID>ReturnCount:PhotoProcessor.kt$PhotoProcessor$private fun rotate(bitmap: Bitmap, degree: Int): Bitmap?</ID>
<ID>SwallowedException:BitmapUtils.kt$BitmapUtils$ex: OutOfMemoryError</ID>
<ID>SwallowedException:CameraXPreview.kt$CameraXPreview$e: Exception</ID>
<ID>SwallowedException:ImageUtil.kt$ImageUtil$e: IOException</ID>
Expand Down
109 changes: 49 additions & 60 deletions app/lint-baseline.xml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,11 @@ class MainActivity : SimpleActivity(), PhotoProcessor.MediaSavedListener, Camera
mediaSoundHelper.release()
}

override fun onBackPressed() {
if (!closeOptions()) {
super.onBackPressed()
override fun onBackPressedCompat(): Boolean {
return if (!closeOptions()) {
false
} else {
true
}
}

Expand Down Expand Up @@ -315,8 +317,9 @@ class MainActivity : SimpleActivity(), PhotoProcessor.MediaSavedListener, Camera
topMargin = safeInsetTop
}

val marginBottom =
safeInsetBottom + navigationBarHeight + resources.getDimensionPixelSize(org.fossify.commons.R.dimen.bigger_margin)
val systemBarsInsets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars())
val marginBottom = systemBarsInsets.bottom +
resources.getDimensionPixelSize(org.fossify.commons.R.dimen.bigger_margin)

binding.shutter.updateLayoutParams<ViewGroup.MarginLayoutParams> {
bottomMargin = marginBottom
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,20 @@ class SettingsActivity : SimpleActivity() {
private val binding by viewBinding(ActivitySettingsBinding::inflate)

override fun onCreate(savedInstanceState: Bundle?) {
isMaterialActivity = true
super.onCreate(savedInstanceState)
binding.apply {
setContentView(root)
setupOptionsMenu()
refreshMenuItems()

updateMaterialActivityViews(
settingsCoordinator,
settingsHolder,
useTransparentNavigation = true,
useTopSearchMenu = false
)
setupMaterialScrollListener(settingsNestedScrollview, settingsToolbar)
setupEdgeToEdge(padBottomSystem = listOf(settingsNestedScrollview))
setupMaterialScrollListener(binding.settingsNestedScrollview, binding.settingsAppbar)
}
}

override fun onResume() {
super.onResume()
setupToolbar(binding.settingsToolbar, NavigationIcon.Arrow)
setupTopAppBar(binding.settingsAppbar, NavigationIcon.Arrow)

setupCustomizeColors()
setupUseEnglish()
Expand Down
25 changes: 16 additions & 9 deletions app/src/main/res/layout/activity_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,29 @@
android:layout_width="match_parent"
android:layout_height="match_parent">

<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/settings_toolbar"
<org.fossify.commons.views.MyAppBarLayout
android:id="@+id/settings_appbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/color_primary"
app:menu="@menu/menu"
app:title="@string/settings"
app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" />
android:layout_height="wrap_content">

<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/settings_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/color_primary"
app:menu="@menu/menu"
app:title="@string/settings"
app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" />

</org.fossify.commons.views.MyAppBarLayout>

<androidx.core.widget.NestedScrollView
android:id="@+id/settings_nested_scrollview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="?attr/actionBarSize"
android:fillViewport="true"
android:scrollbars="none">
android:scrollbars="none"
app:layout_behavior="@string/appbar_scrolling_view_behavior">

<LinearLayout
android:id="@+id/settings_holder"
Expand Down
5 changes: 5 additions & 0 deletions detekt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ style:
maxLineLength: 120
excludePackageStatements: true
excludeImportStatements: true
ReturnCount:
active: true
max: 4
excludeGuardClauses: true
excludes: ["**/test/**", "**/androidTest/**"]

naming:
FunctionNaming:
Expand Down
6 changes: 3 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ androidx-window = "1.5.0"
androidx-camera = "1.4.2"
androidx-ktx = "2.8.6"
#Fossify
commons = "5.4.0"
commons = "5.5.0"
#Gradle
gradlePlugins-agp = "8.11.1"
#build
app-build-compileSDKVersion = "34"
app-build-targetSDK = "34"
app-build-compileSDKVersion = "36"
app-build-targetSDK = "36"
app-build-minimumSDK = "29"
app-build-javaVersion = "VERSION_17"
app-build-kotlinJVMTarget = "17"
Expand Down
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ dependencyResolutionManagement {
google()
mavenCentral()
maven { setUrl("https://jitpack.io") }
mavenLocal()
}
}
include(":app")
Loading