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

Commit 05a8c8a3 authored by Brandon Maxwell's avatar Brandon Maxwell Committed by android-build-merger
Browse files

[Cherry-pick] Use the correct handleMmi function

am: a1e500b2

Change-Id: I1d14ccd54f1cdacc13eeccc775101740776d4622
parents 15eb6049 a1e500b2
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -95,11 +95,14 @@ public class TelecomUtil {
    }

    public static boolean handleMmi(Context context, String dialString,
            PhoneAccountHandle handle) {
            @Nullable PhoneAccountHandle handle) {
        if (hasModifyPhoneStatePermission(context)) {
            try {
                return TelecomManagerCompat.handleMmi(
                        getTelecomManager(context), dialString, handle);
                if (handle == null) {
                    return getTelecomManager(context).handleMmi(dialString);
                } else {
                    return getTelecomManager(context).handleMmi(dialString, handle);
                }
            } catch (SecurityException e) {
                Log.w(TAG, "TelecomManager.handleMmi called without permission.");
            }