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

Commit 53d6b9ba authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 12335440 from eb07f6eb to 24Q4-release

Change-Id: I711438ea896ea62eb6952d47ddc4bb5314b4a776
parents 1d5ccca5 eb07f6eb
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -23,6 +23,17 @@ flag {
  bug: "321369729"
}

# OWNER=breadley TARGET=24Q4
flag {
  name: "cache_call_events"
  namespace: "telecom"
  description: "Cache call events to wait for the ServiceWrapper to be set"
  bug: "364311190"
  metadata {
      purpose: PURPOSE_BUGFIX
    }
}

# OWNER = breadley TARGET=24Q3
flag {
  name: "cancel_removal_on_emergency_redial"
+2 −2
Original line number Diff line number Diff line
@@ -43,8 +43,8 @@
    <string name="respond_via_sms_setting_title_2" msgid="4914853536609553457">"હાજરજવાબમાં ફેરફાર કરો"</string>
    <string name="respond_via_sms_setting_summary" msgid="8054571501085436868"></string>
    <string name="respond_via_sms_edittext_dialog_title" msgid="6579353156073272157">"ઝડપી પ્રતિસાદ"</string>
    <string name="respond_via_sms_confirmation_format" msgid="2932395476561267842">"<xliff:g id="PHONE_NUMBER">%s</xliff:g> પર સંદેશ મોકલ્યો."</string>
    <string name="respond_via_sms_failure_format" msgid="5198680980054596391">"<xliff:g id="PHONE_NUMBER">%s</xliff:g>ને સંદેશ મોકલવામાં નિષ્ફળ રહ્યાં."</string>
    <string name="respond_via_sms_confirmation_format" msgid="2932395476561267842">"<xliff:g id="PHONE_NUMBER">%s</xliff:g> પર મેસેજ મોકલ્યો."</string>
    <string name="respond_via_sms_failure_format" msgid="5198680980054596391">"<xliff:g id="PHONE_NUMBER">%s</xliff:g> પર મેસેજ મોકલવામાં નિષ્ફળ રહ્યાં."</string>
    <string name="enable_account_preference_title" msgid="6949224486748457976">"કૉલ કરવા માટેના એકાઉન્ટ"</string>
    <string name="outgoing_call_not_allowed_user_restriction" msgid="3424338207838851646">"ફક્ત કટોકટીના કૉલ્સને મંજૂરી છે."</string>
    <string name="outgoing_call_not_allowed_no_permission" msgid="8590468836581488679">"ફોન પરવાનગી વિના આ ઍપ્લિકેશન આઉટગોઇંગ કૉલ્સ કરી શકતી નથી."</string>
+5 −0
Original line number Diff line number Diff line
@@ -33,6 +33,11 @@ public class CachedAvailableEndpointsChange implements CachedCallback {
        mAvailableEndpoints = endpoints;
    }

    @Override
    public int getCacheType() {
        return TYPE_STATE;
    }

    @Override
    public void executeCallback(CallSourceService service, Call call) {
        service.onAvailableCallEndpointsChanged(call, mAvailableEndpoints);
+48 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2024 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.server.telecom;

import android.os.Bundle;
import android.telecom.Log;

public class CachedCallEventQueue implements CachedCallback {
    public static final String ID = CachedCallEventQueue.class.getSimpleName();

    private final String mEvent;
    private final Bundle mExtras;

    public CachedCallEventQueue(String event, Bundle extras) {
        mEvent = event;
        mExtras = extras;
    }

    @Override
    public int getCacheType() {
        return TYPE_QUEUE;
    }

    @Override
    public void executeCallback(CallSourceService service, Call call) {
        Log.addEvent(call, LogUtils.Events.CALL_EVENT, mEvent);
        service.sendCallEvent(call, mEvent, mExtras);
    }

    @Override
    public String getCallbackId() {
        return ID;
    }
}
+33 −4
Original line number Diff line number Diff line
@@ -22,6 +22,27 @@ package com.android.server.telecom;
 * The callback will be executed once the service is set.
 */
public interface CachedCallback {

    /**
     * This callback is caching a state, meaning any new CachedCallbacks with the same
     * {@link #getCallbackId()} will REPLACE any existing CachedCallback.
     */
    int TYPE_STATE = 0;
    /**
     * This callback is caching a Queue, meaning that any new CachedCallbacks with the same
     * {@link #getCallbackId()} will enqueue as a FIFO queue and each instance of this
     * CachedCallback will run {@link #executeCallback(CallSourceService, Call)}.
     */
    int TYPE_QUEUE = 1;

    /**
     * This method allows the callback to determine whether it is caching a {@link #TYPE_STATE} or
     * a {@link #TYPE_QUEUE}.
     *
     * @return Either {@link #TYPE_STATE} or {@link #TYPE_QUEUE} based on the callback type.
     */
    int getCacheType();

    /**
     * This method executes the callback that was cached because the service was not available
     * at the time the callback was ready.
@@ -33,11 +54,19 @@ public interface CachedCallback {
    void executeCallback(CallSourceService service, Call call);

    /**
     * This method is helpful for caching the callbacks.  If the callback is called multiple times
     * while the service is not set, ONLY the last callback should be sent to the client since the
     * last callback is the most relevant
     * The ID that this CachedCallback should use to identify itself as a distinct operation.
     * <p>
     * If {@link #TYPE_STATE} is set for {@link #getCacheType()}, and a CachedCallback with the
     * same ID is called multiple times while the service is not set, ONLY the last callback will be
     * sent to the client since the last callback is the most relevant.
     * <p>
     * If {@link #TYPE_QUEUE} is set for {@link #getCacheType()} and the CachedCallback with the
     * same ID is called multiple times while the service is not set, each CachedCallback will be
     * enqueued in FIFO order. Once the service is set, {@link #executeCallback} will be called
     * for each CachedCallback with the same ID.
     *
     * @return the callback id that is used in a map to only store the last callback value
     * @return A unique callback id that will be used differentiate this CachedCallback type with
     * other CachedCallback types.
     */
    String getCallbackId();
}
Loading