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

Commit 3f03722c authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Make InputApplicationInfo as a part of InputApplicationHandle (2/2)"

parents 8b14e4a5 e7dc5017
Loading
Loading
Loading
Loading
+5 −10
Original line number Diff line number Diff line
@@ -56,30 +56,25 @@ bool NativeInputApplicationHandle::updateInfo() {
    JNIEnv* env = AndroidRuntime::getJNIEnv();
    jobject obj = env->NewLocalRef(mObjWeak);
    if (!obj) {
        releaseInfo();
        return false;
    }

    if (!mInfo) {
        mInfo = new InputApplicationInfo();
    }

    mInfo->name = getStringField(env, obj, gInputApplicationHandleClassInfo.name, "<null>");
    mInfo.name = getStringField(env, obj, gInputApplicationHandleClassInfo.name, "<null>");

    mInfo->dispatchingTimeout = env->GetLongField(obj,
    mInfo.dispatchingTimeout = env->GetLongField(obj,
            gInputApplicationHandleClassInfo.dispatchingTimeoutNanos);

    jobject tokenObj = env->GetObjectField(obj,
            gInputApplicationHandleClassInfo.token);
    if (tokenObj) {
        mInfo->token = ibinderForJavaObject(env, tokenObj);
        mInfo.token = ibinderForJavaObject(env, tokenObj);
        env->DeleteLocalRef(tokenObj);
    } else {
        mInfo->token.clear();
        mInfo.token.clear();
    }

    env->DeleteLocalRef(obj);
    return true;
    return mInfo.token.get() != nullptr;
}