Cleanup unsupported appusage in Telecom apis.

Cleaning up some unsupport app usage tags in the Telecom APIs.
See bug for more information on why.

Test: Compile
Fixes: 127403196
Change-Id: I7dec2db4671142dab9e677f909292dec03ff09d7
This commit is contained in:
Tyler Gunn
2019-03-05 13:58:45 -08:00
parent 36791ef41e
commit 17933eb106
4 changed files with 16 additions and 9 deletions

View File

@@ -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) {

View File

@@ -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);
}

View File

@@ -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;

View File

@@ -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);
}