Skip to content

Commit 594e5de

Browse files
committed
Update Android Components to v134.0.2 and related changes (#116)
* Bump mozilla-android-components to v134.0.2 * Add login autofill settings and delegates * Update RemoteTabsStorage constructor * Upgrade compileSdkVersion to 35 * Add lastModified field to LibrarySiteItem previews
1 parent 718f571 commit 594e5de

File tree

7 files changed

+17
-8
lines changed

7 files changed

+17
-8
lines changed

app/src/main/java/org/midorinext/android/browser/BaseBrowserFragment.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,11 @@ abstract class BaseBrowserFragment :
591591
loginValidationDelegate = DefaultLoginValidationDelegate(
592592
context.components.core.lazyPasswordsStorage
593593
),
594+
isLoginAutofillEnabled = {
595+
context.settings().shouldAutofillLogins
596+
},
597+
// there is no generate password feature, add this to show the save dialog
598+
hideUpdateFragmentAfterSavingGeneratedPassword = { _, _ -> false },
594599
isSaveLoginEnabled = {
595600
context.settings().shouldPromptToSaveLogins
596601
},

app/src/main/java/org/midorinext/android/components/Core.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ import org.midorinext.android.perf.lazyMonitored
8787
import org.midorinext.android.settings.SupportUtils
8888
import org.midorinext.android.utils.getUndoDelay
8989
import org.mozilla.geckoview.GeckoRuntime
90-
import java.util.*
9190
import java.util.concurrent.TimeUnit
9291

9392
/**
@@ -341,7 +340,7 @@ class Core(
341340
/**
342341
* The storage component to sync and persist tabs in a Midori Sync account.
343342
*/
344-
val lazyRemoteTabsStorage = lazyMonitored { RemoteTabsStorage(context) }
343+
val lazyRemoteTabsStorage = lazyMonitored { RemoteTabsStorage(context, crashReporter) }
345344

346345
val recentlyClosedTabsStorage =
347346
lazyMonitored { RecentlyClosedTabsStorage(context, engine, crashReporter) }

app/src/main/java/org/midorinext/android/gecko/GeckoProvider.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,12 @@ object GeckoProvider {
105105
GeckoCreditCardsAddressesStorageDelegate(
106106
storage = autofillStorage,
107107
isCreditCardAutofillEnabled = { context.settings().shouldAutofillCreditCardDetails },
108-
isAddressAutofillEnabled = { context.settings().shouldAutofillAddressDetails }
108+
isAddressAutofillEnabled = { context.settings().shouldAutofillAddressDetails },
109+
),
110+
GeckoLoginStorageDelegate(
111+
loginStorage = loginStorage,
112+
isLoginAutofillEnabled = { context.settings().shouldAutofillLogins },
109113
),
110-
GeckoLoginStorageDelegate(loginStorage)
111114
)
112115

113116
return geckoRuntime

app/src/main/java/org/midorinext/android/library/LibrarySiteItem.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ private fun LibrarySiteItemSitePreview() {
261261
url = null,
262262
dateAdded = 0L,
263263
children = null,
264+
lastModified = 0L,
264265
),
265266
)
266267
}
@@ -283,6 +284,7 @@ private fun LibrarySiteItemFolderPreview() {
283284
url = null,
284285
dateAdded = 0L,
285286
children = null,
287+
lastModified = 0L,
286288
),
287289
)
288290
}

app/src/main/res/xml/shortcuts.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
android:shortcutLongLabel="@string/home_screen_shortcut_open_new_tab_2">
1313
<intent
1414
android:action="org.midorinext.android.OPEN_TAB"
15-
android:targetPackage="org.midorinext.android"
15+
android:targetPackage="org.midorinext.android.release"
1616
android:targetClass="org.midorinext.android.IntentReceiverActivity" />
1717
</shortcut>
1818
<shortcut
@@ -23,7 +23,7 @@
2323
android:shortcutLongLabel="@string/home_screen_shortcut_open_new_private_tab_2">
2424
<intent
2525
android:action="org.midorinext.android.OPEN_PRIVATE_TAB"
26-
android:targetPackage="org.midorinext.android"
26+
android:targetPackage="org.midorinext.android.release"
2727
android:targetClass="org.midorinext.android.IntentReceiverActivity" />
2828
</shortcut>
2929
</shortcuts>

buildSrc/src/main/java/AndroidComponents.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
44

55
object AndroidComponents {
6-
const val VERSION = "133.0"
6+
const val VERSION = "134.0.2"
77
}

buildSrc/src/main/java/Config.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import java.util.Locale
1616

1717
object Config {
1818
// Synchronized build configuration for all modules
19-
const val compileSdkVersion = 34
19+
const val compileSdkVersion = 35
2020
const val minSdkVersion = 21
2121
const val targetSdkVersion = 34
2222

0 commit comments

Comments
 (0)