Move the bluetooth icon logic to settingslib

This cl contains the moving about:
1. Several methods in Bluetooth/Utils.java
2. Bluetooth icon drawables
3. Bluetooth strings
4. Tests

Bug: 65488978
Test: RunSettingslibRoboTests

Change-Id: I682daa3eeb5022beb90a95763c70d19d32d54915
This commit is contained in:
jackqdyulei
2017-09-18 13:43:43 -07:00
parent 9d31fa4c8f
commit 88a4b0b0e5
8 changed files with 14 additions and 226 deletions

View File

@@ -51,8 +51,8 @@ public class BluetoothDetailsHeaderController extends BluetoothDetailsController
}
protected void setHeaderProperties() {
final Pair<Drawable, String> pair = Utils.getBtClassDrawableWithDescription(
mContext, mCachedDevice,
final Pair<Drawable, String> pair = com.android.settingslib.bluetooth.Utils
.getBtClassDrawableWithDescription(mContext, mCachedDevice,
mContext.getResources().getFraction(R.fraction.bt_battery_scale_fraction, 1, 1));
String summaryText = mCachedDevice.getConnectionSummary();
mHeaderController.setLabel(mCachedDevice.getName());