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

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

Merge "Add link control support"

parents 304f4ecb b9e84dde
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -136,7 +136,7 @@ public class MSimSmsManager {
    public void sendTextMessage(
            String destinationAddress, String scAddress, String text,
            PendingIntent sentIntent, PendingIntent deliveryIntent, int priority,
            int subscription) {
            boolean isExpectMore, int subscription) {
        if (TextUtils.isEmpty(destinationAddress)) {
            throw new IllegalArgumentException("Invalid destinationAddress");
        }
@@ -150,7 +150,7 @@ public class MSimSmsManager {
            if (iccISms != null) {
                iccISms.sendTextWithOptions(ActivityThread.currentPackageName(),
                        destinationAddress, scAddress, text, sentIntent, deliveryIntent,
                        priority, subscription);
                        priority, isExpectMore, subscription);
            }
        } catch (RemoteException ex) {
            // ignore it
@@ -279,7 +279,8 @@ public class MSimSmsManager {
     */
    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 subscription) {
        if (TextUtils.isEmpty(destinationAddress)) {
            throw new IllegalArgumentException("Invalid destinationAddress");
        }
@@ -294,7 +295,7 @@ public class MSimSmsManager {
                if (iccISms != null) {
                    iccISms.sendMultipartTextWithOptions(ActivityThread.currentPackageName(),
                            destinationAddress, scAddress, parts, sentIntents, deliveryIntents,
                            priority, subscription);
                            priority, isExpectMore, subscription);
                }
            } catch (RemoteException ex) {
                // ignore it
@@ -309,7 +310,7 @@ public class MSimSmsManager {
                deliveryIntent = deliveryIntents.get(0);
            }
            sendTextMessage(destinationAddress, scAddress, parts.get(0),
                    sentIntent, deliveryIntent, priority, subscription);
                    sentIntent, deliveryIntent, priority, isExpectMore, subscription);
        }
    }

+6 −5
Original line number Diff line number Diff line
@@ -148,7 +148,8 @@ public final class SmsManager {
     */
    public void sendTextMessage(
            String destinationAddress, String scAddress, String text,
            PendingIntent sentIntent, PendingIntent deliveryIntent, int priority) {
            PendingIntent sentIntent, PendingIntent deliveryIntent, int priority,
            boolean isExpectMore) {
        if (TextUtils.isEmpty(destinationAddress)) {
            throw new IllegalArgumentException("Invalid destinationAddress");
        }
@@ -162,7 +163,7 @@ public final class SmsManager {
            if (iccISms != null) {
                iccISms.sendTextWithOptions(ActivityThread.currentPackageName(),
                        destinationAddress, scAddress, text, sentIntent, deliveryIntent,
                        priority);
                        priority, isExpectMore);
            }
        } catch (RemoteException ex) {
            // ignore it
@@ -308,7 +309,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) {
        if (TextUtils.isEmpty(destinationAddress)) {
            throw new IllegalArgumentException("Invalid destinationAddress");
        }
@@ -322,7 +323,7 @@ public final class SmsManager {
                if (iccISms != null) {
                    iccISms.sendMultipartTextWithOptions(ActivityThread.currentPackageName(),
                            destinationAddress, scAddress, parts,
                            sentIntents, deliveryIntents, priority);
                            sentIntents, deliveryIntents, priority, isExpectMore);
                }
            } catch (RemoteException ex) {
                // ignore it
@@ -337,7 +338,7 @@ public final class SmsManager {
                deliveryIntent = deliveryIntents.get(0);
            }
            sendTextMessage(destinationAddress, scAddress, parts.get(0),
                    sentIntent, deliveryIntent, priority);
                    sentIntent, deliveryIntent, priority, isExpectMore);
        }
    }

