targets/android: Bump ktfmt to 0.53 and reformat it

Signed-off-by: utzcoz <utzcoz@outlook.com>
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2382>
This commit is contained in:
utzcoz 2024-12-28 13:29:57 +08:00 committed by korejan
parent b04fbb6756
commit ab48d41724
5 changed files with 12 additions and 12 deletions

View file

@ -28,7 +28,7 @@ spotless {
kotlin {
target 'src/main/java/**/*.kt'
// Use ktfmt(https://github.com/facebook/ktfmt) as the default Kotlin formatter. .
ktfmt('0.43').kotlinlangStyle()
ktfmt("$ktfmtVersion").kotlinlangStyle()
}
}

View file

@ -30,7 +30,7 @@ class DisplayOverOtherAppsStatusFragment : Fragment() {
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
savedInstanceState: Bundle?,
): View? {
val view =
inflater.inflate(R.layout.fragment_display_over_other_app_status, container, false)
@ -50,7 +50,7 @@ class DisplayOverOtherAppsStatusFragment : Fragment() {
getString(
R.string.msg_display_over_other_apps,
if (displayOverOtherAppsEnabled) getString(R.string.enabled)
else getString(R.string.disabled)
else getString(R.string.disabled),
)
tv.text = Html.fromHtml(msg, Html.FROM_HTML_MODE_LEGACY)
}
@ -62,7 +62,7 @@ class DisplayOverOtherAppsStatusFragment : Fragment() {
val intent =
Intent(
Settings.ACTION_MANAGE_OVERLAY_PERMISSION,
Uri.parse("package:" + context!!.packageName)
Uri.parse("package:" + context!!.packageName),
)
startActivityForResult(intent, REQUEST_CODE_DISPLAY_OVER_OTHER_APPS)
}

View file

@ -51,12 +51,12 @@ class ServiceNotificationImpl @Inject constructor() : IServiceNotification {
NotificationChannel(
CHANNEL_ID,
nameAndLogoProvider.getLocalizedRuntimeName(),
NotificationManager.IMPORTANCE_LOW
NotificationManager.IMPORTANCE_LOW,
)
notificationChannel.description =
context.getString(
R.string.channel_desc,
nameAndLogoProvider.getLocalizedRuntimeName()
nameAndLogoProvider.getLocalizedRuntimeName(),
)
notificationChannel.setShowBadge(false)
notificationChannel.enableLights(false)
@ -72,7 +72,7 @@ class ServiceNotificationImpl @Inject constructor() : IServiceNotification {
*/
override fun buildNotification(
context: Context,
pendingShutdownIntent: PendingIntent
pendingShutdownIntent: PendingIntent,
): Notification {
createChannel(context)
@ -80,7 +80,7 @@ class ServiceNotificationImpl @Inject constructor() : IServiceNotification {
Notification.Action.Builder(
Icon.createWithResource(context, R.drawable.ic_feathericons_x),
context.getString(R.string.notifExitRuntime),
pendingShutdownIntent
pendingShutdownIntent,
)
.build()
// Make a notification for our foreground service
@ -92,7 +92,7 @@ class ServiceNotificationImpl @Inject constructor() : IServiceNotification {
.setContentText(
context.getString(
R.string.notif_text,
nameAndLogoProvider.getLocalizedRuntimeName()
nameAndLogoProvider.getLocalizedRuntimeName(),
)
)
.setShowWhen(false)
@ -108,7 +108,7 @@ class ServiceNotificationImpl @Inject constructor() : IServiceNotification {
Notification.Action.Builder(
Icon.createWithResource(context, R.drawable.ic_feathericons_settings),
context.getString(R.string.notifConfigure),
pendingIntent
pendingIntent,
)
.build()
builder.addAction(configureAction)

View file

@ -30,7 +30,7 @@ spotless {
kotlin {
target 'src/main/java/**/*.kt'
// Use ktfmt(https://github.com/facebook/ktfmt) as the default Kotlin formatter.
ktfmt('0.43').kotlinlangStyle()
ktfmt("$ktfmtVersion").kotlinlangStyle()
}
}

View file

@ -38,7 +38,7 @@ class MonadoOpenXrUiProvider @Inject constructor(@ApplicationContext val context
Intent.makeMainActivity(
ComponentName.createRelative(context, AboutActivity::class.qualifiedName!!)
),
flags
flags,
)
}
}