format changes
This commit is contained in:
parent
7b7a0e0d5e
commit
8d93ab6e79
|
@ -282,7 +282,7 @@ class ImportExportPrefs @Inject constructor(
|
|||
askToConfirmImport(activity, importFile) { password ->
|
||||
|
||||
val format: PrefsFormat = when (importFile.handler) {
|
||||
PrefsFormatsHandler.CLASSIC -> classicPrefsFormat
|
||||
PrefsFormatsHandler.CLASSIC -> classicPrefsFormat
|
||||
PrefsFormatsHandler.ENCRYPTED -> encryptedPrefsFormat
|
||||
}
|
||||
|
||||
|
|
|
@ -47,6 +47,7 @@ data class PrefsFile(
|
|||
class PrefsFileContract : ActivityResultContract<Void, PrefsFile>() {
|
||||
|
||||
companion object {
|
||||
|
||||
const val OUTPUT_PARAM = "prefs_file"
|
||||
}
|
||||
|
||||
|
@ -75,6 +76,7 @@ class PrefFileListProvider @Inject constructor(
|
|||
) {
|
||||
|
||||
companion object {
|
||||
|
||||
private val path = File(Environment.getExternalStorageDirectory().toString())
|
||||
private val aapsPath = File(path, "AAPS" + File.separator + "preferences")
|
||||
private const val IMPORT_AGE_NOT_YET_OLD_DAYS = 60
|
||||
|
@ -97,7 +99,7 @@ class PrefFileListProvider @Inject constructor(
|
|||
val detectedOld = !detectedNew && classicPrefsFormat.isPreferencesFile(it, contents)
|
||||
if (detectedNew || detectedOld) {
|
||||
val formatHandler = if (detectedNew) PrefsFormatsHandler.ENCRYPTED else PrefsFormatsHandler.CLASSIC
|
||||
prefFiles.add(PrefsFile(it.name , it, path, PrefsImportDir.ROOT_DIR, formatHandler, metadataFor(loadMetadata, formatHandler, contents)))
|
||||
prefFiles.add(PrefsFile(it.name, it, path, PrefsImportDir.ROOT_DIR, formatHandler, metadataFor(loadMetadata, formatHandler, contents)))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/scroll_content_frame"
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
Loading this view directly, without proper Theme, will likely result in crash due to lack of ?dialog... attribute definitions
|
||||
Please use AlertDialogHelper or wrap inflater context with ContextThemeWrapper(context, R.style.AppTheme)
|
||||
-->
|
||||
|
@ -31,13 +30,13 @@
|
|||
android:layout_marginStart="2dp"
|
||||
android:layout_marginEnd="50dp"
|
||||
android:layout_toEndOf="@id/alertdialog_icon"
|
||||
android:textAlignment="center"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="marquee"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:scrollHorizontally="true"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:scrollHorizontally="true"
|
||||
android:singleLine="true"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:textColor="?dialogTitleColor" />
|
||||
|
||||
|
|
Loading…
Reference in a new issue