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

Commit d2b1b9db authored by Amit Mahajan's avatar Amit Mahajan
Browse files

Store selfIdentityUris provided by IMS service.

Bug: 24613146
Change-Id: I337a84a2ed6a37eaa146f9abc2ad28c059ff37e5
parent c18b300f
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.net.LinkProperties;
import android.net.NetworkCapabilities;
import android.net.Uri;
import android.net.wifi.WifiManager;
import android.os.AsyncResult;
import android.os.Build;
@@ -3321,6 +3322,15 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
        mDcTracker.setPolicyDataEnabled(enabled);
    }

    /**
     * SIP URIs aliased to the current subscriber given by the IMS implementation.
     * Applicable only on IMS; used in absence of line1number.
     * @return array of SIP URIs aliased to the current subscriber
     */
    public Uri[] getCurrentSubscriberUris() {
        return null;
    }

    public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
        pw.println("Phone: subId=" + getSubId());
        pw.println(" mPhoneId=" + mPhoneId);
+12 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import android.app.PendingIntent;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.AsyncResult;
import android.os.Bundle;
import android.os.Handler;
@@ -156,6 +157,17 @@ public class ImsPhone extends ImsPhoneBase {
        }
    };

    private Uri[] selfIdentityUris;

    protected void setCurrentSubscriberUris(Uri[] selfIdentityUris) {
        this.selfIdentityUris = selfIdentityUris;
    }

    @Override
    public Uri[] getCurrentSubscriberUris() {
        return selfIdentityUris;
    }

    // Create Cf (Call forward) so that dialling number &
    // mIsCfu (true if reason is call forward unconditional)
    // mOnComplete (Message object passed by client) can be packed &
+7 −0
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.AsyncResult;
import android.os.Bundle;
import android.os.Handler;
@@ -2004,6 +2005,12 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall {
            if (DBG) log("onVoiceMessageCountChanged :: count=" + count);
            mPhone.mDefaultPhone.setVoiceMessageCount(count);
        }

        @Override
        public void registrationAssociatedUriChanged(Uri[] uris) {
            if (DBG) log("registrationAssociatedUriChanged");
            mPhone.setCurrentSubscriberUris(uris);
        }
    };

    private ImsConfigListener.Stub mImsConfigListener = new ImsConfigListener.Stub() {