+7 −6
Original line number Diff line number Diff line
@@ -397,7 +397,7 @@ public class IccSmsInterfaceManager extends ISms.Stub {
                callingPackage) != AppOpsManager.MODE_ALLOWED) {
            return;
        }
        mDispatcher.sendText(destAddr, scAddr, text, sentIntent, deliveryIntent, -1);
        mDispatcher.sendText(destAddr, scAddr, text, sentIntent, deliveryIntent, -1, false);
    }

    /**
@@ -428,7 +428,7 @@ public class IccSmsInterfaceManager extends ISms.Stub {
    @Override
    public void sendTextWithOptions(String callingPackage, String destAddr, String scAddr,
            String text, PendingIntent sentIntent, PendingIntent deliveryIntent,
            int priority) {
            int priority, boolean isExpectMore) {
        mPhone.getContext().enforceCallingPermission(
                Manifest.permission.SEND_SMS,
                "Sending SMS message");
@@ -441,7 +441,8 @@ public class IccSmsInterfaceManager extends ISms.Stub {
                callingPackage) != AppOpsManager.MODE_ALLOWED) {
            return;
        }
        mDispatcher.sendText(destAddr, scAddr, text, sentIntent, deliveryIntent, priority);
        mDispatcher.sendText(destAddr, scAddr, text, sentIntent, deliveryIntent, priority,
                isExpectMore);
    }

    /**
@@ -489,7 +490,7 @@ public class IccSmsInterfaceManager extends ISms.Stub {
        }
        mDispatcher.sendMultipartText(destAddr, scAddr, (ArrayList<String>) parts,
                (ArrayList<PendingIntent>) sentIntents, (ArrayList<PendingIntent>) deliveryIntents,
                -1);
                -1, false);
    }

    /**
@@ -521,7 +522,7 @@ public class IccSmsInterfaceManager extends ISms.Stub {
    @Override
    public void sendMultipartTextWithOptions(String callingPackage, String destAddr,
            String scAddr, List<String> parts, List<PendingIntent> sentIntents,
            List<PendingIntent> deliveryIntents, int priority) {
            List<PendingIntent> deliveryIntents, int priority, boolean isExpectMore) {
        mPhone.getContext().enforceCallingPermission(
                Manifest.permission.SEND_SMS,
                "Sending SMS message");
@@ -538,7 +539,7 @@ public class IccSmsInterfaceManager extends ISms.Stub {
        }
        mDispatcher.sendMultipartText(destAddr, scAddr, (ArrayList<String>) parts,
                (ArrayList<PendingIntent>) sentIntents, (ArrayList<PendingIntent>) deliveryIntents,
                priority);
                priority, isExpectMore);
    }

    @Override
+8 −7
Original line number Diff line number Diff line
@@ -187,13 +187,13 @@ public class ImsSMSDispatcher extends SMSDispatcher {
    @Override
    protected void sendMultipartText(String destAddr, String scAddr,
            ArrayList<String> parts, ArrayList<PendingIntent> sentIntents,
            ArrayList<PendingIntent> deliveryIntents, int priority) {
            ArrayList<PendingIntent> deliveryIntents, int priority, boolean isExpectMore) {
        if (isCdmaMo()) {
            mCdmaDispatcher.sendMultipartText(destAddr, scAddr,
                    parts, sentIntents, deliveryIntents, priority);
                    parts, sentIntents, deliveryIntents, priority, isExpectMore);
        } else {
            mGsmDispatcher.sendMultipartText(destAddr, scAddr,
                    parts, sentIntents, deliveryIntents, priority);
                    parts, sentIntents, deliveryIntents, priority, isExpectMore);
        }
    }

@@ -206,14 +206,15 @@ public class ImsSMSDispatcher extends SMSDispatcher {

    @Override
    protected void sendText(String destAddr, String scAddr, String text,
            PendingIntent sentIntent, PendingIntent deliveryIntent, int priority) {
            PendingIntent sentIntent, PendingIntent deliveryIntent, int priority,
            boolean isExpectMore) {
        Rlog.d(TAG, "sendText");
        if (isCdmaMo()) {
            mCdmaDispatcher.sendText(destAddr, scAddr,
                    text, sentIntent, deliveryIntent, priority);
                    text, sentIntent, deliveryIntent, priority, isExpectMore);
        } else {
            mGsmDispatcher.sendText(destAddr, scAddr,
                    text, sentIntent, deliveryIntent, priority);
                    text, sentIntent, deliveryIntent, priority, isExpectMore);
        }
    }

@@ -324,7 +325,7 @@ public class ImsSMSDispatcher extends SMSDispatcher {
    @Override
    protected void sendNewSubmitPdu(String destinationAddress, String scAddress, String message,
            SmsHeader smsHeader, int format, PendingIntent sentIntent,
            PendingIntent deliveryIntent, boolean lastPart, int priority) {
            PendingIntent deliveryIntent, boolean lastPart, int priority, boolean isExpectMore) {
        Rlog.e(TAG, "Error! Not implemented for IMS.");
    }

+6 −5
Original line number Diff line number Diff line
@@ -516,7 +516,7 @@ public abstract class SMSDispatcher extends Handler {
     */
    protected abstract void sendText(String destAddr, String scAddr,
            String text, PendingIntent sentIntent, PendingIntent deliveryIntent,
            int priority);
            int priority, boolean isExpectMore);

    /**
     * Calculate the number of septets needed to encode the message.
@@ -557,7 +557,7 @@ public abstract class SMSDispatcher extends Handler {
     */
    protected void sendMultipartText(String destAddr, String scAddr,
            ArrayList<String> parts, ArrayList<PendingIntent> sentIntents,
            ArrayList<PendingIntent> deliveryIntents, int priority) {
            ArrayList<PendingIntent> deliveryIntents, int priority, boolean isExpectMore) {

        int refNumber = getNextConcatenatedRef() & 0x00FF;
        int msgCount = parts.size();
@@ -608,7 +608,7 @@ public abstract class SMSDispatcher extends Handler {
            }

            sendNewSubmitPdu(destAddr, scAddr, parts.get(i), smsHeader, encoding,
                    sentIntent, deliveryIntent, (i == (msgCount - 1)), priority);
                    sentIntent, deliveryIntent, (i == (msgCount - 1)), priority, isExpectMore);
        }

    }
@@ -619,7 +619,7 @@ public abstract class SMSDispatcher extends Handler {
    protected abstract void sendNewSubmitPdu(String destinationAddress, String scAddress,
            String message, SmsHeader smsHeader, int encoding,
            PendingIntent sentIntent, PendingIntent deliveryIntent, boolean lastPart,
            int priority);
            int priority, boolean isExpectMore);

    /**
     * Send a SMS
@@ -997,7 +997,8 @@ public abstract class SMSDispatcher extends Handler {
            return;
        }

        sendMultipartText(destinationAddress, scAddress, parts, sentIntents, deliveryIntents, -1);
        sendMultipartText(destinationAddress, scAddress, parts, sentIntents, deliveryIntents, -1,
                tracker.mExpectMore);
    }

    /**
Loading