Remove DEBUG_LEVEL_APP_ONLY

Bug: 260147409, 203369076
Test: atest MicrodroidHostTestCases;
atest MicrodroidTestApp;
atest ComposHostTestCases

Change-Id: Ia12019519766a01495ce4305ea8029e11317ca7d
diff --git a/javalib/api/system-current.txt b/javalib/api/system-current.txt
index f364f4c..fb7c98c 100644
--- a/javalib/api/system-current.txt
+++ b/javalib/api/system-current.txt
@@ -63,8 +63,7 @@
     method @Nullable public String getPayloadBinaryPath();
     method public boolean isCompatibleWith(@NonNull android.system.virtualmachine.VirtualMachineConfig);
     method public boolean isProtectedVm();
-    field public static final int DEBUG_LEVEL_APP_ONLY = 1; // 0x1
-    field public static final int DEBUG_LEVEL_FULL = 2; // 0x2
+    field public static final int DEBUG_LEVEL_FULL = 1; // 0x1
     field public static final int DEBUG_LEVEL_NONE = 0; // 0x0
   }
 
diff --git a/javalib/src/android/system/virtualmachine/VirtualMachineConfig.java b/javalib/src/android/system/virtualmachine/VirtualMachineConfig.java
index f9f29a1..a9e062a 100644
--- a/javalib/src/android/system/virtualmachine/VirtualMachineConfig.java
+++ b/javalib/src/android/system/virtualmachine/VirtualMachineConfig.java
@@ -70,7 +70,6 @@
     @Retention(RetentionPolicy.SOURCE)
     @IntDef(prefix = "DEBUG_LEVEL_", value = {
             DEBUG_LEVEL_NONE,
-            DEBUG_LEVEL_APP_ONLY,
             DEBUG_LEVEL_FULL
     })
     public @interface DebugLevel {}
@@ -84,20 +83,12 @@
     @SystemApi public static final int DEBUG_LEVEL_NONE = 0;
 
     /**
-     * Only the app is debuggable. Log from the app is exported from the VM. Debugger can be
-     * attached to the app process. Rest of the VM is not debuggable.
-     *
-     * @hide
-     */
-    @SystemApi public static final int DEBUG_LEVEL_APP_ONLY = 1;
-
-    /**
      * Fully debuggable. All logs (both logcat and kernel message) are exported. All processes
      * running in the VM can be attached to the debugger. Rooting is possible.
      *
      * @hide
      */
-    @SystemApi public static final int DEBUG_LEVEL_FULL = 2;
+    @SystemApi public static final int DEBUG_LEVEL_FULL = 1;
 
     /** Absolute path to the APK file containing the VM payload. */
     @NonNull private final String mApkPath;
@@ -152,8 +143,7 @@
                     + "range [1, " + availableCpus + "]");
         }
 
-        if (debugLevel != DEBUG_LEVEL_NONE && debugLevel != DEBUG_LEVEL_APP_ONLY
-                && debugLevel != DEBUG_LEVEL_FULL) {
+        if (debugLevel != DEBUG_LEVEL_NONE && debugLevel != DEBUG_LEVEL_FULL) {
             throw new IllegalArgumentException("Invalid debugLevel: " + debugLevel);
         }
 
@@ -230,8 +220,7 @@
             }
         }
         @DebugLevel int debugLevel = b.getInt(KEY_DEBUGLEVEL);
-        if (debugLevel != DEBUG_LEVEL_NONE && debugLevel != DEBUG_LEVEL_APP_ONLY
-                && debugLevel != DEBUG_LEVEL_FULL) {
+        if (debugLevel != DEBUG_LEVEL_NONE && debugLevel != DEBUG_LEVEL_FULL) {
             throw new VirtualMachineException("Invalid debugLevel: " + debugLevel);
         }
         boolean protectedVm = b.getBoolean(KEY_PROTECTED_VM);
@@ -384,9 +373,6 @@
                     VirtualMachineAppConfig.Payload.configPath(mPayloadConfigPath);
         }
         switch (mDebugLevel) {
-            case DEBUG_LEVEL_APP_ONLY:
-                vsConfig.debugLevel = VirtualMachineAppConfig.DebugLevel.APP_ONLY;
-                break;
             case DEBUG_LEVEL_FULL:
                 vsConfig.debugLevel = VirtualMachineAppConfig.DebugLevel.FULL;
                 break;