Show user dialog for BT connection and phonebook access

Show user dialog for incoming BT connection requests from unknown
devices. Move phone book access permission dialog from bluetooth to settings.
The permision dialog pops up to the screen properly instead of
always as notification. AT+CPBR will also use the permission dialog
to ask for user permission.

bug 4489572

Change-Id: Ic1e74b2a9416a462cac4f519240a313691da90c4
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index d92e14f..715a296 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -945,6 +945,25 @@
             </intent-filter>
         </receiver>
 
+        <receiver android:name=".bluetooth.BluetoothPermissionRequest">
+            <intent-filter>
+                <action android:name="android.bluetooth.device.action.CONNECTION_ACCESS_REQUEST" />
+                <action android:name="android.bluetooth.device.action.CONNECTION_ACCESS_CANCEL" />
+            </intent-filter>
+        </receiver>
+
+        <activity android:name=".bluetooth.BluetoothPermissionActivity"
+                  android:label="@string/bluetooth_connection_permission_request"
+                  android:excludeFromRecents="true"
+                  android:permission="android.permission.BLUETOOTH_ADMIN"
+                  android:theme="@*android:style/Theme.Holo.Dialog.Alert">
+            <intent-filter>
+                <action android:name="android.bluetooth.device.action.CONNECTION_ACCESS_REQUEST" />
+                <action android:name="android.bluetooth.device.action.CONNECTION_ACCESS_CANCEL" />
+                <category android:name="android.intent.category.DEFAULT" />
+            </intent-filter>
+        </activity>
+
         <activity android:name="ActivityPicker"
                 android:label="@string/activity_picker_label"
                 android:theme="@*android:style/Theme.Dialog.Alert"