diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-08-31 16:17:04 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-08-31 16:17:04 +0000 |
commit | c39ea3c55fac807c0b98aabdf56c70dc8a49036c (patch) | |
tree | e282668a9587cf6c1ec7b604dea860400c75c6c7 /java/com/android/incallui/audioroute/AudioRouteSelectorDialogFragment.java | |
parent | 68038172793ee0e2ab3e2e56ddfbeb82879d1f58 (diff) | |
parent | 2ca4318cc1ee57dda907ba2069bd61d162b1baef (diff) |
Merge "Update Dialer source to latest internal Google revision."
Diffstat (limited to 'java/com/android/incallui/audioroute/AudioRouteSelectorDialogFragment.java')
-rw-r--r-- | java/com/android/incallui/audioroute/AudioRouteSelectorDialogFragment.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/java/com/android/incallui/audioroute/AudioRouteSelectorDialogFragment.java b/java/com/android/incallui/audioroute/AudioRouteSelectorDialogFragment.java index c757477f1..c7a9d6332 100644 --- a/java/com/android/incallui/audioroute/AudioRouteSelectorDialogFragment.java +++ b/java/com/android/incallui/audioroute/AudioRouteSelectorDialogFragment.java @@ -18,6 +18,7 @@ package com.android.incallui.audioroute; import android.app.Dialog; import android.content.Context; +import android.content.DialogInterface; import android.content.res.ColorStateList; import android.graphics.PorterDuff.Mode; import android.os.Bundle; @@ -41,6 +42,8 @@ public class AudioRouteSelectorDialogFragment extends BottomSheetDialogFragment /** Called when an audio route is picked */ public interface AudioRouteSelectorPresenter { void onAudioRouteSelected(int audioRoute); + + void onAudioRouteSelectorDismiss(); } public static AudioRouteSelectorDialogFragment newInstance(CallAudioState audioState) { @@ -91,6 +94,14 @@ public class AudioRouteSelectorDialogFragment extends BottomSheetDialogFragment return view; } + @Override + public void onDismiss(DialogInterface dialogInterface) { + super.onDismiss(dialogInterface); + FragmentUtils.getParentUnsafe( + AudioRouteSelectorDialogFragment.this, AudioRouteSelectorPresenter.class) + .onAudioRouteSelectorDismiss(); + } + private void initItem(TextView item, final int itemRoute, CallAudioState audioState) { int selectedColor = getResources().getColor(R.color.dialer_theme_color); if ((audioState.getSupportedRouteMask() & itemRoute) == 0) { |