Hide default webview app icon in developer options

Change-Id: I165d0a079f247a7162b0b94f9c52a343563aa527
Fixes: 65267538
Test: robotests
This commit is contained in:
Fan Zhang
2017-10-09 14:27:30 -07:00
parent aa410eba1d
commit d77ba003bd
2 changed files with 0 additions and 15 deletions

View File

@@ -22,7 +22,6 @@ import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.support.v7.preference.Preference;
import android.support.v7.preference.PreferenceScreen;
@@ -56,8 +55,6 @@ public class WebViewAppPreferenceControllerV2Test {
private Preference mPreference;
@Mock
private DefaultAppInfo mAppInfo;
@Mock
private Drawable mDrawable;
private Context mContext;
private WebViewAppPreferenceControllerV2 mController;
@@ -80,24 +77,20 @@ public class WebViewAppPreferenceControllerV2Test {
public void updateState_hasAppLabel_shouldSetAppLabelAndIcon() {
final String appLabel = "SomeRandomAppLabel!!!";
when(mAppInfo.loadLabel()).thenReturn(appLabel);
when(mAppInfo.loadIcon()).thenReturn(mDrawable);
mController.updateState(mPreference);
verify(mPreference).setSummary(appLabel);
verify(mPreference).setIcon(mDrawable);
}
@Test
public void updateState_noAppLabel_shouldSetAppDefaultLabelAndNullIcon() {
final String appLabel = null;
when(mAppInfo.loadLabel()).thenReturn(appLabel);
when(mAppInfo.loadIcon()).thenReturn(mDrawable);
mController.updateState(mPreference);
verify(mPreference).setSummary(R.string.app_list_preference_none);
verify(mPreference).setIcon(null);
}
@Test