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

Commit 7a1723d1 authored by Mathew Inwood's avatar Mathew Inwood
Browse files

Add maxTargetSdk restriction to unused APIs.

These are APIs that have @UnsupportedAppUsage but for which we don't
have any evidence of them currently being used, so should be safe to remove
from the unsupported list.

Bug: 170729553
Test: Treehugger
Change-Id: I086195848a42790edfaf1fd80154b93c0602f52f
parent 0eafb70e
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.ims;
import android.compat.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Message;
import android.os.Parcel;
@@ -952,7 +953,7 @@ public class ImsCall implements ICall {
     *
     * @return {@code True} if the call is a multiparty call.
     */
    @UnsupportedAppUsage
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
    public boolean isMultiparty() {
        synchronized(mLockObj) {
            if (mSession == null) {
@@ -1217,7 +1218,7 @@ public class ImsCall implements ICall {
     * @param number number to be deflected to.
     * @throws ImsException if the IMS service fails to deflect the call
     */
    @UnsupportedAppUsage
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
    public void deflect(String number) throws ImsException {
        logi("deflect :: session=" + mSession + ", number=" + Rlog.pii(TAG, number));

@@ -1243,7 +1244,7 @@ public class ImsCall implements ICall {
     * @see Listener#onCallStartFailed
     * @throws ImsException if the IMS service fails to reject the call
     */
    @UnsupportedAppUsage
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
    public void reject(int reason) throws ImsException {
        logi("reject :: reason=" + reason);

@@ -1328,7 +1329,7 @@ public class ImsCall implements ICall {
     *
     * @param reason reason code to terminate a call
     */
    @UnsupportedAppUsage
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
    public void terminate(int reason) {
        logi("terminate :: reason=" + reason);

+2 −1
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@
package com.android.ims;

import android.compat.annotation.UnsupportedAppUsage;
import android.os.Build;
import android.os.RemoteException;
import android.telephony.ims.ImsReasonInfo;

@@ -64,7 +65,7 @@ public class ImsEcbm {
        }
    }

    @UnsupportedAppUsage
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
    public void exitEmergencyCallbackMode() throws ImsException {
        try {
            miEcbm.exitEmergencyCallbackMode();
+4 −3
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.app.PendingIntent;
import android.compat.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.pm.PackageManager;
import android.os.Build;
import android.os.Message;
import android.os.PersistableBundle;
import android.os.RemoteException;
@@ -454,7 +455,7 @@ public class ImsManager implements FeatureUpdates {
     * @deprecated Doesn't support MSIM devices. Use
     * {@link #isEnhanced4gLteModeSettingEnabledByUser()} instead.
     */
    @UnsupportedAppUsage
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
    public static boolean isEnhanced4gLteModeSettingEnabledByUser(Context context) {
        DefaultSubscriptionManagerProxy p = new DefaultSubscriptionManagerProxy(context);
        ImsManager mgr = ImsManager.getInstance(context, p.getDefaultVoicePhoneId());
@@ -559,7 +560,7 @@ public class ImsManager implements FeatureUpdates {
     * @deprecated Does not support MSIM devices. Please use
     * {@link #isNonTtyOrTtyOnVolteEnabled()} instead.
     */
    @UnsupportedAppUsage
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
    public static boolean isNonTtyOrTtyOnVolteEnabled(Context context) {
        DefaultSubscriptionManagerProxy p = new DefaultSubscriptionManagerProxy(context);
        ImsManager mgr = ImsManager.getInstance(context, p.getDefaultVoicePhoneId());
@@ -596,7 +597,7 @@ public class ImsManager implements FeatureUpdates {
     * @deprecated Does not support MSIM devices. Please use
     * {@link #isVolteEnabledByPlatform()} instead.
     */
    @UnsupportedAppUsage
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
    public static boolean isVolteEnabledByPlatform(Context context) {
        DefaultSubscriptionManagerProxy p = new DefaultSubscriptionManagerProxy(context);
        ImsManager mgr = ImsManager.getInstance(context, p.getDefaultVoicePhoneId());
+2 −1
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.ims.internal;
import android.compat.annotation.UnsupportedAppUsage;
import android.net.Uri;
import android.os.Binder;
import android.os.Build;
import android.os.Handler;
import android.os.IBinder;
import android.os.Looper;
@@ -235,7 +236,7 @@ public class ImsVideoCallProviderWrapper extends Connection.VideoProvider {
     *
     * @param videoProvider
     */
    @UnsupportedAppUsage
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
    public ImsVideoCallProviderWrapper(IImsVideoCallProvider videoProvider)
            throws RemoteException {