Ilya Matyukhin | 3b542cd | 2020-10-12 18:23:46 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2020 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | #include <aidl/Gtest.h> |
| 17 | #include <aidl/Vintf.h> |
| 18 | #include <aidl/android/hardware/biometrics/face/BnFace.h> |
| 19 | #include <aidl/android/hardware/biometrics/face/BnSessionCallback.h> |
| 20 | |
| 21 | #include <android/binder_manager.h> |
| 22 | #include <android/binder_process.h> |
| 23 | |
Ilya Matyukhin | cc2b694 | 2021-03-23 23:08:41 -0700 | [diff] [blame] | 24 | #include <chrono> |
Ilya Matyukhin | 3b542cd | 2020-10-12 18:23:46 -0700 | [diff] [blame] | 25 | #include <future> |
| 26 | |
| 27 | namespace aidl::android::hardware::biometrics::face { |
| 28 | namespace { |
| 29 | |
Ilya Matyukhin | cc2b694 | 2021-03-23 23:08:41 -0700 | [diff] [blame] | 30 | using namespace std::literals::chrono_literals; |
| 31 | |
Ilya Matyukhin | 046020b | 2021-07-03 00:05:47 +0000 | [diff] [blame] | 32 | using aidl::android::hardware::common::NativeHandle; |
| 33 | |
Ilya Matyukhin | 3b542cd | 2020-10-12 18:23:46 -0700 | [diff] [blame] | 34 | constexpr int kSensorId = 0; |
| 35 | constexpr int kUserId = 0; |
Ilya Matyukhin | 3b542cd | 2020-10-12 18:23:46 -0700 | [diff] [blame] | 36 | |
Ilya Matyukhin | 3b542cd | 2020-10-12 18:23:46 -0700 | [diff] [blame] | 37 | class SessionCallback : public BnSessionCallback { |
| 38 | public: |
Ilya Matyukhin | 046020b | 2021-07-03 00:05:47 +0000 | [diff] [blame] | 39 | ndk::ScopedAStatus onChallengeGenerated(int64_t challenge) override { |
| 40 | auto lock = std::lock_guard{mMutex}; |
| 41 | mOnChallengeGeneratedInvoked = true; |
| 42 | mGeneratedChallenge = challenge; |
| 43 | mCv.notify_one(); |
Ilya Matyukhin | 3b542cd | 2020-10-12 18:23:46 -0700 | [diff] [blame] | 44 | return ndk::ScopedAStatus::ok(); |
| 45 | } |
| 46 | |
Ilya Matyukhin | 046020b | 2021-07-03 00:05:47 +0000 | [diff] [blame] | 47 | ndk::ScopedAStatus onChallengeRevoked(int64_t challenge) override { |
| 48 | auto lock = std::lock_guard{mMutex}; |
| 49 | mOnChallengeRevokedInvoked = true; |
| 50 | mRevokedChallenge = challenge; |
| 51 | mCv.notify_one(); |
Ilya Matyukhin | 3b542cd | 2020-10-12 18:23:46 -0700 | [diff] [blame] | 52 | return ndk::ScopedAStatus::ok(); |
| 53 | } |
| 54 | |
Ilya Matyukhin | e13bc81 | 2021-01-19 16:04:04 -0800 | [diff] [blame] | 55 | ndk::ScopedAStatus onAuthenticationFrame(const AuthenticationFrame& /*frame*/) override { |
| 56 | return ndk::ScopedAStatus::ok(); |
| 57 | } |
| 58 | |
| 59 | ndk::ScopedAStatus onEnrollmentFrame(const EnrollmentFrame& /*frame*/) override { |
Ilya Matyukhin | 3b542cd | 2020-10-12 18:23:46 -0700 | [diff] [blame] | 60 | return ndk::ScopedAStatus::ok(); |
| 61 | } |
| 62 | |
Ilya Matyukhin | 046020b | 2021-07-03 00:05:47 +0000 | [diff] [blame] | 63 | ndk::ScopedAStatus onError(Error error, int32_t /*vendorCode*/) override { |
Ilya Matyukhin | 13d8406 | 2021-06-07 16:56:11 -0700 | [diff] [blame] | 64 | auto lock = std::lock_guard<std::mutex>{mMutex}; |
| 65 | mError = error; |
Ilya Matyukhin | 13d8406 | 2021-06-07 16:56:11 -0700 | [diff] [blame] | 66 | mOnErrorInvoked = true; |
| 67 | mCv.notify_one(); |
Ilya Matyukhin | 3b542cd | 2020-10-12 18:23:46 -0700 | [diff] [blame] | 68 | return ndk::ScopedAStatus::ok(); |
| 69 | } |
| 70 | |
| 71 | ndk::ScopedAStatus onEnrollmentProgress(int32_t /*enrollmentId*/, |
| 72 | int32_t /*remaining*/) override { |
| 73 | return ndk::ScopedAStatus::ok(); |
| 74 | } |
| 75 | |
| 76 | ndk::ScopedAStatus onAuthenticationSucceeded( |
| 77 | int32_t /*enrollmentId*/, const keymaster::HardwareAuthToken& /*hat*/) override { |
| 78 | return ndk::ScopedAStatus::ok(); |
| 79 | } |
| 80 | |
| 81 | ndk::ScopedAStatus onAuthenticationFailed() override { return ndk::ScopedAStatus::ok(); } |
| 82 | |
| 83 | ndk::ScopedAStatus onLockoutTimed(int64_t /*durationMillis*/) override { |
| 84 | return ndk::ScopedAStatus::ok(); |
| 85 | } |
| 86 | |
| 87 | ndk::ScopedAStatus onLockoutPermanent() override { return ndk::ScopedAStatus::ok(); } |
| 88 | |
| 89 | ndk::ScopedAStatus onLockoutCleared() override { return ndk::ScopedAStatus::ok(); } |
| 90 | |
| 91 | ndk::ScopedAStatus onInteractionDetected() override { return ndk::ScopedAStatus::ok(); } |
| 92 | |
| 93 | ndk::ScopedAStatus onEnrollmentsEnumerated( |
| 94 | const std::vector<int32_t>& /*enrollmentIds*/) override { |
Ilya Matyukhin | 046020b | 2021-07-03 00:05:47 +0000 | [diff] [blame] | 95 | auto lock = std::lock_guard{mMutex}; |
| 96 | mOnEnrollmentsEnumeratedInvoked = true; |
| 97 | mCv.notify_one(); |
Ilya Matyukhin | 3b542cd | 2020-10-12 18:23:46 -0700 | [diff] [blame] | 98 | return ndk::ScopedAStatus::ok(); |
| 99 | } |
| 100 | |
| 101 | ndk::ScopedAStatus onEnrollmentsRemoved( |
| 102 | const std::vector<int32_t>& /*enrollmentIds*/) override { |
Ilya Matyukhin | 046020b | 2021-07-03 00:05:47 +0000 | [diff] [blame] | 103 | auto lock = std::lock_guard{mMutex}; |
| 104 | mOnEnrollmentsRemovedInvoked = true; |
| 105 | mCv.notify_one(); |
Ilya Matyukhin | 3b542cd | 2020-10-12 18:23:46 -0700 | [diff] [blame] | 106 | return ndk::ScopedAStatus::ok(); |
| 107 | } |
| 108 | |
Ilya Matyukhin | 9fcf6b1 | 2021-04-14 13:43:06 -0700 | [diff] [blame] | 109 | ndk::ScopedAStatus onFeaturesRetrieved(const std::vector<Feature>& /*features*/) override { |
Ilya Matyukhin | 046020b | 2021-07-03 00:05:47 +0000 | [diff] [blame] | 110 | auto lock = std::lock_guard{mMutex}; |
| 111 | mOnFeaturesRetrievedInvoked = true; |
| 112 | mCv.notify_one(); |
Ilya Matyukhin | f2d3886 | 2021-01-22 11:48:59 -0800 | [diff] [blame] | 113 | return ndk::ScopedAStatus::ok(); |
| 114 | } |
| 115 | |
Ilya Matyukhin | 9fcf6b1 | 2021-04-14 13:43:06 -0700 | [diff] [blame] | 116 | ndk::ScopedAStatus onFeatureSet(Feature /*feature*/) override { |
Ilya Matyukhin | f2d3886 | 2021-01-22 11:48:59 -0800 | [diff] [blame] | 117 | return ndk::ScopedAStatus::ok(); |
| 118 | } |
| 119 | |
Ilya Matyukhin | 3b542cd | 2020-10-12 18:23:46 -0700 | [diff] [blame] | 120 | ndk::ScopedAStatus onAuthenticatorIdRetrieved(int64_t /*authenticatorId*/) override { |
Ilya Matyukhin | 046020b | 2021-07-03 00:05:47 +0000 | [diff] [blame] | 121 | auto lock = std::lock_guard{mMutex}; |
| 122 | mOnAuthenticatorIdRetrievedInvoked = true; |
| 123 | mCv.notify_one(); |
Ilya Matyukhin | 3b542cd | 2020-10-12 18:23:46 -0700 | [diff] [blame] | 124 | return ndk::ScopedAStatus::ok(); |
| 125 | } |
| 126 | |
Kevin Chyn | f7890cc | 2021-01-11 17:08:36 -0800 | [diff] [blame] | 127 | ndk::ScopedAStatus onAuthenticatorIdInvalidated(int64_t /*newAuthenticatorId*/) override { |
Ilya Matyukhin | 046020b | 2021-07-03 00:05:47 +0000 | [diff] [blame] | 128 | auto lock = std::lock_guard{mMutex}; |
| 129 | mOnAuthenticatorIdInvalidatedInvoked = true; |
| 130 | mCv.notify_one(); |
Kevin Chyn | f7890cc | 2021-01-11 17:08:36 -0800 | [diff] [blame] | 131 | return ndk::ScopedAStatus::ok(); |
| 132 | } |
Ilya Matyukhin | 3b542cd | 2020-10-12 18:23:46 -0700 | [diff] [blame] | 133 | |
Ilya Matyukhin | cc2b694 | 2021-03-23 23:08:41 -0700 | [diff] [blame] | 134 | ndk::ScopedAStatus onSessionClosed() override { |
Ilya Matyukhin | 13d8406 | 2021-06-07 16:56:11 -0700 | [diff] [blame] | 135 | auto lock = std::lock_guard<std::mutex>{mMutex}; |
| 136 | mOnSessionClosedInvoked = true; |
| 137 | mCv.notify_one(); |
Ilya Matyukhin | cc2b694 | 2021-03-23 23:08:41 -0700 | [diff] [blame] | 138 | return ndk::ScopedAStatus::ok(); |
| 139 | } |
Ilya Matyukhin | cbbfa93 | 2021-03-22 13:25:15 -0700 | [diff] [blame] | 140 | |
Ilya Matyukhin | 13d8406 | 2021-06-07 16:56:11 -0700 | [diff] [blame] | 141 | std::mutex mMutex; |
| 142 | std::condition_variable mCv; |
| 143 | Error mError = Error::UNKNOWN; |
Ilya Matyukhin | 046020b | 2021-07-03 00:05:47 +0000 | [diff] [blame] | 144 | int64_t mGeneratedChallenge = 0; |
| 145 | int64_t mRevokedChallenge = 0; |
| 146 | bool mOnChallengeGeneratedInvoked = false; |
| 147 | bool mOnChallengeRevokedInvoked = false; |
Ilya Matyukhin | 13d8406 | 2021-06-07 16:56:11 -0700 | [diff] [blame] | 148 | bool mOnErrorInvoked = false; |
Ilya Matyukhin | 046020b | 2021-07-03 00:05:47 +0000 | [diff] [blame] | 149 | bool mOnEnrollmentsEnumeratedInvoked = false; |
| 150 | bool mOnEnrollmentsRemovedInvoked = false; |
| 151 | bool mOnFeaturesRetrievedInvoked = false; |
| 152 | bool mOnAuthenticatorIdRetrievedInvoked = false; |
| 153 | bool mOnAuthenticatorIdInvalidatedInvoked = false; |
Ilya Matyukhin | 13d8406 | 2021-06-07 16:56:11 -0700 | [diff] [blame] | 154 | bool mOnSessionClosedInvoked = false; |
Ilya Matyukhin | 3b542cd | 2020-10-12 18:23:46 -0700 | [diff] [blame] | 155 | }; |
| 156 | |
| 157 | class Face : public testing::TestWithParam<std::string> { |
| 158 | protected: |
| 159 | void SetUp() override { |
Ilya Matyukhin | 046020b | 2021-07-03 00:05:47 +0000 | [diff] [blame] | 160 | // Prepare the callback. |
| 161 | mCb = ndk::SharedRefBase::make<SessionCallback>(); |
| 162 | |
| 163 | int retries = 0; |
| 164 | bool isOk = false; |
| 165 | // If the first attempt to create a session fails, we try to create a session again. The |
| 166 | // first attempt might fail if the framework already has an active session. The AIDL |
| 167 | // contract doesn't allow to create a new session without closing the old one. However, we |
| 168 | // can't close the framework's session from VTS. The expectation here is that the HAL will |
| 169 | // crash after the first illegal attempt to create a session, then it will restart, and then |
| 170 | // we'll be able to create a session. |
| 171 | do { |
| 172 | // Get an instance of the HAL. |
| 173 | AIBinder* binder = AServiceManager_waitForService(GetParam().c_str()); |
| 174 | ASSERT_NE(binder, nullptr); |
| 175 | mHal = IFace::fromBinder(ndk::SpAIBinder(binder)); |
| 176 | |
| 177 | // Create a session. |
| 178 | isOk = mHal->createSession(kSensorId, kUserId, mCb, &mSession).isOk(); |
| 179 | ++retries; |
| 180 | } while (!isOk && retries < 2); |
| 181 | |
| 182 | ASSERT_TRUE(isOk); |
| 183 | } |
| 184 | |
| 185 | void TearDown() override { |
| 186 | // Close the mSession. |
| 187 | ASSERT_TRUE(mSession->close().isOk()); |
| 188 | |
| 189 | // Make sure the mSession is closed. |
| 190 | auto lock = std::unique_lock<std::mutex>(mCb->mMutex); |
| 191 | mCb->mCv.wait(lock, [this] { return mCb->mOnSessionClosedInvoked; }); |
Ilya Matyukhin | 3b542cd | 2020-10-12 18:23:46 -0700 | [diff] [blame] | 192 | } |
| 193 | |
Ilya Matyukhin | cc2b694 | 2021-03-23 23:08:41 -0700 | [diff] [blame] | 194 | std::shared_ptr<IFace> mHal; |
Ilya Matyukhin | 046020b | 2021-07-03 00:05:47 +0000 | [diff] [blame] | 195 | std::shared_ptr<SessionCallback> mCb; |
| 196 | std::shared_ptr<ISession> mSession; |
Ilya Matyukhin | 3b542cd | 2020-10-12 18:23:46 -0700 | [diff] [blame] | 197 | }; |
| 198 | |
Ilya Matyukhin | 046020b | 2021-07-03 00:05:47 +0000 | [diff] [blame] | 199 | TEST_P(Face, GetSensorPropsWorksTest) { |
| 200 | std::vector<SensorProps> sensorProps; |
Ilya Matyukhin | 3b542cd | 2020-10-12 18:23:46 -0700 | [diff] [blame] | 201 | |
Ilya Matyukhin | 046020b | 2021-07-03 00:05:47 +0000 | [diff] [blame] | 202 | // Call the method. |
| 203 | ASSERT_TRUE(mHal->getSensorProps(&sensorProps).isOk()); |
Ilya Matyukhin | 3b542cd | 2020-10-12 18:23:46 -0700 | [diff] [blame] | 204 | |
Ilya Matyukhin | 046020b | 2021-07-03 00:05:47 +0000 | [diff] [blame] | 205 | // Make sure the sensorProps aren't empty. |
| 206 | ASSERT_FALSE(sensorProps.empty()); |
| 207 | ASSERT_FALSE(sensorProps[0].commonProps.componentInfo.empty()); |
| 208 | } |
| 209 | |
| 210 | TEST_P(Face, EnrollWithBadHatResultsInErrorTest) { |
| 211 | // Call the method. |
| 212 | auto hat = keymaster::HardwareAuthToken{}; |
Ilya Matyukhin | cc2b694 | 2021-03-23 23:08:41 -0700 | [diff] [blame] | 213 | std::shared_ptr<common::ICancellationSignal> cancellationSignal; |
Ilya Matyukhin | 046020b | 2021-07-03 00:05:47 +0000 | [diff] [blame] | 214 | ASSERT_TRUE( |
| 215 | mSession->enroll(hat, EnrollmentType::DEFAULT, {}, NativeHandle{}, &cancellationSignal) |
| 216 | .isOk()); |
Ilya Matyukhin | 3b542cd | 2020-10-12 18:23:46 -0700 | [diff] [blame] | 217 | |
Ilya Matyukhin | 046020b | 2021-07-03 00:05:47 +0000 | [diff] [blame] | 218 | // Make sure an error is returned. |
| 219 | auto lock = std::unique_lock{mCb->mMutex}; |
| 220 | mCb->mCv.wait(lock, [this] { return mCb->mOnErrorInvoked; }); |
| 221 | } |
| 222 | |
| 223 | TEST_P(Face, GenerateChallengeProducesUniqueChallengesTest) { |
| 224 | static constexpr int kIterations = 100; |
| 225 | |
| 226 | auto challenges = std::set<int>{}; |
| 227 | for (unsigned int i = 0; i < kIterations; ++i) { |
| 228 | // Call the method. |
| 229 | ASSERT_TRUE(mSession->generateChallenge().isOk()); |
| 230 | |
| 231 | // Check that the generated challenge is unique and not 0. |
| 232 | auto lock = std::unique_lock{mCb->mMutex}; |
| 233 | mCb->mCv.wait(lock, [this] { return mCb->mOnChallengeGeneratedInvoked; }); |
| 234 | ASSERT_NE(mCb->mGeneratedChallenge, 0); |
| 235 | ASSERT_EQ(challenges.find(mCb->mGeneratedChallenge), challenges.end()); |
| 236 | |
| 237 | challenges.insert(mCb->mGeneratedChallenge); |
| 238 | mCb->mOnChallengeGeneratedInvoked = false; |
| 239 | } |
| 240 | } |
| 241 | |
| 242 | TEST_P(Face, RevokeChallengeWorksForNonexistentChallengeTest) { |
| 243 | const int64_t nonexistentChallenge = 123; |
| 244 | |
| 245 | // Call the method. |
| 246 | ASSERT_TRUE(mSession->revokeChallenge(nonexistentChallenge).isOk()); |
| 247 | |
| 248 | // Check that the challenge is revoked and matches the requested challenge. |
| 249 | auto lock = std::unique_lock{mCb->mMutex}; |
| 250 | mCb->mCv.wait(lock, [this] { return mCb->mOnChallengeRevokedInvoked; }); |
| 251 | ASSERT_EQ(mCb->mRevokedChallenge, nonexistentChallenge); |
| 252 | } |
| 253 | |
| 254 | TEST_P(Face, RevokeChallengeWorksForExistentChallengeTest) { |
| 255 | // Generate a challenge. |
| 256 | ASSERT_TRUE(mSession->generateChallenge().isOk()); |
| 257 | |
| 258 | // Wait for the result. |
| 259 | auto lock = std::unique_lock{mCb->mMutex}; |
| 260 | mCb->mCv.wait(lock, [this] { return mCb->mOnChallengeGeneratedInvoked; }); |
Ilya Matyukhin | 13d8406 | 2021-06-07 16:56:11 -0700 | [diff] [blame] | 261 | lock.unlock(); |
Ilya Matyukhin | cc2b694 | 2021-03-23 23:08:41 -0700 | [diff] [blame] | 262 | |
Ilya Matyukhin | 046020b | 2021-07-03 00:05:47 +0000 | [diff] [blame] | 263 | // Revoke the challenge. |
| 264 | ASSERT_TRUE(mSession->revokeChallenge(mCb->mGeneratedChallenge).isOk()); |
Ilya Matyukhin | cc2b694 | 2021-03-23 23:08:41 -0700 | [diff] [blame] | 265 | |
Ilya Matyukhin | 046020b | 2021-07-03 00:05:47 +0000 | [diff] [blame] | 266 | // Check that the challenge is revoked and matches the requested challenge. |
Ilya Matyukhin | 13d8406 | 2021-06-07 16:56:11 -0700 | [diff] [blame] | 267 | lock.lock(); |
Ilya Matyukhin | 046020b | 2021-07-03 00:05:47 +0000 | [diff] [blame] | 268 | mCb->mCv.wait(lock, [this] { return mCb->mOnChallengeRevokedInvoked; }); |
| 269 | ASSERT_EQ(mCb->mRevokedChallenge, mCb->mGeneratedChallenge); |
| 270 | } |
| 271 | |
| 272 | TEST_P(Face, EnumerateEnrollmentsWorksTest) { |
| 273 | // Call the method. |
| 274 | ASSERT_TRUE(mSession->enumerateEnrollments().isOk()); |
| 275 | |
| 276 | // Wait for the result. |
| 277 | auto lock = std::unique_lock{mCb->mMutex}; |
| 278 | mCb->mCv.wait(lock, [this] { return mCb->mOnEnrollmentsEnumeratedInvoked; }); |
| 279 | } |
| 280 | |
| 281 | TEST_P(Face, RemoveEnrollmentsWorksTest) { |
| 282 | // Call the method. |
| 283 | ASSERT_TRUE(mSession->removeEnrollments({}).isOk()); |
| 284 | |
| 285 | // Wait for the result. |
| 286 | auto lock = std::unique_lock{mCb->mMutex}; |
| 287 | mCb->mCv.wait(lock, [this] { return mCb->mOnEnrollmentsRemovedInvoked; }); |
| 288 | } |
| 289 | |
| 290 | TEST_P(Face, GetFeaturesWorksTest) { |
| 291 | // Call the method. |
| 292 | ASSERT_TRUE(mSession->getFeatures().isOk()); |
| 293 | |
| 294 | // Wait for the result. |
| 295 | auto lock = std::unique_lock{mCb->mMutex}; |
| 296 | mCb->mCv.wait(lock, [this] { return mCb->mOnFeaturesRetrievedInvoked; }); |
| 297 | } |
| 298 | |
| 299 | TEST_P(Face, GetAuthenticatorIdWorksTest) { |
| 300 | // Call the method. |
| 301 | ASSERT_TRUE(mSession->getAuthenticatorId().isOk()); |
| 302 | |
| 303 | // Wait for the result. |
| 304 | auto lock = std::unique_lock{mCb->mMutex}; |
| 305 | mCb->mCv.wait(lock, [this] { return mCb->mOnAuthenticatorIdRetrievedInvoked; }); |
| 306 | } |
| 307 | |
| 308 | TEST_P(Face, InvalidateAuthenticatorIdWorksTest) { |
| 309 | // Call the method. |
| 310 | ASSERT_TRUE(mSession->invalidateAuthenticatorId().isOk()); |
| 311 | |
| 312 | // Wait for the result. |
| 313 | auto lock = std::unique_lock{mCb->mMutex}; |
| 314 | mCb->mCv.wait(lock, [this] { return mCb->mOnAuthenticatorIdInvalidatedInvoked; }); |
Ilya Matyukhin | 3b542cd | 2020-10-12 18:23:46 -0700 | [diff] [blame] | 315 | } |
| 316 | |
| 317 | GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(Face); |
| 318 | INSTANTIATE_TEST_SUITE_P(IFace, Face, |
| 319 | testing::ValuesIn(::android::getAidlHalInstanceNames(IFace::descriptor)), |
| 320 | ::android::PrintInstanceNameToString); |
| 321 | |
| 322 | } // namespace |
Ilya Matyukhin | cc2b694 | 2021-03-23 23:08:41 -0700 | [diff] [blame] | 323 | } // namespace aidl::android::hardware::biometrics::face |
Ilya Matyukhin | 3b542cd | 2020-10-12 18:23:46 -0700 | [diff] [blame] | 324 | |
| 325 | int main(int argc, char** argv) { |
| 326 | ::testing::InitGoogleTest(&argc, argv); |
| 327 | ABinderProcess_setThreadPoolMaxThreadCount(1); |
| 328 | ABinderProcess_startThreadPool(); |
| 329 | return RUN_ALL_TESTS(); |
| 330 | } |