Terminal app uses a dedicated notification icon
The new icon is copied from the existing vector drawable, but adjusted
to fit the 24dp x 24dp rectangle for notification.
Bug: 414624685
Test: start the terminal, and observe the status bar. the icon is no
longer ridiculously small.
Flag: EXEMPT cosmetic change
Change-Id: I054fbe32c711e0442f6f569ea17a320561f8634e
diff --git a/android/TerminalApp/java/com/android/virtualization/terminal/InstallerService.kt b/android/TerminalApp/java/com/android/virtualization/terminal/InstallerService.kt
index 01c3880..79bb2f8 100644
--- a/android/TerminalApp/java/com/android/virtualization/terminal/InstallerService.kt
+++ b/android/TerminalApp/java/com/android/virtualization/terminal/InstallerService.kt
@@ -73,7 +73,7 @@
notification =
Notification.Builder(this, Application.CHANNEL_LONG_RUNNING_ID)
.setSilent(true)
- .setSmallIcon(R.drawable.ic_launcher_foreground)
+ .setSmallIcon(R.drawable.ic_notification)
.setContentTitle(getString(R.string.installer_notif_title_text))
.setContentText(getString(R.string.installer_notif_desc_text))
.setOngoing(true)
diff --git a/android/TerminalApp/java/com/android/virtualization/terminal/MainActivity.kt b/android/TerminalApp/java/com/android/virtualization/terminal/MainActivity.kt
index 14855ac..3927d87 100644
--- a/android/TerminalApp/java/com/android/virtualization/terminal/MainActivity.kt
+++ b/android/TerminalApp/java/com/android/virtualization/terminal/MainActivity.kt
@@ -369,7 +369,7 @@
val notification: Notification =
Notification.Builder(this, Application.CHANNEL_LONG_RUNNING_ID)
.setSilent(true)
- .setSmallIcon(R.drawable.ic_launcher_foreground)
+ .setSmallIcon(R.drawable.ic_notification)
.setContentTitle(resources.getString(R.string.service_notification_title))
.setContentText(resources.getString(R.string.service_notification_content))
.setContentIntent(tapPendingIntent)
diff --git a/android/TerminalApp/java/com/android/virtualization/terminal/PortNotifier.kt b/android/TerminalApp/java/com/android/virtualization/terminal/PortNotifier.kt
index 3ad397a..ab4fd12 100644
--- a/android/TerminalApp/java/com/android/virtualization/terminal/PortNotifier.kt
+++ b/android/TerminalApp/java/com/android/virtualization/terminal/PortNotifier.kt
@@ -105,7 +105,7 @@
.build()
val notification: Notification =
Notification.Builder(context, Application.CHANNEL_SYSTEM_EVENTS_ID)
- .setSmallIcon(R.drawable.ic_launcher_foreground)
+ .setSmallIcon(R.drawable.ic_notification)
.setContentTitle(title)
.setContentText(content)
.setFullScreenIntent(tapPendingIntent, true)
diff --git a/android/TerminalApp/java/com/android/virtualization/terminal/VmLauncherService.kt b/android/TerminalApp/java/com/android/virtualization/terminal/VmLauncherService.kt
index f69ec73..5ef88be 100644
--- a/android/TerminalApp/java/com/android/virtualization/terminal/VmLauncherService.kt
+++ b/android/TerminalApp/java/com/android/virtualization/terminal/VmLauncherService.kt
@@ -328,7 +328,7 @@
val stopNotificationTitle: String? =
resources.getString(R.string.service_notification_close_title)
return Notification.Builder(this, Application.CHANNEL_SYSTEM_EVENTS_ID)
- .setSmallIcon(R.drawable.ic_launcher_foreground)
+ .setSmallIcon(R.drawable.ic_notification)
.setContentTitle(stopNotificationTitle)
.setOngoing(true)
.setSilent(true)
diff --git a/android/TerminalApp/res/drawable/ic_notification.xml b/android/TerminalApp/res/drawable/ic_notification.xml
new file mode 100644
index 0000000..f9a83de
--- /dev/null
+++ b/android/TerminalApp/res/drawable/ic_notification.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright 2025 The Android Open Source Project
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="#FFFFFF">
+ <group android:scaleX="0.15"
+ android:scaleY="0.17"
+ android:translateX="1"
+ android:translateY="-4">
+ <group android:translateY="133.59375">
+ <path android:pathData="M9.078125,-77.484375L69.75,-51.40625L69.75,-37.765625L9.078125,-11.609375L9.078125,-28.40625L52.53125,-44.71875L9.078125,-60.75L9.078125,-77.484375Z"
+ android:fillColor="#000000"/>
+ <path android:pathData="M139.76562,0L139.76562,13.5L75.21875,13.5L75.21875,0L139.76562,0Z"
+ android:fillColor="#000000"/>
+ </group>
+ </group>
+</vector>