2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-19 09:25:34 +00:00

[fenix] For https://github.com/mozilla-mobile/fenix/issues/21776 - Class member can have 'private' visibility

This commit is contained in:
Gabriel Luong 2021-10-07 13:50:49 -04:00 committed by mergify[bot]
parent 230536c9b7
commit 759194a625
13 changed files with 17 additions and 17 deletions

View File

@ -14,7 +14,7 @@ import mozilla.components.service.fxa.ServerConfig
object FxaServer { object FxaServer {
private const val CLIENT_ID = "a2270f727f45f648" private const val CLIENT_ID = "a2270f727f45f648"
const val REDIRECT_URL = "urn:ietf:wg:oauth:2.0:oob:oauth-redirect-webchannel" private const val REDIRECT_URL = "urn:ietf:wg:oauth:2.0:oob:oauth-redirect-webchannel"
@Suppress("UNUSED_PARAMETER") @Suppress("UNUSED_PARAMETER")
fun config(context: Context): ServerConfig { fun config(context: Context): ServerConfig {

View File

@ -6,7 +6,7 @@ import androidx.test.espresso.IdlingResource
import mozilla.components.feature.addons.ui.AddonInstallationDialogFragment import mozilla.components.feature.addons.ui.AddonInstallationDialogFragment
class AddonsInstallingIdlingResource( class AddonsInstallingIdlingResource(
val fragmentManager: FragmentManager private val fragmentManager: FragmentManager
) : ) :
IdlingResource { IdlingResource {
private var resourceCallback: IdlingResource.ResourceCallback? = null private var resourceCallback: IdlingResource.ResourceCallback? = null

View File

@ -916,7 +916,7 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
} }
} }
fun updateSecureWindowFlags(mode: BrowsingMode = browsingModeManager.mode) { private fun updateSecureWindowFlags(mode: BrowsingMode = browsingModeManager.mode) {
if (mode == BrowsingMode.Private && !settings().allowScreenshotsInPrivateMode) { if (mode == BrowsingMode.Private && !settings().allowScreenshotsInPrivateMode) {
window.addFlags(FLAG_SECURE) window.addFlags(FLAG_SECURE)
} else { } else {

View File

@ -78,7 +78,7 @@ class FenixSnackbar private constructor(
companion object { companion object {
const val LENGTH_LONG = Snackbar.LENGTH_LONG const val LENGTH_LONG = Snackbar.LENGTH_LONG
const val LENGTH_SHORT = Snackbar.LENGTH_SHORT const val LENGTH_SHORT = Snackbar.LENGTH_SHORT
const val LENGTH_ACCESSIBLE = 15000 /* 15 seconds in ms */ private const val LENGTH_ACCESSIBLE = 15000 /* 15 seconds in ms */
const val LENGTH_INDEFINITE = Snackbar.LENGTH_INDEFINITE const val LENGTH_INDEFINITE = Snackbar.LENGTH_INDEFINITE
private const val minTextSize = 12 private const val minTextSize = 12

View File

@ -24,9 +24,9 @@ import org.mozilla.geckoview.GeckoRuntimeSettings
object GeckoProvider { object GeckoProvider {
private var runtime: GeckoRuntime? = null private var runtime: GeckoRuntime? = null
const val CN_UPDATE_URL = private const val CN_UPDATE_URL =
"https://sb.firefox.com.cn/downloads?client=SAFEBROWSING_ID&appver=%MAJOR_VERSION%&pver=2.2" "https://sb.firefox.com.cn/downloads?client=SAFEBROWSING_ID&appver=%MAJOR_VERSION%&pver=2.2"
const val CN_GET_HASH_URL = private const val CN_GET_HASH_URL =
"https://sb.firefox.com.cn/gethash?client=SAFEBROWSING_ID&appver=%MAJOR_VERSION%&pver=2.2" "https://sb.firefox.com.cn/gethash?client=SAFEBROWSING_ID&appver=%MAJOR_VERSION%&pver=2.2"
@Synchronized @Synchronized

View File

@ -115,7 +115,7 @@ class SwipeToDeleteCallback(
companion object { companion object {
const val BACKGROUND_CORNER_OFFSET = 40 const val BACKGROUND_CORNER_OFFSET = 40
const val MARGIN = 32 const val MARGIN = 32
const val DENSITY_CONVERSION = 160f private const val DENSITY_CONVERSION = 160f
private fun draw( private fun draw(
background: Drawable, background: Drawable,

View File

@ -55,7 +55,7 @@ class DownloadView(
var mode: DownloadFragmentState.Mode = DownloadFragmentState.Mode.Normal var mode: DownloadFragmentState.Mode = DownloadFragmentState.Mode.Normal
private set private set
val downloadAdapter = DownloadAdapter(interactor) private val downloadAdapter = DownloadAdapter(interactor)
private val layoutManager = LinearLayoutManager(container.context) private val layoutManager = LinearLayoutManager(container.context)
init { init {
@ -104,7 +104,7 @@ class DownloadView(
} }
} }
fun updateEmptyState(userHasDownloads: Boolean) { private fun updateEmptyState(userHasDownloads: Boolean) {
binding.downloadList.isVisible = userHasDownloads binding.downloadList.isVisible = userHasDownloads
binding.downloadEmptyView.isVisible = !userHasDownloads binding.downloadEmptyView.isVisible = !userHasDownloads
if (!userHasDownloads) { if (!userHasDownloads) {

View File

@ -198,7 +198,7 @@ class AddSearchEngineFragment :
} }
} }
fun checkForErrors(name: String, searchString: String): Boolean { private fun checkForErrors(name: String, searchString: String): Boolean {
return when { return when {
name.isEmpty() -> { name.isEmpty() -> {
customSearchEngine.customSearchEngineNameField.error = resources customSearchEngine.customSearchEngineNameField.error = resources

View File

@ -42,7 +42,7 @@ class RadioSearchEngineListPreference @JvmOverloads constructor(
attrs: AttributeSet? = null, attrs: AttributeSet? = null,
defStyleAttr: Int = android.R.attr.preferenceStyle defStyleAttr: Int = android.R.attr.preferenceStyle
) : Preference(context, attrs, defStyleAttr), CompoundButton.OnCheckedChangeListener { ) : Preference(context, attrs, defStyleAttr), CompoundButton.OnCheckedChangeListener {
val itemResId: Int private val itemResId: Int
get() = R.layout.search_engine_radio_button get() = R.layout.search_engine_radio_button
init { init {

View File

@ -34,7 +34,7 @@ class TabGroupViewHolder(
) : RecyclerView.ViewHolder(itemView) { ) : RecyclerView.ViewHolder(itemView) {
private val binding = TabGroupItemBinding.bind(itemView) private val binding = TabGroupItemBinding.bind(itemView)
lateinit var groupListAdapter: TabGroupListAdapter private lateinit var groupListAdapter: TabGroupListAdapter
fun bind( fun bind(
group: TabGroup, group: TabGroup,

View File

@ -13,9 +13,9 @@ import android.os.Build
*/ */
object ManufacturerCodes { object ManufacturerCodes {
const val HUAWEI: String = "HUAWEI" const val HUAWEI: String = "HUAWEI"
const val LG = "LGE" private const val LG = "LGE"
const val ONE_PLUS: String = "OnePlus" const val ONE_PLUS: String = "OnePlus"
const val SAMSUNG = "samsung" private const val SAMSUNG = "samsung"
val isLG get() = Build.MANUFACTURER.equals(LG, ignoreCase = true) val isLG get() = Build.MANUFACTURER.equals(LG, ignoreCase = true)
val isSamsung get() = Build.MANUFACTURER.equals(SAMSUNG, ignoreCase = true) val isSamsung get() = Build.MANUFACTURER.equals(SAMSUNG, ignoreCase = true)

View File

@ -1180,7 +1180,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
featureFlag = FeatureFlags.addressesFeature featureFlag = FeatureFlags.addressesFeature
) )
var isHistoryMetadataEnabled by booleanPreference( private var isHistoryMetadataEnabled by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_history_metadata_feature), appContext.getPreferenceKey(R.string.pref_key_history_metadata_feature),
default = false default = false
) )

View File

@ -45,11 +45,11 @@ class SitePermissionsWifiIntegration(
} }
} }
fun addWifiConnectedListener() { private fun addWifiConnectedListener() {
wifiConnectionMonitor.addOnWifiConnectedChangedListener(wifiConnectedListener) wifiConnectionMonitor.addOnWifiConnectedChangedListener(wifiConnectedListener)
} }
fun removeWifiConnectedListener() { private fun removeWifiConnectedListener() {
wifiConnectionMonitor.removeOnWifiConnectedChangedListener(wifiConnectedListener) wifiConnectionMonitor.removeOnWifiConnectedChangedListener(wifiConnectedListener)
} }