From c96ee67020cad6a52276bc6ba400cde2ca927cbc Mon Sep 17 00:00:00 2001 From: Haijie Hong Date: Thu, 6 Mar 2025 17:23:16 +0800 Subject: Send opp uri information to device picker and nearby component Bug: 395796600 Bug: 397852103 Test: atest BluetoothOppLauncherActivityTest Flag: com.android.bluetooth.flags.send_opp_device_picker_extra_intent Ignore-AOSP-First: merge conflict Change-Id: Ie0bb8957308d04ea8625ae3678a1cea0d5585a54 --- framework/java/android/bluetooth/BluetoothDevicePicker.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'framework/java') diff --git a/framework/java/android/bluetooth/BluetoothDevicePicker.java b/framework/java/android/bluetooth/BluetoothDevicePicker.java index ee788dae18..7e7cd6d6b7 100644 --- a/framework/java/android/bluetooth/BluetoothDevicePicker.java +++ b/framework/java/android/bluetooth/BluetoothDevicePicker.java @@ -18,6 +18,7 @@ package android.bluetooth; import static android.Manifest.permission.BLUETOOTH_CONNECT; +import android.annotation.FlaggedApi; import android.annotation.RequiresPermission; import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; @@ -25,6 +26,8 @@ import android.annotation.SuppressLint; import android.annotation.SystemApi; import android.bluetooth.annotations.RequiresBluetoothConnectPermission; +import com.android.bluetooth.flags.Flags; + /** * A helper to show a system "Device Picker" activity to the user. * @@ -63,6 +66,14 @@ public interface BluetoothDevicePicker { @SuppressLint("ActionValue") String EXTRA_LAUNCH_CLASS = "android.bluetooth.devicepicker.extra.DEVICE_PICKER_LAUNCH_CLASS"; + /** + * Extra for the original ACTION_SEND or ACTION_SEND_MULTIPLE intent that triggered the BT + * sharing. + */ + @FlaggedApi(Flags.FLAG_OPP_DEVICE_PICKER_EXTRA_INTENT_APIS) + String EXTRA_DEVICE_PICKER_ORIGINAL_SEND_INTENT = + "android.bluetooth.extra.DEVICE_PICKER_ORIGINAL_SEND_INTENT"; + /** * Broadcast when one BT device is selected from BT device picker screen. Selected {@link * BluetoothDevice} is returned in extra data named {@link BluetoothDevice#EXTRA_DEVICE}. -- cgit v1.2.3-59-g8ed1b