···4141 // If the surface comes from client, just stop the service when client disconnected
4242 // because the surface belongs to the client.
4343 if (binder.canDrawOverOtherApps()) BuildConfig.WATCHDOG_TIMEOUT_MILLISECONDS else 0,
4444- this
4444+ this,
4545 )
4646 watchdog.startMonitor()
4747···8888 this,
8989 0,
9090 Intent(BuildConfig.SHUTDOWN_ACTION).setPackage(packageName),
9191- flags
9191+ flags,
9292 )
93939494 val notification = serviceNotification.buildNotification(this, pendingShutdownIntent)
···9797 startForeground(
9898 serviceNotification.getNotificationId(),
9999 notification,
100100- ServiceInfo.FOREGROUND_SERVICE_TYPE_MANIFEST
100100+ ServiceInfo.FOREGROUND_SERVICE_TYPE_MANIFEST,
101101 )
102102 } else {
103103 startForeground(serviceNotification.getNotificationId(), notification)
···1616/** Client watchdog, to determine whether runtime service should be stopped. */
1717class Watchdog(
1818 private val shutdownDelayMilliseconds: Long,
1919- private val shutdownListener: ShutdownListener
1919+ private val shutdownListener: ShutdownListener,
2020) {
2121 /**
2222 * Interface definition for callbacks to be invoked when there's no client connected. Noted that