[Audiosharing] Use new API to start private broadcast.
Test: Manual Bug: 305620450 Change-Id: I7607acdbc647c7c06969fda588ba159a8fb47ed0
This commit is contained in:
@@ -22,6 +22,7 @@ import android.bluetooth.BluetoothLeBroadcast;
|
|||||||
import android.bluetooth.BluetoothLeBroadcastAssistant;
|
import android.bluetooth.BluetoothLeBroadcastAssistant;
|
||||||
import android.bluetooth.BluetoothLeBroadcastMetadata;
|
import android.bluetooth.BluetoothLeBroadcastMetadata;
|
||||||
import android.bluetooth.BluetoothLeBroadcastReceiveState;
|
import android.bluetooth.BluetoothLeBroadcastReceiveState;
|
||||||
|
import android.bluetooth.BluetoothLeBroadcastSubgroupSettings;
|
||||||
import android.bluetooth.BluetoothProfile;
|
import android.bluetooth.BluetoothProfile;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
@@ -540,7 +541,8 @@ public class AudioSharingDevicePreferenceController extends BasePreferenceContro
|
|||||||
mTargetSinks.add(device.getDevice());
|
mTargetSinks.add(device.getDevice());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mBroadcast.startBroadcast("test", null);
|
mBroadcast.startPrivateBroadcast(
|
||||||
|
BluetoothLeBroadcastSubgroupSettings.QUALITY_HIGH);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@@ -22,6 +22,7 @@ import android.bluetooth.BluetoothLeBroadcast;
|
|||||||
import android.bluetooth.BluetoothLeBroadcastAssistant;
|
import android.bluetooth.BluetoothLeBroadcastAssistant;
|
||||||
import android.bluetooth.BluetoothLeBroadcastMetadata;
|
import android.bluetooth.BluetoothLeBroadcastMetadata;
|
||||||
import android.bluetooth.BluetoothLeBroadcastReceiveState;
|
import android.bluetooth.BluetoothLeBroadcastReceiveState;
|
||||||
|
import android.bluetooth.BluetoothLeBroadcastSubgroupSettings;
|
||||||
import android.content.BroadcastReceiver;
|
import android.content.BroadcastReceiver;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
@@ -339,8 +340,7 @@ public class AudioSharingSwitchBarController extends BasePreferenceController
|
|||||||
}
|
}
|
||||||
mDeviceItemsForSharing.remove(0);
|
mDeviceItemsForSharing.remove(0);
|
||||||
}
|
}
|
||||||
// TODO: start broadcast with new API
|
mBroadcast.startPrivateBroadcast(BluetoothLeBroadcastSubgroupSettings.QUALITY_HIGH);
|
||||||
mBroadcast.startBroadcast("test", null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void stopAudioSharing() {
|
private void stopAudioSharing() {
|
||||||
|
Reference in New Issue
Block a user