public void onServiceConnected(ComponentName className, IBinder service) { if (DBG) log("Proxy object connected"); mService = IBluetoothPbap.Stub.asInterface(service); if (mServiceListener != null) { mServiceListener.onServiceConnected(); } }
public void onServiceConnected(ComponentName className, IBinder service) { if (DBG) Log.d(TAG, "Proxy object connected"); mService = IBluetoothHealth.Stub.asInterface(service); if (mServiceListener != null) { mServiceListener.onServiceConnected(BluetoothProfile.HEALTH, BluetoothHealth.this); } }
public void onServiceConnected(ComponentName className, IBinder service) { if (DBG) Log.d(TAG, "Proxy object connected"); mService = IBluetoothInputDevice.Stub.asInterface(service); if (mServiceListener != null) { mServiceListener.onServiceConnected( BluetoothProfile.INPUT_DEVICE, BluetoothInputDevice.this); } }
/** Create a BluetoothA2dp proxy object for interacting with the local Bluetooth A2DP service. */ /*package*/ BluetoothA2dp(Context mContext, ServiceListener l) { IBinder b = ServiceManager.getService(BluetoothA2dpService.BLUETOOTH_A2DP_SERVICE); mServiceListener = l; mAdapter = BluetoothAdapter.getDefaultAdapter(); if (b != null) { mService = IBluetoothA2dp.Stub.asInterface(b); if (mServiceListener != null) { mServiceListener.onServiceConnected(BluetoothProfile.A2DP, this); } } else { Log.w(TAG, "Bluetooth A2DP service not available!"); // Instead of throwing an exception which prevents people from going // into Wireless settings in the emulator. Let it crash later when it is actually used. mService = null; } }