Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5fb44008 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Dialer: WFC UI requiment: Notification and Dialog for network" into atel.lnx.2.0-dev

parents 773dcaa2 76b930ed
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1160,7 +1160,8 @@ e mode.</string>
    <string name="call_data_info_description">Voice call usage time and data usage time</string>
    <string name="alert_call_over_wifi">Calls will be made over Wi-Fi.</string>
    <string name="alert_call_no_cellular_coverage">No cellular network available. Connect to available Wi-Fi to make calls.</string>
    <string name="alert_user_connect_to_wifi_for_call">Connect to Wi-Fi to make calls.</string>
    <string name="alert_user_connect_to_wifi_for_call">Connect to Wi-Fi to make calls</string>
    <string name="alert_user_connect_to_wifi_for_call_text">Tap here to view available networks</string>
    <string name="missing_account_type">(No type)</string>
    <string name="missing_account_name">(No name)</string>
</resources>
+1 −0
Original line number Diff line number Diff line
@@ -2033,6 +2033,7 @@ public class DialpadFragment extends Fragment
        } else {
            if(WifiCallUtils.shallShowWifiCallDialog(getActivity())) {
                 WifiCallUtils.showWifiCallDialog(getActivity());
                 WifiCallUtils.showWifiCallNotification(getActivity());
             } else {
                 getView().performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY);
                 handleDialButtonPressed();
+7 −8
Original line number Diff line number Diff line
@@ -149,16 +149,13 @@ public class WifiCallUtils {

    public static void showWifiCallDialog(final Context context) {
        String promptMessage = context.getString(com.android.dialer.R.string
                .alert_call_no_cellular_coverage) +"\n"+ context.getString(com.android.dialer.R
                        .string.alert_user_connect_to_wifi_for_call);
                .alert_call_no_cellular_coverage);
        AlertDialog.Builder diaBuilder = new AlertDialog.Builder(context);
        diaBuilder.setMessage(promptMessage);
        diaBuilder.setPositiveButton(com.android.internal.R.string.ok, new OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {
                Intent intent = new Intent(Intent.ACTION_MAIN);
                intent.setClassName("com.qualcomm.qti.extsettings",
                        "com.qualcomm.qti.extsettings.wificall.WifiCallingEnhancedSettings");
                Intent intent = new Intent(android.provider.Settings.ACTION_WIFI_SETTINGS);
                context.startActivity(intent);
            }
        });
@@ -211,16 +208,18 @@ public class WifiCallUtils {
            builder.setAutoCancel(true);
            builder.setSmallIcon(R.drawable.wifi_calling_on_notification);
            builder.setContentTitle(
                    context.getResources().getString(R.string.alert_user_connect_to_wifi_for_call));
                    context.getResources().getString(
                        R.string.alert_user_connect_to_wifi_for_call));
            builder.setContentText(
                    context.getResources().getString(R.string.alert_user_connect_to_wifi_for_call));
                    context.getResources().getString(
                        R.string.alert_user_connect_to_wifi_for_call_text));
            notiManager.notify(NOTIFICATION_WIFI_CALL_ID, builder.build());
            new Handler().postDelayed(new Runnable() {
                    @Override
                    public void run() {
                        notiManager.cancel(NOTIFICATION_WIFI_CALL_ID);
                    }
           }, 2000);
           }, 5000);
        }
    }
}