blob: 24694cd2d8901f4edea92da1003be0ec6dc885fd [file] [log] [blame]
Yifan Hong3daec812017-02-27 18:49:11 -08001/*
2 * Copyright (C) 2017 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
17#include "VintfObject.h"
18
Yifan Hong143cfe62017-04-13 20:18:01 -070019#include "CompatibilityMatrix.h"
20#include "parse_xml.h"
Yifan Hong8640cd12017-05-17 12:02:28 -070021#include "utils.h"
Yifan Hong143cfe62017-04-13 20:18:01 -070022
Yifan Hongd52bf3e2018-01-11 16:56:51 -080023#include <dirent.h>
24
Yifan Hong3daec812017-02-27 18:49:11 -080025#include <functional>
26#include <memory>
27#include <mutex>
28
Bowgo Tsai39adc142017-11-03 12:46:26 +080029#ifdef LIBVINTF_TARGET
30#include <android-base/properties.h>
31#endif
32
Yifan Hong60217032018-01-08 16:19:42 -080033#include <android-base/logging.h>
34
Yifan Hongd52bf3e2018-01-11 16:56:51 -080035#define FRAMEWORK_MATRIX_DIR "/system/etc/vintf/"
36
Yifan Hong60217032018-01-08 16:19:42 -080037using std::placeholders::_1;
38using std::placeholders::_2;
39
Yifan Hong3daec812017-02-27 18:49:11 -080040namespace android {
41namespace vintf {
42
43template <typename T>
Yifan Hongfc73edf2017-08-29 11:39:07 -070044struct LockedSharedPtr {
45 std::shared_ptr<T> object;
Yifan Hong3daec812017-02-27 18:49:11 -080046 std::mutex mutex;
Yifan Hong7219ba12018-01-08 16:23:49 -080047 bool fetchedOnce = false;
Yifan Hong3daec812017-02-27 18:49:11 -080048};
49
Yifan Hong1fb004e2017-09-26 15:04:44 -070050struct LockedRuntimeInfoCache {
51 std::shared_ptr<RuntimeInfo> object;
52 std::mutex mutex;
53 RuntimeInfo::FetchFlags fetchedFlags = RuntimeInfo::FetchFlag::NONE;
54};
55
Yifan Hong3daec812017-02-27 18:49:11 -080056template <typename T, typename F>
Yifan Hongfc73edf2017-08-29 11:39:07 -070057static std::shared_ptr<const T> Get(
58 LockedSharedPtr<T> *ptr,
Yifan Hong143cfe62017-04-13 20:18:01 -070059 bool skipCache,
Yifan Hong3daec812017-02-27 18:49:11 -080060 const F &fetchAllInformation) {
61 std::unique_lock<std::mutex> _lock(ptr->mutex);
Yifan Hong7219ba12018-01-08 16:23:49 -080062 if (skipCache || !ptr->fetchedOnce) {
Yifan Hong3daec812017-02-27 18:49:11 -080063 ptr->object = std::make_unique<T>();
Yifan Hong60217032018-01-08 16:19:42 -080064 std::string error;
65 if (fetchAllInformation(ptr->object.get(), &error) != OK) {
66 LOG(WARNING) << error;
Yifan Hong3daec812017-02-27 18:49:11 -080067 ptr->object = nullptr; // frees the old object
68 }
Yifan Hong7219ba12018-01-08 16:23:49 -080069 ptr->fetchedOnce = true;
Yifan Hong3daec812017-02-27 18:49:11 -080070 }
Yifan Hongfc73edf2017-08-29 11:39:07 -070071 return ptr->object;
Yifan Hong3daec812017-02-27 18:49:11 -080072}
73
74// static
Yifan Hongfc73edf2017-08-29 11:39:07 -070075std::shared_ptr<const HalManifest> VintfObject::GetDeviceHalManifest(bool skipCache) {
Steven Moreland648a0012017-10-19 21:23:41 -070076 static LockedSharedPtr<HalManifest> gVendorManifest;
77 static LockedSharedPtr<HalManifest> gOdmManifest;
Bowgo Tsai39adc142017-11-03 12:46:26 +080078#ifdef LIBVINTF_TARGET
79 static LockedSharedPtr<HalManifest> gProductManifest;
80#endif
Steven Moreland648a0012017-10-19 21:23:41 -070081 static std::mutex gDeviceManifestMutex;
82
83 std::unique_lock<std::mutex> _lock(gDeviceManifestMutex);
84
Bowgo Tsai39adc142017-11-03 12:46:26 +080085#ifdef LIBVINTF_TARGET
Steven Morelandc9bd73b2017-12-28 12:15:10 -080086 std::string productModel = android::base::GetProperty("ro.boot.product.hardware.sku", "");
Bowgo Tsai39adc142017-11-03 12:46:26 +080087 if (!productModel.empty()) {
88 auto product = Get(&gProductManifest, skipCache,
Yifan Hong60217032018-01-08 16:19:42 -080089 std::bind(&HalManifest::fetchAllInformation, _1,
Steven Morelandc9bd73b2017-12-28 12:15:10 -080090 "/odm/etc/manifest_" + productModel + ".xml", _2));
Bowgo Tsai39adc142017-11-03 12:46:26 +080091 if (product != nullptr) {
92 return product;
93 }
94 }
95#endif
96
Yifan Hong60217032018-01-08 16:19:42 -080097 auto odm = Get(&gOdmManifest, skipCache,
Steven Morelandc9bd73b2017-12-28 12:15:10 -080098 std::bind(&HalManifest::fetchAllInformation, _1, "/odm/etc/manifest.xml", _2));
Steven Moreland648a0012017-10-19 21:23:41 -070099 if (odm != nullptr) {
100 return odm;
101 }
102
103 return Get(&gVendorManifest, skipCache,
Yifan Hong60217032018-01-08 16:19:42 -0800104 std::bind(&HalManifest::fetchAllInformation, _1, "/vendor/manifest.xml", _2));
Yifan Hong3daec812017-02-27 18:49:11 -0800105}
106
107// static
Yifan Hongfc73edf2017-08-29 11:39:07 -0700108std::shared_ptr<const HalManifest> VintfObject::GetFrameworkHalManifest(bool skipCache) {
109 static LockedSharedPtr<HalManifest> gFrameworkManifest;
Yifan Hong143cfe62017-04-13 20:18:01 -0700110 return Get(&gFrameworkManifest, skipCache,
Yifan Hong60217032018-01-08 16:19:42 -0800111 std::bind(&HalManifest::fetchAllInformation, _1, "/system/manifest.xml", _2));
Yifan Hong3daec812017-02-27 18:49:11 -0800112}
113
Yifan Hong2272bf82017-04-28 14:37:56 -0700114
115// static
Yifan Hongfc73edf2017-08-29 11:39:07 -0700116std::shared_ptr<const CompatibilityMatrix> VintfObject::GetDeviceCompatibilityMatrix(bool skipCache) {
117 static LockedSharedPtr<CompatibilityMatrix> gDeviceMatrix;
Yifan Hong2272bf82017-04-28 14:37:56 -0700118 return Get(&gDeviceMatrix, skipCache,
Yifan Hong60217032018-01-08 16:19:42 -0800119 std::bind(&CompatibilityMatrix::fetchAllInformation, _1,
120 "/vendor/compatibility_matrix.xml", _2));
Yifan Hong2272bf82017-04-28 14:37:56 -0700121}
122
123// static
Yifan Hongfc73edf2017-08-29 11:39:07 -0700124std::shared_ptr<const CompatibilityMatrix> VintfObject::GetFrameworkCompatibilityMatrix(bool skipCache) {
125 static LockedSharedPtr<CompatibilityMatrix> gFrameworkMatrix;
Yifan Hongd52bf3e2018-01-11 16:56:51 -0800126 static LockedSharedPtr<CompatibilityMatrix> gCombinedFrameworkMatrix;
127 static std::mutex gFrameworkCompatibilityMatrixMutex;
128
129 // To avoid deadlock, get device manifest before any locks.
130 auto deviceManifest = GetDeviceHalManifest();
131
132 std::unique_lock<std::mutex> _lock(gFrameworkCompatibilityMatrixMutex);
133
134 auto combined =
135 Get(&gCombinedFrameworkMatrix, skipCache,
136 std::bind(&VintfObject::GetCombinedFrameworkMatrix, deviceManifest, _1, _2));
137 if (combined != nullptr) {
138 return combined;
139 }
140
Yifan Hong2272bf82017-04-28 14:37:56 -0700141 return Get(&gFrameworkMatrix, skipCache,
Yifan Hong60217032018-01-08 16:19:42 -0800142 std::bind(&CompatibilityMatrix::fetchAllInformation, _1,
143 "/system/compatibility_matrix.xml", _2));
Yifan Hong2272bf82017-04-28 14:37:56 -0700144}
145
Yifan Hongd52bf3e2018-01-11 16:56:51 -0800146status_t VintfObject::GetCombinedFrameworkMatrix(
147 const std::shared_ptr<const HalManifest>& deviceManifest, CompatibilityMatrix* out,
148 std::string* error) {
149 auto matrixFragments = GetAllFrameworkMatrixLevels(error);
150 if (matrixFragments.empty()) {
151 return NAME_NOT_FOUND;
152 }
153
154 Level deviceLevel = Level::UNSPECIFIED;
155
156 if (deviceManifest != nullptr) {
157 deviceLevel = deviceManifest->level();
158 }
159
160 // TODO(b/70628538): Do not infer from Shipping API level.
161#ifdef LIBVINTF_TARGET
162 if (deviceLevel == Level::UNSPECIFIED) {
163 auto shippingApi =
164 android::base::GetUintProperty<uint64_t>("ro.product.first_api_level", 0u);
165 if (shippingApi != 0u) {
166 deviceLevel = details::convertFromApiLevel(shippingApi);
167 }
168 }
169#endif
170
171 if (deviceLevel == Level::UNSPECIFIED) {
172 // Cannot infer FCM version. Combine all matrices by assuming
173 // Shipping FCM Version == min(all supported FCM Versions in the framework)
174 for (auto&& pair : matrixFragments) {
175 Level fragmentLevel = pair.object.level();
176 if (fragmentLevel != Level::UNSPECIFIED && deviceLevel > fragmentLevel) {
177 deviceLevel = fragmentLevel;
178 }
179 }
180 }
181
182 if (deviceLevel == Level::UNSPECIFIED) {
183 // None of the fragments specify any FCM version. Should never happen except
184 // for inconsistent builds.
185 if (error) {
186 *error = "No framework compatibility matrix files under " FRAMEWORK_MATRIX_DIR
187 " declare FCM version.";
188 }
189 return NAME_NOT_FOUND;
190 }
191
192 CompatibilityMatrix* combined =
193 CompatibilityMatrix::combine(deviceLevel, &matrixFragments, error);
194 if (combined == nullptr) {
195 return BAD_VALUE;
196 }
197 *out = std::move(*combined);
198 return OK;
199}
200
201std::vector<Named<CompatibilityMatrix>> VintfObject::GetAllFrameworkMatrixLevels(
202 std::string* error) {
203 std::vector<std::string> fileNames;
204 std::vector<Named<CompatibilityMatrix>> results;
205
206 if (details::gFetcher->listFiles(FRAMEWORK_MATRIX_DIR, &fileNames, error) != OK) {
207 return {};
208 }
209 for (const std::string& fileName : fileNames) {
210 std::string path = FRAMEWORK_MATRIX_DIR + fileName;
211
212 std::string content;
213 std::string fetchError;
214 status_t status = details::gFetcher->fetch(path, content, &fetchError);
215 if (status != OK) {
216 if (error) {
217 *error += "Ignore file " + path + ": " + fetchError + "\n";
218 }
219 continue;
220 }
221
222 auto it = results.emplace(results.end());
223 if (!gCompatibilityMatrixConverter(&it->object, content)) {
224 if (error) {
225 // TODO(b/71874788): do not use lastError() because it is not thread-safe.
226 *error +=
227 "Ignore file " + path + ": " + gCompatibilityMatrixConverter.lastError() + "\n";
228 }
229 results.erase(it);
230 continue;
231 }
232 }
233
234 if (results.empty()) {
235 if (error) {
236 *error = "No framework matrices under " FRAMEWORK_MATRIX_DIR
237 " can be fetched or parsed.\n" +
238 *error;
239 }
240 } else {
241 if (error && !error->empty()) {
242 LOG(WARNING) << *error;
243 *error = "";
244 }
245 }
246
247 return results;
248}
249
Yifan Hong3daec812017-02-27 18:49:11 -0800250// static
Yifan Hong1fb004e2017-09-26 15:04:44 -0700251std::shared_ptr<const RuntimeInfo> VintfObject::GetRuntimeInfo(bool skipCache,
252 RuntimeInfo::FetchFlags flags) {
253 static LockedRuntimeInfoCache gDeviceRuntimeInfo;
254 std::unique_lock<std::mutex> _lock(gDeviceRuntimeInfo.mutex);
255
256 if (!skipCache) {
257 flags &= (~gDeviceRuntimeInfo.fetchedFlags);
258 }
259
260 if (gDeviceRuntimeInfo.object == nullptr) {
Yifan Hong29bb2d42017-09-27 13:28:00 -0700261 gDeviceRuntimeInfo.object = details::gRuntimeInfoFactory->make_shared();
Yifan Hong1fb004e2017-09-26 15:04:44 -0700262 }
263
264 status_t status = gDeviceRuntimeInfo.object->fetchAllInformation(flags);
265 if (status != OK) {
266 gDeviceRuntimeInfo.fetchedFlags &= (~flags); // mark the fields as "not fetched"
267 return nullptr;
268 }
269
270 gDeviceRuntimeInfo.fetchedFlags |= flags;
271 return gDeviceRuntimeInfo.object;
Yifan Hong3daec812017-02-27 18:49:11 -0800272}
273
Yifan Hong143cfe62017-04-13 20:18:01 -0700274namespace details {
275
Yifan Hong143cfe62017-04-13 20:18:01 -0700276enum class ParseStatus {
277 OK,
278 PARSE_ERROR,
279 DUPLICATED_FWK_ENTRY,
280 DUPLICATED_DEV_ENTRY,
281};
282
Yifan Hong9532bd22017-04-14 15:30:52 -0700283static std::string toString(ParseStatus status) {
Yifan Hong143cfe62017-04-13 20:18:01 -0700284 switch(status) {
285 case ParseStatus::OK: return "OK";
286 case ParseStatus::PARSE_ERROR: return "parse error";
287 case ParseStatus::DUPLICATED_FWK_ENTRY: return "duplicated framework";
288 case ParseStatus::DUPLICATED_DEV_ENTRY: return "duplicated device";
289 }
290 return "";
291}
292
293template<typename T>
Yifan Hong9532bd22017-04-14 15:30:52 -0700294static ParseStatus tryParse(const std::string &xml, const XmlConverter<T> &parse,
Yifan Hongfc73edf2017-08-29 11:39:07 -0700295 std::shared_ptr<T> *fwk, std::shared_ptr<T> *dev) {
296 std::shared_ptr<T> ret = std::make_shared<T>();
Yifan Hong143cfe62017-04-13 20:18:01 -0700297 if (!parse(ret.get(), xml)) {
298 return ParseStatus::PARSE_ERROR;
299 }
300 if (ret->type() == SchemaType::FRAMEWORK) {
301 if (fwk->get() != nullptr) {
302 return ParseStatus::DUPLICATED_FWK_ENTRY;
303 }
304 *fwk = std::move(ret);
305 } else if (ret->type() == SchemaType::DEVICE) {
306 if (dev->get() != nullptr) {
307 return ParseStatus::DUPLICATED_DEV_ENTRY;
308 }
309 *dev = std::move(ret);
310 }
311 return ParseStatus::OK;
312}
313
314template<typename T, typename GetFunction>
Yifan Hongfc73edf2017-08-29 11:39:07 -0700315static status_t getMissing(const std::shared_ptr<T>& pkg, bool mount,
Yifan Hong143cfe62017-04-13 20:18:01 -0700316 std::function<status_t(void)> mountFunction,
Yifan Hongfc73edf2017-08-29 11:39:07 -0700317 std::shared_ptr<const T>* updated,
Yifan Hong143cfe62017-04-13 20:18:01 -0700318 GetFunction getFunction) {
319 if (pkg != nullptr) {
320 *updated = pkg;
321 } else {
322 if (mount) {
323 (void)mountFunction(); // ignore mount errors
324 }
325 *updated = getFunction();
326 }
327 return OK;
328}
329
330#define ADD_MESSAGE(__error__) \
331 if (error != nullptr) { \
332 *error += (__error__); \
333 } \
334
335struct PackageInfo {
336 struct Pair {
Yifan Hongfc73edf2017-08-29 11:39:07 -0700337 std::shared_ptr<HalManifest> manifest;
338 std::shared_ptr<CompatibilityMatrix> matrix;
Yifan Hong143cfe62017-04-13 20:18:01 -0700339 };
340 Pair dev;
341 Pair fwk;
342};
343
344struct UpdatedInfo {
345 struct Pair {
Yifan Hongfc73edf2017-08-29 11:39:07 -0700346 std::shared_ptr<const HalManifest> manifest;
347 std::shared_ptr<const CompatibilityMatrix> matrix;
Yifan Hong143cfe62017-04-13 20:18:01 -0700348 };
349 Pair dev;
350 Pair fwk;
Yifan Hongfc73edf2017-08-29 11:39:07 -0700351 std::shared_ptr<const RuntimeInfo> runtimeInfo;
Yifan Hong143cfe62017-04-13 20:18:01 -0700352};
353
Michael Schwartz97dc0f92017-05-08 14:07:14 -0700354// Checks given compatibility info against info on the device. If no
355// compatability info is given then the device info will be checked against
356// itself.
Yifan Hongdb6423e2017-09-11 14:38:46 -0700357int32_t checkCompatibility(const std::vector<std::string>& xmls, bool mount,
358 const PartitionMounter& mounter, std::string* error,
359 DisabledChecks disabledChecks) {
Yifan Hong143cfe62017-04-13 20:18:01 -0700360 status_t status;
361 ParseStatus parseStatus;
362 PackageInfo pkg; // All information from package.
363 UpdatedInfo updated; // All files and runtime info after the update.
364
Yifan Hong143cfe62017-04-13 20:18:01 -0700365 // parse all information from package
366 for (const auto &xml : xmls) {
367 parseStatus = tryParse(xml, gHalManifestConverter, &pkg.fwk.manifest, &pkg.dev.manifest);
368 if (parseStatus == ParseStatus::OK) {
369 continue; // work on next one
370 }
371 if (parseStatus != ParseStatus::PARSE_ERROR) {
372 ADD_MESSAGE(toString(parseStatus) + " manifest");
373 return ALREADY_EXISTS;
374 }
375 parseStatus = tryParse(xml, gCompatibilityMatrixConverter, &pkg.fwk.matrix, &pkg.dev.matrix);
376 if (parseStatus == ParseStatus::OK) {
377 continue; // work on next one
378 }
379 if (parseStatus != ParseStatus::PARSE_ERROR) {
380 ADD_MESSAGE(toString(parseStatus) + " matrix");
381 return ALREADY_EXISTS;
382 }
383 ADD_MESSAGE(toString(parseStatus)); // parse error
384 return BAD_VALUE;
385 }
386
387 // get missing info from device
Yifan Hong8640cd12017-05-17 12:02:28 -0700388 // use functions instead of std::bind because std::bind doesn't work well with mock objects
389 auto mountSystem = [&mounter] { return mounter.mountSystem(); };
390 auto mountVendor = [&mounter] { return mounter.mountVendor(); };
391 if ((status = getMissing(
Yifan Hongfc73edf2017-08-29 11:39:07 -0700392 pkg.fwk.manifest, mount, mountSystem, &updated.fwk.manifest,
Yifan Hong8640cd12017-05-17 12:02:28 -0700393 std::bind(VintfObject::GetFrameworkHalManifest, true /* skipCache */))) != OK) {
Yifan Hong143cfe62017-04-13 20:18:01 -0700394 return status;
395 }
Michael Schwartz97dc0f92017-05-08 14:07:14 -0700396 if ((status = getMissing(
Yifan Hongfc73edf2017-08-29 11:39:07 -0700397 pkg.dev.manifest, mount, mountVendor, &updated.dev.manifest,
Yifan Hong8640cd12017-05-17 12:02:28 -0700398 std::bind(VintfObject::GetDeviceHalManifest, true /* skipCache */))) != OK) {
399 return status;
400 }
401 if ((status = getMissing(
Yifan Hongfc73edf2017-08-29 11:39:07 -0700402 pkg.fwk.matrix, mount, mountSystem, &updated.fwk.matrix,
Michael Schwartz97dc0f92017-05-08 14:07:14 -0700403 std::bind(VintfObject::GetFrameworkCompatibilityMatrix, true /* skipCache */))) !=
404 OK) {
405 return status;
406 }
407 if ((status = getMissing(
Yifan Hongfc73edf2017-08-29 11:39:07 -0700408 pkg.dev.matrix, mount, mountVendor, &updated.dev.matrix,
Michael Schwartz97dc0f92017-05-08 14:07:14 -0700409 std::bind(VintfObject::GetDeviceCompatibilityMatrix, true /* skipCache */))) != OK) {
410 return status;
411 }
Yifan Hong8640cd12017-05-17 12:02:28 -0700412
413 if (mount) {
414 (void)mounter.umountSystem(); // ignore errors
415 (void)mounter.umountVendor(); // ignore errors
416 }
417
418 updated.runtimeInfo = VintfObject::GetRuntimeInfo(true /* skipCache */);
Yifan Hong143cfe62017-04-13 20:18:01 -0700419
420 // null checks for files and runtime info after the update
421 // TODO(b/37321309) if a compat mat is missing, it is not matched and considered compatible.
422 if (updated.fwk.manifest == nullptr) {
423 ADD_MESSAGE("No framework manifest file from device or from update package");
424 return NO_INIT;
425 }
426 if (updated.dev.manifest == nullptr) {
427 ADD_MESSAGE("No device manifest file from device or from update package");
428 return NO_INIT;
429 }
430 if (updated.fwk.matrix == nullptr) {
431 ADD_MESSAGE("No framework matrix, skipping;");
432 // TODO(b/37321309) consider missing matricies as errors.
433 }
434 if (updated.dev.matrix == nullptr) {
435 ADD_MESSAGE("No device matrix, skipping;");
436 // TODO(b/37321309) consider missing matricies as errors.
437 }
438 if (updated.runtimeInfo == nullptr) {
439 ADD_MESSAGE("No runtime info from device");
440 return NO_INIT;
441 }
442
443 // compatiblity check.
444 // TODO(b/37321309) outer if checks can be removed if we consider missing matrices as errors.
445 if (updated.dev.manifest && updated.fwk.matrix) {
446 if (!updated.dev.manifest->checkCompatibility(*updated.fwk.matrix, error)) {
Yifan Hong0d4be122017-05-15 17:04:22 -0700447 if (error)
448 error->insert(0, "Device manifest and framework compatibility matrix "
449 "are incompatible: ");
Yifan Hong143cfe62017-04-13 20:18:01 -0700450 return INCOMPATIBLE;
451 }
452 }
453 if (updated.fwk.manifest && updated.dev.matrix) {
454 if (!updated.fwk.manifest->checkCompatibility(*updated.dev.matrix, error)) {
Yifan Hong0d4be122017-05-15 17:04:22 -0700455 if (error)
456 error->insert(0, "Framework manifest and device compatibility matrix "
457 "are incompatible: ");
Yifan Hong143cfe62017-04-13 20:18:01 -0700458 return INCOMPATIBLE;
459 }
460 }
461 if (updated.runtimeInfo && updated.fwk.matrix) {
Yifan Hongdb6423e2017-09-11 14:38:46 -0700462 if (!updated.runtimeInfo->checkCompatibility(*updated.fwk.matrix, error, disabledChecks)) {
Yifan Hong0d4be122017-05-15 17:04:22 -0700463 if (error)
464 error->insert(0, "Runtime info and framework compatibility matrix "
465 "are incompatible: ");
Yifan Honge8b86842017-05-25 17:59:22 +0000466 return INCOMPATIBLE;
Yifan Hong143cfe62017-04-13 20:18:01 -0700467 }
468 }
469
470 return COMPATIBLE;
471}
472
473} // namespace details
474
Yifan Hongfbbf0472017-04-07 18:14:18 -0700475// static
Yifan Hongdb6423e2017-09-11 14:38:46 -0700476int32_t VintfObject::CheckCompatibility(const std::vector<std::string>& xmls, std::string* error,
477 DisabledChecks disabledChecks) {
478 return details::checkCompatibility(xmls, false /* mount */, *details::gPartitionMounter, error,
479 disabledChecks);
Yifan Hongfbbf0472017-04-07 18:14:18 -0700480}
481
Yifan Hong3daec812017-02-27 18:49:11 -0800482
483} // namespace vintf
484} // namespace android