am d21b4839: Merge "Add multi user support for bluetooth" into jb-mr1-dev

* commit 'd21b483904057212ab1654b8ef606d41f2d3fe46':
  Add multi user support for bluetooth
This commit is contained in:
Matthew Xie
2012-10-04 23:24:27 -07:00
committed by Android Git Automerger
3 changed files with 15 additions and 2 deletions

View File

@@ -620,6 +620,13 @@
android:description="@string/permdesc_bluetoothAdmin"
android:label="@string/permlab_bluetoothAdmin" />
<!-- Allows bluetooth stack to access files
@hide This should only be used by Bluetooth apk.
-->
<permission android:name="android.permission.BLUETOOTH_STACK"
android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
android:protectionLevel="signature" />
<!-- Allows applications to perform I/O operations over NFC -->
<permission android:name="android.permission.NFC"
android:permissionGroup="android.permission-group.NETWORK"

View File

@@ -42,6 +42,10 @@
<group gid="net_bt" />
</permission>
<permission name="android.permission.BLUETOOTH_STACK" >
<group gid="net_bt_stack" />
</permission>
<permission name="android.permission.NET_TUNNELING" >
<group gid="vpn" />
</permission>
@@ -176,6 +180,7 @@
<assign-permission name="android.permission.INTERACT_ACROSS_USERS" uid="shell" />
<assign-permission name="android.permission.INTERACT_ACROSS_USERS_FULL" uid="shell" />
<assign-permission name="android.permission.MANAGE_USERS" uid="shell" />
<assign-permission name="android.permission.BLUETOOTH_STACK" uid="shell" />
<assign-permission name="android.permission.MODIFY_AUDIO_SETTINGS" uid="media" />
<assign-permission name="android.permission.ACCESS_DRM" uid="media" />

View File

@@ -481,7 +481,7 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
mHandler.sendMessageDelayed(timeoutMsg,TIMEOUT_BIND_MS);
Intent i = new Intent(IBluetooth.class.getName());
if (!mContext.bindService(i, mConnection,
Context.BIND_AUTO_CREATE)) {
Context.BIND_AUTO_CREATE, UserHandle.USER_CURRENT)) {
mHandler.removeMessages(MESSAGE_TIMEOUT_BIND);
Log.e(TAG, "fail to bind to: " + IBluetooth.class.getName());
}
@@ -717,7 +717,8 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
mHandler.sendMessageDelayed(timeoutMsg,TIMEOUT_BIND_MS);
mConnection.setGetNameAddressOnly(false);
Intent i = new Intent(IBluetooth.class.getName());
if (!mContext.bindService(i, mConnection,Context.BIND_AUTO_CREATE)) {
if (!mContext.bindService(i, mConnection, Context.BIND_AUTO_CREATE,
UserHandle.USER_CURRENT)) {
mHandler.removeMessages(MESSAGE_TIMEOUT_BIND);
Log.e(TAG, "Fail to bind to: " + IBluetooth.class.getName());
}