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

Commit 5670fa7c authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 10147226 from 2b5f925e to udc-release

Change-Id: I9564a06ca7eed2c8d0fbb1bab54dbaf91febac4c
parents 01793147 2b5f925e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -274,6 +274,7 @@ message VoiceCallSession {
    optional bool is_multiparty = 31;
    optional int32 call_duration = 32;
    optional int32 last_known_rat = 33;
    optional int32 fold_state = 34;

    // Internal use only
    optional int64 setup_begin_millis = 10001;
+2 −1
Original line number Diff line number Diff line
@@ -974,7 +974,8 @@ public class MetricsCollector implements StatsManager.StatsPullAtomCallback {
                session.ratAtConnected,
                session.isMultiparty,
                session.callDuration,
                session.lastKnownRat);
                session.lastKnownRat,
                session.foldState);
    }

    private static StatsEvent buildStatsEvent(IncomingSms sms) {
+5 −0
Original line number Diff line number Diff line
@@ -157,6 +157,8 @@ public class VoiceCallSessionStats {
    private final PersistAtomsStorage mAtomsStorage =
            PhoneFactory.getMetricsCollector().getAtomsStorage();
    private final UiccController mUiccController = UiccController.getInstance();
    private final DeviceStateHelper mDeviceStateHelper =
            PhoneFactory.getMetricsCollector().getDeviceStateHelper();

    public VoiceCallSessionStats(int phoneId, Phone phone) {
        mPhoneId = phoneId;
@@ -514,6 +516,9 @@ public class VoiceCallSessionStats {
        // Update end RAT
        updateRatAtEnd(proto, getVoiceRatWithVoNRFix(mPhone, getServiceState(), proto.bearerAtEnd));

        // Set device fold state
        proto.foldState = mDeviceStateHelper.getFoldState();

        mAtomsStorage.addVoiceCallSession(proto);

        // merge RAT usages to PersistPullers when the call session ends (i.e. no more active calls)
+1 −4
Original line number Diff line number Diff line
@@ -46,7 +46,6 @@ import android.os.Process;
import android.os.RemoteException;
import android.os.TelephonyServiceManager;
import android.os.UserHandle;
import android.provider.DeviceConfig;
import android.provider.Settings;
import android.provider.Telephony.SimInfo;
import android.service.carrier.CarrierIdentifier;
@@ -1311,9 +1310,7 @@ public class SubscriptionManagerService extends ISub.Stub {
                log("updateSubscription: SIM_STATE_NOT_READY is not a final state. Will update "
                        + "subscription later.");
                return;
            }

            if (!areUiccAppsEnabledOnCard(phoneId)) {
            } else {
                logl("updateSubscription: UICC app disabled on slot " + phoneId);
                markSubscriptionsInactive(phoneId);
            }
+13 −0
Original line number Diff line number Diff line
@@ -2235,6 +2235,19 @@ public class SubscriptionManagerServiceTest extends TelephonyTest {
        assertThat(mSubscriptionManagerServiceUT.getActiveSubIdList(false)).isEmpty();
    }

    @Test
    public void testSimNotReadyBySimDeactivate() {
        insertSubscription(FAKE_SUBSCRIPTION_INFO1);

        mContextFixture.addCallingOrSelfPermission(Manifest.permission.READ_PRIVILEGED_PHONE_STATE);
        mSubscriptionManagerServiceUT.updateSimState(
                0, TelephonyManager.SIM_STATE_NOT_READY, null, null);
        doReturn(true).when(mUiccProfile).isEmptyProfile();
        processAllMessages();

        assertThat(mSubscriptionManagerServiceUT.getActiveSubIdList(false)).isEmpty();
    }

    @Test
    public void testInactiveSimRemoval() {
        insertSubscription(FAKE_SUBSCRIPTION_INFO2);