From d79c92a9a02977eee20975bc96944e24fee6375e Mon Sep 17 00:00:00 2001 From: Thibault Deckers Date: Fri, 23 Jun 2023 19:37:18 +0200 Subject: [PATCH] fixed tiff decoder native log --- android/app/build.gradle | 2 +- .../thibault/aves/decoder/TiffGlideModule.kt | 14 +- lib/model/app/contributors.dart | 1 + scripts/fix_android_log_levels.bat | 1 + scripts/fix_android_log_levels.sh | 1 + untranslated.json | 246 ------------------ 6 files changed, 13 insertions(+), 252 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index fb9110b6e..efddd5672 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -224,7 +224,7 @@ dependencies { // - https://jitpack.io/p/deckerst/Android-TiffBitmapFactory // - https://jitpack.io/p/deckerst/mp4parser // - https://jitpack.io/p/deckerst/pixymeta-android - implementation 'com.github.deckerst:Android-TiffBitmapFactory:876e53870a' + implementation 'com.github.deckerst:Android-TiffBitmapFactory:90c06eebf4' implementation 'com.github.deckerst.mp4parser:isoparser:4cc0c5d06c' implementation 'com.github.deckerst.mp4parser:muxer:4cc0c5d06c' implementation 'com.github.deckerst:pixymeta-android:706bd73d6e' diff --git a/android/app/src/main/kotlin/deckers/thibault/aves/decoder/TiffGlideModule.kt b/android/app/src/main/kotlin/deckers/thibault/aves/decoder/TiffGlideModule.kt index 074f06332..20ad40cb5 100644 --- a/android/app/src/main/kotlin/deckers/thibault/aves/decoder/TiffGlideModule.kt +++ b/android/app/src/main/kotlin/deckers/thibault/aves/decoder/TiffGlideModule.kt @@ -80,11 +80,15 @@ internal class TiffFetcher(val model: TiffImage, val width: Int, val height: Int inDirectoryNumber = page inSampleSize = sampleSize } - val bitmap = TiffBitmapFactory.decodeFileDescriptor(fd, options) - if (bitmap == null) { - callback.onLoadFailed(Exception("null bitmap")) - } else { - callback.onDataReady(bitmap) + try { + val bitmap = TiffBitmapFactory.decodeFileDescriptor(fd, options) + if (bitmap == null) { + callback.onLoadFailed(Exception("Decoding full TIFF yielded null bitmap")) + } else { + callback.onDataReady(bitmap) + } + } catch (e: Exception) { + callback.onLoadFailed(e) } } diff --git a/lib/model/app/contributors.dart b/lib/model/app/contributors.dart index d12d06d11..d1f2b8f46 100644 --- a/lib/model/app/contributors.dart +++ b/lib/model/app/contributors.dart @@ -49,6 +49,7 @@ class Contributors { Contributor('Макар Разин', 'makarrazin14@gmail.com'), Contributor('Leon', 'leonhoog@outlook.com'), Contributor('stephen-cusi', 'magiskcurry@qq.com'), + Contributor('atilluF', '110931720+atilluF@users.noreply.github.com'), // Contributor('SAMIRAH AIL', 'samiratalzahrani@gmail.com'), // Arabic // Contributor('Salih Ail', 'rrrfff444@gmail.com'), // Arabic // Contributor('nasreddineloukriz', 'nasreddineloukriz@gmail.com'), // Arabic diff --git a/scripts/fix_android_log_levels.bat b/scripts/fix_android_log_levels.bat index ee9d7b46d..b585d2771 100644 --- a/scripts/fix_android_log_levels.bat +++ b/scripts/fix_android_log_levels.bat @@ -29,6 +29,7 @@ adb.exe shell setprop log.tag.J4A INFO adb.exe shell setprop log.tag.MediaCodec WARN adb.exe shell setprop log.tag.MediaMetadataRetriever INFO adb.exe shell setprop log.tag.MediaMetadataRetrieverJNI INFO +adb.exe shell setprop log.tag.NativeTiffDecoder INFO adb.exe shell setprop log.tag.NuMediaExtractor INFO adb.exe shell setprop log.tag.PipelineWatcher INFO adb.exe shell setprop log.tag.ReflectedParamUpdater INFO diff --git a/scripts/fix_android_log_levels.sh b/scripts/fix_android_log_levels.sh index 1e525225e..f179d3624 100755 --- a/scripts/fix_android_log_levels.sh +++ b/scripts/fix_android_log_levels.sh @@ -21,6 +21,7 @@ adb shell setprop log.tag.J4A INFO adb shell setprop log.tag.MediaCodec WARN adb shell setprop log.tag.MediaMetadataRetriever INFO adb shell setprop log.tag.MediaMetadataRetrieverJNI INFO +adb shell setprop log.tag.NativeTiffDecoder INFO adb shell setprop log.tag.NuMediaExtractor INFO adb shell setprop log.tag.PipelineWatcher INFO adb shell setprop log.tag.ReflectedParamUpdater INFO diff --git a/untranslated.json b/untranslated.json index eb90da68e..317409fff 100644 --- a/untranslated.json +++ b/untranslated.json @@ -640,198 +640,20 @@ ], "be": [ - "columnCount", - "timeSeconds", - "timeMinutes", - "timeDays", - "entryActionExport", - "entryActionInfo", - "entryActionRename", - "entryActionRestore", - "entryActionRotateCCW", - "entryActionRotateCW", - "entryActionFlip", - "entryActionPrint", - "entryActionShare", - "entryActionShareImageOnly", - "entryActionShareVideoOnly", - "entryActionViewSource", - "entryActionShowGeoTiffOnMap", - "entryActionConvertMotionPhotoToStillImage", - "entryActionViewMotionPhotoVideo", - "entryActionEdit", - "entryActionOpen", - "entryActionSetAs", - "entryActionOpenMap", - "entryActionRotateScreen", - "entryActionAddFavourite", - "entryActionRemoveFavourite", - "videoActionCaptureFrame", - "videoActionMute", - "videoActionUnmute", - "videoActionPause", - "videoActionPlay", - "videoActionReplay10", - "videoActionSkip10", - "videoActionSelectStreams", - "videoActionSetSpeed", - "viewerActionSettings", - "viewerActionLock", - "viewerActionUnlock", - "slideshowActionResume", - "slideshowActionShowInCollection", - "entryInfoActionEditDate", - "entryInfoActionEditLocation", - "entryInfoActionEditTitleDescription", - "entryInfoActionEditRating", - "entryInfoActionEditTags", - "entryInfoActionRemoveMetadata", - "entryInfoActionExportMetadata", - "entryInfoActionRemoveLocation", - "editorActionTransform", - "editorTransformCrop", - "editorTransformRotate", - "cropAspectRatioFree", - "cropAspectRatioOriginal", - "cropAspectRatioSquare", - "filterAspectRatioLandscapeLabel", - "filterAspectRatioPortraitLabel", - "filterBinLabel", - "filterFavouriteLabel", - "filterNoDateLabel", - "filterNoAddressLabel", - "filterLocatedLabel", - "filterNoLocationLabel", - "filterNoRatingLabel", - "filterTaggedLabel", - "filterNoTagLabel", - "filterNoTitleLabel", - "filterOnThisDayLabel", - "filterRecentlyAddedLabel", - "filterRatingRejectedLabel", - "filterTypeAnimatedLabel", - "filterTypeMotionPhotoLabel", - "filterTypePanoramaLabel", - "filterTypeRawLabel", - "filterTypeSphericalVideoLabel", - "filterTypeGeotiffLabel", - "filterMimeImageLabel", - "filterMimeVideoLabel", - "accessibilityAnimationsRemove", - "accessibilityAnimationsKeep", - "albumTierNew", - "albumTierPinned", - "albumTierSpecial", - "albumTierApps", - "albumTierVaults", - "albumTierRegular", - "coordinateFormatDms", - "coordinateFormatDecimal", - "coordinateDms", - "coordinateDmsNorth", - "coordinateDmsSouth", - "coordinateDmsEast", - "coordinateDmsWest", - "displayRefreshRatePreferHighest", - "displayRefreshRatePreferLowest", - "keepScreenOnNever", - "keepScreenOnVideoPlayback", - "keepScreenOnViewerOnly", - "keepScreenOnAlways", - "lengthUnitPixel", - "lengthUnitPercent", - "mapStyleGoogleNormal", - "mapStyleGoogleHybrid", - "mapStyleGoogleTerrain", - "mapStyleHuaweiNormal", - "mapStyleHuaweiTerrain", - "mapStyleOsmHot", - "mapStyleStamenToner", - "mapStyleStamenWatercolor", - "maxBrightnessNever", - "maxBrightnessAlways", - "nameConflictStrategyRename", - "nameConflictStrategyReplace", - "nameConflictStrategySkip", - "subtitlePositionTop", - "subtitlePositionBottom", - "themeBrightnessLight", - "themeBrightnessDark", - "themeBrightnessBlack", - "unitSystemMetric", - "unitSystemImperial", - "vaultLockTypePattern", - "vaultLockTypePin", - "vaultLockTypePassword", - "settingsVideoEnablePip", - "videoControlsPlay", - "videoControlsPlaySeek", - "videoControlsPlayOutside", "videoControlsNone", - "videoLoopModeNever", - "videoLoopModeShortOnly", - "videoLoopModeAlways", - "videoPlaybackSkip", - "videoPlaybackMuted", - "videoPlaybackWithSound", - "videoResumptionModeNever", - "videoResumptionModeAlways", "viewerTransitionSlide", - "viewerTransitionParallax", "viewerTransitionFade", "viewerTransitionZoomIn", "viewerTransitionNone", - "wallpaperTargetHome", - "wallpaperTargetLock", - "wallpaperTargetHomeLock", "widgetDisplayedItemRandom", - "widgetDisplayedItemMostRecent", "widgetOpenPageHome", "widgetOpenPageCollection", "widgetOpenPageViewer", - "widgetTapUpdateWidget", - "storageVolumeDescriptionFallbackPrimary", - "storageVolumeDescriptionFallbackNonPrimary", - "rootDirectoryDescription", - "otherDirectoryDescription", - "storageAccessDialogMessage", - "restrictedAccessDialogMessage", - "notEnoughSpaceDialogMessage", - "missingSystemFilePickerDialogMessage", - "unsupportedTypeDialogMessage", - "nameConflictDialogSingleSourceMessage", - "nameConflictDialogMultipleSourceMessage", - "addShortcutDialogLabel", - "addShortcutButtonLabel", - "noMatchingAppDialogMessage", "binEntriesConfirmationDialogMessage", "deleteEntriesConfirmationDialogMessage", - "moveUndatedConfirmationDialogMessage", - "moveUndatedConfirmationDialogSetDate", - "videoResumeDialogMessage", - "videoStartOverButtonLabel", - "videoResumeButtonLabel", - "setCoverDialogLatest", - "setCoverDialogAuto", "setCoverDialogCustom", "hideFilterConfirmationDialogMessage", - "newAlbumDialogTitle", - "newAlbumDialogNameLabel", - "newAlbumDialogNameLabelAlreadyExistsHelper", - "newAlbumDialogStorageLabel", "newVaultWarningDialogMessage", - "newVaultDialogTitle", - "configureVaultDialogTitle", - "vaultDialogLockModeWhenScreenOff", - "vaultDialogLockTypeLabel", - "patternDialogEnter", - "patternDialogConfirm", - "pinDialogEnter", - "pinDialogConfirm", - "passwordDialogEnter", - "passwordDialogConfirm", - "authenticateToConfigureVault", - "authenticateToUnlockVault", "vaultBinUsageDialogMessage", "renameAlbumDialogLabel", "renameAlbumDialogLabelAlreadyExistsHelper", @@ -1905,16 +1727,6 @@ "aboutDataUsageExternal" ], - "es": [ - "aboutDataUsageSectionTitle", - "aboutDataUsageData", - "aboutDataUsageCache", - "aboutDataUsageDatabase", - "aboutDataUsageMisc", - "aboutDataUsageInternal", - "aboutDataUsageExternal" - ], - "eu": [ "aboutDataUsageSectionTitle", "aboutDataUsageData", @@ -2436,16 +2248,6 @@ "filePickerUseThisFolder" ], - "fr": [ - "aboutDataUsageSectionTitle", - "aboutDataUsageData", - "aboutDataUsageCache", - "aboutDataUsageDatabase", - "aboutDataUsageMisc", - "aboutDataUsageInternal", - "aboutDataUsageExternal" - ], - "gl": [ "columnCount", "saveCopyButtonLabel", @@ -4313,36 +4115,7 @@ "filePickerUseThisFolder" ], - "hu": [ - "aboutDataUsageSectionTitle", - "aboutDataUsageData", - "aboutDataUsageCache", - "aboutDataUsageDatabase", - "aboutDataUsageMisc", - "aboutDataUsageInternal", - "aboutDataUsageExternal" - ], - - "id": [ - "aboutDataUsageSectionTitle", - "aboutDataUsageData", - "aboutDataUsageCache", - "aboutDataUsageDatabase", - "aboutDataUsageMisc", - "aboutDataUsageInternal", - "aboutDataUsageExternal" - ], - "it": [ - "saveCopyButtonLabel", - "applyTooltip", - "editorActionTransform", - "editorTransformCrop", - "editorTransformRotate", - "cropAspectRatioFree", - "cropAspectRatioOriginal", - "cropAspectRatioSquare", - "widgetTapUpdateWidget", "aboutDataUsageSectionTitle", "aboutDataUsageData", "aboutDataUsageCache", @@ -4410,16 +4183,6 @@ "tagEditorDiscardDialogMessage" ], - "ko": [ - "aboutDataUsageSectionTitle", - "aboutDataUsageData", - "aboutDataUsageCache", - "aboutDataUsageDatabase", - "aboutDataUsageMisc", - "aboutDataUsageInternal", - "aboutDataUsageExternal" - ], - "lt": [ "columnCount", "saveCopyButtonLabel", @@ -5954,15 +5717,6 @@ ], "pt": [ - "saveCopyButtonLabel", - "applyTooltip", - "editorActionTransform", - "editorTransformCrop", - "editorTransformRotate", - "cropAspectRatioFree", - "cropAspectRatioOriginal", - "cropAspectRatioSquare", - "widgetTapUpdateWidget", "aboutDataUsageSectionTitle", "aboutDataUsageData", "aboutDataUsageCache",