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

Commit df51f1fd authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Use Parcelable CellIdentity instead of CellLocation in AIDL." am: 4f42d17a am: 87b6d7b2

Change-Id: I7ad1485a1d6009cea28e064c0ba916c01762af35
parents 940c3de9 87b6d7b2
Loading
Loading
Loading
Loading
+3 −6
Original line number Original line Diff line number Diff line
@@ -19,15 +19,14 @@ package com.android.internal.telephony;
import android.annotation.NonNull;
import android.annotation.NonNull;
import android.annotation.UnsupportedAppUsage;
import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.Context;
import android.os.Bundle;
import android.os.RemoteException;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.ServiceManager;
import android.telephony.Annotation.DataFailureCause;
import android.telephony.Annotation.DataFailureCause;
import android.telephony.Annotation.RadioPowerState;
import android.telephony.Annotation.RadioPowerState;
import android.telephony.Annotation.SrvccState;
import android.telephony.Annotation.SrvccState;
import android.telephony.CallQuality;
import android.telephony.CallQuality;
import android.telephony.CellIdentity;
import android.telephony.CellInfo;
import android.telephony.CellInfo;
import android.telephony.CellLocation;
import android.telephony.PhoneCapability;
import android.telephony.PhoneCapability;
import android.telephony.PreciseCallState;
import android.telephony.PreciseCallState;
import android.telephony.PreciseDataConnectionState;
import android.telephony.PreciseDataConnectionState;
@@ -142,11 +141,9 @@ public class DefaultPhoneNotifier implements PhoneNotifier {
    }
    }


    @Override
    @Override
    public void notifyCellLocation(Phone sender, CellLocation cl) {
    public void notifyCellLocation(Phone sender, CellIdentity cellIdentity) {
        int subId = sender.getSubId();
        int subId = sender.getSubId();
        Bundle data = new Bundle();
        mTelephonyRegistryMgr.notifyCellLocation(subId, cellIdentity);
        cl.fillInNotifierBundle(data);
        mTelephonyRegistryMgr.notifyCellLocation(subId, data);
    }
    }


    @Override
    @Override
