Loading vibrator/aidl/default/Vibrator.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -138,6 +138,11 @@ ndk::ScopedAStatus Vibrator::getSupportedPrimitives(std::vector<CompositePrimiti ndk::ScopedAStatus Vibrator::getPrimitiveDuration(CompositePrimitive primitive, int32_t* durationMs) { std::vector<CompositePrimitive> supported; getSupportedPrimitives(&supported); if (std::find(supported.begin(), supported.end(), primitive) == supported.end()) { return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION); } if (primitive != CompositePrimitive::NOOP) { *durationMs = 100; } else { Loading Loading
vibrator/aidl/default/Vibrator.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -138,6 +138,11 @@ ndk::ScopedAStatus Vibrator::getSupportedPrimitives(std::vector<CompositePrimiti ndk::ScopedAStatus Vibrator::getPrimitiveDuration(CompositePrimitive primitive, int32_t* durationMs) { std::vector<CompositePrimitive> supported; getSupportedPrimitives(&supported); if (std::find(supported.begin(), supported.end(), primitive) == supported.end()) { return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION); } if (primitive != CompositePrimitive::NOOP) { *durationMs = 100; } else { Loading