Formatting

This commit is contained in:
arkon
2022-04-08 16:44:23 -04:00
parent 2dfafa387b
commit 5afff31f72
197 changed files with 481 additions and 483 deletions

View File

@@ -50,8 +50,8 @@ class ExtensionUpdateJob(private val context: Context, workerParams: WorkerParam
context.resources.getQuantityString(
R.plurals.update_check_notification_ext_updates,
names.size,
names.size
)
names.size,
),
)
val extNames = names.joinToString(", ")
setContentText(extNames)
@@ -59,7 +59,7 @@ class ExtensionUpdateJob(private val context: Context, workerParams: WorkerParam
setSmallIcon(R.drawable.ic_extension_24dp)
setContentIntent(NotificationReceiver.openExtensionsPendingActivity(context))
setAutoCancel(true)
}
},
)
}
}
@@ -79,7 +79,7 @@ class ExtensionUpdateJob(private val context: Context, workerParams: WorkerParam
2,
TimeUnit.DAYS,
3,
TimeUnit.HOURS
TimeUnit.HOURS,
)
.addTag(TAG)
.setConstraints(constraints)

View File

@@ -85,7 +85,7 @@ internal class ExtensionGithubApi {
hasChangelog = it.hasChangelog == 1,
sources = it.sources?.toExtensionSources() ?: emptyList(),
apkName = it.apk,
iconUrl = "${REPO_URL_PREFIX}icon/${it.apk.replace(".apk", ".png")}"
iconUrl = "${REPO_URL_PREFIX}icon/${it.apk.replace(".apk", ".png")}",
)
}
}
@@ -95,7 +95,7 @@ internal class ExtensionGithubApi {
AvailableExtensionSources(
name = it.name,
id = it.id,
baseUrl = it.baseUrl
baseUrl = it.baseUrl,
)
}
}

View File

@@ -70,7 +70,7 @@ class PackageInstallerInstaller(private val service: Service) : Installer(servic
service,
activeSession!!.second,
Intent(INSTALL_ACTION),
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) PendingIntent.FLAG_MUTABLE else 0
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) PendingIntent.FLAG_MUTABLE else 0,
).intentSender
session.commit(intentSender)
}

View File

@@ -249,7 +249,7 @@ internal class ExtensionInstaller(private val context: Context) {
downloadManager.query(query).use { cursor ->
if (cursor.moveToFirst()) {
val localUri = cursor.getString(
cursor.getColumnIndexOrThrow(DownloadManager.COLUMN_LOCAL_URI)
cursor.getColumnIndexOrThrow(DownloadManager.COLUMN_LOCAL_URI),
).removePrefix(FILE_SCHEME)
installApk(id, File(localUri).getUriCompat(context))

View File

@@ -120,7 +120,7 @@ internal object ExtensionLoader {
if (libVersion < LIB_VERSION_MIN || libVersion > LIB_VERSION_MAX) {
val exception = Exception(
"Lib version is $libVersion, while only versions " +
"$LIB_VERSION_MIN to $LIB_VERSION_MAX are allowed"
"$LIB_VERSION_MIN to $LIB_VERSION_MAX are allowed",
)
logcat(LogPriority.WARN, exception)
return LoadResult.Error(exception)
@@ -190,7 +190,7 @@ internal object ExtensionLoader {
sources = sources,
pkgFactory = appInfo.metaData.getString(METADATA_SOURCE_FACTORY),
isUnofficial = signatureHash != officialSignature,
icon = context.getApplicationIcon(pkgName)
icon = context.getApplicationIcon(pkgName),
)
return LoadResult.Success(extension)
}