Use proper icon size for default app prefs.

Change-Id: Ib48c7a546fcd3a3a9e32b7a65cbdadd54721f252
Fixes: 77726902
Test: robotests
This commit is contained in:
Fan Zhang
2018-04-06 16:31:31 -07:00
parent 78e2cad8b1
commit e0d2140256
6 changed files with 14 additions and 11 deletions

View File

@@ -16,6 +16,7 @@
package com.android.settings.accounts;
import static com.android.settingslib.TwoTargetPreference.ICON_SIZE_MEDIUM;
import static com.google.common.truth.Truth.assertThat;
import android.content.Context;
@@ -42,8 +43,8 @@ public class ProviderPreferenceTest {
public void shouldUseSmallIcon() {
final ProviderPreference providerPreference = new ProviderPreference(
mContext, "account_type", null /* icon */, "provider_name");
final boolean useSmallIcon =
ReflectionHelpers.getField(providerPreference, "mUseSmallIcon");
assertThat(useSmallIcon).isTrue();
final int iconSize =
ReflectionHelpers.getField(providerPreference, "mIconSize");
assertThat(iconSize).isEqualTo(ICON_SIZE_MEDIUM);
}
}