Skip to content

Commit 94677ab

Browse files
committed
Update ktlint to version 1.8.0
1 parent a69c711 commit 94677ab

File tree

8 files changed

+26
-8
lines changed

8 files changed

+26
-8
lines changed

app/src/androidTest/java/org/mozilla/reference/browser/ui/robots/AddToHomeScreenRobot.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class AddToHomeScreenRobot {
2222
when (Build.VERSION.SDK_INT) {
2323
// For Android Oreo(API 26) to Android 11(API 30), click the "Add Automatically" button
2424
in Build.VERSION_CODES.O..Build.VERSION_CODES.R -> clickAddAutomaticallyButton()
25+
2526
// For Android 12(API 31) to Vanilla Ice Cream(API 35), click the "Add to Home Screen" button
2627
in Build.VERSION_CODES.S..Build.VERSION_CODES.VANILLA_ICE_CREAM -> clickAddToHomeScreenButton()
2728
}

app/src/main/java/org/mozilla/reference/browser/BrowserActivity.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,15 @@ open class BrowserActivity : AppCompatActivity() {
125125
attrs: AttributeSet,
126126
): View? =
127127
when (name) {
128-
EngineView::class.java.name ->
128+
EngineView::class.java.name -> {
129129
components.core.engine
130130
.createView(context, attrs)
131131
.asView()
132-
else -> super.onCreateView(parent, name, context, attrs)
132+
}
133+
134+
else -> {
135+
super.onCreateView(parent, name, context, attrs)
136+
}
133137
}
134138

135139
private fun onNonFatalCrash(crash: Crash) {

app/src/main/java/org/mozilla/reference/browser/ExternalAppBrowserActivity.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class ExternalAppBrowserActivity : BrowserActivity() {
2626
WebAppManifest.DisplayMode.MINIMAL_UI,
2727
WebAppManifest.DisplayMode.BROWSER,
2828
-> null
29+
2930
else -> null
3031
}
3132

app/src/main/java/org/mozilla/reference/browser/addons/AddonSettingsActivity.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,15 @@ class AddonSettingsActivity : AppCompatActivity() {
5454
attrs: AttributeSet,
5555
): View? =
5656
when (name) {
57-
EngineView::class.java.name ->
57+
EngineView::class.java.name -> {
5858
components.core.engine
5959
.createView(context, attrs)
6060
.asView()
61-
else -> super.onCreateView(parent, name, context, attrs)
61+
}
62+
63+
else -> {
64+
super.onCreateView(parent, name, context, attrs)
65+
}
6266
}
6367

6468
/**

app/src/main/java/org/mozilla/reference/browser/addons/WebExtensionActionPopupActivity.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,15 @@ class WebExtensionActionPopupActivity : AppCompatActivity() {
5454
attrs: AttributeSet,
5555
): View? =
5656
when (name) {
57-
EngineView::class.java.name ->
57+
EngineView::class.java.name -> {
5858
components.core.engine
5959
.createView(context, attrs)
6060
.asView()
61-
else -> super.onCreateView(parent, name, context, attrs)
61+
}
62+
63+
else -> {
64+
super.onCreateView(parent, name, context, attrs)
65+
}
6266
}
6367

6468
/**

app/src/main/java/org/mozilla/reference/browser/settings/SettingsActivity.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ class SettingsActivity :
3737
onBackPressedDispatcher.onBackPressed()
3838
true
3939
}
40-
else -> super.onOptionsItemSelected(item)
40+
41+
else -> {
42+
super.onOptionsItemSelected(item)
43+
}
4144
}
4245

4346
override fun updateTitle(titleResId: Int) {

app/src/main/java/org/mozilla/reference/browser/tabs/TabsToolbar.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class TabsToolbar
3838
}
3939
closeTabsTray?.invoke()
4040
}
41+
4142
R.id.closeTab -> {
4243
when (isPrivateTray) {
4344
true -> tabsUseCases.removePrivateTabs.invoke()

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ androidx-test-uiautomator = "2.3.0"
4444
dependency-analysis = "3.4.1"
4545
detekt = "1.23.8"
4646
jspecify = "1.0.0"
47-
ktlint = "1.7.1"
47+
ktlint = "1.8.0"
4848

4949
# Third Party Testing
5050
hamcrest = "1.3"

0 commit comments

Comments
 (0)