Tweak Aperture defaults

Signed-off-by: Tad <tad@spotco.us>
This commit is contained in:
Tad 2023-01-08 21:20:36 -05:00
parent c92c084ca1
commit 7dbdcdf751
2 changed files with 70 additions and 0 deletions

View File

@ -0,0 +1,66 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tad <tad@spotco.us>
Date: Sun, 8 Jan 2023 21:16:28 -0500
Subject: [PATCH] Enable stabilization by default
Change-Id: I77417dd0877f8ea765b1fd70ac824c743d3ed3a0
Signed-off-by: Tad <tad@spotco.us>
---
.../java/org/lineageos/aperture/SharedPreferencesExt.kt | 6 +++---
app/src/main/res/xml/root_preferences.xml | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/app/src/main/java/org/lineageos/aperture/SharedPreferencesExt.kt b/app/src/main/java/org/lineageos/aperture/SharedPreferencesExt.kt
index accf276..c3ac511 100644
--- a/app/src/main/java/org/lineageos/aperture/SharedPreferencesExt.kt
+++ b/app/src/main/java/org/lineageos/aperture/SharedPreferencesExt.kt
@@ -331,7 +331,7 @@ internal var SharedPreferences.lastSavedUri: Uri?
// Image stabilization
private const val IMAGE_STABILIZATION_KEY = "image_stabilization"
internal val SharedPreferences.imageStabilizationMode: StabilizationMode
- get() = if (getBoolean(IMAGE_STABILIZATION_KEY, false)) {
+ get() = if (getBoolean(IMAGE_STABILIZATION_KEY, true)) {
StabilizationMode.OPTICAL
} else {
StabilizationMode.OFF
@@ -343,8 +343,8 @@ private const val VIDEO_STABILIZATION_OIS_KEY = "video_stabilization_ois"
private const val VIDEO_STABILIZATION_PREVIEW_KEY = "video_stabilization_preview"
internal val SharedPreferences.videoStabilizationMode: StabilizationMode
get() {
- val videoStabilization = getBoolean(VIDEO_STABILIZATION_KEY, false)
- val videoStabilizationOis = getBoolean(VIDEO_STABILIZATION_OIS_KEY, false)
+ val videoStabilization = getBoolean(VIDEO_STABILIZATION_KEY, true)
+ val videoStabilizationOis = getBoolean(VIDEO_STABILIZATION_OIS_KEY, true)
val videoStabilizationPreview = getBoolean(VIDEO_STABILIZATION_PREVIEW_KEY, false)
return when {
diff --git a/app/src/main/res/xml/root_preferences.xml b/app/src/main/res/xml/root_preferences.xml
index 96eb553..507ceb8 100644
--- a/app/src/main/res/xml/root_preferences.xml
+++ b/app/src/main/res/xml/root_preferences.xml
@@ -53,7 +53,7 @@
app:useSimpleSummaryProvider="true" />
<SwitchPreference
- app:defaultValue="false"
+ app:defaultValue="true"
app:iconSpaceReserved="false"
app:key="image_stabilization"
app:summary="@string/image_stabilization_summary"
@@ -66,14 +66,14 @@
app:title="@string/video_header">
<SwitchPreference
- app:defaultValue="false"
+ app:defaultValue="true"
app:iconSpaceReserved="false"
app:key="video_stabilization"
app:summary="@string/video_stabilization_summary"
app:title="@string/video_stabilization_title" />
<SwitchPreference
- app:defaultValue="false"
+ app:defaultValue="true"
app:iconSpaceReserved="false"
app:key="video_stabilization_ois"
app:summary="@string/video_stabilization_ois_summary"

View File

@ -255,6 +255,10 @@ if enterAndClear "lineage-sdk"; then
if [ "$DOS_DEBLOBBER_REMOVE_AUDIOFX" = true ]; then awk -i inplace '!/LineageAudioService/' lineage/res/res/values/config.xml; fi; #Remove AudioFX
fi;
if enterAndClear "packages/apps/Aperture"; then
applyPatch "$DOS_PATCHES/android_packages_apps_Aperture/0001-IS.patch"; #Enable stabilization by default (DivestOS)
fi;
#if enterAndClear "packages/apps/CarrierConfig"; then
#rm -rf assets/*.xml;
#cp $DOS_PATCHES_COMMON/android_packages_apps_CarrierConfig/*.xml assets/;