Merge "remount: Replace ServiceManager::getService with checkService" into main am: 4131a3afd1
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2690886 Change-Id: I0edade2adc78401e6f5291d1a2a579ac102d2087 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
18cea8df37
1 changed files with 4 additions and 5 deletions
|
@ -128,12 +128,11 @@ class MyLogger {
|
|||
}
|
||||
|
||||
static android::sp<android::os::IVold> GetVold() {
|
||||
auto sm = android::defaultServiceManager();
|
||||
while (true) {
|
||||
if (auto sm = android::defaultServiceManager()) {
|
||||
if (auto binder = sm->getService(android::String16("vold"))) {
|
||||
if (auto vold = android::interface_cast<android::os::IVold>(binder)) {
|
||||
return vold;
|
||||
}
|
||||
if (auto binder = sm->checkService(android::String16("vold"))) {
|
||||
if (auto vold = android::interface_cast<android::os::IVold>(binder)) {
|
||||
return vold;
|
||||
}
|
||||
}
|
||||
std::this_thread::sleep_for(2s);
|
||||
|
|
Loading…
Reference in a new issue