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

Commit 4f0b0f21 authored by Steven Moreland's avatar Steven Moreland Committed by android-build-merger
Browse files

Merge "vibrator extension: use checked_interface_cast" am: 741347b4 am: 19d121b6

am: 6d77b339

Change-Id: I77dfe60e90e06eea95226cbce544cf46183a3fd7
parents f3b8f482 6d77b339
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -20,9 +20,9 @@
#include <binder/IServiceManager.h>
#include <gtest/gtest.h>

using android::checked_interface_cast;
using android::IBinder;
using android::IInterface;
using android::interface_cast;
using android::OK;
using android::sp;
using android::waitForVintfService;
@@ -44,7 +44,7 @@ TEST(Cpp, CallExtMethod) {
    // getting the extension
    sp<IBinder> ext;
    ASSERT_EQ(OK, IInterface::asBinder(vib)->getExtension(&ext));
    sp<ICustomVibrator> cvib = interface_cast<ICustomVibrator>(ext);
    sp<ICustomVibrator> cvib = checked_interface_cast<ICustomVibrator>(ext);
    ASSERT_NE(nullptr, cvib.get());

    // calling extension method