ktlint: Format source directories other than main

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
Aayush Gupta
2025-12-30 12:07:40 +08:00
parent c218e8197f
commit 00c07d0a98
8 changed files with 20 additions and 30 deletions

View File

@@ -144,19 +144,17 @@ class InstallerStatusReceiver : BaseInstallerStatusReceiver() {
}
}
private fun isHuaweiSilentInstallSupported(context: Context): Boolean {
return try {
val applicationInfo: ApplicationInfo = context.packageManager.getApplicationInfo(
PACKAGE_NAME_APP_GALLERY,
PackageManager.GET_META_DATA
)
private fun isHuaweiSilentInstallSupported(context: Context): Boolean = try {
val applicationInfo: ApplicationInfo = context.packageManager.getApplicationInfo(
PACKAGE_NAME_APP_GALLERY,
PackageManager.GET_META_DATA
)
val supportFunction = applicationInfo.metaData.getInt("appgallery_support_function")
Log.i(TAG, "Huawei silent install support function: $supportFunction")
val supportFunction = applicationInfo.metaData.getInt("appgallery_support_function")
Log.i(TAG, "Huawei silent install support function: $supportFunction")
(supportFunction and (1 shl 5)) != 0
} catch (e: Exception) {
false
}
(supportFunction and (1 shl 5)) != 0
} catch (e: Exception) {
false
}
}

View File

@@ -7,9 +7,7 @@ object FlavouredUtil : IFlavouredUtil {
override val defaultDispensers: Set<String> = emptySet()
override fun promptMicroGInstall(context: Context): Boolean {
return isHuawei &&
PackageUtil.hasSupportedAppGallery(context) &&
!PackageUtil.isMicroGBundleInstalled(context)
}
override fun promptMicroGInstall(context: Context): Boolean = isHuawei &&
PackageUtil.hasSupportedAppGallery(context) &&
!PackageUtil.isMicroGBundleInstalled(context)
}