Merge "Remove unnecessary dependencies."
diff --git a/base/include/hidl/Status.h b/base/include/hidl/Status.h
index 7c716c7..f812ebb 100644
--- a/base/include/hidl/Status.h
+++ b/base/include/hidl/Status.h
@@ -161,9 +161,17 @@
}
// Check if underlying error is DEAD_OBJECT.
- // Does not set mCheckedStatus.
+ // Check mCheckedStatus only if this method returns true.
bool isDeadObject() const {
- return mStatus.transactionError() == DEAD_OBJECT;
+ bool dead = mStatus.transactionError() == DEAD_OBJECT;
+
+ // This way, if you only check isDeadObject your process will
+ // only be killed for more serious unchecked errors
+ if (dead) {
+ mCheckedStatus = true;
+ }
+
+ return dead;
}
// For debugging purposes only