From 97eeaa0b41965a54a1ef3f4828a165ad5b5e3439 Mon Sep 17 00:00:00 2001 From: maniac103 Date: Tue, 16 Apr 2024 20:37:14 +0200 Subject: [PATCH] Make code formatting comply to ktlint standards (#3649) Signed-off-by: Danny Baumann --- .editorconfig | 1 + .idea/codeStyles/Project.xml | 2 - .../org/openhab/habdroid/ui/MapViewHelper.kt | 20 +- .../habdroid/core/CloudMessagingHelper.kt | 39 ++-- .../habdroid/core/FcmRegistrationWorker.kt | 41 ++-- .../org/openhab/habdroid/ui/MapViewHelper.kt | 6 +- .../background/BackgroundTasksManager.kt | 76 ++++--- .../background/EventListenerService.kt | 15 +- .../habdroid/background/ItemUpdateWorker.kt | 39 ++-- .../ItemsControlsProviderService.kt | 17 +- .../background/NotificationUpdateObserver.kt | 76 ++++--- .../background/tiles/AbstractTileService.kt | 30 +-- .../habdroid/background/tiles/TileService1.kt | 2 +- .../background/tiles/TileService10.kt | 2 +- .../background/tiles/TileService11.kt | 2 +- .../background/tiles/TileService12.kt | 2 +- .../habdroid/background/tiles/TileService2.kt | 2 +- .../habdroid/background/tiles/TileService3.kt | 2 +- .../habdroid/background/tiles/TileService4.kt | 2 +- .../habdroid/background/tiles/TileService5.kt | 2 +- .../habdroid/background/tiles/TileService6.kt | 2 +- .../habdroid/background/tiles/TileService7.kt | 2 +- .../habdroid/background/tiles/TileService8.kt | 2 +- .../habdroid/background/tiles/TileService9.kt | 2 +- .../habdroid/core/NotificationHelper.kt | 48 ++--- .../core/connection/AbstractConnection.kt | 22 +-- .../habdroid/core/connection/Connection.kt | 2 + .../core/connection/ConnectionFactory.kt | 58 +++--- .../connection/ConnectionManagerHelper.kt | 6 + .../habdroid/model/CloudNotification.kt | 3 +- .../openhab/habdroid/model/IconResource.kt | 12 +- .../openhab/habdroid/model/LabeledValue.kt | 1 - .../org/openhab/habdroid/model/LinkedPage.kt | 18 +- .../java/org/openhab/habdroid/model/NfcTag.kt | 10 +- .../org/openhab/habdroid/model/ParsedState.kt | 7 +- .../habdroid/model/ServerConfiguration.kt | 2 +- .../habdroid/model/ServerProperties.kt | 4 + .../org/openhab/habdroid/model/Sitemap.kt | 24 +-- .../java/org/openhab/habdroid/model/Widget.kt | 12 +- .../habdroid/model/WidgetDataSource.kt | 8 +- .../org/openhab/habdroid/ui/AboutActivity.kt | 187 ++++++++++-------- .../habdroid/ui/AbstractBaseActivity.kt | 45 +++-- .../habdroid/ui/AbstractItemPickerActivity.kt | 20 +- .../habdroid/ui/BasicItemPickerActivity.kt | 1 - .../habdroid/ui/CloudNotificationAdapter.kt | 8 +- .../ui/CloudNotificationListFragment.kt | 6 +- .../habdroid/ui/ConnectionWebViewClient.kt | 1 - .../habdroid/ui/ImageWidgetActivity.kt | 1 - .../org/openhab/habdroid/ui/IntroActivity.kt | 2 - .../openhab/habdroid/ui/ItemPickerAdapter.kt | 1 - .../org/openhab/habdroid/ui/LogActivity.kt | 6 +- .../org/openhab/habdroid/ui/MainActivity.kt | 135 ++++++++----- .../habdroid/ui/NfcItemPickerActivity.kt | 24 ++- .../habdroid/ui/SelectionItemActivity.kt | 3 - .../habdroid/ui/TaskerItemPickerActivity.kt | 10 +- .../org/openhab/habdroid/ui/ViewExtensions.kt | 6 +- .../org/openhab/habdroid/ui/WidgetAdapter.kt | 27 ++- .../habdroid/ui/WidgetDetailBottomSheets.kt | 3 +- .../openhab/habdroid/ui/WidgetListFragment.kt | 164 +++++++-------- .../ui/activity/AbstractWebViewFragment.kt | 2 + .../habdroid/ui/activity/ContentController.kt | 141 ++++++++----- .../activity/PageConnectionHolderFragment.kt | 24 ++- .../ui/homescreenwidget/ItemUpdateWidget.kt | 10 +- .../homescreenwidget/VoiceWidgetWithIcon.kt | 1 - .../ui/preference/PreferencesActivity.kt | 1 + .../fragments/ConnectionSettingsFragment.kt | 6 +- .../fragments/MainSettingsFragment.kt | 5 +- .../fragments/ServerEditorFragment.kt | 8 +- .../fragments/TileSettingsFragment.kt | 14 +- .../widgets/ChartScalingPreference.kt | 1 - .../widgets/CustomInputTypePreference.kt | 1 - .../widgets/DeviceIdentifierPreference.kt | 9 +- .../widgets/ItemAndTogglePreference.kt | 4 +- .../widgets/ItemUpdatingPreference.kt | 3 +- .../preference/widgets/UrlInputPreference.kt | 1 - .../widgets/WifiSsidInputPreference.kt | 6 +- .../widget/RecyclerViewSwipeRefreshLayout.kt | 26 +-- .../habdroid/ui/widget/WidgetImageView.kt | 17 +- .../habdroid/ui/widget/WidgetSlider.kt | 9 +- .../habdroid/util/AsyncServiceResolver.kt | 1 + .../openhab/habdroid/util/ExtensionFuncs.kt | 43 ++-- .../org/openhab/habdroid/util/HttpClient.kt | 105 ++++++---- .../openhab/habdroid/util/MjpegInputStream.kt | 1 - .../org/openhab/habdroid/util/PrefKeys.kt | 1 + .../habdroid/util/SuggestedCommandsFactory.kt | 1 - .../habdroid/background/TileServicesTests.kt | 4 +- .../core/connection/ConnectionFactoryTest.kt | 29 +-- .../core/connection/DefaultConnectionTest.kt | 9 +- .../habdroid/model/IconResourceTest.kt | 7 - .../org/openhab/habdroid/model/ItemTest.kt | 63 +++--- .../org/openhab/habdroid/model/SitemapTest.kt | 53 +++-- .../org/openhab/habdroid/model/WidgetTest.kt | 23 ++- .../habdroid/util/PreferencesUtilTest.kt | 7 +- .../org/openhab/habdroid/util/UtilTest.kt | 51 +++-- 94 files changed, 1141 insertions(+), 819 deletions(-) diff --git a/.editorconfig b/.editorconfig index 054437f601..78b7fa3b32 100644 --- a/.editorconfig +++ b/.editorconfig @@ -12,6 +12,7 @@ insert_final_newline = true [*.{java,kt,xml}] max_line_length = 120 +ktlint_code_style = android_studio [*.yml] indent_size = 2 diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index 902fce96b0..cd165e646c 100644 --- a/.idea/codeStyles/Project.xml +++ b/.idea/codeStyles/Project.xml @@ -12,8 +12,6 @@ -