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

Commit 90723afa authored by Tyler Gunn's avatar Tyler Gunn Committed by Gerrit Code Review
Browse files

Merge "Cleanup unsupported appusage in Telecom apis."

parents b7463a63 17933eb1
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package android.telecom;

import android.annotation.SystemApi;
import android.annotation.UnsupportedAppUsage;
import android.os.Build;
import android.os.Parcel;
import android.os.Parcelable;

@@ -54,11 +55,11 @@ public class AudioState implements Parcelable {
    private static final int ROUTE_ALL = ROUTE_EARPIECE | ROUTE_BLUETOOTH | ROUTE_WIRED_HEADSET |
            ROUTE_SPEAKER;

    @UnsupportedAppUsage
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 127403196)
    private final boolean isMuted;
    @UnsupportedAppUsage
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 127403196)
    private final int route;
    @UnsupportedAppUsage
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 127403196)
    private final int supportedRouteMask;

    public AudioState(boolean muted, int route, int supportedRouteMask) {
+9 −4
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package android.telecom;
import android.annotation.SystemApi;
import android.annotation.UnsupportedAppUsage;
import android.bluetooth.BluetoothDevice;
import android.os.Build;
import android.os.Bundle;
import android.os.RemoteException;
import android.util.ArrayMap;
@@ -328,10 +329,12 @@ public final class Phone {
     * become active, and the touch screen and display will be turned off when the user's face
     * is detected to be in close proximity to the screen. This operation is a no-op on devices
     * that do not have a proximity sensor.
     *
     * <p>
     * This API does not actually turn on the proximity sensor; apps should do this on their own if
     * required.
     * @hide
     */
    @UnsupportedAppUsage
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 127403196)
    public final void setProximitySensorOn() {
        mInCallAdapter.turnProximitySensorOn();
    }
@@ -344,10 +347,12 @@ public final class Phone {
     * @param screenOnImmediately If true, the screen will be turned on immediately if it was
     * previously off. Otherwise, the screen will only be turned on after the proximity sensor
     * is no longer triggered.
     *
     * <p>
     * This API does not actually turn of the proximity sensor; apps should do this on their own if
     * required.
     * @hide
     */
    @UnsupportedAppUsage
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 127403196)
    public final void setProximitySensorOff(boolean screenOnImmediately) {
        mInCallAdapter.turnProximitySensorOff(screenOnImmediately);
    }
+1 −1
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ import java.util.Objects;
 * See {@link PhoneAccount}, {@link TelecomManager}.
 */
public final class PhoneAccountHandle implements Parcelable {
    @UnsupportedAppUsage
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 127403196)
    private final ComponentName mComponentName;
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)
    private final String mId;
+2 −1
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package android.telecom;

import android.annotation.UnsupportedAppUsage;
import android.net.Uri;
import android.os.Build;
import android.os.Handler;
import android.os.IBinder;
import android.os.Looper;
@@ -218,7 +219,7 @@ public class VideoCallImpl extends VideoCall {
        mTargetSdkVersion = sdkVersion;
    }

    @UnsupportedAppUsage
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 127403196)
    public void destroy() {
        unregisterCallback(mCallback);
    }