Implements disableNanoApp

Bug: 67734082
Test: Run a test app to issue an disable request, verify HAL code is
executed via logs and client receives an error response.
Change-Id: I5a26c85372bd10a0224bf2a696982dccbca0c275
diff --git a/services/core/java/com/android/server/location/ContextHubService.java b/services/core/java/com/android/server/location/ContextHubService.java
index 694dd26..1ad0cf9 100644
--- a/services/core/java/com/android/server/location/ContextHubService.java
+++ b/services/core/java/com/android/server/location/ContextHubService.java
@@ -718,6 +718,30 @@
     }
 
     /**
+     * Disables a nanoapp at the specified Context Hub.
+     *
+     * @param contextHubId        the ID of the hub to disable the nanoapp
+     * @param transactionCallback the client-facing transaction callback interface
+     * @param nanoAppId           the ID of the nanoapp to disable
+     *
+     * @throws IllegalStateException if the transaction queue is full
+     */
+    @Override
+    public void disableNanoApp(
+            int contextHubId, IContextHubTransactionCallback transactionCallback, long nanoAppId)
+            throws RemoteException {
+        checkPermissions();
+        if (!checkHalProxyAndContextHubId(
+                contextHubId, transactionCallback, ContextHubTransaction.TYPE_DISABLE_NANOAPP)) {
+            return;
+        }
+
+        ContextHubServiceTransaction transaction = mTransactionManager.createDisableTransaction(
+                contextHubId, nanoAppId, transactionCallback);
+        mTransactionManager.addTransaction(transaction);
+    }
+
+    /**
      * Queries for a list of nanoapps from the specified Context hub.
      *
      * @param contextHubId        the ID of the hub to query