Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 91d1d156 authored by Matthew Xie's avatar Matthew Xie Committed by Android Git Automerger
Browse files

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

* commit 'd21b4839':
  Add multi user support for bluetooth
parents 74ab4268 d21b4839
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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"
+5 −0
Original line number Diff line number Diff line
@@ -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" />
+3 −2
Original line number Diff line number Diff line
@@ -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());
                }