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