Loading android/app/res/values/config.xml +11 −0 Original line number Diff line number Diff line Loading @@ -121,4 +121,15 @@ <!-- Package that is providing the exposure notification service --> <string name="exposure_notification_package">com.google.android.gms</string> <!-- Enabling Gabeldorsche up to the scanning layer, including - BLE scanning - BLE advertising - ACL connection management - Controller information management - HCI layer - HAL interface layer - Other required GD components like config storage --> <bool name="enable_gd_up_to_scanning_layer">false</bool> </resources> android/app/src/com/android/bluetooth/btservice/AdapterService.java +2 −1 Original line number Diff line number Diff line Loading @@ -3395,7 +3395,8 @@ public class AdapterService extends Service { if (DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_BLUETOOTH, GD_ADVERTISING_FLAG, false)) { initFlags.add(String.format("%s=%s", GD_ADVERTISING_FLAG, "true")); } if (DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_BLUETOOTH, GD_SCANNING_FLAG, false)) { if (DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_BLUETOOTH, GD_SCANNING_FLAG, Config.isGdEnabledUpToScanningLayer())) { initFlags.add(String.format("%s=%s", GD_SCANNING_FLAG, "true")); } if (DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_BLUETOOTH, GD_HCI_FLAG, false)) { Loading android/app/src/com/android/bluetooth/btservice/Config.java +8 −1 Original line number Diff line number Diff line Loading @@ -22,10 +22,10 @@ import android.bluetooth.IBluetoothManager; import android.content.ContentResolver; import android.content.Context; import android.content.res.Resources; import android.os.SystemProperties; import android.os.IBinder; import android.os.RemoteException; import android.os.ServiceManager; import android.os.SystemProperties; import android.provider.Settings; import android.text.TextUtils; import android.util.Log; Loading Loading @@ -111,6 +111,8 @@ public class Config { private static Class[] sSupportedProfiles = new Class[0]; private static boolean sIsGdEnabledUptoScanningLayer = false; static void init(Context ctx) { if (ctx == null) { return; Loading Loading @@ -143,12 +145,17 @@ public class Config { } } sSupportedProfiles = profiles.toArray(new Class[profiles.size()]); sIsGdEnabledUptoScanningLayer = resources.getBoolean(R.bool.enable_gd_up_to_scanning_layer); } static Class[] getSupportedProfiles() { return sSupportedProfiles; } static boolean isGdEnabledUpToScanningLayer() { return sIsGdEnabledUptoScanningLayer; } private static long getProfileMask(Class profile) { for (ProfileConfig config : PROFILE_SERVICES_AND_FLAGS) { if (config.mClass == profile) { Loading Loading
android/app/res/values/config.xml +11 −0 Original line number Diff line number Diff line Loading @@ -121,4 +121,15 @@ <!-- Package that is providing the exposure notification service --> <string name="exposure_notification_package">com.google.android.gms</string> <!-- Enabling Gabeldorsche up to the scanning layer, including - BLE scanning - BLE advertising - ACL connection management - Controller information management - HCI layer - HAL interface layer - Other required GD components like config storage --> <bool name="enable_gd_up_to_scanning_layer">false</bool> </resources>
android/app/src/com/android/bluetooth/btservice/AdapterService.java +2 −1 Original line number Diff line number Diff line Loading @@ -3395,7 +3395,8 @@ public class AdapterService extends Service { if (DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_BLUETOOTH, GD_ADVERTISING_FLAG, false)) { initFlags.add(String.format("%s=%s", GD_ADVERTISING_FLAG, "true")); } if (DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_BLUETOOTH, GD_SCANNING_FLAG, false)) { if (DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_BLUETOOTH, GD_SCANNING_FLAG, Config.isGdEnabledUpToScanningLayer())) { initFlags.add(String.format("%s=%s", GD_SCANNING_FLAG, "true")); } if (DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_BLUETOOTH, GD_HCI_FLAG, false)) { Loading
android/app/src/com/android/bluetooth/btservice/Config.java +8 −1 Original line number Diff line number Diff line Loading @@ -22,10 +22,10 @@ import android.bluetooth.IBluetoothManager; import android.content.ContentResolver; import android.content.Context; import android.content.res.Resources; import android.os.SystemProperties; import android.os.IBinder; import android.os.RemoteException; import android.os.ServiceManager; import android.os.SystemProperties; import android.provider.Settings; import android.text.TextUtils; import android.util.Log; Loading Loading @@ -111,6 +111,8 @@ public class Config { private static Class[] sSupportedProfiles = new Class[0]; private static boolean sIsGdEnabledUptoScanningLayer = false; static void init(Context ctx) { if (ctx == null) { return; Loading Loading @@ -143,12 +145,17 @@ public class Config { } } sSupportedProfiles = profiles.toArray(new Class[profiles.size()]); sIsGdEnabledUptoScanningLayer = resources.getBoolean(R.bool.enable_gd_up_to_scanning_layer); } static Class[] getSupportedProfiles() { return sSupportedProfiles; } static boolean isGdEnabledUpToScanningLayer() { return sIsGdEnabledUptoScanningLayer; } private static long getProfileMask(Class profile) { for (ProfileConfig config : PROFILE_SERVICES_AND_FLAGS) { if (config.mClass == profile) { Loading