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

Commit a519a5fb authored by Greg Kaiser's avatar Greg Kaiser Committed by Android (Google) Code Review
Browse files

Merge "ContextHubService: Don't change app handle on load" into nyc-mr1-dev

parents 23af4ec0 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;