Loading android/app/res/values/config.xml +0 −6 Original line number Diff line number Diff line Loading @@ -160,12 +160,6 @@ <!-- Max number of connected audio devices supported by Bluetooth stack --> <integer name="config_bluetooth_max_connected_audio_devices">5</integer> <bool name="config_supportBluetoothPersistedState">true</bool> <!-- Boolean indicating if current platform need do one-time bluetooth address re-validation --> <bool name="config_bluetooth_address_validation">false</bool> <!-- Boolean indicating if current platform supports HFP inband ringing --> <bool name="config_bluetooth_hfp_inband_ringing_support">true</bool> </resources> service/java/com/android/server/bluetooth/BluetoothManagerService.java +2 −15 Original line number Diff line number Diff line Loading @@ -585,19 +585,6 @@ class BluetoothManagerService extends IBluetoothManager.Stub { mSystemUiUid = systemUiUid; } private boolean getBluetoothBooleanConfig(String name, boolean orElse) { try { Resources bluetoothRes = mContext.getPackageManager() .getResourcesForApplication(BLUETOOTH_PACKAGE_NAME); orElse = bluetoothRes.getBoolean(bluetoothRes.getIdentifier( name, "bool", BLUETOOTH_PACKAGE_NAME)); } catch (PackageManager.NameNotFoundException e) { Log.e(TAG, "Unable to retrieve Bluetooth configuration " + name); e.printStackTrace(); } return orElse; } /** * Returns true if airplane mode is currently on */ Loading @@ -608,7 +595,7 @@ class BluetoothManagerService extends IBluetoothManager.Stub { private boolean supportBluetoothPersistedState() { // Set default support to true to copy config default. return getBluetoothBooleanConfig("config_supportBluetoothPersistedState", true); return BluetoothProperties.isSupportPersistedStateEnabled().orElse(true); } /** Loading Loading @@ -681,7 +668,7 @@ class BluetoothManagerService extends IBluetoothManager.Stub { if (DBG) { Log.d(TAG, "Loading stored name and address"); } if (getBluetoothBooleanConfig("config_bluetooth_address_validation", false) if (BluetoothProperties.isAdapterAddressValidationEnabled().orElse(false) && Settings.Secure.getIntForUser(mContentResolver, BLUETOOTH_NAME, 0, UserHandle.SYSTEM.getIdentifier()) == 0) { // if the valid flag is not set, don't load the address and name Loading Loading
android/app/res/values/config.xml +0 −6 Original line number Diff line number Diff line Loading @@ -160,12 +160,6 @@ <!-- Max number of connected audio devices supported by Bluetooth stack --> <integer name="config_bluetooth_max_connected_audio_devices">5</integer> <bool name="config_supportBluetoothPersistedState">true</bool> <!-- Boolean indicating if current platform need do one-time bluetooth address re-validation --> <bool name="config_bluetooth_address_validation">false</bool> <!-- Boolean indicating if current platform supports HFP inband ringing --> <bool name="config_bluetooth_hfp_inband_ringing_support">true</bool> </resources>
service/java/com/android/server/bluetooth/BluetoothManagerService.java +2 −15 Original line number Diff line number Diff line Loading @@ -585,19 +585,6 @@ class BluetoothManagerService extends IBluetoothManager.Stub { mSystemUiUid = systemUiUid; } private boolean getBluetoothBooleanConfig(String name, boolean orElse) { try { Resources bluetoothRes = mContext.getPackageManager() .getResourcesForApplication(BLUETOOTH_PACKAGE_NAME); orElse = bluetoothRes.getBoolean(bluetoothRes.getIdentifier( name, "bool", BLUETOOTH_PACKAGE_NAME)); } catch (PackageManager.NameNotFoundException e) { Log.e(TAG, "Unable to retrieve Bluetooth configuration " + name); e.printStackTrace(); } return orElse; } /** * Returns true if airplane mode is currently on */ Loading @@ -608,7 +595,7 @@ class BluetoothManagerService extends IBluetoothManager.Stub { private boolean supportBluetoothPersistedState() { // Set default support to true to copy config default. return getBluetoothBooleanConfig("config_supportBluetoothPersistedState", true); return BluetoothProperties.isSupportPersistedStateEnabled().orElse(true); } /** Loading Loading @@ -681,7 +668,7 @@ class BluetoothManagerService extends IBluetoothManager.Stub { if (DBG) { Log.d(TAG, "Loading stored name and address"); } if (getBluetoothBooleanConfig("config_bluetooth_address_validation", false) if (BluetoothProperties.isAdapterAddressValidationEnabled().orElse(false) && Settings.Secure.getIntForUser(mContentResolver, BLUETOOTH_NAME, 0, UserHandle.SYSTEM.getIdentifier()) == 0) { // if the valid flag is not set, don't load the address and name Loading