Add bluetooth profile toggle visibility checker

Bug: 321178209
Test: atest BluetoothDetailsProfilesControllerTest
Change-Id: Ic6c040a5a500d51945893061623526271eba94c7
This commit is contained in:
Haijie Hong
2024-01-22 15:36:57 +08:00
parent 628ebac9e2
commit 82688cc1d3
5 changed files with 157 additions and 29 deletions

View File

@@ -27,6 +27,7 @@ import androidx.preference.Preference;
import com.android.settingslib.bluetooth.CachedBluetoothDevice;
import java.util.List;
import java.util.Set;
/**
* Provider for bluetooth related features.
@@ -73,4 +74,14 @@ public interface BluetoothFeatureProvider {
* @return the extra bluetooth preference list
*/
List<Preference> getBluetoothExtraOptions(Context context, CachedBluetoothDevice device);
/**
* Gets the bluetooth profile preference keys which should be hidden in the device details page.
*
* @param context Context
* @param bluetoothDevice the bluetooth device
* @return the profiles which should be hidden
*/
Set<String> getInvisibleProfilePreferenceKeys(
Context context, BluetoothDevice bluetoothDevice);
}