Optimize VmLauncherApp
1. Add some optimization options
2. Remove unused static libs
Bug: 335012275
Test: check if there is no regression
Change-Id: I83275cadb81a574be20374fad704033c2885747f
diff --git a/vmlauncher_app/Android.bp b/vmlauncher_app/Android.bp
index f9c325c..7103d53 100644
--- a/vmlauncher_app/Android.bp
+++ b/vmlauncher_app/Android.bp
@@ -7,9 +7,6 @@
srcs: ["java/**/*.java"],
resource_dirs: ["res"],
static_libs: [
- "androidx-constraintlayout_constraintlayout",
- "androidx.appcompat_appcompat",
- "com.google.android.material_material",
// TODO(b/330257000): will be removed when binder RPC is used
"android.system.virtualizationservice_internal-java",
// TODO(b/331708504): will be removed when AVF framework handles surface
@@ -24,4 +21,8 @@
apex_available: [
"com.android.virt",
],
+ optimize: {
+ optimize: true,
+ shrink_resources: true,
+ },
}
diff --git a/vmlauncher_app/res/layout/activity_main.xml b/vmlauncher_app/res/layout/activity_main.xml
index 6cc899f..5fa2171 100644
--- a/vmlauncher_app/res/layout/activity_main.xml
+++ b/vmlauncher_app/res/layout/activity_main.xml
@@ -1,11 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
-<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:scrollbars="horizontal|vertical"
- android:textAlignment="textStart"
tools:context=".MainActivity">
<SurfaceView
android:id="@+id/surface_view"
@@ -13,4 +11,4 @@
android:layout_width="match_parent"
android:layout_height="match_parent" />
-</androidx.constraintlayout.widget.ConstraintLayout>
+</LinearLayout>