+1 −1
Original line number Original line Diff line number Diff line
@@ -1538,7 +1538,7 @@ public class GsmCdmaCallTracker extends CallTracker {
                    causeCode == CallFailCause.BEARER_NOT_AVAIL ||
                    causeCode == CallFailCause.BEARER_NOT_AVAIL ||
                    causeCode == CallFailCause.ERROR_UNSPECIFIED) {
                    causeCode == CallFailCause.ERROR_UNSPECIFIED) {


                    CellLocation loc = mPhone.getCellLocation();
                    CellLocation loc = mPhone.getCellIdentity().asCellLocation();
                    int cid = -1;
                    int cid = -1;
                    if (loc != null) {
                    if (loc != null) {
                        if (loc instanceof GsmCellLocation) {
                        if (loc instanceof GsmCellLocation) {
+7 −7
Original line number Original line Diff line number Diff line
@@ -60,7 +60,7 @@ import android.telecom.TelecomManager;
import android.telecom.VideoProfile;
import android.telecom.VideoProfile;
import android.telephony.AccessNetworkConstants;
import android.telephony.AccessNetworkConstants;
import android.telephony.CarrierConfigManager;
import android.telephony.CarrierConfigManager;
import android.telephony.CellLocation;
import android.telephony.CellIdentity;
import android.telephony.DataFailCause;
import android.telephony.DataFailCause;
import android.telephony.ImsiEncryptionInfo;
import android.telephony.ImsiEncryptionInfo;
import android.telephony.NetworkScanRequest;
import android.telephony.NetworkScanRequest;
@@ -522,8 +522,8 @@ public class GsmCdmaPhone extends Phone {
    }
    }


    @Override
    @Override
    public void getCellLocation(WorkSource workSource, Message rspMsg) {
    public void getCellIdentity(WorkSource workSource, Message rspMsg) {
        mSST.requestCellLocation(workSource, rspMsg);
        mSST.requestCellIdentity(workSource, rspMsg);
    }
    }


    @UnsupportedAppUsage
    @UnsupportedAppUsage
@@ -811,12 +811,12 @@ public class GsmCdmaPhone extends Phone {
    }
    }


    /**
    /**
     * Notify that the CellLocation has changed.
     * Notify that the cell location has changed.
     *
     *
     * @param cl the new CellLocation
     * @param cellIdentity the new CellIdentity
     */
     */
    public void notifyLocationChanged(CellLocation cl) {
    public void notifyLocationChanged(CellIdentity cellIdentity) {
        mNotifier.notifyCellLocation(this, cl);
        mNotifier.notifyCellLocation(this, cellIdentity);
    }
    }


    @Override
    @Override
+5 −6
Original line number Original line Diff line number Diff line
@@ -45,8 +45,8 @@ import android.telephony.Annotation.ApnType;
import android.telephony.Annotation.DataFailureCause;
import android.telephony.Annotation.DataFailureCause;
import android.telephony.CarrierConfigManager;
import android.telephony.CarrierConfigManager;
import android.telephony.CarrierRestrictionRules;
import android.telephony.CarrierRestrictionRules;
import android.telephony.CellIdentity;
import android.telephony.CellInfo;
import android.telephony.CellInfo;
import android.telephony.CellLocation;
import android.telephony.ClientRequestStats;
import android.telephony.ClientRequestStats;
import android.telephony.ImsiEncryptionInfo;
import android.telephony.ImsiEncryptionInfo;
import android.telephony.PhoneStateListener;
import android.telephony.PhoneStateListener;
@@ -1864,17 +1864,16 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
    /**
    /**
     * @return the current cell location if known
     * @return the current cell location if known
     */
     */
    @UnsupportedAppUsage
    public CellIdentity getCellIdentity() {
    public CellLocation getCellLocation() {
        return getServiceStateTracker().getCellIdentity();
        return getServiceStateTracker().getCellLocation();
    }
    }


    /**
    /**
     * @param workSource calling WorkSource
     * @param workSource calling WorkSource
     * @param rspMsg the response message containing the cell location
     * @param rspMsg the response message containing the cell location
     */
     */
    public void getCellLocation(WorkSource workSource, Message rspMsg) {
    public void getCellIdentity(WorkSource workSource, Message rspMsg) {
        getServiceStateTracker().requestCellLocation(workSource, rspMsg);
        getServiceStateTracker().requestCellIdentity(workSource, rspMsg);
    }
    }


    /**
    /**
+7 −3
Original line number Original line Diff line number Diff line
@@ -21,8 +21,8 @@ import android.telephony.Annotation.DataFailureCause;
import android.telephony.Annotation.RadioPowerState;
import android.telephony.Annotation.RadioPowerState;
import android.telephony.Annotation.SrvccState;
import android.telephony.Annotation.SrvccState;
import android.telephony.CallQuality;
import android.telephony.CallQuality;
import android.telephony.CellIdentity;
import android.telephony.CellInfo;
import android.telephony.CellInfo;
import android.telephony.CellLocation;
import android.telephony.PhoneCapability;
import android.telephony.PhoneCapability;
import android.telephony.PreciseDataConnectionState;
import android.telephony.PreciseDataConnectionState;
import android.telephony.emergency.EmergencyNumber;
import android.telephony.emergency.EmergencyNumber;
@@ -39,8 +39,12 @@ public interface PhoneNotifier {


    void notifyServiceState(Phone sender);
    void notifyServiceState(Phone sender);


    /** Notify registrants of the current CellLocation */
    /**
    void notifyCellLocation(Phone sender, CellLocation cl);
     * Notify registrants of the current CellLocation.
     *
     * <p>Use CellIdentity that is Parcellable to pass AIDL; convert to CellLocation in client code.
     */
    void notifyCellLocation(Phone sender, CellIdentity cellIdentity);


    @UnsupportedAppUsage
    @UnsupportedAppUsage
    void notifySignalStrength(Phone sender);
    void notifySignalStrength(Phone sender);
Loading