use of com.android.dialer.callintent.CallIntentBuilder in project android_packages_apps_Dialer by LineageOS.
the class MissedCallNotifier method callBackFromMissedCall.
/**
* Trigger an intent to make a call from a missed call number.
*/
@WorkerThread
public void callBackFromMissedCall(String number, Uri callUri) {
closeSystemDialogs(context);
CallLogNotificationsQueryHelper.markSingleMissedCallInCallLogAsRead(context, callUri);
cancelSingleMissedCallNotification(context, callUri);
DialerUtils.startActivityWithErrorToast(context, new CallIntentBuilder(number, CallInitiationType.Type.MISSED_CALL_NOTIFICATION).build().setFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
}
use of com.android.dialer.callintent.CallIntentBuilder in project android_packages_apps_Dialer by LineageOS.
the class CallComposerActivity method placeRCSCall.
private void placeRCSCall(MultimediaData.Builder builder) {
MultimediaData data = builder.build();
LogUtil.i("CallComposerActivity.placeRCSCall", "placing enriched call, data: " + data);
Logger.get(this).logImpression(DialerImpression.Type.CALL_COMPOSER_ACTIVITY_PLACE_RCS_CALL);
getEnrichedCallManager().sendCallComposerData(sessionId, data);
TelecomUtil.placeCall(this, new CallIntentBuilder(contact.getNumber(), CallInitiationType.Type.CALL_COMPOSER).build());
setResult(RESULT_OK);
SharedPreferences preferences = DialerUtils.getDefaultSharedPreferenceForDeviceProtectedStorageContext(this);
// Show a toast for privacy purposes if this is the first time a user uses call composer.
if (preferences.getBoolean(KEY_IS_FIRST_CALL_COMPOSE, true)) {
int privacyMessage = data.hasImageData() ? R.string.image_sent_messages : R.string.message_sent_messages;
Toast toast = Toast.makeText(this, privacyMessage, Toast.LENGTH_LONG);
int yOffset = getResources().getDimensionPixelOffset(R.dimen.privacy_toast_y_offset);
toast.setGravity(Gravity.CENTER_HORIZONTAL | Gravity.BOTTOM, 0, yOffset);
toast.show();
preferences.edit().putBoolean(KEY_IS_FIRST_CALL_COMPOSE, false).apply();
}
finish();
}
Aggregations