Introduce BluetoothAudioCodecPreferenceController

- Create new BluetoothAudioCodecPreferenceController
 - Create controller inside the DashboardFragment
 - Port logic from DevelopmentSettings into the controller

Bug: 34203528
Test: make RunSettingsRoboTests -j40
Change-Id: I90a0e58328196315fccbecd6d46531b4f0fcaef1
This commit is contained in:
jeffreyhuang
2017-10-12 16:39:26 -07:00
parent 32b0f1d486
commit 0ef326f365
9 changed files with 325 additions and 47 deletions

View File

@@ -18,8 +18,6 @@ package com.android.settings.development;
import android.bluetooth.BluetoothCodecConfig;
import android.content.Context;
import android.support.v7.preference.ListPreference;
import android.support.v7.preference.PreferenceScreen;
import com.android.settings.R;
import com.android.settingslib.core.lifecycle.Lifecycle;
@@ -31,11 +29,9 @@ public class BluetoothAudioSampleRatePreferenceController extends
private static final String BLUETOOTH_SELECT_A2DP_SAMPLE_RATE_KEY =
"bluetooth_select_a2dp_sample_rate";
private ListPreference mPreference;
public BluetoothAudioSampleRatePreferenceController(Context context, Lifecycle lifecycle,
Object bluetoothA2dpLock, BluetoothA2dpConfigStore store) {
super(context, lifecycle, bluetoothA2dpLock, store);
BluetoothA2dpConfigStore store) {
super(context, lifecycle, store);
}
@Override
@@ -43,13 +39,6 @@ public class BluetoothAudioSampleRatePreferenceController extends
return BLUETOOTH_SELECT_A2DP_SAMPLE_RATE_KEY;
}
@Override
public void displayPreference(PreferenceScreen screen) {
super.displayPreference(screen);
mPreference = (ListPreference) screen.findPreference(getPreferenceKey());
}
@Override
protected String[] getListValues() {
return mContext.getResources().getStringArray(