use of com.android.incallui.telecomeventui.InternationalCallOnWifiDialogFragment in project android_packages_apps_Dialer by LineageOS.
the class InCallActivityCommon method onCreate.
public void onCreate(Bundle icicle) {
// set this flag so this activity will stay in front of the keyguard
// Have the WindowManager filter out touch events that are "too fat".
int flags = WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED | WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON | WindowManager.LayoutParams.FLAG_IGNORE_CHEEK_PRESSES;
inCallActivity.getWindow().addFlags(flags);
inCallActivity.setContentView(R.layout.incall_screen);
internalResolveIntent(inCallActivity.getIntent());
boolean isLandscape = inCallActivity.getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE;
boolean isRtl = ViewUtil.isRtl();
if (isLandscape) {
dialpadSlideInAnimation = AnimationUtils.loadAnimation(inCallActivity, isRtl ? R.anim.dialpad_slide_in_left : R.anim.dialpad_slide_in_right);
dialpadSlideOutAnimation = AnimationUtils.loadAnimation(inCallActivity, isRtl ? R.anim.dialpad_slide_out_left : R.anim.dialpad_slide_out_right);
} else {
dialpadSlideInAnimation = AnimationUtils.loadAnimation(inCallActivity, R.anim.dialpad_slide_in_bottom);
dialpadSlideOutAnimation = AnimationUtils.loadAnimation(inCallActivity, R.anim.dialpad_slide_out_bottom);
}
dialpadSlideInAnimation.setInterpolator(AnimUtils.EASE_IN);
dialpadSlideOutAnimation.setInterpolator(AnimUtils.EASE_OUT);
dialpadSlideOutAnimation.setAnimationListener(new AnimationListenerAdapter() {
@Override
public void onAnimationEnd(Animation animation) {
performHideDialpadFragment();
}
});
if (icicle != null) {
// in onResume() to ensure the hosting fragment has been inflated and is ready to receive it.
if (icicle.containsKey(INTENT_EXTRA_SHOW_DIALPAD)) {
boolean showDialpad = icicle.getBoolean(INTENT_EXTRA_SHOW_DIALPAD);
showDialpadRequest = showDialpad ? DIALPAD_REQUEST_SHOW : DIALPAD_REQUEST_HIDE;
animateDialpadOnShow = false;
}
dtmfTextToPreopulate = icicle.getString(DIALPAD_TEXT_KEY);
SelectPhoneAccountDialogFragment dialogFragment = (SelectPhoneAccountDialogFragment) inCallActivity.getFragmentManager().findFragmentByTag(TAG_SELECT_ACCOUNT_FRAGMENT);
if (dialogFragment != null) {
dialogFragment.setListener(selectAccountListener);
}
}
InternationalCallOnWifiDialogFragment existingInternationalFragment = (InternationalCallOnWifiDialogFragment) inCallActivity.getSupportFragmentManager().findFragmentByTag(TAG_INTERNATIONAL_CALL_ON_WIFI);
if (existingInternationalFragment != null) {
LogUtil.i("InCallActivityCommon.onCreate", "international fragment exists attaching callback");
existingInternationalFragment.setCallback(internationalCallOnWifiCallback);
}
inCallOrientationEventListener = new InCallOrientationEventListener(inCallActivity);
}
use of com.android.incallui.telecomeventui.InternationalCallOnWifiDialogFragment in project android_packages_apps_Dialer by LineageOS.
the class InCallActivityCommon method showInternationalCallOnWifiDialog.
void showInternationalCallOnWifiDialog(@NonNull DialerCall call) {
LogUtil.enterBlock("InCallActivityCommon.showInternationalCallOnWifiDialog");
if (!InternationalCallOnWifiDialogFragment.shouldShow(inCallActivity)) {
LogUtil.i("InCallActivityCommon.showInternationalCallOnWifiDialog", "InternationalCallOnWifiDialogFragment.shouldShow returned false");
return;
}
InternationalCallOnWifiDialogFragment fragment = InternationalCallOnWifiDialogFragment.newInstance(call.getId(), internationalCallOnWifiCallback);
fragment.show(inCallActivity.getSupportFragmentManager(), TAG_INTERNATIONAL_CALL_ON_WIFI);
}
use of com.android.incallui.telecomeventui.InternationalCallOnWifiDialogFragment in project android_packages_apps_Dialer by LineageOS.
the class InCallActivityCommon method dismissPendingDialogs.
void dismissPendingDialogs() {
if (dialog != null) {
dialog.dismiss();
dialog = null;
}
if (selectPhoneAccountDialogFragment != null) {
selectPhoneAccountDialogFragment.dismiss();
selectPhoneAccountDialogFragment = null;
}
InternationalCallOnWifiDialogFragment internationalCallOnWifiFragment = (InternationalCallOnWifiDialogFragment) inCallActivity.getSupportFragmentManager().findFragmentByTag(TAG_INTERNATIONAL_CALL_ON_WIFI);
if (internationalCallOnWifiFragment != null) {
LogUtil.i("InCallActivityCommon.dismissPendingDialogs", "dismissing InternationalCallOnWifiDialogFragment");
internationalCallOnWifiFragment.dismiss();
}
}
Aggregations