ContextHubService: Don't change app handle on load

Due to the way this logic was set up, every time we would load
a new nanoapp, add_app_instance() would change the nanoapp's
handle/"id" in manner that was invisible to closeTxnLoad(),
so our JNI cache would use a different handle than what we
passed to the Java callback.

We remove this unnecessary changing of the handle/"id".

Bug:31325144
Change-Id: I8678729f38fb804bc6a128ce9722fd35551fa1c1
diff --git a/core/jni/android_hardware_location_ContextHubService.cpp b/core/jni/android_hardware_location_ContextHubService.cpp
index 3644410..a24aa31 100644
--- a/core/jni/android_hardware_location_ContextHubService.cpp
+++ b/core/jni/android_hardware_location_ContextHubService.cpp
@@ -393,16 +393,8 @@
     app_instance_info_s entry;
     assert(appInfo);
 
-    const char *action = "Updated";
-    if (db.appInstances.count(appInstanceHandle) == 0) {
-        action = "Added";
-        appInstanceHandle = generate_id();
-        if (appInstanceHandle < 0) {
-            ALOGE("Cannot find resources to add app instance %" PRId32,
-                  appInstanceHandle);
-            return -1;
-        }
-    }
+    const char *action =
+        (db.appInstances.count(appInstanceHandle) == 0) ? "Added" : "Updated";
 
     entry.appInfo = *appInfo;