diff options
author | 2019-09-10 10:18:00 -0700 | |
---|---|---|
committer | 2019-09-17 11:21:18 -0700 | |
commit | 86a17f87f6a588ed291f7946889fa64fcdad88ec (patch) | |
tree | 63f35ecd16ac060d4156508cb72d38239d92e7b5 /libs/binder/Stability.cpp | |
parent | 13286c3b510661eb5f1ffbdad5e5a6881a1dbb5e (diff) |
servicemanager: check VINTF manifest for VINTF ifs
For interfaces that are exported API to vendor, check that the
interfaces are declared in the manifest before allowing them to
register.
Implements this relationship:
Device using VINTF instance => instance in manifest
The manifest is used for two things:
- understand which HAL interfaces are used so that we don't deprecate
them too early.
- understand which interfaces are on the device: this allows clients to
depend on a HAL interface IFF it is installed.
Bug: 136027762
Test: try registering interface that is and isn't in the VINTF manifest
Change-Id: I8aa09a56c638a6cc3aa93f102caf09da401a143b
Diffstat (limited to 'libs/binder/Stability.cpp')
-rw-r--r-- | libs/binder/Stability.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/libs/binder/Stability.cpp b/libs/binder/Stability.cpp index b6f10c8759..7ce5e36292 100644 --- a/libs/binder/Stability.cpp +++ b/libs/binder/Stability.cpp @@ -37,6 +37,10 @@ void Stability::markVndk(IBinder* binder) { LOG_ALWAYS_FATAL_IF(result != OK, "Should only mark known object."); } +bool Stability::requiresVintfDeclaration(const sp<IBinder>& binder) { + return check(get(binder.get()), Level::VINTF); +} + void Stability::tryMarkCompilationUnit(IBinder* binder) { (void) set(binder, kLocalStability, false /*log*/); } @@ -99,12 +103,6 @@ bool Stability::check(int32_t provided, Level required) { stable = false; } - if (!stable) { - ALOGE("Cannot do a user transaction on a %s binder in a %s context.", - stabilityString(provided).c_str(), - stabilityString(required).c_str()); - } - return stable; } @@ -123,4 +121,4 @@ std::string Stability::stabilityString(int32_t stability) { } } // namespace internal -} // namespace stability
\ No newline at end of file +} // namespace stability |