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

Commit f4176132 authored by Linux Build Service Account's avatar Linux Build Service Account
Browse files

Promotion of atel.lnx.2.0-00006.

CRs      Change ID                                   Subject
--------------------------------------------------------------------------------------------------------------
1039298   I87a247b496bf9580d7a8d9a2485bc72b4b404a23   Pop-up a video call welcome dialog upon the dialer
767005   Ie3725b87bf9aad747f81c1703343b60f5af8dcb8   Fix incorrect call duration after system time changes

Change-Id: Idfb56515467c7a84ad6860954d2957f7d1454347
CRs-Fixed: 767005, 1039298
parents 5e5fd997 e23f6e29
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.content.Context;
import android.hardware.camera2.CameraCharacteristics;
import android.net.Uri;
import android.os.Bundle;
import android.os.SystemClock;
import android.os.Trace;
import android.os.RemoteException;
import android.telecom.Call.Details;
@@ -391,6 +392,7 @@ public class Call {
    private String mLastForwardedNumber;
    private String mCallSubject;
    private PhoneAccountHandle mPhoneAccountHandle;
    private long mBaseChronometerTime = 0;

    /**
     * Indicates whether the phone account associated with this call supports specifying a call
@@ -1026,4 +1028,13 @@ public class Call {
                extras.getInt(QtiCallConstants.VOWIFI_CALL_QUALITY_EXTRA_KEY,
                QtiCallConstants.VOWIFI_QUALITY_NONE);
    }

    public void triggerCalcBaseChronometerTime() {
        mBaseChronometerTime = getConnectTimeMillis() - System.currentTimeMillis()
                + SystemClock.elapsedRealtime();
    }

    public long getCallDuration() {
        return SystemClock.elapsedRealtime() - mBaseChronometerTime;
    }
}
+2 −3
Original line number Diff line number Diff line
@@ -321,6 +321,7 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi>
        // Start/stop timers.
        if (isPrimaryCallActive()) {
            Log.d(this, "Starting the calltime timer");
            mPrimary.triggerCalcBaseChronometerTime();
            mCallTimer.start(CALL_TIME_UPDATE_INTERVAL_MS);
        } else {
            Log.d(this, "Canceling the calltime timer");
@@ -561,9 +562,7 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi>
            ui.setPrimaryCallElapsedTime(false, 0);
            mCallTimer.cancel();
        } else {
            final long callStart = mPrimary.getConnectTimeMillis();
            final long duration = System.currentTimeMillis() - callStart;
            ui.setPrimaryCallElapsedTime(true, duration);
            ui.setPrimaryCallElapsedTime(true, mPrimary.getCallDuration());
        }
    }

+3 −1
Original line number Diff line number Diff line
@@ -518,9 +518,11 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O

        if (getResources().getBoolean(
                R.bool.config_regional_video_call_welcome_dialog)) {
            if(CallUtil.isVideoEnabled(this)) {
                showVideoCallWelcomeDialog();
            }
        }
    }
    @Override
    protected void onResume() {
        Trace.beginSection(TAG + " onResume");
+1 −1
Original line number Diff line number Diff line
@@ -203,7 +203,7 @@ public class DialerUtils {
    public static boolean canShowWelcomeScreen(Context context) {
        final SharedPreferences prefs = context.getSharedPreferences(
                PREFS_MESSAGE, Context.MODE_PRIVATE);
        return prefs.getBoolean(KEY_STATE, false);
        return prefs.getBoolean(KEY_STATE, true);
    }