diff options
Diffstat (limited to 'libs/binder/ProcessState.cpp')
-rw-r--r-- | libs/binder/ProcessState.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libs/binder/ProcessState.cpp b/libs/binder/ProcessState.cpp index 6f26450275..b5e4dfe4df 100644 --- a/libs/binder/ProcessState.cpp +++ b/libs/binder/ProcessState.cpp @@ -124,14 +124,14 @@ sp<IBinder> ProcessState::getContextObject(const sp<IBinder>& /*caller*/) { sp<IBinder> context = getStrongProxyForHandle(0); - if (context == nullptr) { - ALOGW("Not able to get context object on %s.", mDriverName.c_str()); + if (context) { + // The root object is special since we get it directly from the driver, it is never + // written by Parcell::writeStrongBinder. + internal::Stability::markCompilationUnit(context.get()); + } else { + ALOGW("Not able to get context object on %s.", mDriverName.c_str()); } - // The root object is special since we get it directly from the driver, it is never - // written by Parcell::writeStrongBinder. - internal::Stability::markCompilationUnit(context.get()); - return context; } |