diff options
| author | 2020-12-30 19:37:25 +0000 | |
|---|---|---|
| committer | 2020-12-30 19:37:25 +0000 | |
| commit | 99c72813ce26557d328cfb0fa963273561e1538e (patch) | |
| tree | 17ee2bcbf9fdc920fb053042351c7ef8bc583459 /libs/binder/ProcessState.cpp | |
| parent | 402995188862c3c8efbcc4831e7ae6e7472e1e33 (diff) | |
| parent | 7ac860e54f520abad2ae87def8c3b4e04f3a3696 (diff) | |
Merge "libbinder: only set sm stability if non-null" am: 7ac860e54f
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1536623
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Ibde722a1586ee853ab4209ca2c3643bd63051e42
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; } |