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

Commit 8587b83a authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 11654651 from 4922fa5a to 24Q3-release

Change-Id: I767c1b109f710d1cf68bc260af1ceddefb2c81b3
parents 99a6b705 4922fa5a
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -31,5 +31,13 @@
       the UX issue mentioned above.
  -->
  <distance-noise-floor>0.2</distance-noise-floor>
  <!-- The low and high jerk thresholds for prediction pruning.

    The jerk thresholds are based on normalized dt = 1 calculations, and
    are taken from Jetpacks MotionEventPredictor's KalmanPredictor
    implementation (using its ACCURATE_LOW_JANK and ACCURATE_HIGH_JANK).
  -->
  <low-jerk>0.1</low-jerk>
  <high-jerk>0.2</high-jerk>
</motion-predictor>
+5 −0
Original line number Diff line number Diff line
@@ -105,6 +105,11 @@ public:
        // The noise floor for predictions.
        // Distances (r) less than this should be discarded as noise.
        float distanceNoiseFloor = 0;

        // Low and high jerk thresholds (with normalized dt = 1) for predictions.
        // High jerk means more predictions will be pruned, vice versa for low.
        float lowJerk = 0;
        float highJerk = 0;
    };

    // Creates a model from an encoded Flatbuffer model.
+24 −7
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@
#include <binderthreadstateutilstest/1.0/IHidlStuff.h>
#include <gtest/gtest.h>
#include <hidl/HidlTransportSupport.h>
#include <hidl/ServiceManagement.h>
#include <hwbinder/IPCThreadState.h>

#include <thread>
@@ -37,6 +38,7 @@ using android::OK;
using android::sp;
using android::String16;
using android::binder::Status;
using android::hardware::isHidlSupported;
using android::hardware::Return;
using binderthreadstateutilstest::V1_0::IHidlStuff;

@@ -67,6 +69,7 @@ std::string id2name(size_t id) {
// complicated calls are possible, but this should do here.

static void callHidl(size_t id, int32_t idx) {
    CHECK_EQ(true, isHidlSupported()) << "We shouldn't be calling HIDL if it's not supported";
    auto stuff = IHidlStuff::getService(id2name(id));
    CHECK(stuff->call(idx).isOk());
}
@@ -174,6 +177,7 @@ TEST(BinderThreadState, DoesntInitializeBinderDriver) {
}

TEST(BindThreadState, RemoteHidlCall) {
    if (!isHidlSupported()) GTEST_SKIP() << "No  HIDL support on device";
    auto stuff = IHidlStuff::getService(id2name(kP1Id));
    ASSERT_NE(nullptr, stuff);
    ASSERT_TRUE(stuff->call(0).isOk());
@@ -186,11 +190,14 @@ TEST(BindThreadState, RemoteAidlCall) {
}

TEST(BindThreadState, RemoteNestedStartHidlCall) {
    if (!isHidlSupported()) GTEST_SKIP() << "No  HIDL support on device";
    auto stuff = IHidlStuff::getService(id2name(kP1Id));
    ASSERT_NE(nullptr, stuff);
    ASSERT_TRUE(stuff->call(100).isOk());
}
TEST(BindThreadState, RemoteNestedStartAidlCall) {
    // this test case is trying ot nest a HIDL call which requires HIDL support
    if (!isHidlSupported()) GTEST_SKIP() << "No  HIDL support on device";
    sp<IAidlStuff> stuff;
    ASSERT_EQ(OK, android::getService<IAidlStuff>(String16(id2name(kP1Id).c_str()), &stuff));
    ASSERT_NE(nullptr, stuff);
@@ -205,11 +212,15 @@ int server(size_t thisId, size_t otherId) {
             defaultServiceManager()->addService(String16(id2name(thisId).c_str()), aidlServer));
    android::ProcessState::self()->startThreadPool();

    if (isHidlSupported()) {
        // HIDL
        android::hardware::configureRpcThreadpool(1, true /*callerWillJoin*/);
        sp<IHidlStuff> hidlServer = new HidlServer(thisId, otherId);
        CHECK_EQ(OK, hidlServer->registerAsService(id2name(thisId).c_str()));
        android::hardware::joinRpcThreadpool();
    } else {
        android::IPCThreadState::self()->joinThreadPool(true);
    }

    return EXIT_FAILURE;
}
@@ -227,9 +238,15 @@ int main(int argc, char** argv) {
    }

    android::waitForService<IAidlStuff>(String16(id2name(kP1Id).c_str()));
    android::hardware::details::waitForHwService(IHidlStuff::descriptor, id2name(kP1Id).c_str());
    if (isHidlSupported()) {
        android::hardware::details::waitForHwService(IHidlStuff::descriptor,
                                                     id2name(kP1Id).c_str());
    }
    android::waitForService<IAidlStuff>(String16(id2name(kP2Id).c_str()));
    android::hardware::details::waitForHwService(IHidlStuff::descriptor, id2name(kP2Id).c_str());
    if (isHidlSupported()) {
        android::hardware::details::waitForHwService(IHidlStuff::descriptor,
                                                     id2name(kP2Id).c_str());
    }

    return RUN_ALL_TESTS();
}
+2 −1
Original line number Diff line number Diff line
@@ -21,7 +21,8 @@ cc_test {
    cppflags: [
        "-Wall",
        "-Werror",
        "-Wno-extra",
        "-Wextra",
        "-Wthread-safety",
        "-DCOM_ANDROID_GRAPHICS_LIBGUI_FLAGS_BQ_SETFRAMERATE=true",
    ],

+4 −1
Original line number Diff line number Diff line
@@ -16,6 +16,9 @@

#define LOG_TAG "BLASTBufferQueue_test"

#pragma clang diagnostic ignored "-Wsign-compare"
#pragma clang diagnostic ignored "-Wthread-safety"

#include <gui/BLASTBufferQueue.h>

#include <android/hardware/graphics/common/1.2/types.h>
@@ -476,7 +479,7 @@ TEST_F(BLASTBufferQueueTest, TripleBuffering) {
        ASSERT_EQ(OK, igbProducer->requestBuffer(slot, &buf));
        allocated.push_back({slot, fence});
    }
    for (int i = 0; i < allocated.size(); i++) {
    for (size_t i = 0; i < allocated.size(); i++) {
        igbProducer->cancelBuffer(allocated[i].first, allocated[i].second);
    }

Loading