Merge "Docs: Moved // BEGIN_INCLUDE a few lines up so readers understand the context of the Binding class (it's an inner-class)" into oc-mr1-dev

This commit is contained in:
Jon Dormody
2017-12-22 22:17:05 +00:00
committed by Android (Google) Code Review
2 changed files with 7 additions and 6 deletions

View File

@@ -79,18 +79,18 @@ public class LocalServiceActivities {
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
// BEGIN_INCLUDE(bind)
/** /**
* Example of binding and unbinding to the local service. * Example of binding and unbinding to the local service.
* This demonstrates the implementation of a service which the client will * This demonstrates the implementation of a service which the client will
* bind to, receiving an object through which it can communicate with the service.</p> * bind to, receiving an object through which it can communicate with the service.
* *
* <p>Note that this is implemented as an inner class only keep the sample * Note that this is implemented as an inner class only keep the sample
* all together; typically this code would appear in some separate class. * all together; typically this code would appear in some separate class.
*/ */
public static class Binding extends Activity { public static class Binding extends Activity {
private boolean mIsBound; private boolean mIsBound;
// BEGIN_INCLUDE(bind)
private LocalService mBoundService; private LocalService mBoundService;
private ServiceConnection mConnection = new ServiceConnection() { private ServiceConnection mConnection = new ServiceConnection() {

View File

@@ -21,16 +21,17 @@ import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
public class MessengerServiceActivities { public class MessengerServiceActivities {
// BEGIN_INCLUDE(bind)
/** /**
* Example of binding and unbinding to the remote service. * Example of binding and unbinding to the remote service.
* This demonstrates the implementation of a service which the client will * This demonstrates the implementation of a service which the client will
* bind to, interacting with it through an aidl interface.</p> * bind to, interacting with it through an aidl interface.
* *
* <p>Note that this is implemented as an inner class only keep the sample * Note that this is implemented as an inner class only keep the sample
* all together; typically this code would appear in some separate class. * all together; typically this code would appear in some separate class.
*/ */
public static class Binding extends Activity { public static class Binding extends Activity {
// BEGIN_INCLUDE(bind)
/** Messenger for communicating with service. */ /** Messenger for communicating with service. */
Messenger mService = null; Messenger mService = null;
/** Flag indicating whether we have called bind on the service. */ /** Flag indicating whether we have called bind on the service. */