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

Commit 62fddab6 authored by Bill Yi's avatar Bill Yi
Browse files

Merge pi-qpr1-release PQ1A.181105.017.A1 to pi-platform-release

Change-Id: I30fa6094e7bf2a9d8f6f57f64a359f896c472fdf
parents cf51f62d 5ebb4380
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -13,6 +13,9 @@ message TelecomLog {

  // Timing information for the logging sessions
  repeated LogSessionTiming session_timings = 2;

  // Hardware revision (EVT, DVT, PVT etc.)
  optional string hardware_revision = 3;
}

message LogSessionTiming {
+1 −1
Original line number Diff line number Diff line
@@ -64,7 +64,7 @@
    <string name="blocked_numbers_butter_bar_button" msgid="2197943354922010696">"Gaitu berriro"</string>
    <string name="blocked_numbers_number_blocked_message" msgid="7678509606805029540">"Blokeatu da <xliff:g id="BLOCKED_NUMBER">%1$s</xliff:g>"</string>
    <string name="blocked_numbers_number_unblocked_message" msgid="977894647366750418">"Desblokeatu da <xliff:g id="UNBLOCKED_NUMBER">%1$s</xliff:g>"</string>
    <string name="blocked_numbers_block_emergency_number_message" msgid="917851876780698387">"Ezin da blokeatu larrialdi-zenbakia."</string>
    <string name="blocked_numbers_block_emergency_number_message" msgid="917851876780698387">"Ezin da blokeatu larrialdietarako zenbakia."</string>
    <string name="blocked_numbers_number_already_blocked_message" msgid="4392247814500811798">"<xliff:g id="BLOCKED_NUMBER">%1$s</xliff:g> blokeatuta dago dagoeneko."</string>
    <string name="toast_personal_call_msg" msgid="5115361633476779723">"Telefono pertsonala erabiltzen ari zara deia egiteko"</string>
    <string name="notification_incoming_call" msgid="7713197997773986670">"<xliff:g id="CALL_VIA">%1$s</xliff:g> deia (deitzailea: <xliff:g id="CALL_FROM">%2$s</xliff:g>)"</string>
+5 −0
Original line number Diff line number Diff line
@@ -55,4 +55,9 @@
         When false, a fancy vibration pattern which ramps up and down will be used.
         Devices should overlay this value based on the type of vibration hardware they employ. -->
    <bool name="use_simple_vibration_pattern">false</bool>

    <!-- When true, if Telecom is playing the ringtone, it will attempt to pause for some time
         between repeats of the ringtone.
         When false, the ringtone will be looping with no pause. -->
    <bool name="should_pause_between_ringtone_repeats">true</bool>
</resources>
+4 −0
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package com.android.server.telecom;

import android.os.SystemProperties;

import android.telecom.Connection;
import android.telecom.DisconnectCause;
import android.telecom.Logging.EventManager;
@@ -583,6 +585,7 @@ public class Analytics {
                            .setSessionEntryPoint(timing.getKey())
                            .setTimeMillis(timing.getTime()))
                    .toArray(TelecomLogClass.LogSessionTiming[]::new);
            result.setHardwareRevision(SystemProperties.get("ro.boot.revision", ""));
            if (args.length > 1 && CLEAR_ANALYTICS_ARG.equals(args[1])) {
                sCallIdToInfo.clear();
                sSessionTimings.clear();
@@ -628,6 +631,7 @@ public class Analytics {
                    .filter(e -> sSessionIdToLogSession.containsKey(e.getKey()))
                    .forEach(e -> writer.printf("%s: %.2f\n",
                            sSessionIdToLogSession.get(e.getKey()), e.getValue()));
            writer.println("Hardware Version: " + SystemProperties.get("ro.boot.revision", ""));
        }
    }

+29 −1
Original line number Diff line number Diff line
@@ -47,6 +47,26 @@ public class AsyncRingtonePlayer {
    /** The current ringtone. Only used by the ringtone thread. */
    private Ringtone mRingtone;

    /**
     * Determines if the {@link AsyncRingtonePlayer} should pause between repeats of the ringtone.
     * When {@code true}, the system will check if the ringtone has stopped every
     * {@link #RESTART_RINGER_MILLIS} and restart the ringtone if it has stopped.  This does not
     * guarantee that there is {@link #RESTART_RINGER_MILLIS} between each repeat of the ringtone,
     * rather it ensures that for short ringtones, or ringtones which are not a multiple of
     * {@link #RESTART_RINGER_MILLIS} in duration that there will be some pause between repetitions.
     * When {@code false}, the ringtone will be looped continually with no attempt to pause between
     * repeats.
     */
    private boolean mShouldPauseBetweenRepeat = true;

    public AsyncRingtonePlayer() {
        // Empty
    }

    public AsyncRingtonePlayer(boolean shouldPauseBetweenRepeat) {
        mShouldPauseBetweenRepeat = shouldPauseBetweenRepeat;
    }

    /** Plays the ringtone. */
    public void play(RingtoneFactory factory, Call incomingCall) {
        Log.d(this, "Posting play.");
@@ -144,7 +164,15 @@ public class AsyncRingtonePlayer {
            }
        }

        if (mShouldPauseBetweenRepeat) {
            // We're trying to pause between repeats, so the ringtone will not intentionally loop.
            // Instead, we'll use a handler message to perform repeats.
            handleRepeat();
        } else {
            mRingtone.setLooping(true);
            mRingtone.play();
            Log.i(this, "Play ringtone, looping.");
        }
    }

    private void handleRepeat() {
Loading