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

Commit ace9a749 authored by Sukanya Rajkhowa's avatar Sukanya Rajkhowa Committed by Wink Saville
Browse files

SMS over IMS bug fixes

This change includes the following:
1) SMS over IMS remaining patches which address review comments

2) Fix for Bug:11378993
For MT SMS over IMS, if an application uses the createFromPdu(byte[] pdu) API
instead of createFromPdu(byte[] pdu,String format) API, we first try to create
SmsMessage from raw PDU with the format of active phone. That either returns a
valid SmsMessage object or throws a RuntimeException causing the correct format
to be used the next time. If GsmSmsAddress is not valid, we should throw
a RuntimeException which is handled by createFromPdu(byte[] pdu)

3) Fix for Bug:11424054
Register for ICC changes and handle new SMS on ICC

Bug: 11378993, 11424054
Change-Id: I94bcfcf93d8205c2916997091617899c6ebdd5e5
parent a500ee7f
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
/*
 * Copyright (C) 2008 The Android Open Source Project
 * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
+0 −1
Original line number Diff line number Diff line
/*
 * Copyright (C) 2008 The Android Open Source Project
 * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
+0 −1
Original line number Diff line number Diff line
/*
 * Copyright (C) 2006 The Android Open Source Project
 * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
+6 −5
Original line number Diff line number Diff line
/*
 * Copyright (C) 2006 The Android Open Source Project
 * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
@@ -111,13 +110,15 @@ public interface CommandsInterface {
    RadioState getRadioState();

    /**
     * response.obj.result is an int[2]
     * response.obj.result is an int[3]
     *
     * response.obj.result[0] is registration state
     * response.obj.result[0] is IMS registration state
     *                        0 - Not registered
     *                        1 - Registered
     * response.obj.result[1] is of type const RIL_IMS_SMS_Format,
     *                        corresponds to sms format used for SMS over IMS.
     * response.obj.result[1] is bitmap of supported services
     *                        & 0x1 - SMS supported
     * response.obj.result[2 ] is of type RILConstants.GSM_PHONE or
     *                                    RILConstants.CDMA_PHONE
     */
    void getImsRegistrationState(Message result);

+1 −7
Original line number Diff line number Diff line
/*
 * Copyright (C) 2008 The Android Open Source Project
 * Copyright (c) 2013, The Linux Foundation. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
@@ -90,8 +89,7 @@ public class IccSmsInterfaceManager extends ISms.Stub {
                    ar = (AsyncResult)msg.obj;
                    synchronized (mLock) {
                        if (ar.exception == null) {
                            mSms  = (List<SmsRawData>)
                                    buildValidRawData((ArrayList<byte[]>) ar.result);
                            mSms = buildValidRawData((ArrayList<byte[]>) ar.result);
                            //Mark SMS as read after importing it from card.
                            markMessagesAsRead((ArrayList<byte[]>) ar.result);
                        } else {
@@ -160,10 +158,6 @@ public class IccSmsInterfaceManager extends ISms.Stub {
        }
    }

    public void dispose() {
        mDispatcher.dispose();
    }

    protected void updatePhoneObject(PhoneBase phone) {
        mPhone = phone;
        mDispatcher.updatePhoneObject(phone);
Loading