Loading src/com/android/settings/development/bluetooth/AbstractBluetoothListPreferenceController.java +8 −15 Original line number Original line Diff line number Diff line Loading @@ -43,7 +43,6 @@ public abstract class AbstractBluetoothListPreferenceController implements Preference.OnPreferenceChangeListener { implements Preference.OnPreferenceChangeListener { private static final String TAG = "AbstrBtListPrefCtrl"; private static final String TAG = "AbstrBtListPrefCtrl"; private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG); protected static final int DEFAULT_VALUE_INT = 1000; protected static final int DEFAULT_VALUE_INT = 1000; Loading Loading @@ -74,9 +73,7 @@ public abstract class AbstractBluetoothListPreferenceController @Override @Override public boolean onPreferenceChange(@Nullable Preference preference, @NonNull Object newValue) { public boolean onPreferenceChange(@Nullable Preference preference, @NonNull Object newValue) { if (DEBUG) { Log.d(TAG, "onPreferenceChange: newValue=" + (String) newValue); Log.d(TAG, "onPreferenceChange: newValue=" + (String) newValue); } if (mListPreference == null) { if (mListPreference == null) { Log.e(TAG, "onPreferenceChange: List preference is null"); Log.e(TAG, "onPreferenceChange: List preference is null"); return false; return false; Loading @@ -99,9 +96,7 @@ public abstract class AbstractBluetoothListPreferenceController @Override @Override protected void onDeveloperOptionsSwitchDisabled() { protected void onDeveloperOptionsSwitchDisabled() { super.onDeveloperOptionsSwitchDisabled(); super.onDeveloperOptionsSwitchDisabled(); if (DEBUG) { Log.d(TAG, "onDeveloperOptionsSwitchDisabled"); Log.d(TAG, "onDeveloperOptionsSwitchDisabled"); } if (mListPreference == null) { if (mListPreference == null) { Log.e(TAG, "onDeveloperOptionsSwitchDisabled: List preference is null"); Log.e(TAG, "onDeveloperOptionsSwitchDisabled: List preference is null"); return; return; Loading Loading @@ -230,14 +225,12 @@ public abstract class AbstractBluetoothListPreferenceController } } private void setupDefaultListPreference() { private void setupDefaultListPreference() { if (DEBUG) { Log.d( Log.d( TAG, TAG, "setupDefaultListPreference: mDefaultEntry=" "setupDefaultListPreference: mDefaultEntry=" + mDefaultEntry + mDefaultEntry + ", mDefaultValue=" + ", mDefaultValue=" + mDefaultValue); + mDefaultValue); } if (mListPreference == null) { if (mListPreference == null) { Log.e(TAG, "setupListPreference: List preference is null"); Log.e(TAG, "setupListPreference: List preference is null"); return; return; Loading src/com/android/settings/development/bluetooth/BluetoothCodecListPreferenceController.java +11 −24 Original line number Original line Diff line number Diff line Loading @@ -43,7 +43,6 @@ public class BluetoothCodecListPreferenceController private static final String KEY = "bluetooth_audio_codec_settings_list"; private static final String KEY = "bluetooth_audio_codec_settings_list"; private static final String TAG = "BtExtCodecCtr"; private static final String TAG = "BtExtCodecCtr"; private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG); @Nullable private final Callback mCallback; @Nullable private final Callback mCallback; Loading @@ -59,9 +58,7 @@ public class BluetoothCodecListPreferenceController @Override @Override public boolean isAvailable() { public boolean isAvailable() { boolean available = Flags.a2dpOffloadCodecExtensibilitySettings(); boolean available = Flags.a2dpOffloadCodecExtensibilitySettings(); if (DEBUG) { Log.d(TAG, "isAvailable: " + available); Log.d(TAG, "isAvailable: " + available); } return available; return available; } } Loading @@ -82,9 +79,7 @@ public class BluetoothCodecListPreferenceController return false; return false; } } if (DEBUG) { Log.d(TAG, "onPreferenceChange: newValue=" + (String) newValue); Log.d(TAG, "onPreferenceChange: newValue=" + (String) newValue); } final BluetoothA2dp bluetoothA2dp = mBluetoothA2dp; final BluetoothA2dp bluetoothA2dp = mBluetoothA2dp; if (bluetoothA2dp == null) { if (bluetoothA2dp == null) { Log.e(TAG, "onPreferenceChange: bluetoothA2dp is null"); Log.e(TAG, "onPreferenceChange: bluetoothA2dp is null"); Loading @@ -110,9 +105,7 @@ public class BluetoothCodecListPreferenceController return false; return false; } } if (DEBUG) { Log.d(TAG, "onPreferenceChange: setCodecConfigPreference: " + codecConfig.toString()); Log.d(TAG, "onPreferenceChange: setCodecConfigPreference: " + codecConfig.toString()); } bluetoothA2dp.setCodecConfigPreference(activeDevice, codecConfig); bluetoothA2dp.setCodecConfigPreference(activeDevice, codecConfig); if (mCallback != null) { if (mCallback != null) { mCallback.onBluetoothCodecChanged(); mCallback.onBluetoothCodecChanged(); Loading Loading @@ -161,7 +154,6 @@ public class BluetoothCodecListPreferenceController && currentCodecConfig.getExtendedCodecType().equals(codecType)) { && currentCodecConfig.getExtendedCodecType().equals(codecType)) { selectedCodecId = codecIds.get(codecIds.size() - 1); selectedCodecId = codecIds.get(codecIds.size() - 1); selectedLabel = labels.get(labels.size() - 1); selectedLabel = labels.get(labels.size() - 1); if (DEBUG) { Log.d( Log.d( TAG, TAG, "updateState: Current config: " "updateState: Current config: " Loading @@ -170,7 +162,6 @@ public class BluetoothCodecListPreferenceController + selectedCodecId); + selectedCodecId); } } } } } setupListPreference(labels, codecIds, selectedLabel, selectedCodecId); setupListPreference(labels, codecIds, selectedLabel, selectedCodecId); } } Loading @@ -178,9 +169,7 @@ public class BluetoothCodecListPreferenceController @Override @Override public void onHDAudioEnabled(boolean enabled) { public void onHDAudioEnabled(boolean enabled) { if (DEBUG) { Log.d(TAG, "onHDAudioEnabled: enabled=" + enabled); Log.d(TAG, "onHDAudioEnabled: enabled=" + enabled); } if (mListPreference == null) { if (mListPreference == null) { Log.e(TAG, "onHDAudioEnabled: List preference is null"); Log.e(TAG, "onHDAudioEnabled: List preference is null"); return; return; Loading Loading @@ -216,9 +205,7 @@ public class BluetoothCodecListPreferenceController return; return; } } if (DEBUG) { Log.d(TAG, "writeConfigurationValues: Selected codec: " + selectedCodecType.toString()); Log.d(TAG, "writeConfigurationValues: Selected codec: " + selectedCodecType.toString()); } final BluetoothCodecStatus codecStatus = getBluetoothCodecStatus(); final BluetoothCodecStatus codecStatus = getBluetoothCodecStatus(); if (codecStatus == null) { if (codecStatus == null) { Log.e(TAG, "writeConfigurationValues: Bluetooth Codec Status is null"); Log.e(TAG, "writeConfigurationValues: Bluetooth Codec Status is null"); Loading Loading
src/com/android/settings/development/bluetooth/AbstractBluetoothListPreferenceController.java +8 −15 Original line number Original line Diff line number Diff line Loading @@ -43,7 +43,6 @@ public abstract class AbstractBluetoothListPreferenceController implements Preference.OnPreferenceChangeListener { implements Preference.OnPreferenceChangeListener { private static final String TAG = "AbstrBtListPrefCtrl"; private static final String TAG = "AbstrBtListPrefCtrl"; private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG); protected static final int DEFAULT_VALUE_INT = 1000; protected static final int DEFAULT_VALUE_INT = 1000; Loading Loading @@ -74,9 +73,7 @@ public abstract class AbstractBluetoothListPreferenceController @Override @Override public boolean onPreferenceChange(@Nullable Preference preference, @NonNull Object newValue) { public boolean onPreferenceChange(@Nullable Preference preference, @NonNull Object newValue) { if (DEBUG) { Log.d(TAG, "onPreferenceChange: newValue=" + (String) newValue); Log.d(TAG, "onPreferenceChange: newValue=" + (String) newValue); } if (mListPreference == null) { if (mListPreference == null) { Log.e(TAG, "onPreferenceChange: List preference is null"); Log.e(TAG, "onPreferenceChange: List preference is null"); return false; return false; Loading @@ -99,9 +96,7 @@ public abstract class AbstractBluetoothListPreferenceController @Override @Override protected void onDeveloperOptionsSwitchDisabled() { protected void onDeveloperOptionsSwitchDisabled() { super.onDeveloperOptionsSwitchDisabled(); super.onDeveloperOptionsSwitchDisabled(); if (DEBUG) { Log.d(TAG, "onDeveloperOptionsSwitchDisabled"); Log.d(TAG, "onDeveloperOptionsSwitchDisabled"); } if (mListPreference == null) { if (mListPreference == null) { Log.e(TAG, "onDeveloperOptionsSwitchDisabled: List preference is null"); Log.e(TAG, "onDeveloperOptionsSwitchDisabled: List preference is null"); return; return; Loading Loading @@ -230,14 +225,12 @@ public abstract class AbstractBluetoothListPreferenceController } } private void setupDefaultListPreference() { private void setupDefaultListPreference() { if (DEBUG) { Log.d( Log.d( TAG, TAG, "setupDefaultListPreference: mDefaultEntry=" "setupDefaultListPreference: mDefaultEntry=" + mDefaultEntry + mDefaultEntry + ", mDefaultValue=" + ", mDefaultValue=" + mDefaultValue); + mDefaultValue); } if (mListPreference == null) { if (mListPreference == null) { Log.e(TAG, "setupListPreference: List preference is null"); Log.e(TAG, "setupListPreference: List preference is null"); return; return; Loading
src/com/android/settings/development/bluetooth/BluetoothCodecListPreferenceController.java +11 −24 Original line number Original line Diff line number Diff line Loading @@ -43,7 +43,6 @@ public class BluetoothCodecListPreferenceController private static final String KEY = "bluetooth_audio_codec_settings_list"; private static final String KEY = "bluetooth_audio_codec_settings_list"; private static final String TAG = "BtExtCodecCtr"; private static final String TAG = "BtExtCodecCtr"; private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG); @Nullable private final Callback mCallback; @Nullable private final Callback mCallback; Loading @@ -59,9 +58,7 @@ public class BluetoothCodecListPreferenceController @Override @Override public boolean isAvailable() { public boolean isAvailable() { boolean available = Flags.a2dpOffloadCodecExtensibilitySettings(); boolean available = Flags.a2dpOffloadCodecExtensibilitySettings(); if (DEBUG) { Log.d(TAG, "isAvailable: " + available); Log.d(TAG, "isAvailable: " + available); } return available; return available; } } Loading @@ -82,9 +79,7 @@ public class BluetoothCodecListPreferenceController return false; return false; } } if (DEBUG) { Log.d(TAG, "onPreferenceChange: newValue=" + (String) newValue); Log.d(TAG, "onPreferenceChange: newValue=" + (String) newValue); } final BluetoothA2dp bluetoothA2dp = mBluetoothA2dp; final BluetoothA2dp bluetoothA2dp = mBluetoothA2dp; if (bluetoothA2dp == null) { if (bluetoothA2dp == null) { Log.e(TAG, "onPreferenceChange: bluetoothA2dp is null"); Log.e(TAG, "onPreferenceChange: bluetoothA2dp is null"); Loading @@ -110,9 +105,7 @@ public class BluetoothCodecListPreferenceController return false; return false; } } if (DEBUG) { Log.d(TAG, "onPreferenceChange: setCodecConfigPreference: " + codecConfig.toString()); Log.d(TAG, "onPreferenceChange: setCodecConfigPreference: " + codecConfig.toString()); } bluetoothA2dp.setCodecConfigPreference(activeDevice, codecConfig); bluetoothA2dp.setCodecConfigPreference(activeDevice, codecConfig); if (mCallback != null) { if (mCallback != null) { mCallback.onBluetoothCodecChanged(); mCallback.onBluetoothCodecChanged(); Loading Loading @@ -161,7 +154,6 @@ public class BluetoothCodecListPreferenceController && currentCodecConfig.getExtendedCodecType().equals(codecType)) { && currentCodecConfig.getExtendedCodecType().equals(codecType)) { selectedCodecId = codecIds.get(codecIds.size() - 1); selectedCodecId = codecIds.get(codecIds.size() - 1); selectedLabel = labels.get(labels.size() - 1); selectedLabel = labels.get(labels.size() - 1); if (DEBUG) { Log.d( Log.d( TAG, TAG, "updateState: Current config: " "updateState: Current config: " Loading @@ -170,7 +162,6 @@ public class BluetoothCodecListPreferenceController + selectedCodecId); + selectedCodecId); } } } } } setupListPreference(labels, codecIds, selectedLabel, selectedCodecId); setupListPreference(labels, codecIds, selectedLabel, selectedCodecId); } } Loading @@ -178,9 +169,7 @@ public class BluetoothCodecListPreferenceController @Override @Override public void onHDAudioEnabled(boolean enabled) { public void onHDAudioEnabled(boolean enabled) { if (DEBUG) { Log.d(TAG, "onHDAudioEnabled: enabled=" + enabled); Log.d(TAG, "onHDAudioEnabled: enabled=" + enabled); } if (mListPreference == null) { if (mListPreference == null) { Log.e(TAG, "onHDAudioEnabled: List preference is null"); Log.e(TAG, "onHDAudioEnabled: List preference is null"); return; return; Loading Loading @@ -216,9 +205,7 @@ public class BluetoothCodecListPreferenceController return; return; } } if (DEBUG) { Log.d(TAG, "writeConfigurationValues: Selected codec: " + selectedCodecType.toString()); Log.d(TAG, "writeConfigurationValues: Selected codec: " + selectedCodecType.toString()); } final BluetoothCodecStatus codecStatus = getBluetoothCodecStatus(); final BluetoothCodecStatus codecStatus = getBluetoothCodecStatus(); if (codecStatus == null) { if (codecStatus == null) { Log.e(TAG, "writeConfigurationValues: Bluetooth Codec Status is null"); Log.e(TAG, "writeConfigurationValues: Bluetooth Codec Status is null"); Loading