diff options
author | Yifan Hong | 2018-01-17 17:52:30 -0600 |
---|---|---|
committer | Yifan Hong | 2018-01-24 13:43:48 -0600 |
commit | f73ba51f3c2d7279629ec4d2286011993194f062 (patch) | |
tree | e0aa07d3c030ecea387110f1be5f6513da4614a1 /CompatibilityMatrix.cpp | |
parent | fb9e8b655e67031c156687eeb4e561c976d04015 (diff) | |
download | platform-system-libvintf-f73ba51f3c2d7279629ec4d2286011993194f062.tar.gz platform-system-libvintf-f73ba51f3c2d7279629ec4d2286011993194f062.tar.xz platform-system-libvintf-f73ba51f3c2d7279629ec4d2286011993194f062.zip |
Add VintfObject::CheckDeprecation().android-wear-8.0.0_r1
This API reads all framework matrices at different FCM version,
and consider a service instance as "deprecated" if all of the
following is true:
1. instance is in an "old matrix"
2. instance is not in the "new matrix"
3. instance is registered through service manager /
in device manifest
4. No instance with the same package/major version/interface/
instance name but a higher minor version is:
4.1 in the "new matrix"; and
4.2 registered through service manager / in device manifest.
Test: vintf_object_test
Test: vts_treble_vintf_test
Bug: 69425186
Change-Id: I316ba9510688fc927b8f0675ed8db5e29d5036dd
Diffstat (limited to 'CompatibilityMatrix.cpp')
-rw-r--r-- | CompatibilityMatrix.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/CompatibilityMatrix.cpp b/CompatibilityMatrix.cpp index 56cd0e8..00e4d14 100644 --- a/CompatibilityMatrix.cpp +++ b/CompatibilityMatrix.cpp | |||
@@ -96,6 +96,10 @@ std::pair<MatrixHal*, VersionRange*> CompatibilityMatrix::getHalWithMajorVersion | |||
96 | } | 96 | } |
97 | return {nullptr, nullptr}; | 97 | return {nullptr, nullptr}; |
98 | } | 98 | } |
99 | std::pair<const MatrixHal*, const VersionRange*> CompatibilityMatrix::getHalWithMajorVersion( | ||
100 | const std::string& name, size_t majorVer) const { | ||
101 | return const_cast<CompatibilityMatrix*>(this)->getHalWithMajorVersion(name, majorVer); | ||
102 | } | ||
99 | 103 | ||
100 | bool CompatibilityMatrix::addAllHalsAsOptional(CompatibilityMatrix* other, std::string* error) { | 104 | bool CompatibilityMatrix::addAllHalsAsOptional(CompatibilityMatrix* other, std::string* error) { |
101 | if (other == nullptr || other->level() <= level()) { | 105 | if (other == nullptr || other->level() <= level()) { |