@Override public void onServiceConnected(final ComponentName name, final IBinder service, final IUnbinder unbinder) {
			if (mConnection == null) return;	// Already closed
			Log.d(TAG, "Service connected: " + name.flattenToShortString());
			mConnectedService = new ConnectedService(name, service, unbinder);

			try {
				Log.v(TAG, "Start monitoring: " + this);
				service.linkToDeath(this, 0);
			} catch (final RemoteException e) {
				Log.e(TAG, "Service already died", e);
				return;
			}

			if (Thread.currentThread() != Looper.getMainLooper().getThread())
				new Handler(Looper.getMainLooper()).post(() -> { if (mConnection != null) mConnection.onServiceConnected(service); });
			else mConnection.onServiceConnected(service);
		}
Special {@link ServiceConnection} to be used together with ServiceShuttle. Cannot be shared by more than one service.

Created by Oasis on 2016/10/20.
shared/src/main/java/com/oasisfeng/island/shuttle/ShuttleServiceConnection.java