ktlint: Format all extensions
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
@@ -13,18 +13,26 @@ fun PackageInfo.isValidApp(packageManager: PackageManager): Boolean {
|
||||
// Filter out core AOSP system apps
|
||||
if (this.applicationInfo!!.flags and ApplicationInfo.FLAG_SYSTEM != 0) {
|
||||
if (this.packageName.endsWith(".resources")) return false
|
||||
if (this.applicationInfo!!.loadLabel(packageManager).startsWith(this.packageName)) return false
|
||||
if (this.applicationInfo!!.loadLabel(packageManager).startsWith(this.packageName)) {
|
||||
return false
|
||||
}
|
||||
if (this.versionName?.endsWith("system image") == true) return false
|
||||
if (this.versionName?.endsWith("-initial") == true) return false
|
||||
if (this.versionName == Build.VERSION.RELEASE && PackageInfoCompat.getLongVersionCode(this) == Build.VERSION.SDK_INT.toLong()) return false
|
||||
if (this.versionName == Build.VERSION.RELEASE &&
|
||||
PackageInfoCompat.getLongVersionCode(this) == Build.VERSION.SDK_INT.toLong()
|
||||
) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
return when {
|
||||
isQAndAbove -> {
|
||||
Process.isApplicationUid(this.applicationInfo!!.uid) &&
|
||||
!this.applicationInfo!!.isResourceOverlay && !this.isApex
|
||||
!this.applicationInfo!!.isResourceOverlay && !this.isApex
|
||||
}
|
||||
|
||||
isNAndAbove -> Process.isApplicationUid(this.applicationInfo!!.uid)
|
||||
|
||||
else -> this.versionName != null
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user