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

Commit 367353b7 authored by Pranav Madapurmath's avatar Pranav Madapurmath Committed by Android (Google) Code Review
Browse files

Merge "TelephonyRegistryManager API review changes" into main

parents 0e81f5cf 2abf4b7a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -15040,7 +15040,7 @@ package android.telephony {
  @FlaggedApi("com.android.server.telecom.flags.telecom_resolve_hidden_dependencies") public class TelephonyRegistryManager {
    method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void notifyCallStateChangedForAllSubscriptions(int, @Nullable String);
    method public void notifyOutgoingEmergencyCall(int, int, @NonNull android.telephony.emergency.EmergencyNumber);
    method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void notifyOutgoingEmergencyCall(int, int, @NonNull android.telephony.emergency.EmergencyNumber);
  }
  public final class ThermalMitigationRequest implements android.os.Parcelable {
+19 −6
Original line number Diff line number Diff line
@@ -19,12 +19,15 @@ import android.annotation.CallbackExecutor;
import android.annotation.FlaggedApi;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.RequiresFeature;
import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
import android.annotation.SystemService;
import android.compat.Compatibility;
import android.compat.annotation.ChangeId;
import android.compat.annotation.EnabledAfter;
import android.content.Context;
import android.content.pm.PackageManager;
import android.os.Binder;
import android.os.Build;
import android.os.RemoteException;
@@ -73,9 +76,15 @@ import java.util.stream.Collectors;
 * Limit API access to only carrier apps with certain permissions or apps running on
 * privileged UID.
 *
 * TelephonyRegistryManager is intended for use on devices that implement
 * {@link android.content.pm.PackageManager#FEATURE_TELEPHONY FEATURE_TELEPHONY}. On devices
 * that do not implement this feature, the behavior is not reliable.
 *
 * @hide
 */
@SystemApi
@SystemService(Context.TELEPHONY_REGISTRY_SERVICE)
@RequiresFeature(PackageManager.FEATURE_TELEPHONY)
@FlaggedApi(Flags.FLAG_TELECOM_RESOLVE_HIDDEN_DEPENDENCIES)
public class TelephonyRegistryManager {

@@ -389,10 +398,11 @@ public class TelephonyRegistryManager {
    }

    /**
     * Notify call state changed on all subscriptions.
     * Notify call state changed on all subscriptions, excluding over-the-top VOIP calls (otherwise
     * known as self-managed calls in the Android Platform).
     *
     * @param state latest call state. e.g, offhook, ringing
     * @param incomingNumber incoming phone number.
     * @param incomingNumber incoming phone number or null in the case for OTT VOIP calls
     * @hide
     */
    @SystemApi
@@ -627,17 +637,20 @@ public class TelephonyRegistryManager {
    }

    /**
     * Notify outgoing emergency call.
     * Notify outgoing emergency call to all applications that have registered a listener
     * ({@link PhoneStateListener}) or a callback ({@link TelephonyCallback}) to monitor changes in
     * telephony states.
     * @param simSlotIndex Sender phone ID.
     * @param subId Sender subscription ID.
     * @param subscriptionId Sender subscription ID.
     * @param emergencyNumber Emergency number.
     * @hide
     */
    @SystemApi
    public void notifyOutgoingEmergencyCall(int simSlotIndex, int subId,
    @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
    public void notifyOutgoingEmergencyCall(int simSlotIndex, int subscriptionId,
            @NonNull EmergencyNumber emergencyNumber) {
        try {
            sRegistry.notifyOutgoingEmergencyCall(simSlotIndex, subId, emergencyNumber);
            sRegistry.notifyOutgoingEmergencyCall(simSlotIndex, subscriptionId, emergencyNumber);
        } catch (RemoteException ex) {
            // system process is dead
            throw ex.rethrowFromSystemServer();