Add flag to control whether or not we should tint icons
Fix: 34365726 Test: robotests Change-Id: Ic08d8590c9867fb0383da03f05237f74644a77ff
This commit is contained in:
@@ -20,6 +20,7 @@ import android.app.Activity;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.drawable.Icon;
|
||||
import android.os.Bundle;
|
||||
@@ -364,4 +365,16 @@ public class DashboardFeatureProviderImplTest {
|
||||
public void testGetExtraIntentAction_shouldReturnNull() {
|
||||
assertThat(mImpl.getExtraIntentAction()).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testShouldTintIcon_shouldReturnValueFromResource() {
|
||||
final Resources res = mActivity.getApplicationContext().getResources();
|
||||
when(res.getBoolean(R.bool.config_tintSettingIcon))
|
||||
.thenReturn(false);
|
||||
assertThat(mImpl.shouldTintIcon()).isFalse();
|
||||
|
||||
when(res.getBoolean(R.bool.config_tintSettingIcon))
|
||||
.thenReturn(true);
|
||||
assertThat(mImpl.shouldTintIcon()).isTrue();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user