ktlint: Final formatting fixes
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
@@ -50,7 +50,7 @@ object Constants {
|
|||||||
const val GITLAB_URL = "https://gitlab.com/AuroraOSS/AuroraStore"
|
const val GITLAB_URL = "https://gitlab.com/AuroraOSS/AuroraStore"
|
||||||
const val URL_DISPENSER = "https://auroraoss.com/api/auth"
|
const val URL_DISPENSER = "https://auroraoss.com/api/auth"
|
||||||
|
|
||||||
//ACCOUNTS
|
// ACCOUNTS
|
||||||
const val ACCOUNT_SIGNED_IN = "ACCOUNT_SIGNED_IN"
|
const val ACCOUNT_SIGNED_IN = "ACCOUNT_SIGNED_IN"
|
||||||
const val ACCOUNT_TYPE = "ACCOUNT_TYPE"
|
const val ACCOUNT_TYPE = "ACCOUNT_TYPE"
|
||||||
const val ACCOUNT_EMAIL_PLAIN = "ACCOUNT_EMAIL_PLAIN"
|
const val ACCOUNT_EMAIL_PLAIN = "ACCOUNT_EMAIL_PLAIN"
|
||||||
|
|||||||
@@ -28,7 +28,8 @@ fun PackageInfo.isValidApp(packageManager: PackageManager): Boolean {
|
|||||||
return when {
|
return when {
|
||||||
isQAndAbove -> {
|
isQAndAbove -> {
|
||||||
Process.isApplicationUid(this.applicationInfo!!.uid) &&
|
Process.isApplicationUid(this.applicationInfo!!.uid) &&
|
||||||
!this.applicationInfo!!.isResourceOverlay && !this.isApex
|
!this.applicationInfo!!.isResourceOverlay &&
|
||||||
|
!this.isApex
|
||||||
}
|
}
|
||||||
|
|
||||||
isNAndAbove -> Process.isApplicationUid(this.applicationInfo!!.uid)
|
isNAndAbove -> Process.isApplicationUid(this.applicationInfo!!.uid)
|
||||||
|
|||||||
@@ -124,9 +124,8 @@ private fun ScreenContent(
|
|||||||
|
|
||||||
Button(
|
Button(
|
||||||
modifier = buttonWidthModifier,
|
modifier = buttonWidthModifier,
|
||||||
enabled =
|
enabled = !isFinalPage() ||
|
||||||
!isFinalPage() ||
|
(!uiState.isMicroBundleChecked || uiState.isMicroGBundleInstalled),
|
||||||
(!uiState.isMicroBundleChecked || uiState.isMicroGBundleInstalled),
|
|
||||||
onClick = {
|
onClick = {
|
||||||
when {
|
when {
|
||||||
isFinalPage() -> onFinishOnboarding()
|
isFinalPage() -> onFinishOnboarding()
|
||||||
|
|||||||
@@ -206,7 +206,8 @@ class DownloadWorker @AssistedInject constructor(
|
|||||||
private suspend fun onSuccess(): Result {
|
private suspend fun onSuccess(): Result {
|
||||||
return withContext(NonCancellable) {
|
return withContext(NonCancellable) {
|
||||||
return@withContext try {
|
return@withContext try {
|
||||||
if (BuildConfig.FLAVOR == FLAVOUR_HUAWEI && download.requiresGMS &&
|
if (BuildConfig.FLAVOR == FLAVOUR_HUAWEI &&
|
||||||
|
download.requiresGMS &&
|
||||||
PackageUtil.hasMicroGCompanion(context)
|
PackageUtil.hasMicroGCompanion(context)
|
||||||
) {
|
) {
|
||||||
appInstaller.getMicroGInstaller().install(download)
|
appInstaller.getMicroGInstaller().install(download)
|
||||||
|
|||||||
@@ -104,7 +104,6 @@ class ExportWorker @AssistedInject constructor(
|
|||||||
|
|
||||||
notificationManager = context.getSystemService<NotificationManager>()!!
|
notificationManager = context.getSystemService<NotificationManager>()!!
|
||||||
|
|
||||||
@Suppress("ktlint:standard:mixed-condition-operators")
|
|
||||||
if (packageName.isNullOrEmpty() || isDownload && versionCode == -1L) {
|
if (packageName.isNullOrEmpty() || isDownload && versionCode == -1L) {
|
||||||
Log.e(TAG, "Input data is corrupt, bailing out!")
|
Log.e(TAG, "Input data is corrupt, bailing out!")
|
||||||
notifyStatus(displayName ?: String(), uri, false)
|
notifyStatus(displayName ?: String(), uri, false)
|
||||||
|
|||||||
@@ -123,11 +123,12 @@ object PackageUtil {
|
|||||||
context,
|
context,
|
||||||
PACKAGE_NAME_PLAY_STORE,
|
PACKAGE_NAME_PLAY_STORE,
|
||||||
VERSION_CODE_MICROG_COMPANION_MIN
|
VERSION_CODE_MICROG_COMPANION_MIN
|
||||||
) && hasActivity(
|
) &&
|
||||||
context,
|
hasActivity(
|
||||||
PACKAGE_NAME_PLAY_STORE,
|
context,
|
||||||
MICROG_INSTALL_ACTIVITY
|
PACKAGE_NAME_PLAY_STORE,
|
||||||
)
|
MICROG_INSTALL_ACTIVITY
|
||||||
|
)
|
||||||
|
|
||||||
fun isInstalled(context: Context, packageName: String, versionCode: Long? = null): Boolean =
|
fun isInstalled(context: Context, packageName: String, versionCode: Long? = null): Boolean =
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -41,8 +41,10 @@ open class GenericCarouselController(private val callbacks: Callbacks) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
open fun applyFilter(streamBundle: StreamCluster): Boolean {
|
open fun applyFilter(streamBundle: StreamCluster): Boolean {
|
||||||
return streamBundle.clusterTitle.isNotBlank() && // Filter noisy cluster
|
return streamBundle.clusterTitle.isNotBlank() &&
|
||||||
streamBundle.clusterAppList.isNotEmpty() && // Filter empty clusters
|
// Filter noisy cluster
|
||||||
|
streamBundle.clusterAppList.isNotEmpty() &&
|
||||||
|
// Filter empty clusters
|
||||||
streamBundle.clusterAppList.count() > 1 // Filter clusters with single apps (promotions)
|
streamBundle.clusterAppList.count() > 1 // Filter clusters with single apps (promotions)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -71,8 +71,8 @@ class BlacklistViewModel @Inject constructor(
|
|||||||
if (query.isNotBlank()) {
|
if (query.isNotBlank()) {
|
||||||
_filteredPackages.value = packages.value!!
|
_filteredPackages.value = packages.value!!
|
||||||
.filter {
|
.filter {
|
||||||
it.applicationInfo!!.loadLabel(context.packageManager)
|
it.applicationInfo!!.loadLabel(context.packageManager).contains(query, true) ||
|
||||||
.contains(query, true) || it.packageName.contains(query, true)
|
it.packageName.contains(query, true)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
_filteredPackages.value = packages.value
|
_filteredPackages.value = packages.value
|
||||||
|
|||||||
Reference in New Issue
Block a user