Skip to content

Commit 2213d11

Browse files
rvandermeulenmergify[bot]
authored andcommitted
Fix new issues
1 parent 562e5f7 commit 2213d11

File tree

16 files changed

+35
-30
lines changed

16 files changed

+35
-30
lines changed

app/src/androidTest/java/org/mozilla/reference/browser/helpers/BrowserActivityTestRule.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import org.mozilla.reference.browser.BrowserActivity
1919
class BrowserActivityTestRule(
2020
initialTouchMode: Boolean = false,
2121
launchActivity: Boolean = true,
22-
2322
) : ActivityTestRule<BrowserActivity>(BrowserActivity::class.java, initialTouchMode, launchActivity) {
2423

2524
/**

app/src/androidTest/java/org/mozilla/reference/browser/helpers/MockWebServer.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ class AndroidAssetDispatcher : Dispatcher() {
5454
assetManager.open(pathWithoutQueryParams!!).use { inputStream ->
5555
return fileToResponse(pathWithoutQueryParams, inputStream)
5656
}
57-
} catch (e: IOException) { // e.g. file not found.
57+
} catch (e: IOException) {
58+
// e.g. file not found.
5859
// We're on a background thread so we need to forward the exception to the main thread.
5960
mainThreadHandler.postAtFrontOfQueue { throw e }
6061
return MockResponse().setResponseCode(HTTP_NOT_FOUND)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class CustomTabsTest {
2727
@get:Rule
2828
val activityTestRule = BrowserActivityTestRule()
2929

30-
@get: Rule
30+
@get:Rule
3131
val intentReceiverActivityTestRule = ActivityTestRule(
3232
IntentReceiverActivity::class.java,
3333
true,

app/src/main/java/org/mozilla/reference/browser/autofill/AutofillPreference.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ import androidx.preference.Preference
1717
import androidx.preference.PreferenceViewHolder
1818
import org.mozilla.reference.browser.R
1919

20-
class AutofillPreference @JvmOverloads constructor(
20+
class AutofillPreference
21+
@JvmOverloads
22+
constructor(
2123
context: Context,
2224
attrs: AttributeSet? = null,
2325
) : Preference(context, attrs) {

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ abstract class BaseBrowserFragment : Fragment(), UserInteractionHandler, Activit
9595
fullScreenFeature,
9696
findInPageIntegration,
9797
toolbarIntegration,
98-
9998
sessionFeature,
10099
lastTabFeature,
101100
)

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,24 +102,20 @@ class CustomTabsIntegration(
102102
private fun menuItems(sessionState: SessionState?): List<MenuCandidate> {
103103
return listOf(
104104
menuToolbar(session),
105-
106105
TextMenuCandidate("Share") {
107106
val url = sessionState?.content?.url.orEmpty()
108107
context.share(url)
109108
},
110-
111109
CompoundMenuCandidate(
112110
text = "Request desktop site",
113111
isChecked = sessionState?.content?.desktopMode == true,
114112
end = CompoundMenuCandidate.ButtonType.SWITCH,
115113
) { checked ->
116114
sessionUseCases.requestDesktopSite.invoke(checked, sessionState?.id)
117115
},
118-
119116
TextMenuCandidate("Find in Page") {
120117
FindInPageIntegration.launch?.invoke()
121118
},
122-
123119
TextMenuCandidate("Open in Browser") {
124120
// Release the session from this view so that it can immediately be rendered by a different view
125121
engineView.release()

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class ExternalAppBrowserFragment : BaseBrowserFragment(), UserInteractionHandler
8484
) { toolbarVisible ->
8585
toolbar.isVisible = toolbarVisible
8686
webAppToolbarShouldBeVisible = toolbarVisible
87-
if (!toolbarVisible) { engineView.setDynamicToolbarMaxHeight(0) }
87+
if (!toolbarVisible) engineView.setDynamicToolbarMaxHeight(0)
8888
},
8989
owner = this,
9090
view = toolbar,

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -105,20 +105,17 @@ class ToolbarIntegration(
105105
private fun sessionMenuItems(sessionState: SessionState): List<MenuCandidate> {
106106
return listOfNotNull(
107107
menuToolbar(sessionState),
108-
109108
TextMenuCandidate("Share") {
110109
val url = sessionState.content.url
111110
context.share(url)
112111
},
113-
114112
CompoundMenuCandidate(
115113
text = "Request desktop site",
116114
isChecked = sessionState.content.desktopMode,
117115
end = CompoundMenuCandidate.ButtonType.SWITCH,
118116
) { checked ->
119117
sessionUseCases.requestDesktopSite.invoke(checked)
120118
},
121-
122119
if (webAppUseCases.isPinningSupported()) {
123120
TextMenuCandidate(
124121
text = "Add to homescreen",
@@ -131,7 +128,6 @@ class ToolbarIntegration(
131128
} else {
132129
null
133130
},
134-
135131
TextMenuCandidate(
136132
text = "Find in Page",
137133
) {
@@ -153,19 +149,16 @@ class ToolbarIntegration(
153149
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK
154150
context.startActivity(intent)
155151
},
156-
157152
TextMenuCandidate(text = "Synced Tabs") {
158153
val intent = Intent(context, SyncedTabsActivity::class.java)
159154
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK
160155
context.startActivity(intent)
161156
},
162-
163157
TextMenuCandidate(text = "Report issue") {
164158
tabsUseCases.addTab(
165159
url = "https://github.com/mozilla-mobile/reference-browser/issues/new",
166160
)
167161
},
168-
169162
TextMenuCandidate(text = "Settings") {
170163
val intent = Intent(context, SettingsActivity::class.java)
171164
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK

app/src/main/java/org/mozilla/reference/browser/components/Services.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ class Services(
2828
FirefoxAccountsAuthFeature(
2929
accountManager,
3030
redirectUrl = BackgroundServices.REDIRECT_URL,
31-
) {
32-
_, authUrl ->
31+
) { _, authUrl ->
3332
MainScope().launch {
3433
tabsUseCases.addTab.invoke(authUrl)
3534
}

app/src/main/java/org/mozilla/reference/browser/ext/Context.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ val Context.application: BrowserApplication
3030
val Context.components: Components
3131
get() = application.components
3232

33-
fun Context.getPreferenceKey(@StringRes resourceId: Int): String =
33+
fun Context.getPreferenceKey(
34+
@StringRes resourceId: Int,
35+
): String =
3436
resources.getString(resourceId)
3537

3638
/**

0 commit comments

Comments
 (0)