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

Commit ad8f0fdd authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Plumb PhysicalChannelConfig all the way up."

parents 1f6b16a8 8f332a7a
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -75,6 +75,7 @@ public abstract class BaseCommands implements CommandsInterface {
    protected RegistrantList mRilNetworkScanResultRegistrants = new RegistrantList();
    protected RegistrantList mModemResetRegistrants = new RegistrantList();
    protected RegistrantList mNattKeepaliveStatusRegistrants = new RegistrantList();
    protected RegistrantList mPhysicalChannelConfigurationRegistrants = new RegistrantList();

    protected Registrant mGsmSmsRegistrant;
    protected Registrant mCdmaSmsRegistrant;
@@ -835,6 +836,17 @@ public abstract class BaseCommands implements CommandsInterface {
        mRilCellInfoListRegistrants.remove(h);
    }

    @Override
    public void registerForPhysicalChannelConfiguration(Handler h, int what, Object obj) {
        Registrant r = new Registrant(h, what, obj);
        mPhysicalChannelConfigurationRegistrants.add(r);
    }

    @Override
    public void unregisterForPhysicalChannelConfiguration(Handler h) {
        mPhysicalChannelConfigurationRegistrants.remove(h);
    }

    @Override
    public void registerForSrvccStateChanged(Handler h, int what, Object obj) {
        Registrant r = new Registrant (h, what, obj);
+11 −0
Original line number Diff line number Diff line
@@ -1787,6 +1787,17 @@ public interface CommandsInterface {
    void registerForCellInfoList(Handler h, int what, Object obj);
    void unregisterForCellInfoList(Handler h);

    /**
     * Fires when a new {@link android.telephony.PhysicalChannelConfig} list is received from the
     * RIL.
     */
    void registerForPhysicalChannelConfiguration(Handler h, int what, Object obj);

    /**
     * Unregisters the handler for {@link android.telephony.PhysicalChannelConfig} updates.
     */
    void unregisterForPhysicalChannelConfiguration(Handler h);

    /**
     * Set Initial Attach Apn
     *
+14 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import android.os.Bundle;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.telephony.CellInfo;
import android.telephony.PhysicalChannelConfig;
import android.telephony.PreciseCallState;
import android.telephony.Rlog;
import android.telephony.ServiceState;
@@ -231,6 +232,19 @@ public class DefaultPhoneNotifier implements PhoneNotifier {
        }
    }

    @Override
    public void notifyPhysicalChannelConfiguration(Phone sender,
            List<PhysicalChannelConfig> configs) {
        int subId = sender.getSubId();
        try {
            if (mRegistry != null) {
                mRegistry.notifyPhysicalChannelConfigurationForSubscriber(subId, configs);
            }
        } catch (RemoteException ex) {
            // system process is dead
        }
    }

    @Override
    public void notifyOtaspChanged(Phone sender, int otaspMode) {
        // FIXME: subId?
+6 −1
Original line number Diff line number Diff line
@@ -28,7 +28,6 @@ import android.net.Uri;
import android.net.wifi.WifiManager;
import android.os.AsyncResult;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
@@ -49,6 +48,7 @@ import android.telephony.CellLocation;
import android.telephony.ClientRequestStats;
import android.telephony.ImsiEncryptionInfo;
import android.telephony.PhoneStateListener;
import android.telephony.PhysicalChannelConfig;
import android.telephony.RadioAccessFamily;
import android.telephony.Rlog;
import android.telephony.ServiceState;
@@ -2143,6 +2143,11 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
        mNotifier.notifyCellInfo(this, privatizeCellInfoList(cellInfo));
    }

    /** Notify {@link PhysicalChannelConfig} changes. */
    public void notifyPhysicalChannelConfiguration(List<PhysicalChannelConfig> configs) {
        mNotifier.notifyPhysicalChannelConfiguration(this, configs);
    }

    public void notifyVoLteServiceStateChanged(VoLteServiceState lteState) {
        mNotifier.notifyVoLteServiceStateChanged(this, lteState);
    }
+4 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.internal.telephony;

import android.telephony.CellInfo;
import android.telephony.PhysicalChannelConfig;
import android.telephony.VoLteServiceState;

import java.util.List;
@@ -50,6 +51,9 @@ public interface PhoneNotifier {

    public void notifyCellInfo(Phone sender, List<CellInfo> cellInfo);

    /** Notify of change to PhysicalChannelConfiguration. */
    void notifyPhysicalChannelConfiguration(Phone sender, List<PhysicalChannelConfig> configs);

    public void notifyPreciseCallState(Phone sender);

    public void notifyDisconnectCause(int cause, int preciseCause);
Loading