aboutsummaryrefslogtreecommitdiff
path: root/en/devices/architecture/hidl-cpp
diff options
context:
space:
mode:
authorAndroid Partner Docs <noreply@android.com>2017-11-27 14:00:50 -0800
committerClay Murphy <claym@google.com>2017-11-27 14:05:08 -0800
commitac7267d7d1398c4d013f95175c0815d05cd8ff4a (patch)
tree00be835285849f088c424858daae94291225104d /en/devices/architecture/hidl-cpp
parentf3e7e140eb98c82b182eb71d7190a6774b2a35f1 (diff)
downloadsource.android.com-ac7267d7d1398c4d013f95175c0815d05cd8ff4a.tar.gz
Docs: Changes to source.android.com
- 177067701 Devsite localized content from translation request 61efef... by Android Partner Docs <noreply@android.com> - 177067685 Devsite localized content from translation request b66c5a... by Android Partner Docs <noreply@android.com> - 177067675 Devsite localized content from translation request 63e470... by Android Partner Docs <noreply@android.com> - 177067400 Updated sentence in site-updates, per translator request. by Danielle Roberts <daroberts@google.com> - 177065207 Update recommended copyright notice: more recent year, re... by Android Partner Docs <noreply@android.com> - 177059538 Use return values for registerAsService in HIDL docs. by Android Partner Docs <noreply@android.com> - 176689483 Devsite localized content from translation request 651c31... by Android Partner Docs <noreply@android.com> - 176652762 Compact PNGs and JPGs for site-androidsource by Android Partner Docs <noreply@android.com> - 176576812 Devsite localized content from translation request 4bb3f9... by Android Partner Docs <noreply@android.com> - 176539103 Replace dbto and dtbo to fix partition name in Example 1 by Clay Murphy <claym@google.com> - 176453866 Devsite localized content from translation request e3b54a... by Android Partner Docs <noreply@android.com> PiperOrigin-RevId: 177067701 Change-Id: Ic14c002fa5eae027bbb4af42888e18f14dcf0829
Diffstat (limited to 'en/devices/architecture/hidl-cpp')
-rw-r--r--en/devices/architecture/hidl-cpp/index.html6
-rw-r--r--en/devices/architecture/hidl-cpp/interfaces.html6
2 files changed, 8 insertions, 4 deletions
diff --git a/en/devices/architecture/hidl-cpp/index.html b/en/devices/architecture/hidl-cpp/index.html
index af685400..f42d8f8a 100644
--- a/en/devices/architecture/hidl-cpp/index.html
+++ b/en/devices/architecture/hidl-cpp/index.html
@@ -116,7 +116,11 @@ a binderized service. Example daemon code (for pure binderized service):</p>
<pre class="prettyprint">
int main(int /* argc */, char* /* argv */ []) {
Nfc nfc = new Nfc();
- nfc-&gt;registerAsService();
+ const status_t status = nfc-&gt;registerAsService();
+ if (status != ::android::OK) {
+ return 1; // or handle error
+ }
+ // join pool or do other things
}
</pre>
diff --git a/en/devices/architecture/hidl-cpp/interfaces.html b/en/devices/architecture/hidl-cpp/interfaces.html
index 5047e8d0..285c22b5 100644
--- a/en/devices/architecture/hidl-cpp/interfaces.html
+++ b/en/devices/architecture/hidl-cpp/interfaces.html
@@ -101,9 +101,9 @@ later:</p>
<pre class="prettyprint">
::android::sp&lt;IFoo&gt; myFoo = new FooImpl();
-::android::sp&lt;IFoo&gt; myFoo = new FooAnotherImpl();
-myFoo-&gt;registerAsService();
-mySecondFoo-&gt;registerAsService("another_foo");
+::android::sp&lt;IFoo&gt; mySecondFoo = new FooAnotherImpl();
+status_t status = myFoo-&gt;registerAsService();
+status_t anotherStatus = mySecondFoo-&gt;registerAsService("another_foo");
</pre>
<p>The <code>hwservicemanager</code> treats the combination of