/** * Clear the callback so no further updates are sent. * * Subclasses should be sure to call super.stop() so they also stop sending * updates when killed by a user. */ @Override public void stop() { disconnected(); setCallback(null); }
/** * Pass a raw measurement received from an external caller to the callback. * * Note that this method is public - users of this class can directly force * it to send new values. */ @Override public void handleMessage(VehicleMessage measurement) { super.handleMessage(measurement); }
/** * Construct a new instance and set the callback. * * @param callback An object implementing the * SourceCallback interface that should receive data from this * source. */ public BaseVehicleDataSource(SourceCallback callback) { setCallback(callback); }
@Override public void stop() { super.stop(); try { mService.unregister(mRemoteListener); } catch(RemoteException e) { Log.w(TAG, "Unable to register to receive " + "message callbacks", e); } }