diff --git a/android/TerminalApp/java/com/android/virtualization/terminal/Logger.kt b/android/TerminalApp/java/com/android/virtualization/terminal/Logger.kt
index d02491b..4162247 100644
--- a/android/TerminalApp/java/com/android/virtualization/terminal/Logger.kt
+++ b/android/TerminalApp/java/com/android/virtualization/terminal/Logger.kt
@@ -51,8 +51,7 @@
             deleteOldLogs(dir, 10)
             val logPath = dir.resolve(LocalDateTime.now().toString() + ".txt")
             val console = vm.getConsoleOutput()
-            val file =
-                Files.newOutputStream(logPath, StandardOpenOption.CREATE)
+            val file = Files.newOutputStream(logPath, StandardOpenOption.CREATE)
             executor.submit<Int?> {
                 console.use { console ->
                     LineBufferedOutputStream(file).use { fileOutput ->
diff --git a/android/TerminalApp/java/com/android/virtualization/terminal/VmLauncherService.kt b/android/TerminalApp/java/com/android/virtualization/terminal/VmLauncherService.kt
index aa1898f..5f3fd49 100644
--- a/android/TerminalApp/java/com/android/virtualization/terminal/VmLauncherService.kt
+++ b/android/TerminalApp/java/com/android/virtualization/terminal/VmLauncherService.kt
@@ -55,8 +55,8 @@
 import java.io.File
 import java.io.FileOutputStream
 import java.io.IOException
-import java.lang.RuntimeException
 import java.lang.Math.min
+import java.lang.RuntimeException
 import java.net.InetSocketAddress
 import java.net.SocketAddress
 import java.nio.file.Files
@@ -78,39 +78,41 @@
     private var debianService: DebianServiceImpl? = null
     private var portNotifier: PortNotifier? = null
     private var mLock = Object()
-    @GuardedBy("mLock")
-    private var currentMemBalloonPercent = 0;
+    @GuardedBy("mLock") private var currentMemBalloonPercent = 0
 
-    @GuardedBy("mLock")
-    private val inflateMemBalloonHandler = Handler(Looper.getMainLooper())
-    private val inflateMemBalloonTask: Runnable = object : Runnable {
-        override fun run() {
-            synchronized(mLock) {
-                if (currentMemBalloonPercent < INITIAL_MEM_BALLOON_PERCENT
-                    || currentMemBalloonPercent > MAX_MEM_BALLOON_PERCENT
-                ) {
-                    Log.e(
-                        TAG, "currentBalloonPercent=$currentMemBalloonPercent is invalid," +
+    @GuardedBy("mLock") private val inflateMemBalloonHandler = Handler(Looper.getMainLooper())
+    private val inflateMemBalloonTask: Runnable =
+        object : Runnable {
+            override fun run() {
+                synchronized(mLock) {
+                    if (
+                        currentMemBalloonPercent < INITIAL_MEM_BALLOON_PERCENT ||
+                            currentMemBalloonPercent > MAX_MEM_BALLOON_PERCENT
+                    ) {
+                        Log.e(
+                            TAG,
+                            "currentBalloonPercent=$currentMemBalloonPercent is invalid," +
                                 " should be in range: " +
-                                "$INITIAL_MEM_BALLOON_PERCENT~$MAX_MEM_BALLOON_PERCENT"
-                    )
-                    return
-                }
-                // Increases the balloon size by MEM_BALLOON_PERCENT_STEP% every time
-                if (currentMemBalloonPercent < MAX_MEM_BALLOON_PERCENT) {
-                    currentMemBalloonPercent =
-                        min(
-                            MAX_MEM_BALLOON_PERCENT,
-                            currentMemBalloonPercent + MEM_BALLOON_PERCENT_STEP
+                                "$INITIAL_MEM_BALLOON_PERCENT~$MAX_MEM_BALLOON_PERCENT",
                         )
-                    virtualMachine?.setMemoryBalloonByPercent(currentMemBalloonPercent)
-                    inflateMemBalloonHandler.postDelayed(this,
-                        MEM_BALLOON_INFLATE_INTERVAL_MILLIS)
+                        return
+                    }
+                    // Increases the balloon size by MEM_BALLOON_PERCENT_STEP% every time
+                    if (currentMemBalloonPercent < MAX_MEM_BALLOON_PERCENT) {
+                        currentMemBalloonPercent =
+                            min(
+                                MAX_MEM_BALLOON_PERCENT,
+                                currentMemBalloonPercent + MEM_BALLOON_PERCENT_STEP,
+                            )
+                        virtualMachine?.setMemoryBalloonByPercent(currentMemBalloonPercent)
+                        inflateMemBalloonHandler.postDelayed(
+                            this,
+                            MEM_BALLOON_INFLATE_INTERVAL_MILLIS,
+                        )
+                    }
                 }
             }
         }
-    }
-
 
     interface VmLauncherServiceCallback {
         fun onVmStart()
@@ -136,8 +138,8 @@
             // This gives the app maximum available memory.
             ApplicationLifeCycleEvent.APP_ON_START -> {
                 synchronized(mLock) {
-                    inflateMemBalloonHandler.removeCallbacks(inflateMemBalloonTask);
-                    currentMemBalloonPercent = 0;
+                    inflateMemBalloonHandler.removeCallbacks(inflateMemBalloonTask)
+                    currentMemBalloonPercent = 0
                     virtualMachine?.setMemoryBalloonByPercent(currentMemBalloonPercent)
                 }
             }
@@ -148,12 +150,12 @@
                 // MAX_MEM_BALLOON_PERCENT of total memory. This allows the system to reclaim
                 // memory while the app is in the background.
                 synchronized(mLock) {
-                    currentMemBalloonPercent = INITIAL_MEM_BALLOON_PERCENT;
+                    currentMemBalloonPercent = INITIAL_MEM_BALLOON_PERCENT
                     virtualMachine?.setMemoryBalloonByPercent(currentMemBalloonPercent)
                     inflateMemBalloonHandler.postDelayed(
                         inflateMemBalloonTask,
-                        MEM_BALLOON_INFLATE_INTERVAL_MILLIS
-                    );
+                        MEM_BALLOON_INFLATE_INTERVAL_MILLIS,
+                    )
                 }
             }
             else -> {
@@ -440,7 +442,7 @@
         private const val INITIAL_MEM_BALLOON_PERCENT = 10
         private const val MAX_MEM_BALLOON_PERCENT = 50
         private const val MEM_BALLOON_INFLATE_INTERVAL_MILLIS = 60000L
-        private const val MEM_BALLOON_PERCENT_STEP = 5;
+        private const val MEM_BALLOON_PERCENT_STEP = 5
 
         private fun getMyIntent(context: Context): Intent {
             return Intent(context.getApplicationContext(), VmLauncherService::class.java)
