Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2c621b5a authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "libbinder: 'deprecate' note on BinderService" am: 0acaeabd

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1722993

Change-Id: I97187ec0d1c482d4144dedcf8a2d29dc611adeca
parents 3b8faf91 0acaeabd
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -26,6 +26,24 @@
#include <binder/ProcessState.h>
#include <binder/IServiceManager.h>

// WARNING: deprecated - DO NOT USE - prefer to setup service directly.
//
// This class embellishes a class with a few static methods which can be used in
// limited circumstances (when one service needs to be registered and
// published). However, this is an anti-pattern:
// - these methods are aliases of existing methods, and as such, represent an
//   incremental amount of information required to understand the system but
//   which does not actually save in terms of lines of code. For instance, users
//   of this class should be surprised to know that this will start up to 16
//   threads in the binder threadpool.
// - the template instantiation costs need to be paid, even though everything
//   done here is generic.
// - the getServiceName API here is undocumented and non-local (for instance,
//   this unnecessarily assumes a single service type will only be instantiated
//   once with no arguments).
//
// So, DO NOT USE.

// ---------------------------------------------------------------------------
namespace android {