Loading android/app/src/com/android/bluetooth/btservice/Config.java +6 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.bluetooth.btservice; import android.bluetooth.BluetoothProfile; import android.content.Context; import android.content.pm.PackageManager; import android.content.res.Resources; import android.os.SystemProperties; import android.util.Log; Loading Loading @@ -193,6 +194,11 @@ public class Config { } } // Disable ASHA if BLE is not supported on this platform if (!ctx.getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) { setProfileEnabled(HearingAidService.class, false); } ArrayList<Class> profiles = new ArrayList<>(PROFILE_SERVICES_AND_FLAGS.length); for (ProfileConfig config : PROFILE_SERVICES_AND_FLAGS) { Log.i(TAG, "init: profile=" + config.mClass.getSimpleName() + ", enabled=" Loading android/app/src/com/android/bluetooth/hearingaid/HearingAidService.java +1 −1 Original line number Diff line number Diff line Loading @@ -107,7 +107,7 @@ public class HearingAidService extends ProfileService { private final ServiceFactory mFactory = new ServiceFactory(); public static boolean isEnabled() { return BluetoothProperties.isProfileAshaCentralEnabled().orElse(false); return BluetoothProperties.isProfileAshaCentralEnabled().orElse(true); } @Override Loading service/java/com/android/server/bluetooth/BluetoothManagerService.java +5 −1 Original line number Diff line number Diff line Loading @@ -601,8 +601,12 @@ public class BluetoothManagerService extends IBluetoothManager.Stub { mBluetoothNotificationManager = new BluetoothNotificationManager(mContext); // Disable ASHA if BLE is not supported on this platform mIsHearingAidProfileSupported = BluetoothProperties.isProfileAshaCentralEnabled().orElse(false); BluetoothProperties.isProfileAshaCentralEnabled().orElse(true); if (!mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) { mIsHearingAidProfileSupported = false; } String value = SystemProperties.get( "persist.sys.fflag.override.settings_bluetooth_hearing_aid"); Loading Loading
android/app/src/com/android/bluetooth/btservice/Config.java +6 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.bluetooth.btservice; import android.bluetooth.BluetoothProfile; import android.content.Context; import android.content.pm.PackageManager; import android.content.res.Resources; import android.os.SystemProperties; import android.util.Log; Loading Loading @@ -193,6 +194,11 @@ public class Config { } } // Disable ASHA if BLE is not supported on this platform if (!ctx.getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) { setProfileEnabled(HearingAidService.class, false); } ArrayList<Class> profiles = new ArrayList<>(PROFILE_SERVICES_AND_FLAGS.length); for (ProfileConfig config : PROFILE_SERVICES_AND_FLAGS) { Log.i(TAG, "init: profile=" + config.mClass.getSimpleName() + ", enabled=" Loading
android/app/src/com/android/bluetooth/hearingaid/HearingAidService.java +1 −1 Original line number Diff line number Diff line Loading @@ -107,7 +107,7 @@ public class HearingAidService extends ProfileService { private final ServiceFactory mFactory = new ServiceFactory(); public static boolean isEnabled() { return BluetoothProperties.isProfileAshaCentralEnabled().orElse(false); return BluetoothProperties.isProfileAshaCentralEnabled().orElse(true); } @Override Loading
service/java/com/android/server/bluetooth/BluetoothManagerService.java +5 −1 Original line number Diff line number Diff line Loading @@ -601,8 +601,12 @@ public class BluetoothManagerService extends IBluetoothManager.Stub { mBluetoothNotificationManager = new BluetoothNotificationManager(mContext); // Disable ASHA if BLE is not supported on this platform mIsHearingAidProfileSupported = BluetoothProperties.isProfileAshaCentralEnabled().orElse(false); BluetoothProperties.isProfileAshaCentralEnabled().orElse(true); if (!mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) { mIsHearingAidProfileSupported = false; } String value = SystemProperties.get( "persist.sys.fflag.override.settings_bluetooth_hearing_aid"); Loading