Merge "Making Bluetooth OPP file transfer intent generic"
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 770556b..aa18d33 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -17,12 +17,6 @@
android:description="@string/permdesc_bluetoothWhitelist"
android:protectionLevel="signature" />
- <!-- Allows receiving handover status broadcasts from Bluetooth -->,
- <permission android:name="com.android.permission.HANDOVER_STATUS"
- android:label="@string/permlab_handoverStatus"
- android:description="@string/permdesc_handoverStatus"
- android:protectionLevel="signature" />
-
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.ACCESS_BLUETOOTH_SHARE" />
<uses-permission android:name="android.permission.INTERNET" />
@@ -35,7 +29,7 @@
<uses-permission android:name="android.permission.READ_CALL_LOG" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
- <uses-permission android:name="com.android.permission.HANDOVER_STATUS" />
+ <uses-permission android:name="android.permission.NFC_HANDOVER_STATUS" />
<uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />
<uses-permission android:name="android.permission.WRITE_APN_SETTINGS" />
<uses-permission android:name="android.permission.NET_ADMIN" />
@@ -109,12 +103,12 @@
<action android:name="android.btopp.intent.action.STOP_HANDOVER_TRANSFER" />
</intent-filter>
<intent-filter>
- <action android:name="android.btopp.intent.action.HANDOVER_SEND" />
+ <action android:name="android.nfc.handover.intent.action.HANDOVER_SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="*/*" />
</intent-filter>
<intent-filter>
- <action android:name="android.btopp.intent.action.HANDOVER_SEND_MULTIPLE" />
+ <action android:name="android.nfc.handover.intent.action.HANDOVER_SEND_MULTIPLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="*/*" />
</intent-filter>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index f58543b..3ab8884 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -38,11 +38,6 @@
a Bluetooth device, allowing that device to send files to this device without user
confirmation.</string>
- <!-- Strings used for a (system only) permission -->
- <string name="permlab_handoverStatus">Receive BT handover transfer broadcasts.</string>
- <string name="permdesc_handoverStatus">Allows receiving handover transfer status
- information from Bluetooth.</string>
-
<!-- string showed on "Share picutre via" dialog -->
<string name="bt_share_picker_label">Bluetooth</string>
diff --git a/src/com/android/bluetooth/opp/Constants.java b/src/com/android/bluetooth/opp/Constants.java
index c31a328..4abdc69 100644
--- a/src/com/android/bluetooth/opp/Constants.java
+++ b/src/com/android/bluetooth/opp/Constants.java
@@ -82,34 +82,34 @@
/** the intent that is used for initiating a handover transfer */
public static final String ACTION_HANDOVER_SEND =
- "android.btopp.intent.action.HANDOVER_SEND";
+ "android.nfc.handover.intent.action.HANDOVER_SEND";
/** the intent that is used for initiating a multi-uri handover transfer */
public static final String ACTION_HANDOVER_SEND_MULTIPLE =
- "android.btopp.intent.action.HANDOVER_SEND_MULTIPLE";
+ "android.nfc.handover.intent.action.HANDOVER_SEND_MULTIPLE";
/** the intent that is used for indicating an incoming transfer*/
public static final String ACTION_HANDOVER_STARTED =
- "android.btopp.intent.action.BT_OPP_HANDOVER_STARTED";
+ "android.nfc.handover.intent.action.HANDOVER_STARTED";
/** intent action used to indicate the progress of a handover transfer */
public static final String ACTION_BT_OPP_TRANSFER_PROGRESS =
- "android.btopp.intent.action.BT_OPP_TRANSFER_PROGRESS";
+ "android.nfc.handover.intent.action.TRANSFER_PROGRESS";
/** intent action used to indicate the completion of a handover transfer */
public static final String ACTION_BT_OPP_TRANSFER_DONE =
- "android.btopp.intent.action.BT_OPP_TRANSFER_DONE";
+ "android.nfc.handover.intent.action.TRANSFER_DONE";
/** intent extra used to indicate the success of a handover transfer */
public static final String EXTRA_BT_OPP_TRANSFER_STATUS =
- "android.btopp.intent.extra.BT_OPP_TRANSFER_STATUS";
+ "android.nfc.handover.intent.extra.TRANSFER_STATUS";
/** intent extra used to indicate the address associated with the transfer */
public static final String EXTRA_BT_OPP_ADDRESS =
- "android.btopp.intent.extra.BT_OPP_ADDRESS";
+ "android.nfc.handover.intent.extra.ADDRESS";
public static final String EXTRA_BT_OPP_OBJECT_COUNT =
- "android.btopp.intent.extra.BT_OPP_OBJECT_COUNT";
+ "android.nfc.handover.intent.extra.OBJECT_COUNT";
public static final int COUNT_HEADER_UNAVAILABLE = -1;
public static final int HANDOVER_TRANSFER_STATUS_SUCCESS = 0;
@@ -118,7 +118,7 @@
/** intent extra used to indicate the direction of a handover transfer */
public static final String EXTRA_BT_OPP_TRANSFER_DIRECTION =
- "android.btopp.intent.extra.BT_OPP_TRANSFER_DIRECTION";
+ "android.nfc.handover.intent.extra.TRANSFER_DIRECTION";
public static final int DIRECTION_BLUETOOTH_INCOMING = 0;
@@ -126,25 +126,25 @@
/** intent extra used to provide a unique ID for the transfer */
public static final String EXTRA_BT_OPP_TRANSFER_ID =
- "android.btopp.intent.extra.BT_OPP_TRANSFER_ID";
+ "android.nfc.handover.intent.extra.TRANSFER_ID";
/** intent extra used to provide progress of the transfer */
public static final String EXTRA_BT_OPP_TRANSFER_PROGRESS =
- "android.btopp.intent.extra.BT_OPP_TRANSFER_PROGRESS";
+ "android.nfc.handover.intent.extra.TRANSFER_PROGRESS";
/** intent extra used to provide the Uri where the data was stored
* by the handover transfer */
public static final String EXTRA_BT_OPP_TRANSFER_URI =
- "android.btopp.intent.extra.BT_OPP_TRANSFER_URI";
+ "android.nfc.handover.intent.extra.TRANSFER_URI";
/** intent extra used to provide the mime-type of the data in
* the handover transfer */
public static final String EXTRA_BT_OPP_TRANSFER_MIMETYPE =
- "android.btopp.intent.extra.BT_OPP_TRANSFER_MIMETYPE";
+ "android.nfc.handover.intent.extra.TRANSFER_MIME_TYPE";
/** permission needed to be able to receive handover status requests */
public static final String HANDOVER_STATUS_PERMISSION =
- "com.android.permission.HANDOVER_STATUS";
+ "android.permission.NFC_HANDOVER_STATUS";
/** intent extra that indicates this transfer is a handover from another
* transport (NFC, WIFI)
diff --git a/tests/AndroidManifest.xml b/tests/AndroidManifest.xml
index 3ab9f79..17b07cf 100755
--- a/tests/AndroidManifest.xml
+++ b/tests/AndroidManifest.xml
@@ -14,7 +14,7 @@
<uses-permission android:name="android.permission.READ_CALL_LOG" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
- <uses-permission android:name="com.android.permission.HANDOVER_STATUS" />
+ <uses-permission android:name="android.permission.NFC_HANDOVER_STATUS" />
<uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />
<uses-permission android:name="android.permission.NET_ADMIN" />
<uses-permission android:name="android.permission.CALL_PRIVILEGED" />