Loading src/com/android/settings/homepage/contextualcards/legacysuggestion/LegacySuggestionContextualCardController.java +4 −2 Original line number Original line Diff line number Diff line Loading @@ -128,8 +128,10 @@ public class LegacySuggestionContextualCardController implements ContextualCardC return; return; } } final List<Suggestion> suggestions = mSuggestionController.getSuggestions(); final List<Suggestion> suggestions = mSuggestionController.getSuggestions(); Log.d(TAG, "Loaded suggests: " final String suggestionCount = suggestions == null + suggestions == null ? "null" : String.valueOf(suggestions.size())); ? "null" : String.valueOf(suggestions.size()); Log.d(TAG, "Loaded suggests: " + suggestionCount); final List<ContextualCard> cards = new ArrayList<>(); final List<ContextualCard> cards = new ArrayList<>(); if (suggestions != null) { if (suggestions != null) { Loading tests/robotests/src/com/android/settings/homepage/contextualcards/legacysuggestion/LegacySuggestionContextualCardControllerTest.java +3 −0 Original line number Original line Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.settings.homepage.contextualcards.legacysuggestion; import static com.google.common.truth.Truth.assertThat; import static com.google.common.truth.Truth.assertThat; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import android.content.Context; import android.content.Context; Loading Loading @@ -84,8 +85,10 @@ public class LegacySuggestionContextualCardControllerTest { @Test @Test public void onServiceConnected_shouldLoadSuggestion() { public void onServiceConnected_shouldLoadSuggestion() { when(mSuggestionController.getSuggestions()).thenReturn(null); mController.mSuggestionController = mSuggestionController; mController.mSuggestionController = mSuggestionController; mController.setCardUpdateListener(mCardUpdateListener); mController.setCardUpdateListener(mCardUpdateListener); mController.onServiceConnected(); mController.onServiceConnected(); verify(mSuggestionController).getSuggestions(); verify(mSuggestionController).getSuggestions(); Loading Loading
src/com/android/settings/homepage/contextualcards/legacysuggestion/LegacySuggestionContextualCardController.java +4 −2 Original line number Original line Diff line number Diff line Loading @@ -128,8 +128,10 @@ public class LegacySuggestionContextualCardController implements ContextualCardC return; return; } } final List<Suggestion> suggestions = mSuggestionController.getSuggestions(); final List<Suggestion> suggestions = mSuggestionController.getSuggestions(); Log.d(TAG, "Loaded suggests: " final String suggestionCount = suggestions == null + suggestions == null ? "null" : String.valueOf(suggestions.size())); ? "null" : String.valueOf(suggestions.size()); Log.d(TAG, "Loaded suggests: " + suggestionCount); final List<ContextualCard> cards = new ArrayList<>(); final List<ContextualCard> cards = new ArrayList<>(); if (suggestions != null) { if (suggestions != null) { Loading
tests/robotests/src/com/android/settings/homepage/contextualcards/legacysuggestion/LegacySuggestionContextualCardControllerTest.java +3 −0 Original line number Original line Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.settings.homepage.contextualcards.legacysuggestion; import static com.google.common.truth.Truth.assertThat; import static com.google.common.truth.Truth.assertThat; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import android.content.Context; import android.content.Context; Loading Loading @@ -84,8 +85,10 @@ public class LegacySuggestionContextualCardControllerTest { @Test @Test public void onServiceConnected_shouldLoadSuggestion() { public void onServiceConnected_shouldLoadSuggestion() { when(mSuggestionController.getSuggestions()).thenReturn(null); mController.mSuggestionController = mSuggestionController; mController.mSuggestionController = mSuggestionController; mController.setCardUpdateListener(mCardUpdateListener); mController.setCardUpdateListener(mCardUpdateListener); mController.onServiceConnected(); mController.onServiceConnected(); verify(mSuggestionController).getSuggestions(); verify(mSuggestionController).getSuggestions(); Loading