Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0bffa9bd authored by Greg Kaiser's avatar Greg Kaiser Committed by android-build-merger
Browse files

ContextHubService: Don't change app handle on load

am: b0604ecc

Change-Id: I23b2d991309bd1e8771ad4a03220d485c7388287
parents 515b7007 b0604ecc
Loading
Loading
Loading
Loading
+2 −10
Original line number Diff line number Diff line
@@ -393,16 +393,8 @@ static jint add_app_instance(const hub_app_info *appInfo, uint32_t hubHandle,
    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;