ktlint: Address property and variable name violations
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
@@ -45,8 +45,10 @@ import javax.inject.Singleton
|
||||
@Singleton
|
||||
class HttpClient @Inject constructor(private val okHttpClient: OkHttpClient): IHttpClient {
|
||||
|
||||
private val POST = "POST"
|
||||
private val GET = "GET"
|
||||
companion object {
|
||||
private const val POST = "POST"
|
||||
private const val GET = "GET"
|
||||
}
|
||||
|
||||
private val _responseCode = MutableStateFlow(100)
|
||||
override val responseCode: StateFlow<Int>
|
||||
|
||||
@@ -35,7 +35,9 @@ class BlacklistProvider @Inject constructor(
|
||||
@ApplicationContext val context: Context,
|
||||
) {
|
||||
|
||||
private val PREFERENCE_BLACKLIST = "PREFERENCE_BLACKLIST"
|
||||
companion object {
|
||||
private const val PREFERENCE_BLACKLIST = "PREFERENCE_BLACKLIST"
|
||||
}
|
||||
|
||||
var blacklist: MutableSet<String>
|
||||
set(value) = Preferences.putString(
|
||||
|
||||
@@ -25,8 +25,11 @@ import androidx.core.content.pm.PackageInfoCompat
|
||||
import com.aurora.store.util.PackageUtil.getPackageInfo
|
||||
|
||||
class NativeGsfVersionProvider(context: Context, isExport: Boolean = false) {
|
||||
private val GOOGLE_SERVICES_PACKAGE_ID = "com.google.android.gms"
|
||||
private val GOOGLE_VENDING_PACKAGE_ID = "com.android.vending"
|
||||
|
||||
companion object {
|
||||
private const val GOOGLE_SERVICES_PACKAGE_ID = "com.google.android.gms"
|
||||
private const val GOOGLE_VENDING_PACKAGE_ID = "com.android.vending"
|
||||
}
|
||||
|
||||
// Preferred defaults, not any specific reason they just work fine.
|
||||
var gsfVersionCode = 203019037L
|
||||
|
||||
@@ -41,7 +41,9 @@ import javax.inject.Singleton
|
||||
@Singleton
|
||||
open class SpoofDeviceProvider(private val context: Context) {
|
||||
|
||||
private val SUFFIX = ".properties"
|
||||
companion object {
|
||||
private const val SUFFIX = ".properties"
|
||||
}
|
||||
|
||||
val availableDeviceProperties: List<Properties>
|
||||
get() {
|
||||
|
||||
@@ -77,6 +77,10 @@ class DownloadWorker @AssistedInject constructor(
|
||||
@Assisted workerParams: WorkerParameters
|
||||
) : AuthWorker(authProvider, context, workerParams) {
|
||||
|
||||
companion object {
|
||||
private const val NOTIFICATION_ID: Int = 200
|
||||
}
|
||||
|
||||
private lateinit var download: Download
|
||||
|
||||
private val notificationManager = context.getSystemService<NotificationManager>()!!
|
||||
@@ -86,8 +90,6 @@ class DownloadWorker @AssistedInject constructor(
|
||||
private var totalProgress = 0
|
||||
private var downloadedBytes = 0L
|
||||
|
||||
private val NOTIFICATION_ID: Int = 200
|
||||
|
||||
inner class NoNetworkException : Exception(context.getString(R.string.title_no_network))
|
||||
inner class NothingToDownloadException : Exception(context.getString(R.string.purchase_no_file))
|
||||
inner class DownloadFailedException : Exception(context.getString(R.string.download_failed))
|
||||
|
||||
@@ -44,6 +44,9 @@ class ExportWorker @AssistedInject constructor(
|
||||
private const val VERSION_CODE = "VERSION_CODE"
|
||||
private const val DISPLAY_NAME = "DISPLAY_NAME"
|
||||
|
||||
private const val NOTIFICATION_ID = 500
|
||||
private const val NOTIFICATION_ID_FGS = 501
|
||||
|
||||
/**
|
||||
* Exports the installed package to the given URI
|
||||
* @param app App to export
|
||||
@@ -91,8 +94,6 @@ class ExportWorker @AssistedInject constructor(
|
||||
}
|
||||
|
||||
private lateinit var notificationManager: NotificationManager
|
||||
private val NOTIFICATION_ID = 500
|
||||
private val NOTIFICATION_ID_FGS = 501
|
||||
|
||||
override suspend fun doWork(): Result {
|
||||
val isDownload = inputData.getBoolean(IS_DOWNLOAD, false)
|
||||
|
||||
@@ -42,7 +42,7 @@ class InstallerViewModel @Inject constructor(
|
||||
private val _error = MutableSharedFlow<String>()
|
||||
val error = _error.asSharedFlow()
|
||||
|
||||
private var _installerId: Int
|
||||
private var installerId: Int
|
||||
get() = sharedPreferences.getInt(PREFERENCE_INSTALLER_ID, 0)
|
||||
set(value) = sharedPreferences.edit { putInt(PREFERENCE_INSTALLER_ID, value) }
|
||||
|
||||
@@ -50,7 +50,7 @@ class InstallerViewModel @Inject constructor(
|
||||
key = PREFERENCE_INSTALLER_ID,
|
||||
scope = viewModelScope,
|
||||
initial = AppInstaller.getCurrentInstaller(context).ordinal,
|
||||
valueProvider = { _installerId }
|
||||
valueProvider = { installerId }
|
||||
)
|
||||
|
||||
init {
|
||||
|
||||
@@ -49,9 +49,9 @@ class SearchViewModel @Inject constructor(
|
||||
private val _suggestions = MutableStateFlow<List<SearchSuggestEntry>>(emptyList())
|
||||
val suggestions = _suggestions.asStateFlow()
|
||||
|
||||
private val _filter = MutableStateFlow(SearchFilter())
|
||||
private val searchFilter = MutableStateFlow(SearchFilter())
|
||||
private val _apps = MutableStateFlow<PagingData<App>>(PagingData.empty())
|
||||
val apps = combine(_filter, _apps) { filter, pagingData ->
|
||||
val apps = combine(searchFilter, _apps) { filter, pagingData ->
|
||||
pagingData.filter { app ->
|
||||
when {
|
||||
filter.noAds && app.containsAds -> false
|
||||
@@ -65,7 +65,7 @@ class SearchViewModel @Inject constructor(
|
||||
}.stateIn(viewModelScope, SharingStarted.WhileSubscribed(), PagingData.empty())
|
||||
|
||||
fun filterResults(filter: SearchFilter) {
|
||||
_filter.value = filter
|
||||
searchFilter.value = filter
|
||||
}
|
||||
|
||||
fun search(query: String) {
|
||||
|
||||
Reference in New Issue
Block a user