diff options
author | 2020-12-30 19:52:49 +0000 | |
---|---|---|
committer | 2020-12-30 19:52:49 +0000 | |
commit | cc45cabcbaf494a70905396ec79a3811a2b33bad (patch) | |
tree | 06bb3befd949e48f30b00143a5e42546608fb070 | |
parent | 58795ac61b8dbddf1425848fbd19861e7e1b9dbd (diff) | |
parent | 99c72813ce26557d328cfb0fa963273561e1538e (diff) |
Merge "libbinder: only set sm stability if non-null" am: 7ac860e54f am: 99c72813ce
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1536623
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I703d82abf612d2a0c7f0d440da6a3e54eadab302
-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; } |