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

Commit 700c3219 authored by Steve Kondik's avatar Steve Kondik
Browse files
parents 33c2de88 a17d5a3e
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -90,6 +90,7 @@ public class CellBroadcastMessage implements Parcelable {
        mSmsCbMessage = new SmsCbMessage(in);
        mDeliveryTime = in.readLong();
        mIsRead = (in.readInt() != 0);
        mSubId = in.readInt();
    }

    /** Parcelable: no special flags. */
@@ -103,6 +104,7 @@ public class CellBroadcastMessage implements Parcelable {
        mSmsCbMessage.writeToParcel(out, flags);
        out.writeLong(mDeliveryTime);
        out.writeInt(mIsRead ? 1 : 0);
        out.writeInt(mSubId);
    }

    public static final Parcelable.Creator<CellBroadcastMessage> CREATOR
+9 −5
Original line number Diff line number Diff line
@@ -128,6 +128,7 @@ public class MSimSmsManager {
     *  raw pdu of the status report is in the extended data ("pdu").
     * @param priority Priority level of the message
     * @param subscription on which the SMS has to be sent.
     * @param validityPeriod Validity Period of the message in Minutes.
     *
     * @throws IllegalArgumentException if destinationAddress or text are empty
     *
@@ -136,7 +137,7 @@ public class MSimSmsManager {
    public void sendTextMessage(
            String destinationAddress, String scAddress, String text,
            PendingIntent sentIntent, PendingIntent deliveryIntent, int priority,
            int subscription) {
            boolean isExpectMore, int validityPeriod, int subscription) {
        if (TextUtils.isEmpty(destinationAddress)) {
            throw new IllegalArgumentException("Invalid destinationAddress");
        }
@@ -150,7 +151,7 @@ public class MSimSmsManager {
            if (iccISms != null) {
                iccISms.sendTextWithOptions(ActivityThread.currentPackageName(),
                        destinationAddress, scAddress, text, sentIntent, deliveryIntent,
                        priority, subscription);
                        priority, isExpectMore, validityPeriod, subscription);
            }
        } catch (RemoteException ex) {
            // ignore it
@@ -274,12 +275,14 @@ public class MSimSmsManager {
     *   extended data ("pdu").
     * @param priority Priority level of the message
     * @param subscription on which the SMS has to be sent.
     * @param validityPeriod Validity Period of the message in Minutes.
     *
     * @throws IllegalArgumentException if destinationAddress or data are empty
     */
    public void sendMultipartTextMessage(String destinationAddress, String scAddress,
            ArrayList<String> parts, ArrayList<PendingIntent> sentIntents,
            ArrayList<PendingIntent> deliveryIntents, int priority, int subscription) {
            ArrayList<PendingIntent> deliveryIntents, int priority, boolean isExpectMore,
            int validityPeriod, int subscription) {
        if (TextUtils.isEmpty(destinationAddress)) {
            throw new IllegalArgumentException("Invalid destinationAddress");
        }
@@ -294,7 +297,7 @@ public class MSimSmsManager {
                if (iccISms != null) {
                    iccISms.sendMultipartTextWithOptions(ActivityThread.currentPackageName(),
                            destinationAddress, scAddress, parts, sentIntents, deliveryIntents,
                            priority, subscription);
                            priority, isExpectMore, validityPeriod, subscription);
                }
            } catch (RemoteException ex) {
                // ignore it
@@ -309,7 +312,8 @@ public class MSimSmsManager {
                deliveryIntent = deliveryIntents.get(0);
            }
            sendTextMessage(destinationAddress, scAddress, parts.get(0),
                    sentIntent, deliveryIntent, priority, subscription);
                    sentIntent, deliveryIntent, priority, isExpectMore, validityPeriod,
                    subscription);
        }
    }

+9 −5
Original line number Diff line number Diff line
@@ -142,13 +142,15 @@ public final class SmsManager {
     *  broadcast when the message is delivered to the recipient.  The
     *  raw pdu of the status report is in the extended data ("pdu").
     * @param priority Priority level of the message
     * @param validityPeriod Validity Period of the message in Minutes.
     *
     * @throws IllegalArgumentException if destinationAddress or text are empty
     * {@hide}
     */
    public void sendTextMessage(
            String destinationAddress, String scAddress, String text,
            PendingIntent sentIntent, PendingIntent deliveryIntent, int priority) {
            PendingIntent sentIntent, PendingIntent deliveryIntent, int priority,
            boolean isExpectMore, int validityPeriod) {
        if (TextUtils.isEmpty(destinationAddress)) {
            throw new IllegalArgumentException("Invalid destinationAddress");
        }
@@ -162,7 +164,7 @@ public final class SmsManager {
            if (iccISms != null) {
                iccISms.sendTextWithOptions(ActivityThread.currentPackageName(),
                        destinationAddress, scAddress, text, sentIntent, deliveryIntent,
                        priority);
                        priority, isExpectMore, validityPeriod);
            }
        } catch (RemoteException ex) {
            // ignore it
@@ -301,6 +303,7 @@ public final class SmsManager {
     *   to the recipient.  The raw pdu of the status report is in the
     *   extended data ("pdu").
     * @param priority Priority level of the message
     * @param validityPeriod Validity Period of the message in Minutes.
     *
     * @throws IllegalArgumentException if destinationAddress or data are empty
     * {@hide}
@@ -308,7 +311,7 @@ public final class SmsManager {
    public void sendMultipartTextMessage(
            String destinationAddress, String scAddress, ArrayList<String> parts,
            ArrayList<PendingIntent> sentIntents, ArrayList<PendingIntent> deliveryIntents,
            int priority) {
            int priority, boolean isExpectMore, int validityPeriod) {
        if (TextUtils.isEmpty(destinationAddress)) {
            throw new IllegalArgumentException("Invalid destinationAddress");
        }
@@ -322,7 +325,8 @@ public final class SmsManager {
                if (iccISms != null) {
                    iccISms.sendMultipartTextWithOptions(ActivityThread.currentPackageName(),
                            destinationAddress, scAddress, parts,
                            sentIntents, deliveryIntents, priority);
                            sentIntents, deliveryIntents, priority, isExpectMore,
                            validityPeriod);
                }
            } catch (RemoteException ex) {
                // ignore it
@@ -337,7 +341,7 @@ public final class SmsManager {
                deliveryIntent = deliveryIntents.get(0);
            }
            sendTextMessage(destinationAddress, scAddress, parts.get(0),
                    sentIntent, deliveryIntent, priority);
                    sentIntent, deliveryIntent, priority, isExpectMore, validityPeriod);
        }
    }

+43 −0
Original line number Diff line number Diff line
@@ -81,6 +81,21 @@ public class CallDetails {
                                                * Phone.CALL_TYPE_SMS;SMS Type
                                                */

    public static final int CALL_TYPE_VT_PAUSE = 6; /*
                                                     * Indicates that video is paused;
                                                     * This is an internal call type.
                                                     * The type is used by TeleService and
                                                     * InCallUI only. See CALL_TYPE_VT_RESUME
                                                     */

    public static final int CALL_TYPE_VT_RESUME = 7; /*
                                                      * This is an internal call
                                                      * type. VT_RESUME call
                                                      * type is used to send
                                                      * unpause request to
                                                      * TeleService.
                                                      */

    public static final int CALL_TYPE_UNKNOWN = 10; /*
                                                     * Phone.CALL_TYPE_UNKNOWN;
                                                     * Unknown Call type, may be
@@ -98,6 +113,7 @@ public class CallDetails {
                                                       * not yet selected a
                                                       * domain for a call
                                                       */

    public static final int CALL_DOMAIN_CS = 1; /*
                                                 * Phone.CALL_DOMAIN_CS; Circuit
                                                 * switched domain
@@ -135,12 +151,25 @@ public class CallDetails {
                                                               * disabled
                                                               */

    public static final int VIDEO_PAUSE_STATE_PAUSED = 1; /*
                                                           * Indicates that
                                                           * video is paused;
                                                           */

    public static final int VIDEO_PAUSE_STATE_RESUMED = 2; /*
                                                            * Indicates that
                                                            * video is resumed;
                                                            */

    public static final String EXTRAS_IS_CONFERENCE_URI = "isConferenceUri";
    public static final String EXTRAS_PARENT_CALL_ID = "parentCallId";
    public static final String EXTRAS_HANDOVER_INFORMATION = "handoverInfo";
    public static final int EXTRA_TYPE_LTE_TO_IWLAN_HO_FAIL = 1;

    public int call_type;
    public int call_domain;
    public String[] extras;
    private int mVideoPauseState = VIDEO_PAUSE_STATE_RESUMED;

    public static class ServiceStatus {
        public boolean isValid;
@@ -207,6 +236,19 @@ public class CallDetails {
        this.extras = getExtrasFromMap(newExtras);
    }

    public void setVideoPauseState(int videoPauseState) {
        // Validate and set the new video pause state.
        switch (videoPauseState) {
            case VIDEO_PAUSE_STATE_RESUMED:
            case VIDEO_PAUSE_STATE_PAUSED:
                mVideoPauseState = videoPauseState;
        }
    }

    public int getVideoPauseState() {
        return mVideoPauseState;
    }

    public String getValueForKeyFromExtras(String[] extras, String key) {
        for (int i = 0; extras != null && i < extras.length; i++) {
            if (extras[i] != null) {
@@ -254,6 +296,7 @@ public class CallDetails {
        return (" " + call_type
                + " " + call_domain
                + " " + extrasResult
                + " videoPauseState" + mVideoPauseState
                + " Local Ability " + localSrvAbility
                + " Peer Ability " + peerSrvAbility);
    }
+2 −11
Original line number Diff line number Diff line
@@ -31,9 +31,8 @@ import android.os.SystemProperties;
import android.telephony.MSimTelephonyManager;
import android.telephony.PhoneNumberUtils;
import android.telephony.PhoneStateListener;
import android.telephony.Rlog;
import android.telephony.ServiceState;
import android.telephony.TelephonyManager;
import android.telephony.Rlog;

import java.util.ArrayList;
import java.util.Collections;
@@ -458,12 +457,6 @@ public class CallManager {
        return phone;
    }

    private boolean isImsOnWifi(Phone offHookPhone) {
        return (offHookPhone.getPhoneType() == PhoneConstants.PHONE_TYPE_IMS &&
                offHookPhone.getServiceState().getDataNetworkType() !=
                        TelephonyManager.NETWORK_TYPE_LTE);
    }

    public void setAudioMode() {
        Context context = getContext();
        if (context == null) return;
@@ -500,11 +493,9 @@ public class CallManager {
                }

                int newAudioMode = AudioManager.MODE_IN_CALL;
                if (offhookPhone instanceof SipPhone || isImsOnWifi(offhookPhone)) {
                if (offhookPhone instanceof SipPhone) {
                    Rlog.d(LOG_TAG, "setAudioMode Set audio mode for SIP call!");
                    // enable IN_COMMUNICATION audio mode instead for sipPhone
                    // or for IMS calls over wifi
                    Rlog.d(LOG_TAG, "setAudioMode Set audio mode for SIP or wifi call!");
                    newAudioMode = AudioManager.MODE_IN_COMMUNICATION;
                }
                int currMode = audioManager.getMode();
Loading