diff options
| author | 2020-12-30 20:17:54 +0000 | |
|---|---|---|
| committer | 2020-12-30 20:17:54 +0000 | |
| commit | c7204b2f70a8ee1a4a90a90f90e0bee2044e7903 (patch) | |
| tree | 3de747bf06fc6f22b579ea7fdead11c71475fd0f | |
| parent | b973403c4eab319a5f16893626c2532265271f92 (diff) | |
| parent | cc45cabcbaf494a70905396ec79a3811a2b33bad (diff) | |
Merge "libbinder: only set sm stability if non-null" am: 7ac860e54f am: 99c72813ce am: cc45cabcba
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1536623
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: If71c9cecbdae738c588bb3e559b5ed380fe359bb
| -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; } |