Add battery indicator to bluetooth icon
This cl change util method in bluetooth package to return drawable instead of resId. If the bt device has battery level, then method return customized layerDrawable, otherwise return a simple drawable created from resId. Bug: 63393322 Test: RunSettingsRoboTests Change-Id: Ib21822eafda0e8570212ce5cb070478e4f4876a2
This commit is contained in:
@@ -32,6 +32,7 @@ import com.android.settings.testutils.SettingsRobolectricTestRunner;
|
||||
import com.android.settings.TestConfig;
|
||||
import com.android.settings.testutils.FakeFeatureFactory;
|
||||
import com.android.settings.testutils.shadow.SettingsShadowBluetoothDevice;
|
||||
import com.android.settings.testutils.shadow.SettingsShadowResources;
|
||||
import com.android.settings.testutils.shadow.ShadowEntityHeaderController;
|
||||
import com.android.settings.widget.EntityHeaderController;
|
||||
|
||||
@@ -45,7 +46,8 @@ import org.robolectric.annotation.Config;
|
||||
|
||||
@RunWith(SettingsRobolectricTestRunner.class)
|
||||
@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION,
|
||||
shadows={SettingsShadowBluetoothDevice.class, ShadowEntityHeaderController.class})
|
||||
shadows={SettingsShadowBluetoothDevice.class, ShadowEntityHeaderController.class,
|
||||
SettingsShadowResources.class})
|
||||
public class BluetoothDetailsHeaderControllerTest extends BluetoothDetailsControllerTestBase {
|
||||
private BluetoothDetailsHeaderController mController;
|
||||
private LayoutPreference mPreference;
|
||||
|
Reference in New Issue
Block a user