Make BT icon colorful
Add new method to get rainbow bt icon and also refactor AdaptiveHomepageIcon: 1. Rename 2. Add ConstantState Bug: 126425211 Test: RunSettingsRoboTests Change-Id: Idb8aaf253d0d9e2ab33d8852f093e6689ebadde4
This commit is contained in:
@@ -38,7 +38,6 @@ import androidx.preference.PreferenceViewHolder;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.overlay.FeatureFactory;
|
||||
import com.android.settings.widget.GearPreference;
|
||||
import com.android.settingslib.bluetooth.BluetoothUtils;
|
||||
import com.android.settingslib.bluetooth.CachedBluetoothDevice;
|
||||
import com.android.settingslib.core.instrumentation.MetricsFeatureProvider;
|
||||
|
||||
@@ -130,8 +129,8 @@ public final class BluetoothDevicePreference extends GearPreference implements
|
||||
// Null check is done at the framework
|
||||
setSummary(mCachedDevice.getConnectionSummary());
|
||||
|
||||
final Pair<Drawable, String> pair = BluetoothUtils
|
||||
.getBtClassDrawableWithDescription(getContext(), mCachedDevice);
|
||||
final Pair<Drawable, String> pair = Utils
|
||||
.getBtRainbowDrawableWithDescription(getContext(), mCachedDevice);
|
||||
if (pair.first != null) {
|
||||
setIcon(pair.first);
|
||||
contentDescription = pair.second;
|
||||
@@ -246,5 +245,4 @@ public final class BluetoothDevicePreference extends GearPreference implements
|
||||
R.string.bluetooth_pairing_error_message);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user