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

Commit 77cf5c22 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Add AIDL version check for injectNiSuplMessageData()" into udc-dev am: 4e471917

parents 654c21ce 4e471917
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -89,6 +89,10 @@ jboolean AGnssRil::updateNetworkState(jboolean connected, jint type, jboolean ro
}

jboolean AGnssRil::injectNiSuplMessageData(const jbyteArray& msgData, jint length, jint slotIndex) {
    if (mIAGnssRil->getInterfaceVersion() <= 2) {
        ALOGE("IAGnssRil does not support injectNiSuplMessageData().");
        return JNI_FALSE;
    }
    JNIEnv* env = getJniEnv();
    jbyte* bytes = reinterpret_cast<jbyte*>(env->GetPrimitiveArrayCritical(msgData, 0));
    auto status = mIAGnssRil->injectNiSuplMessageData(std::vector<uint8_t>((const uint8_t*)bytes,