diff options
author | Eric Erfanian <erfanian@google.com> | 2018-04-25 19:00:11 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-04-25 19:00:11 +0000 |
commit | 43ed0dc0666e9d2e2837a2019e2765f10f43dff8 (patch) | |
tree | ac6491831c0d331f8582a65eda60143cb0798fd0 /java/com/android/dialer/speeddial/SpeedDialFragment.java | |
parent | 34ed7da073bbac5b8a4283c495c588ef3b0ea32b (diff) | |
parent | 79a407ee27e6c8f6447f3a8c71ae2c7f6b33f591 (diff) |
Merge changes I5b8ad5ca,I0011019c,I8ee43ce8,I35e0748a,I9e9947ad, ...
* changes:
Show clear frequents option in the toolbar if there are suggested contacts.
Use UI listener for preferred account worker in in call UI
Make SIM Selection hint multi-line
Convert CequintCallerIdContact into an @AutoValue
Newly starred SpeedDialUiItems now have SpeedDialEntry ids set.
Disable entries in CallingAccountSelector that are not selectable
Add "enabled" to SelectPhoneAccountDialogFragment.
Add skeleton for CequintPhoneLookup
Log send button impressions for RTT call.
Show international call on wifi dialog without InCallActivity.
Expose active calls from in call UI
Diffstat (limited to 'java/com/android/dialer/speeddial/SpeedDialFragment.java')
-rw-r--r-- | java/com/android/dialer/speeddial/SpeedDialFragment.java | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/java/com/android/dialer/speeddial/SpeedDialFragment.java b/java/com/android/dialer/speeddial/SpeedDialFragment.java index 26893a8d3..b74c06239 100644 --- a/java/com/android/dialer/speeddial/SpeedDialFragment.java +++ b/java/com/android/dialer/speeddial/SpeedDialFragment.java @@ -34,6 +34,7 @@ import android.view.ViewGroup; import android.widget.FrameLayout; import com.android.dialer.callintent.CallInitiationType; import com.android.dialer.callintent.CallIntentBuilder; +import com.android.dialer.common.FragmentUtils; import com.android.dialer.common.LogUtil; import com.android.dialer.common.concurrent.DialerExecutorComponent; import com.android.dialer.common.concurrent.SupportUiListener; @@ -132,11 +133,6 @@ public class SpeedDialFragment extends Fragment { return rootLayout; } - public boolean hasFrequents() { - // TODO(calderwoodra) - return false; - } - @Override public void onResume() { super.onResume(); @@ -173,12 +169,17 @@ public class SpeedDialFragment extends Fragment { } private void onSpeedDialUiItemListLoaded(ImmutableList<SpeedDialUiItem> speedDialUiItems) { + LogUtil.enterBlock("SpeedDialFragment.onSpeedDialUiItemListLoaded"); // TODO(calderwoodra): Use DiffUtil to properly update and animate the change adapter.setSpeedDialUiItems( UiItemLoaderComponent.get(getContext()) .speedDialUiItemLoader() .insertDuoChannels(getContext(), speedDialUiItems)); adapter.notifyDataSetChanged(); + if (getActivity() != null) { + FragmentUtils.getParentUnsafe(this, HostInterface.class) + .setHasFrequents(adapter.hasFrequents()); + } } @Override @@ -359,4 +360,10 @@ public class SpeedDialFragment extends Fragment { Contacts.CONTENT_URI, String.valueOf(speedDialUiItem.contactId())))); } } + + /** Interface for {@link SpeedDialFragment} to communicate with its host/parent. */ + public interface HostInterface { + + void setHasFrequents(boolean hasFrequents); + } } |