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

Commit c756ab0e authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "random_binder: don't try to get ServiceManager on host" into main

parents a640fb9f cd21a20b
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -76,13 +76,16 @@ sp<IBinder> getRandomBinder(FuzzedDataProvider* provider) {

                return new RandomBinder(String16(str.c_str()), std::move(bytes));
            },
#ifdef __ANDROID__
            []() {
                // this is the easiest remote binder to get ahold of, and it
                // should be able to handle anything thrown at it, and
                // essentially every process can talk to it, so it's a good
                // candidate for checking usage of an actual BpBinder
                // This only works on an Android device with binder enabled
                return IInterface::asBinder(defaultServiceManager());
            },
#endif
            [&]() -> sp<IBinder> { return nullptr; },
    });
    return makeFunc();