Merge "Move AssetAtlas off of SkBitmap*"
diff --git a/api/current.txt b/api/current.txt
index 9b47519..7575a07 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -5740,6 +5740,7 @@
method public void setRestrictionsProvider(android.content.ComponentName, android.content.ComponentName);
method public void setScreenCaptureDisabled(android.content.ComponentName, boolean);
method public void setSecureSetting(android.content.ComponentName, java.lang.String, java.lang.String);
+ method public void setStatusBarEnabledState(android.content.ComponentName, boolean);
method public int setStorageEncryption(android.content.ComponentName, boolean);
method public void setTrustAgentConfiguration(android.content.ComponentName, android.content.ComponentName, android.os.PersistableBundle);
method public void setUninstallBlocked(android.content.ComponentName, java.lang.String, boolean);
@@ -7660,6 +7661,7 @@
field public static final java.lang.String ALARM_SERVICE = "alarm";
field public static final java.lang.String APPWIDGET_SERVICE = "appwidget";
field public static final java.lang.String APP_OPS_SERVICE = "appops";
+ field public static final java.lang.String AUDIO_DEVICES_SERVICE = "audio_devices_manager";
field public static final java.lang.String AUDIO_SERVICE = "audio";
field public static final java.lang.String BATTERY_SERVICE = "batterymanager";
field public static final int BIND_ABOVE_CLIENT = 8; // 0x8
@@ -12607,6 +12609,7 @@
method public final void unlock();
field public static final java.lang.String ACTION_NEW_PICTURE = "android.hardware.action.NEW_PICTURE";
field public static final java.lang.String ACTION_NEW_VIDEO = "android.hardware.action.NEW_VIDEO";
+ field public static final int CAMERA_ERROR_EVICTED = 2; // 0x2
field public static final int CAMERA_ERROR_SERVER_DIED = 100; // 0x64
field public static final int CAMERA_ERROR_UNKNOWN = 1; // 0x1
}
@@ -13055,6 +13058,7 @@
method public abstract android.hardware.camera2.CameraDevice getDevice();
method public abstract android.view.Surface getInputSurface();
method public abstract boolean isReprocessible();
+ method public abstract void prepare(android.view.Surface) throws android.hardware.camera2.CameraAccessException;
method public abstract int setRepeatingBurst(java.util.List<android.hardware.camera2.CaptureRequest>, android.hardware.camera2.CameraCaptureSession.CaptureCallback, android.os.Handler) throws android.hardware.camera2.CameraAccessException;
method public abstract int setRepeatingRequest(android.hardware.camera2.CaptureRequest, android.hardware.camera2.CameraCaptureSession.CaptureCallback, android.os.Handler) throws android.hardware.camera2.CameraAccessException;
method public abstract void stopRepeating() throws android.hardware.camera2.CameraAccessException;
@@ -13077,6 +13081,7 @@
method public abstract void onConfigureFailed(android.hardware.camera2.CameraCaptureSession);
method public abstract void onConfigured(android.hardware.camera2.CameraCaptureSession);
method public void onReady(android.hardware.camera2.CameraCaptureSession);
+ method public void onSurfacePrepared(android.hardware.camera2.CameraCaptureSession, android.view.Surface);
}
public final class CameraCharacteristics extends android.hardware.camera2.CameraMetadata {
@@ -14563,6 +14568,47 @@
method public android.media.AudioAttributes.Builder setUsage(int);
}
+ public class AudioDeviceInfo {
+ method public java.lang.String getAddress();
+ method public int[] getChannelCounts();
+ method public int[] getChannelMasks();
+ method public int[] getFormats();
+ method public java.lang.String getName();
+ method public int[] getSampleRates();
+ method public int getType();
+ method public boolean isSink();
+ method public boolean isSource();
+ field public static final int TYPE_AUX_LINE = 19; // 0x13
+ field public static final int TYPE_BLUETOOTH_A2DP = 8; // 0x8
+ field public static final int TYPE_BLUETOOTH_SCO = 7; // 0x7
+ field public static final int TYPE_BUILTIN_EARPIECE = 1; // 0x1
+ field public static final int TYPE_BUILTIN_MIC = 15; // 0xf
+ field public static final int TYPE_BUILTIN_SPEAKER = 2; // 0x2
+ field public static final int TYPE_DOCK = 13; // 0xd
+ field public static final int TYPE_FM = 14; // 0xe
+ field public static final int TYPE_FM_TUNER = 16; // 0x10
+ field public static final int TYPE_HDMI = 9; // 0x9
+ field public static final int TYPE_HDMI_ARC = 10; // 0xa
+ field public static final int TYPE_LINE_ANALOG = 5; // 0x5
+ field public static final int TYPE_LINE_DIGITAL = 6; // 0x6
+ field public static final int TYPE_TELEPHONY = 18; // 0x12
+ field public static final int TYPE_TV_TUNER = 17; // 0x11
+ field public static final int TYPE_UNKNOWN = 0; // 0x0
+ field public static final int TYPE_USB_ACCESSORY = 12; // 0xc
+ field public static final int TYPE_USB_DEVICE = 11; // 0xb
+ field public static final int TYPE_WIRED_HEADPHONES = 4; // 0x4
+ field public static final int TYPE_WIRED_HEADSET = 3; // 0x3
+ }
+
+ public class AudioDevicesManager {
+ method public void addOnAudioDeviceConnectionListener(android.media.OnAudioDeviceConnectionListener, android.os.Handler);
+ method public android.media.AudioDeviceInfo[] listDevices(int);
+ method public void removeOnAudioDeviceConnectionListener(android.media.OnAudioDeviceConnectionListener);
+ field public static final int LIST_DEVICES_ALL = 3; // 0x3
+ field public static final int LIST_DEVICES_INPUTS = 1; // 0x1
+ field public static final int LIST_DEVICES_OUTPUTS = 2; // 0x2
+ }
+
public class AudioFormat {
method public int getChannelCount();
method public int getChannelIndexMask();
@@ -16205,6 +16251,10 @@
ctor public NotProvisionedException(java.lang.String);
}
+ public abstract interface OnAudioDeviceConnectionListener {
+ method public abstract void onAudioDeviceConnection();
+ }
+
public final class Rating implements android.os.Parcelable {
method public int describeContents();
method public float getPercentRating();
@@ -22499,7 +22549,6 @@
public class Binder implements android.os.IBinder {
ctor public Binder();
method public void attachInterface(android.os.IInterface, java.lang.String);
- method public static final void blockUntilThreadAvailable();
method public static final long clearCallingIdentity();
method public void dump(java.io.FileDescriptor, java.lang.String[]);
method protected void dump(java.io.FileDescriptor, java.io.PrintWriter, java.lang.String[]);
@@ -26463,6 +26512,7 @@
field public static final java.lang.String DEBUG_APP = "debug_app";
field public static final java.lang.String DEVELOPMENT_SETTINGS_ENABLED = "development_settings_enabled";
field public static final java.lang.String DEVICE_PROVISIONED = "device_provisioned";
+ field public static final java.lang.String HIDE_CARRIER_NETWORK_SETTINGS = "hide_carrier_network_settings";
field public static final java.lang.String HTTP_PROXY = "http_proxy";
field public static final deprecated java.lang.String INSTALL_NON_MARKET_APPS = "install_non_market_apps";
field public static final java.lang.String MODE_RINGER = "mode_ringer";
@@ -26628,6 +26678,7 @@
field public static final android.net.Uri DEFAULT_RINGTONE_URI;
field public static final deprecated java.lang.String DEVICE_PROVISIONED = "device_provisioned";
field public static final deprecated java.lang.String DIM_SCREEN = "dim_screen";
+ field public static final java.lang.String DTMF_TONE_TYPE_WHEN_DIALING = "dtmf_tone_type";
field public static final java.lang.String DTMF_TONE_WHEN_DIALING = "dtmf_tone";
field public static final java.lang.String END_BUTTON_BEHAVIOR = "end_button_behavior";
field public static final java.lang.String FONT_SCALE = "font_scale";
@@ -26676,6 +26727,7 @@
field public static final java.lang.String USER_ROTATION = "user_rotation";
field public static final deprecated java.lang.String USE_GOOGLE_MAIL = "use_google_mail";
field public static final java.lang.String VIBRATE_ON = "vibrate_on";
+ field public static final java.lang.String VIBRATE_WHEN_RINGING = "vibrate_when_ringing";
field public static final deprecated java.lang.String WAIT_FOR_DEBUGGER = "wait_for_debugger";
field public static final deprecated java.lang.String WALLPAPER_ACTIVITY = "wallpaper_activity";
field public static final deprecated java.lang.String WIFI_MAX_DHCP_RETRY_COUNT = "wifi_max_dhcp_retry_count";
@@ -29733,6 +29785,394 @@
package android.telecom {
+ public final class AudioState implements android.os.Parcelable {
+ ctor public AudioState(boolean, int, int);
+ ctor public AudioState(android.telecom.AudioState);
+ method public static java.lang.String audioRouteToString(int);
+ method public int describeContents();
+ method public int getRoute();
+ method public int getSupportedRouteMask();
+ method public boolean isMuted();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.telecom.AudioState> CREATOR;
+ field public static final int ROUTE_BLUETOOTH = 2; // 0x2
+ field public static final int ROUTE_EARPIECE = 1; // 0x1
+ field public static final int ROUTE_SPEAKER = 8; // 0x8
+ field public static final int ROUTE_WIRED_HEADSET = 4; // 0x4
+ field public static final int ROUTE_WIRED_OR_EARPIECE = 5; // 0x5
+ }
+
+ public final class Call {
+ method public void addListener(android.telecom.Call.Listener);
+ method public void answer(int);
+ method public void conference(android.telecom.Call);
+ method public void disconnect();
+ method public java.util.List<java.lang.String> getCannedTextResponses();
+ method public java.util.List<android.telecom.Call> getChildren();
+ method public java.util.List<android.telecom.Call> getConferenceableCalls();
+ method public android.telecom.Call.Details getDetails();
+ method public android.telecom.Call getParent();
+ method public java.lang.String getRemainingPostDialSequence();
+ method public int getState();
+ method public android.telecom.InCallService.VideoCall getVideoCall();
+ method public void hold();
+ method public void mergeConference();
+ method public void phoneAccountSelected(android.telecom.PhoneAccountHandle, boolean);
+ method public void playDtmfTone(char);
+ method public void postDialContinue(boolean);
+ method public void reject(boolean, java.lang.String);
+ method public void removeListener(android.telecom.Call.Listener);
+ method public void splitFromConference();
+ method public void stopDtmfTone();
+ method public void swapConference();
+ method public void unhold();
+ field public static final java.lang.String AVAILABLE_PHONE_ACCOUNTS = "selectPhoneAccountAccounts";
+ field public static final int STATE_ACTIVE = 4; // 0x4
+ field public static final int STATE_CONNECTING = 9; // 0x9
+ field public static final int STATE_DIALING = 1; // 0x1
+ field public static final int STATE_DISCONNECTED = 7; // 0x7
+ field public static final int STATE_DISCONNECTING = 10; // 0xa
+ field public static final int STATE_HOLDING = 3; // 0x3
+ field public static final int STATE_NEW = 0; // 0x0
+ field public static final int STATE_PRE_DIAL_WAIT = 8; // 0x8
+ field public static final int STATE_RINGING = 2; // 0x2
+ }
+
+ public static class Call.Details {
+ method public static boolean can(int, int);
+ method public boolean can(int);
+ method public static java.lang.String capabilitiesToString(int);
+ method public android.telecom.PhoneAccountHandle getAccountHandle();
+ method public int getCallCapabilities();
+ method public int getCallProperties();
+ method public java.lang.String getCallerDisplayName();
+ method public int getCallerDisplayNamePresentation();
+ method public final long getConnectTimeMillis();
+ method public android.telecom.DisconnectCause getDisconnectCause();
+ method public android.os.Bundle getExtras();
+ method public android.telecom.GatewayInfo getGatewayInfo();
+ method public android.net.Uri getHandle();
+ method public int getHandlePresentation();
+ method public android.telecom.StatusHints getStatusHints();
+ method public int getVideoState();
+ field public static final int CAPABILITY_DISCONNECT_FROM_CONFERENCE = 8192; // 0x2000
+ field public static final int CAPABILITY_GENERIC_CONFERENCE = 16384; // 0x4000
+ field public static final int CAPABILITY_HIGH_DEF_AUDIO = 32768; // 0x8000
+ field public static final int CAPABILITY_HOLD = 1; // 0x1
+ field public static final int CAPABILITY_MANAGE_CONFERENCE = 128; // 0x80
+ field public static final int CAPABILITY_MERGE_CONFERENCE = 4; // 0x4
+ field public static final int CAPABILITY_MUTE = 64; // 0x40
+ field public static final int CAPABILITY_RESPOND_VIA_TEXT = 32; // 0x20
+ field public static final int CAPABILITY_SEPARATE_FROM_CONFERENCE = 4096; // 0x1000
+ field public static final int CAPABILITY_SHOW_CALLBACK_NUMBER = 131072; // 0x20000
+ field public static final int CAPABILITY_SUPPORTS_VT_LOCAL_BIDIRECTIONAL = 768; // 0x300
+ field public static final int CAPABILITY_SUPPORTS_VT_LOCAL_RX = 256; // 0x100
+ field public static final int CAPABILITY_SUPPORTS_VT_LOCAL_TX = 512; // 0x200
+ field public static final int CAPABILITY_SUPPORTS_VT_REMOTE_BIDIRECTIONAL = 3072; // 0xc00
+ field public static final int CAPABILITY_SUPPORTS_VT_REMOTE_RX = 1024; // 0x400
+ field public static final int CAPABILITY_SUPPORTS_VT_REMOTE_TX = 2048; // 0x800
+ field public static final int CAPABILITY_SUPPORT_HOLD = 2; // 0x2
+ field public static final int CAPABILITY_SWAP_CONFERENCE = 8; // 0x8
+ field public static final int CAPABILITY_WIFI = 65536; // 0x10000
+ }
+
+ public static abstract class Call.Listener {
+ ctor public Call.Listener();
+ method public void onCallDestroyed(android.telecom.Call);
+ method public void onCannedTextResponsesLoaded(android.telecom.Call, java.util.List<java.lang.String>);
+ method public void onChildrenChanged(android.telecom.Call, java.util.List<android.telecom.Call>);
+ method public void onConferenceableCallsChanged(android.telecom.Call, java.util.List<android.telecom.Call>);
+ method public void onDetailsChanged(android.telecom.Call, android.telecom.Call.Details);
+ method public void onParentChanged(android.telecom.Call, android.telecom.Call);
+ method public void onPostDialWait(android.telecom.Call, java.lang.String);
+ method public void onStateChanged(android.telecom.Call, int);
+ method public void onVideoCallChanged(android.telecom.Call, android.telecom.InCallService.VideoCall);
+ }
+
+ public class CallProperties {
+ ctor public CallProperties();
+ field public static final int CONFERENCE = 1; // 0x1
+ }
+
+ public final class CallState {
+ method public static java.lang.String toString(int);
+ field public static final int ABORTED = 8; // 0x8
+ field public static final int ACTIVE = 5; // 0x5
+ field public static final int CONNECTING = 1; // 0x1
+ field public static final int DIALING = 3; // 0x3
+ field public static final int DISCONNECTED = 7; // 0x7
+ field public static final int DISCONNECTING = 9; // 0x9
+ field public static final int NEW = 0; // 0x0
+ field public static final int ON_HOLD = 6; // 0x6
+ field public static final int PRE_DIAL_WAIT = 2; // 0x2
+ field public static final int RINGING = 4; // 0x4
+ }
+
+ public final class CameraCapabilities implements android.os.Parcelable {
+ ctor public CameraCapabilities(int, int);
+ method public int describeContents();
+ method public int getHeight();
+ method public int getWidth();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.telecom.CameraCapabilities> CREATOR;
+ }
+
+ public abstract class Conference implements android.telecom.IConferenceable {
+ ctor public Conference(android.telecom.PhoneAccountHandle);
+ method public final boolean addConnection(android.telecom.Connection);
+ method public final void destroy();
+ method public final android.telecom.AudioState getAudioState();
+ method public final java.util.List<android.telecom.Connection> getConferenceableConnections();
+ method public final long getConnectTimeMillis();
+ method public final int getConnectionCapabilities();
+ method public final java.util.List<android.telecom.Connection> getConnections();
+ method public final android.telecom.DisconnectCause getDisconnectCause();
+ method public final android.telecom.PhoneAccountHandle getPhoneAccountHandle();
+ method public android.telecom.Connection getPrimaryConnection();
+ method public final int getState();
+ method public void onAudioStateChanged(android.telecom.AudioState);
+ method public void onConnectionAdded(android.telecom.Connection);
+ method public void onDisconnect();
+ method public void onHold();
+ method public void onMerge(android.telecom.Connection);
+ method public void onMerge();
+ method public void onPlayDtmfTone(char);
+ method public void onSeparate(android.telecom.Connection);
+ method public void onStopDtmfTone();
+ method public void onSwap();
+ method public void onUnhold();
+ method public final void removeConnection(android.telecom.Connection);
+ method public final void setActive();
+ method public final void setConferenceableConnections(java.util.List<android.telecom.Connection>);
+ method public void setConnectTimeMillis(long);
+ method public final void setConnectionCapabilities(int);
+ method public final void setDisconnected(android.telecom.DisconnectCause);
+ method public final void setOnHold();
+ field public static final long CONNECT_TIME_NOT_SPECIFIED = 0L; // 0x0L
+ }
+
+ public abstract class Connection implements android.telecom.IConferenceable {
+ ctor public Connection();
+ method public static java.lang.String capabilitiesToString(int);
+ method public static android.telecom.Connection createCanceledConnection();
+ method public static android.telecom.Connection createFailedConnection(android.telecom.DisconnectCause);
+ method public final void destroy();
+ method public final android.net.Uri getAddress();
+ method public final int getAddressPresentation();
+ method public final boolean getAudioModeIsVoip();
+ method public final android.telecom.AudioState getAudioState();
+ method public final java.lang.String getCallerDisplayName();
+ method public final int getCallerDisplayNamePresentation();
+ method public final android.telecom.Conference getConference();
+ method public final java.util.List<android.telecom.IConferenceable> getConferenceables();
+ method public final int getConnectionCapabilities();
+ method public final android.telecom.DisconnectCause getDisconnectCause();
+ method public final int getState();
+ method public final android.telecom.StatusHints getStatusHints();
+ method public final android.telecom.Connection.VideoProvider getVideoProvider();
+ method public final boolean isRingbackRequested();
+ method public void onAbort();
+ method public void onAnswer();
+ method public void onAudioStateChanged(android.telecom.AudioState);
+ method public void onDisconnect();
+ method public void onHold();
+ method public void onPlayDtmfTone(char);
+ method public void onPostDialContinue(boolean);
+ method public void onReject();
+ method public void onSeparate();
+ method public void onStateChanged(int);
+ method public void onStopDtmfTone();
+ method public void onUnhold();
+ method public final void setActive();
+ method public final void setAddress(android.net.Uri, int);
+ method public final void setAudioModeIsVoip(boolean);
+ method public final void setCallerDisplayName(java.lang.String, int);
+ method public final void setConferenceableConnections(java.util.List<android.telecom.Connection>);
+ method public final void setConferenceables(java.util.List<android.telecom.IConferenceable>);
+ method public final void setConnectionCapabilities(int);
+ method public final void setConnectionService(android.telecom.ConnectionService);
+ method public final void setDialing();
+ method public final void setDisconnected(android.telecom.DisconnectCause);
+ method public final void setInitialized();
+ method public final void setInitializing();
+ method public final void setNextPostDialChar(char);
+ method public final void setOnHold();
+ method public final void setPostDialWait(java.lang.String);
+ method public final void setRingbackRequested(boolean);
+ method public final void setRinging();
+ method public final void setStatusHints(android.telecom.StatusHints);
+ method public static java.lang.String stateToString(int);
+ field public static final int CAPABILITY_DISCONNECT_FROM_CONFERENCE = 8192; // 0x2000
+ field public static final int CAPABILITY_HOLD = 1; // 0x1
+ field public static final int CAPABILITY_MANAGE_CONFERENCE = 128; // 0x80
+ field public static final int CAPABILITY_MERGE_CONFERENCE = 4; // 0x4
+ field public static final int CAPABILITY_MUTE = 64; // 0x40
+ field public static final int CAPABILITY_RESPOND_VIA_TEXT = 32; // 0x20
+ field public static final int CAPABILITY_SEPARATE_FROM_CONFERENCE = 4096; // 0x1000
+ field public static final int CAPABILITY_SUPPORT_HOLD = 2; // 0x2
+ field public static final int CAPABILITY_SWAP_CONFERENCE = 8; // 0x8
+ field public static final int STATE_ACTIVE = 4; // 0x4
+ field public static final int STATE_DIALING = 3; // 0x3
+ field public static final int STATE_DISCONNECTED = 6; // 0x6
+ field public static final int STATE_HOLDING = 5; // 0x5
+ field public static final int STATE_INITIALIZING = 0; // 0x0
+ field public static final int STATE_NEW = 1; // 0x1
+ field public static final int STATE_RINGING = 2; // 0x2
+ }
+
+ public static abstract class Connection.VideoProvider {
+ ctor public Connection.VideoProvider();
+ method public void changeCallDataUsage(long);
+ method public void changeCameraCapabilities(android.telecom.CameraCapabilities);
+ method public void changePeerDimensions(int, int);
+ method public void changeVideoQuality(int);
+ method public void handleCallSessionEvent(int);
+ method public abstract void onRequestCameraCapabilities();
+ method public abstract void onRequestConnectionDataUsage();
+ method public abstract void onSendSessionModifyRequest(android.telecom.VideoProfile);
+ method public abstract void onSendSessionModifyResponse(android.telecom.VideoProfile);
+ method public abstract void onSetCamera(java.lang.String);
+ method public abstract void onSetDeviceOrientation(int);
+ method public abstract void onSetDisplaySurface(android.view.Surface);
+ method public abstract void onSetPauseImage(java.lang.String);
+ method public abstract void onSetPreviewSurface(android.view.Surface);
+ method public abstract void onSetZoom(float);
+ method public void receiveSessionModifyRequest(android.telecom.VideoProfile);
+ method public void receiveSessionModifyResponse(int, android.telecom.VideoProfile, android.telecom.VideoProfile);
+ field public static final int SESSION_EVENT_CAMERA_FAILURE = 5; // 0x5
+ field public static final int SESSION_EVENT_CAMERA_READY = 6; // 0x6
+ field public static final int SESSION_EVENT_RX_PAUSE = 1; // 0x1
+ field public static final int SESSION_EVENT_RX_RESUME = 2; // 0x2
+ field public static final int SESSION_EVENT_TX_START = 3; // 0x3
+ field public static final int SESSION_EVENT_TX_STOP = 4; // 0x4
+ field public static final int SESSION_MODIFY_REQUEST_FAIL = 2; // 0x2
+ field public static final int SESSION_MODIFY_REQUEST_INVALID = 3; // 0x3
+ field public static final int SESSION_MODIFY_REQUEST_REJECTED_BY_REMOTE = 5; // 0x5
+ field public static final int SESSION_MODIFY_REQUEST_SUCCESS = 1; // 0x1
+ field public static final int SESSION_MODIFY_REQUEST_TIMED_OUT = 4; // 0x4
+ }
+
+ public final class ConnectionRequest implements android.os.Parcelable {
+ ctor public ConnectionRequest(android.telecom.PhoneAccountHandle, android.net.Uri, android.os.Bundle);
+ method public int describeContents();
+ method public android.telecom.PhoneAccountHandle getAccountHandle();
+ method public android.net.Uri getAddress();
+ method public android.os.Bundle getExtras();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.telecom.ConnectionRequest> CREATOR;
+ }
+
+ public abstract class ConnectionService extends android.app.Service {
+ ctor public ConnectionService();
+ method public final void addConference(android.telecom.Conference);
+ method public final void addExistingConnection(android.telecom.PhoneAccountHandle, android.telecom.Connection);
+ method public final void conferenceRemoteConnections(android.telecom.RemoteConnection, android.telecom.RemoteConnection);
+ method public final android.telecom.RemoteConnection createRemoteIncomingConnection(android.telecom.PhoneAccountHandle, android.telecom.ConnectionRequest);
+ method public final android.telecom.RemoteConnection createRemoteOutgoingConnection(android.telecom.PhoneAccountHandle, android.telecom.ConnectionRequest);
+ method public final java.util.Collection<android.telecom.Connection> getAllConnections();
+ method public final android.os.IBinder onBind(android.content.Intent);
+ method public void onConference(android.telecom.Connection, android.telecom.Connection);
+ method public android.telecom.Connection onCreateIncomingConnection(android.telecom.PhoneAccountHandle, android.telecom.ConnectionRequest);
+ method public android.telecom.Connection onCreateOutgoingConnection(android.telecom.PhoneAccountHandle, android.telecom.ConnectionRequest);
+ method public void onRemoteConferenceAdded(android.telecom.RemoteConference);
+ method public void onRemoteExistingConnectionAdded(android.telecom.RemoteConnection);
+ field public static final java.lang.String SERVICE_INTERFACE = "android.telecom.ConnectionService";
+ }
+
+ public final class DisconnectCause implements android.os.Parcelable {
+ ctor public DisconnectCause(int);
+ ctor public DisconnectCause(int, java.lang.String);
+ ctor public DisconnectCause(int, java.lang.CharSequence, java.lang.CharSequence, java.lang.String);
+ ctor public DisconnectCause(int, java.lang.CharSequence, java.lang.CharSequence, java.lang.String, int);
+ method public int describeContents();
+ method public int getCode();
+ method public java.lang.CharSequence getDescription();
+ method public java.lang.CharSequence getLabel();
+ method public java.lang.String getReason();
+ method public int getTone();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final int BUSY = 7; // 0x7
+ field public static final int CANCELED = 4; // 0x4
+ field public static final int CONNECTION_MANAGER_NOT_SUPPORTED = 10; // 0xa
+ field public static final android.os.Parcelable.Creator<android.telecom.DisconnectCause> CREATOR;
+ field public static final int ERROR = 1; // 0x1
+ field public static final int LOCAL = 2; // 0x2
+ field public static final int MISSED = 5; // 0x5
+ field public static final int OTHER = 9; // 0x9
+ field public static final int REJECTED = 6; // 0x6
+ field public static final int REMOTE = 3; // 0x3
+ field public static final int RESTRICTED = 8; // 0x8
+ field public static final int UNKNOWN = 0; // 0x0
+ }
+
+ public class GatewayInfo implements android.os.Parcelable {
+ ctor public GatewayInfo(java.lang.String, android.net.Uri, android.net.Uri);
+ method public int describeContents();
+ method public android.net.Uri getGatewayAddress();
+ method public java.lang.String getGatewayProviderPackageName();
+ method public android.net.Uri getOriginalAddress();
+ method public boolean isEmpty();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.telecom.GatewayInfo> CREATOR;
+ }
+
+ public abstract interface IConferenceable {
+ }
+
+ public abstract class InCallService extends android.app.Service {
+ ctor public InCallService();
+ method public final android.telecom.Phone getPhone();
+ method public android.os.IBinder onBind(android.content.Intent);
+ method public void onPhoneCreated(android.telecom.Phone);
+ method public void onPhoneDestroyed(android.telecom.Phone);
+ field public static final java.lang.String SERVICE_INTERFACE = "android.telecom.InCallService";
+ }
+
+ public static abstract class InCallService.VideoCall {
+ ctor public InCallService.VideoCall();
+ method public abstract void requestCallDataUsage();
+ method public abstract void requestCameraCapabilities();
+ method public abstract void sendSessionModifyRequest(android.telecom.VideoProfile);
+ method public abstract void sendSessionModifyResponse(android.telecom.VideoProfile);
+ method public abstract void setCamera(java.lang.String);
+ method public abstract void setDeviceOrientation(int);
+ method public abstract void setDisplaySurface(android.view.Surface);
+ method public abstract void setPauseImage(java.lang.String);
+ method public abstract void setPreviewSurface(android.view.Surface);
+ method public abstract void setVideoCallListener(android.telecom.InCallService.VideoCall.Listener);
+ method public abstract void setZoom(float);
+ }
+
+ public static abstract class InCallService.VideoCall.Listener {
+ ctor public InCallService.VideoCall.Listener();
+ method public abstract void onCallDataUsageChanged(long);
+ method public abstract void onCallSessionEvent(int);
+ method public abstract void onCameraCapabilitiesChanged(android.telecom.CameraCapabilities);
+ method public abstract void onPeerDimensionsChanged(int, int);
+ method public abstract void onSessionModifyRequestReceived(android.telecom.VideoProfile);
+ method public abstract void onSessionModifyResponseReceived(int, android.telecom.VideoProfile, android.telecom.VideoProfile);
+ method public abstract void onVideoQualityChanged(int);
+ }
+
+ public final class Phone {
+ method public final void addListener(android.telecom.Phone.Listener);
+ method public final boolean canAddCall();
+ method public final android.telecom.AudioState getAudioState();
+ method public final java.util.List<android.telecom.Call> getCalls();
+ method public final void removeListener(android.telecom.Phone.Listener);
+ method public final void setAudioRoute(int);
+ method public final void setMuted(boolean);
+ }
+
+ public static abstract class Phone.Listener {
+ ctor public Phone.Listener();
+ method public void onAudioStateChanged(android.telecom.Phone, android.telecom.AudioState);
+ method public void onBringToForeground(android.telecom.Phone, boolean);
+ method public void onCallAdded(android.telecom.Phone, android.telecom.Call);
+ method public void onCallRemoved(android.telecom.Phone, android.telecom.Call);
+ method public void onCanAddCallChanged(android.telecom.Phone, boolean);
+ }
+
public class PhoneAccount implements android.os.Parcelable {
method public static android.telecom.PhoneAccount.Builder builder(android.telecom.PhoneAccountHandle, java.lang.CharSequence);
method public android.graphics.drawable.Drawable createIconDrawable(android.content.Context);
@@ -29751,7 +30191,10 @@
method public java.util.List<java.lang.String> getSupportedUriSchemes();
method public boolean hasCapabilities(int);
method public boolean supportsUriScheme(java.lang.String);
+ method public android.telecom.PhoneAccount.Builder toBuilder();
method public void writeToParcel(android.os.Parcel, int);
+ field public static final int CAPABILITY_CALL_PROVIDER = 2; // 0x2
+ field public static final int CAPABILITY_CONNECTION_MANAGER = 1; // 0x1
field public static final int CAPABILITY_PLACE_EMERGENCY_CALLS = 16; // 0x10
field public static final int CAPABILITY_SIM_SUBSCRIPTION = 4; // 0x4
field public static final int CAPABILITY_VIDEO_CALLING = 8; // 0x8
@@ -29767,6 +30210,7 @@
public static class PhoneAccount.Builder {
ctor public PhoneAccount.Builder(android.telecom.PhoneAccountHandle, java.lang.CharSequence);
ctor public PhoneAccount.Builder(android.telecom.PhoneAccount);
+ method public android.telecom.PhoneAccount.Builder addSupportedUriScheme(java.lang.String);
method public android.telecom.PhoneAccount build();
method public android.telecom.PhoneAccount.Builder setAddress(android.net.Uri);
method public android.telecom.PhoneAccount.Builder setCapabilities(int);
@@ -29783,27 +30227,130 @@
public class PhoneAccountHandle implements android.os.Parcelable {
ctor public PhoneAccountHandle(android.content.ComponentName, java.lang.String);
+ ctor public PhoneAccountHandle(android.content.ComponentName, java.lang.String, android.os.UserHandle);
method public int describeContents();
method public android.content.ComponentName getComponentName();
method public java.lang.String getId();
+ method public android.os.UserHandle getUserHandle();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.telecom.PhoneAccountHandle> CREATOR;
}
+ public final class RemoteConference {
+ method public void disconnect();
+ method public java.util.List<android.telecom.RemoteConnection> getConferenceableConnections();
+ method public final int getConnectionCapabilities();
+ method public final java.util.List<android.telecom.RemoteConnection> getConnections();
+ method public android.telecom.DisconnectCause getDisconnectCause();
+ method public final int getState();
+ method public void hold();
+ method public void merge();
+ method public void playDtmfTone(char);
+ method public final void registerCallback(android.telecom.RemoteConference.Callback);
+ method public void separate(android.telecom.RemoteConnection);
+ method public void setAudioState(android.telecom.AudioState);
+ method public void stopDtmfTone();
+ method public void swap();
+ method public void unhold();
+ method public final void unregisterCallback(android.telecom.RemoteConference.Callback);
+ }
+
+ public static abstract class RemoteConference.Callback {
+ ctor public RemoteConference.Callback();
+ method public void onConferenceableConnectionsChanged(android.telecom.RemoteConference, java.util.List<android.telecom.RemoteConnection>);
+ method public void onConnectionAdded(android.telecom.RemoteConference, android.telecom.RemoteConnection);
+ method public void onConnectionCapabilitiesChanged(android.telecom.RemoteConference, int);
+ method public void onConnectionRemoved(android.telecom.RemoteConference, android.telecom.RemoteConnection);
+ method public void onDestroyed(android.telecom.RemoteConference);
+ method public void onDisconnected(android.telecom.RemoteConference, android.telecom.DisconnectCause);
+ method public void onStateChanged(android.telecom.RemoteConference, int, int);
+ }
+
+ public final class RemoteConnection {
+ method public void abort();
+ method public void answer();
+ method public void disconnect();
+ method public android.net.Uri getAddress();
+ method public int getAddressPresentation();
+ method public java.lang.CharSequence getCallerDisplayName();
+ method public int getCallerDisplayNamePresentation();
+ method public android.telecom.RemoteConference getConference();
+ method public java.util.List<android.telecom.RemoteConnection> getConferenceableConnections();
+ method public int getConnectionCapabilities();
+ method public android.telecom.DisconnectCause getDisconnectCause();
+ method public int getState();
+ method public android.telecom.StatusHints getStatusHints();
+ method public void hold();
+ method public boolean isRingbackRequested();
+ method public boolean isVoipAudioMode();
+ method public void playDtmfTone(char);
+ method public void postDialContinue(boolean);
+ method public void registerCallback(android.telecom.RemoteConnection.Callback);
+ method public void reject();
+ method public void setAudioState(android.telecom.AudioState);
+ method public void stopDtmfTone();
+ method public void unhold();
+ method public void unregisterCallback(android.telecom.RemoteConnection.Callback);
+ }
+
+ public static abstract class RemoteConnection.Callback {
+ ctor public RemoteConnection.Callback();
+ method public void onAddressChanged(android.telecom.RemoteConnection, android.net.Uri, int);
+ method public void onCallerDisplayNameChanged(android.telecom.RemoteConnection, java.lang.String, int);
+ method public void onConferenceChanged(android.telecom.RemoteConnection, android.telecom.RemoteConference);
+ method public void onConferenceableConnectionsChanged(android.telecom.RemoteConnection, java.util.List<android.telecom.RemoteConnection>);
+ method public void onConnectionCapabilitiesChanged(android.telecom.RemoteConnection, int);
+ method public void onDestroyed(android.telecom.RemoteConnection);
+ method public void onDisconnected(android.telecom.RemoteConnection, android.telecom.DisconnectCause);
+ method public void onPostDialChar(android.telecom.RemoteConnection, char);
+ method public void onPostDialWait(android.telecom.RemoteConnection, java.lang.String);
+ method public void onRingbackRequested(android.telecom.RemoteConnection, boolean);
+ method public void onStateChanged(android.telecom.RemoteConnection, int);
+ method public void onStatusHintsChanged(android.telecom.RemoteConnection, android.telecom.StatusHints);
+ method public void onVoipAudioChanged(android.telecom.RemoteConnection, boolean);
+ }
+
+ public final class StatusHints implements android.os.Parcelable {
+ ctor public StatusHints(android.content.ComponentName, java.lang.CharSequence, int, android.os.Bundle);
+ method public int describeContents();
+ method public android.os.Bundle getExtras();
+ method public android.graphics.drawable.Drawable getIcon(android.content.Context);
+ method public int getIconResId();
+ method public java.lang.CharSequence getLabel();
+ method public android.content.ComponentName getPackageName();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.telecom.StatusHints> CREATOR;
+ }
+
public class TelecomManager {
+ method public void addNewIncomingCall(android.telecom.PhoneAccountHandle, android.os.Bundle);
method public void cancelMissedCallsNotification();
+ method public android.net.Uri getAdnUriForPhoneAccount(android.telecom.PhoneAccountHandle);
method public java.util.List<android.telecom.PhoneAccountHandle> getCallCapablePhoneAccounts();
+ method public java.lang.String getLine1Number(android.telecom.PhoneAccountHandle);
method public android.telecom.PhoneAccount getPhoneAccount(android.telecom.PhoneAccountHandle);
+ method public android.telecom.PhoneAccountHandle getSimCallManager();
+ method public android.telecom.PhoneAccountHandle getUserSelectedOutgoingPhoneAccount();
method public boolean handleMmi(java.lang.String);
+ method public boolean handleMmi(java.lang.String, android.telecom.PhoneAccountHandle);
+ method public boolean hasVoiceMailNumber(android.telecom.PhoneAccountHandle);
method public boolean isInCall();
+ method public boolean isVoiceMailNumber(android.telecom.PhoneAccountHandle, java.lang.String);
+ method public void registerPhoneAccount(android.telecom.PhoneAccount);
method public void showInCallScreen(boolean);
+ method public void silenceRinger();
+ method public void unregisterPhoneAccount(android.telecom.PhoneAccountHandle);
+ field public static final java.lang.String ACTION_CHANGE_PHONE_ACCOUNTS = "android.telecom.action.CHANGE_PHONE_ACCOUNTS";
+ field public static final java.lang.String ACTION_INCOMING_CALL = "android.telecom.action.INCOMING_CALL";
field public static final java.lang.String ACTION_SHOW_CALL_ACCESSIBILITY_SETTINGS = "android.telecom.action.SHOW_CALL_ACCESSIBILITY_SETTINGS";
field public static final java.lang.String ACTION_SHOW_CALL_SETTINGS = "android.telecom.action.SHOW_CALL_SETTINGS";
field public static final java.lang.String ACTION_SHOW_RESPOND_VIA_SMS_SETTINGS = "android.telecom.action.SHOW_RESPOND_VIA_SMS_SETTINGS";
field public static final char DTMF_CHARACTER_PAUSE = 44; // 0x002c ','
field public static final char DTMF_CHARACTER_WAIT = 59; // 0x003b ';'
+ field public static final java.lang.String EXTRA_CALL_BACK_NUMBER = "android.telecom.extra.CALL_BACK_NUMBER";
field public static final java.lang.String EXTRA_CALL_DISCONNECT_CAUSE = "android.telecom.extra.CALL_DISCONNECT_CAUSE";
field public static final java.lang.String EXTRA_CALL_DISCONNECT_MESSAGE = "android.telecom.extra.CALL_DISCONNECT_MESSAGE";
+ field public static final java.lang.String EXTRA_INCOMING_CALL_EXTRAS = "android.telecom.extra.INCOMING_CALL_EXTRAS";
field public static final java.lang.String EXTRA_OUTGOING_CALL_EXTRAS = "android.telecom.extra.OUTGOING_CALL_EXTRAS";
field public static final java.lang.String EXTRA_PHONE_ACCOUNT_HANDLE = "android.telecom.extra.PHONE_ACCOUNT_HANDLE";
field public static final java.lang.String EXTRA_START_CALL_WITH_SPEAKERPHONE = "android.telecom.extra.START_CALL_WITH_SPEAKERPHONE";
@@ -30320,6 +30867,7 @@
method public int getDataActivity();
method public int getDataState();
method public java.lang.String getDeviceId();
+ method public java.lang.String getDeviceId(int);
method public java.lang.String getDeviceSoftwareVersion();
method public java.lang.String getGroupIdLevel1();
method public java.lang.String getLine1Number();
@@ -30330,6 +30878,7 @@
method public java.lang.String getNetworkOperator();
method public java.lang.String getNetworkOperatorName();
method public int getNetworkType();
+ method public int getPhoneCount();
method public int getPhoneType();
method public java.lang.String getSimCountryIso();
method public java.lang.String getSimOperator();
@@ -36525,6 +37074,7 @@
field public static final int TITLE_CHANGED = 64; // 0x40
field public static final int TYPE_ACCESSIBILITY_OVERLAY = 2032; // 0x7f0
field public static final int TYPE_APPLICATION = 2; // 0x2
+ field public static final int TYPE_APPLICATION_ABOVE_SUB_PANEL = 1005; // 0x3ed
field public static final int TYPE_APPLICATION_ATTACHED_DIALOG = 1003; // 0x3eb
field public static final int TYPE_APPLICATION_MEDIA = 1001; // 0x3e9
field public static final int TYPE_APPLICATION_PANEL = 1000; // 0x3e8
diff --git a/api/system-current.txt b/api/system-current.txt
index 3fd3517..fb44b61 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -5844,6 +5844,7 @@
method public void setRestrictionsProvider(android.content.ComponentName, android.content.ComponentName);
method public void setScreenCaptureDisabled(android.content.ComponentName, boolean);
method public void setSecureSetting(android.content.ComponentName, java.lang.String, java.lang.String);
+ method public void setStatusBarEnabledState(android.content.ComponentName, boolean);
method public int setStorageEncryption(android.content.ComponentName, boolean);
method public void setTrustAgentConfiguration(android.content.ComponentName, android.content.ComponentName, android.os.PersistableBundle);
method public void setUninstallBlocked(android.content.ComponentName, java.lang.String, boolean);
@@ -7875,6 +7876,7 @@
field public static final java.lang.String ALARM_SERVICE = "alarm";
field public static final java.lang.String APPWIDGET_SERVICE = "appwidget";
field public static final java.lang.String APP_OPS_SERVICE = "appops";
+ field public static final java.lang.String AUDIO_DEVICES_SERVICE = "audio_devices_manager";
field public static final java.lang.String AUDIO_SERVICE = "audio";
field public static final java.lang.String BACKUP_SERVICE = "backup";
field public static final java.lang.String BATTERY_SERVICE = "batterymanager";
@@ -12901,6 +12903,7 @@
method public final void unlock();
field public static final java.lang.String ACTION_NEW_PICTURE = "android.hardware.action.NEW_PICTURE";
field public static final java.lang.String ACTION_NEW_VIDEO = "android.hardware.action.NEW_VIDEO";
+ field public static final int CAMERA_ERROR_EVICTED = 2; // 0x2
field public static final int CAMERA_ERROR_SERVER_DIED = 100; // 0x64
field public static final int CAMERA_ERROR_UNKNOWN = 1; // 0x1
}
@@ -13351,6 +13354,7 @@
method public abstract android.hardware.camera2.CameraDevice getDevice();
method public abstract android.view.Surface getInputSurface();
method public abstract boolean isReprocessible();
+ method public abstract void prepare(android.view.Surface) throws android.hardware.camera2.CameraAccessException;
method public abstract int setRepeatingBurst(java.util.List<android.hardware.camera2.CaptureRequest>, android.hardware.camera2.CameraCaptureSession.CaptureCallback, android.os.Handler) throws android.hardware.camera2.CameraAccessException;
method public abstract int setRepeatingRequest(android.hardware.camera2.CaptureRequest, android.hardware.camera2.CameraCaptureSession.CaptureCallback, android.os.Handler) throws android.hardware.camera2.CameraAccessException;
method public abstract void stopRepeating() throws android.hardware.camera2.CameraAccessException;
@@ -13373,6 +13377,7 @@
method public abstract void onConfigureFailed(android.hardware.camera2.CameraCaptureSession);
method public abstract void onConfigured(android.hardware.camera2.CameraCaptureSession);
method public void onReady(android.hardware.camera2.CameraCaptureSession);
+ method public void onSurfacePrepared(android.hardware.camera2.CameraCaptureSession, android.view.Surface);
}
public final class CameraCharacteristics extends android.hardware.camera2.CameraMetadata {
@@ -15751,6 +15756,47 @@
method public android.media.AudioAttributes.Builder setUsage(int);
}
+ public class AudioDeviceInfo {
+ method public java.lang.String getAddress();
+ method public int[] getChannelCounts();
+ method public int[] getChannelMasks();
+ method public int[] getFormats();
+ method public java.lang.String getName();
+ method public int[] getSampleRates();
+ method public int getType();
+ method public boolean isSink();
+ method public boolean isSource();
+ field public static final int TYPE_AUX_LINE = 19; // 0x13
+ field public static final int TYPE_BLUETOOTH_A2DP = 8; // 0x8
+ field public static final int TYPE_BLUETOOTH_SCO = 7; // 0x7
+ field public static final int TYPE_BUILTIN_EARPIECE = 1; // 0x1
+ field public static final int TYPE_BUILTIN_MIC = 15; // 0xf
+ field public static final int TYPE_BUILTIN_SPEAKER = 2; // 0x2
+ field public static final int TYPE_DOCK = 13; // 0xd
+ field public static final int TYPE_FM = 14; // 0xe
+ field public static final int TYPE_FM_TUNER = 16; // 0x10
+ field public static final int TYPE_HDMI = 9; // 0x9
+ field public static final int TYPE_HDMI_ARC = 10; // 0xa
+ field public static final int TYPE_LINE_ANALOG = 5; // 0x5
+ field public static final int TYPE_LINE_DIGITAL = 6; // 0x6
+ field public static final int TYPE_TELEPHONY = 18; // 0x12
+ field public static final int TYPE_TV_TUNER = 17; // 0x11
+ field public static final int TYPE_UNKNOWN = 0; // 0x0
+ field public static final int TYPE_USB_ACCESSORY = 12; // 0xc
+ field public static final int TYPE_USB_DEVICE = 11; // 0xb
+ field public static final int TYPE_WIRED_HEADPHONES = 4; // 0x4
+ field public static final int TYPE_WIRED_HEADSET = 3; // 0x3
+ }
+
+ public class AudioDevicesManager {
+ method public void addOnAudioDeviceConnectionListener(android.media.OnAudioDeviceConnectionListener, android.os.Handler);
+ method public android.media.AudioDeviceInfo[] listDevices(int);
+ method public void removeOnAudioDeviceConnectionListener(android.media.OnAudioDeviceConnectionListener);
+ field public static final int LIST_DEVICES_ALL = 3; // 0x3
+ field public static final int LIST_DEVICES_INPUTS = 1; // 0x1
+ field public static final int LIST_DEVICES_OUTPUTS = 2; // 0x2
+ }
+
public final class AudioFocusInfo implements android.os.Parcelable {
method public int describeContents();
method public android.media.AudioAttributes getAttributes();
@@ -17420,6 +17466,10 @@
ctor public NotProvisionedException(java.lang.String);
}
+ public abstract interface OnAudioDeviceConnectionListener {
+ method public abstract void onAudioDeviceConnection();
+ }
+
public final class Rating implements android.os.Parcelable {
method public int describeContents();
method public float getPercentRating();
@@ -24387,7 +24437,6 @@
public class Binder implements android.os.IBinder {
ctor public Binder();
method public void attachInterface(android.os.IInterface, java.lang.String);
- method public static final void blockUntilThreadAvailable();
method public static final long clearCallingIdentity();
method public void dump(java.io.FileDescriptor, java.lang.String[]);
method protected void dump(java.io.FileDescriptor, java.io.PrintWriter, java.lang.String[]);
@@ -28465,6 +28514,7 @@
field public static final java.lang.String DEBUG_APP = "debug_app";
field public static final java.lang.String DEVELOPMENT_SETTINGS_ENABLED = "development_settings_enabled";
field public static final java.lang.String DEVICE_PROVISIONED = "device_provisioned";
+ field public static final java.lang.String HIDE_CARRIER_NETWORK_SETTINGS = "hide_carrier_network_settings";
field public static final java.lang.String HTTP_PROXY = "http_proxy";
field public static final deprecated java.lang.String INSTALL_NON_MARKET_APPS = "install_non_market_apps";
field public static final java.lang.String MODE_RINGER = "mode_ringer";
@@ -28631,6 +28681,7 @@
field public static final android.net.Uri DEFAULT_RINGTONE_URI;
field public static final deprecated java.lang.String DEVICE_PROVISIONED = "device_provisioned";
field public static final deprecated java.lang.String DIM_SCREEN = "dim_screen";
+ field public static final java.lang.String DTMF_TONE_TYPE_WHEN_DIALING = "dtmf_tone_type";
field public static final java.lang.String DTMF_TONE_WHEN_DIALING = "dtmf_tone";
field public static final java.lang.String END_BUTTON_BEHAVIOR = "end_button_behavior";
field public static final java.lang.String FONT_SCALE = "font_scale";
@@ -28679,6 +28730,7 @@
field public static final java.lang.String USER_ROTATION = "user_rotation";
field public static final deprecated java.lang.String USE_GOOGLE_MAIL = "use_google_mail";
field public static final java.lang.String VIBRATE_ON = "vibrate_on";
+ field public static final java.lang.String VIBRATE_WHEN_RINGING = "vibrate_when_ringing";
field public static final deprecated java.lang.String WAIT_FOR_DEBUGGER = "wait_for_debugger";
field public static final deprecated java.lang.String WALLPAPER_ACTIVITY = "wallpaper_activity";
field public static final deprecated java.lang.String WIFI_MAX_DHCP_RETRY_COUNT = "wifi_max_dhcp_retry_count";
@@ -31836,6 +31888,7 @@
public final class AudioState implements android.os.Parcelable {
ctor public AudioState(boolean, int, int);
ctor public AudioState(android.telecom.AudioState);
+ method public static java.lang.String audioRouteToString(int);
method public int describeContents();
method public int getRoute();
method public int getSupportedRouteMask();
@@ -31847,25 +31900,6 @@
field public static final int ROUTE_SPEAKER = 8; // 0x8
field public static final int ROUTE_WIRED_HEADSET = 4; // 0x4
field public static final int ROUTE_WIRED_OR_EARPIECE = 5; // 0x5
- field public final boolean isMuted;
- field public final int route;
- field public final int supportedRouteMask;
- }
-
- public class AuthenticatorService extends android.app.Service {
- ctor public AuthenticatorService();
- method public android.os.IBinder onBind(android.content.Intent);
- }
-
- public class AuthenticatorService.Authenticator extends android.accounts.AbstractAccountAuthenticator {
- ctor public AuthenticatorService.Authenticator(android.content.Context);
- method public android.os.Bundle addAccount(android.accounts.AccountAuthenticatorResponse, java.lang.String, java.lang.String, java.lang.String[], android.os.Bundle) throws android.accounts.NetworkErrorException;
- method public android.os.Bundle confirmCredentials(android.accounts.AccountAuthenticatorResponse, android.accounts.Account, android.os.Bundle) throws android.accounts.NetworkErrorException;
- method public android.os.Bundle editProperties(android.accounts.AccountAuthenticatorResponse, java.lang.String);
- method public android.os.Bundle getAuthToken(android.accounts.AccountAuthenticatorResponse, android.accounts.Account, java.lang.String, android.os.Bundle) throws android.accounts.NetworkErrorException;
- method public java.lang.String getAuthTokenLabel(java.lang.String);
- method public android.os.Bundle hasFeatures(android.accounts.AccountAuthenticatorResponse, android.accounts.Account, java.lang.String[]) throws android.accounts.NetworkErrorException;
- method public android.os.Bundle updateCredentials(android.accounts.AccountAuthenticatorResponse, android.accounts.Account, java.lang.String, android.os.Bundle) throws android.accounts.NetworkErrorException;
}
public final class Call {
@@ -31880,6 +31914,7 @@
method public android.telecom.Call getParent();
method public java.lang.String getRemainingPostDialSequence();
method public int getState();
+ method public android.telecom.InCallService.VideoCall getVideoCall();
method public void hold();
method public void mergeConference();
method public void phoneAccountSelected(android.telecom.PhoneAccountHandle, boolean);
@@ -31891,6 +31926,7 @@
method public void stopDtmfTone();
method public void swapConference();
method public void unhold();
+ field public static final java.lang.String AVAILABLE_PHONE_ACCOUNTS = "selectPhoneAccountAccounts";
field public static final int STATE_ACTIVE = 4; // 0x4
field public static final int STATE_CONNECTING = 9; // 0x9
field public static final int STATE_DIALING = 1; // 0x1
@@ -31903,13 +31939,15 @@
}
public static class Call.Details {
+ method public static boolean can(int, int);
+ method public boolean can(int);
method public static java.lang.String capabilitiesToString(int);
method public android.telecom.PhoneAccountHandle getAccountHandle();
method public int getCallCapabilities();
method public int getCallProperties();
method public java.lang.String getCallerDisplayName();
method public int getCallerDisplayNamePresentation();
- method public long getConnectTimeMillis();
+ method public final long getConnectTimeMillis();
method public android.telecom.DisconnectCause getDisconnectCause();
method public android.os.Bundle getExtras();
method public android.telecom.GatewayInfo getGatewayInfo();
@@ -31918,14 +31956,24 @@
method public android.telecom.StatusHints getStatusHints();
method public int getVideoState();
field public static final int CAPABILITY_DISCONNECT_FROM_CONFERENCE = 8192; // 0x2000
+ field public static final int CAPABILITY_GENERIC_CONFERENCE = 16384; // 0x4000
+ field public static final int CAPABILITY_HIGH_DEF_AUDIO = 32768; // 0x8000
field public static final int CAPABILITY_HOLD = 1; // 0x1
field public static final int CAPABILITY_MANAGE_CONFERENCE = 128; // 0x80
field public static final int CAPABILITY_MERGE_CONFERENCE = 4; // 0x4
field public static final int CAPABILITY_MUTE = 64; // 0x40
field public static final int CAPABILITY_RESPOND_VIA_TEXT = 32; // 0x20
field public static final int CAPABILITY_SEPARATE_FROM_CONFERENCE = 4096; // 0x1000
+ field public static final int CAPABILITY_SHOW_CALLBACK_NUMBER = 131072; // 0x20000
+ field public static final int CAPABILITY_SUPPORTS_VT_LOCAL_BIDIRECTIONAL = 768; // 0x300
+ field public static final int CAPABILITY_SUPPORTS_VT_LOCAL_RX = 256; // 0x100
+ field public static final int CAPABILITY_SUPPORTS_VT_LOCAL_TX = 512; // 0x200
+ field public static final int CAPABILITY_SUPPORTS_VT_REMOTE_BIDIRECTIONAL = 3072; // 0xc00
+ field public static final int CAPABILITY_SUPPORTS_VT_REMOTE_RX = 1024; // 0x400
+ field public static final int CAPABILITY_SUPPORTS_VT_REMOTE_TX = 2048; // 0x800
field public static final int CAPABILITY_SUPPORT_HOLD = 2; // 0x2
field public static final int CAPABILITY_SWAP_CONFERENCE = 8; // 0x8
+ field public static final int CAPABILITY_WIFI = 65536; // 0x10000
}
public static abstract class Call.Listener {
@@ -31938,6 +31986,12 @@
method public void onParentChanged(android.telecom.Call, android.telecom.Call);
method public void onPostDialWait(android.telecom.Call, java.lang.String);
method public void onStateChanged(android.telecom.Call, int);
+ method public void onVideoCallChanged(android.telecom.Call, android.telecom.InCallService.VideoCall);
+ }
+
+ public class CallProperties {
+ ctor public CallProperties();
+ field public static final int CONFERENCE = 1; // 0x1
}
public final class CallState {
@@ -31954,13 +32008,22 @@
field public static final int RINGING = 4; // 0x4
}
+ public final class CameraCapabilities implements android.os.Parcelable {
+ ctor public CameraCapabilities(int, int);
+ method public int describeContents();
+ method public int getHeight();
+ method public int getWidth();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.telecom.CameraCapabilities> CREATOR;
+ }
+
public abstract class Conference implements android.telecom.IConferenceable {
ctor public Conference(android.telecom.PhoneAccountHandle);
method public final boolean addConnection(android.telecom.Connection);
method public final void destroy();
method public final android.telecom.AudioState getAudioState();
method public final java.util.List<android.telecom.Connection> getConferenceableConnections();
- method public long getConnectTimeMillis();
+ method public final long getConnectTimeMillis();
method public final int getConnectionCapabilities();
method public final java.util.List<android.telecom.Connection> getConnections();
method public final android.telecom.DisconnectCause getDisconnectCause();
@@ -31985,8 +32048,7 @@
method public final void setConnectionCapabilities(int);
method public final void setDisconnected(android.telecom.DisconnectCause);
method public final void setOnHold();
- field public static long CONNECT_TIME_NOT_SPECIFIED;
- field protected android.telecom.PhoneAccountHandle mPhoneAccount;
+ field public static final long CONNECT_TIME_NOT_SPECIFIED = 0L; // 0x0L
}
public abstract class Connection implements android.telecom.IConferenceable {
@@ -31999,7 +32061,6 @@
method public final int getAddressPresentation();
method public final boolean getAudioModeIsVoip();
method public final android.telecom.AudioState getAudioState();
- method public final deprecated int getCallCapabilities();
method public final java.lang.String getCallerDisplayName();
method public final int getCallerDisplayNamePresentation();
method public final android.telecom.Conference getConference();
@@ -32008,8 +32069,8 @@
method public final android.telecom.DisconnectCause getDisconnectCause();
method public final int getState();
method public final android.telecom.StatusHints getStatusHints();
+ method public final android.telecom.Connection.VideoProvider getVideoProvider();
method public final boolean isRingbackRequested();
- method protected void notifyConferenceStarted();
method public void onAbort();
method public void onAnswer();
method public void onAudioStateChanged(android.telecom.AudioState);
@@ -32025,7 +32086,6 @@
method public final void setActive();
method public final void setAddress(android.net.Uri, int);
method public final void setAudioModeIsVoip(boolean);
- method public final deprecated void setCallCapabilities(int);
method public final void setCallerDisplayName(java.lang.String, int);
method public final void setConferenceableConnections(java.util.List<android.telecom.Connection>);
method public final void setConferenceables(java.util.List<android.telecom.IConferenceable>);
@@ -32060,6 +32120,38 @@
field public static final int STATE_RINGING = 2; // 0x2
}
+ public static abstract class Connection.VideoProvider {
+ ctor public Connection.VideoProvider();
+ method public void changeCallDataUsage(long);
+ method public void changeCameraCapabilities(android.telecom.CameraCapabilities);
+ method public void changePeerDimensions(int, int);
+ method public void changeVideoQuality(int);
+ method public void handleCallSessionEvent(int);
+ method public abstract void onRequestCameraCapabilities();
+ method public abstract void onRequestConnectionDataUsage();
+ method public abstract void onSendSessionModifyRequest(android.telecom.VideoProfile);
+ method public abstract void onSendSessionModifyResponse(android.telecom.VideoProfile);
+ method public abstract void onSetCamera(java.lang.String);
+ method public abstract void onSetDeviceOrientation(int);
+ method public abstract void onSetDisplaySurface(android.view.Surface);
+ method public abstract void onSetPauseImage(java.lang.String);
+ method public abstract void onSetPreviewSurface(android.view.Surface);
+ method public abstract void onSetZoom(float);
+ method public void receiveSessionModifyRequest(android.telecom.VideoProfile);
+ method public void receiveSessionModifyResponse(int, android.telecom.VideoProfile, android.telecom.VideoProfile);
+ field public static final int SESSION_EVENT_CAMERA_FAILURE = 5; // 0x5
+ field public static final int SESSION_EVENT_CAMERA_READY = 6; // 0x6
+ field public static final int SESSION_EVENT_RX_PAUSE = 1; // 0x1
+ field public static final int SESSION_EVENT_RX_RESUME = 2; // 0x2
+ field public static final int SESSION_EVENT_TX_START = 3; // 0x3
+ field public static final int SESSION_EVENT_TX_STOP = 4; // 0x4
+ field public static final int SESSION_MODIFY_REQUEST_FAIL = 2; // 0x2
+ field public static final int SESSION_MODIFY_REQUEST_INVALID = 3; // 0x3
+ field public static final int SESSION_MODIFY_REQUEST_REJECTED_BY_REMOTE = 5; // 0x5
+ field public static final int SESSION_MODIFY_REQUEST_SUCCESS = 1; // 0x1
+ field public static final int SESSION_MODIFY_REQUEST_TIMED_OUT = 4; // 0x4
+ }
+
public final class ConnectionRequest implements android.os.Parcelable {
ctor public ConnectionRequest(android.telecom.PhoneAccountHandle, android.net.Uri, android.os.Bundle);
method public int describeContents();
@@ -32129,13 +32221,39 @@
public abstract class InCallService extends android.app.Service {
ctor public InCallService();
- method public android.telecom.Phone getPhone();
+ method public final android.telecom.Phone getPhone();
method public android.os.IBinder onBind(android.content.Intent);
method public void onPhoneCreated(android.telecom.Phone);
method public void onPhoneDestroyed(android.telecom.Phone);
field public static final java.lang.String SERVICE_INTERFACE = "android.telecom.InCallService";
}
+ public static abstract class InCallService.VideoCall {
+ ctor public InCallService.VideoCall();
+ method public abstract void requestCallDataUsage();
+ method public abstract void requestCameraCapabilities();
+ method public abstract void sendSessionModifyRequest(android.telecom.VideoProfile);
+ method public abstract void sendSessionModifyResponse(android.telecom.VideoProfile);
+ method public abstract void setCamera(java.lang.String);
+ method public abstract void setDeviceOrientation(int);
+ method public abstract void setDisplaySurface(android.view.Surface);
+ method public abstract void setPauseImage(java.lang.String);
+ method public abstract void setPreviewSurface(android.view.Surface);
+ method public abstract void setVideoCallListener(android.telecom.InCallService.VideoCall.Listener);
+ method public abstract void setZoom(float);
+ }
+
+ public static abstract class InCallService.VideoCall.Listener {
+ ctor public InCallService.VideoCall.Listener();
+ method public abstract void onCallDataUsageChanged(long);
+ method public abstract void onCallSessionEvent(int);
+ method public abstract void onCameraCapabilitiesChanged(android.telecom.CameraCapabilities);
+ method public abstract void onPeerDimensionsChanged(int, int);
+ method public abstract void onSessionModifyRequestReceived(android.telecom.VideoProfile);
+ method public abstract void onSessionModifyResponseReceived(int, android.telecom.VideoProfile, android.telecom.VideoProfile);
+ method public abstract void onVideoQualityChanged(int);
+ }
+
public final class Phone {
method public final void addListener(android.telecom.Phone.Listener);
method public final boolean canAddCall();
@@ -32195,7 +32313,6 @@
ctor public PhoneAccount.Builder(android.telecom.PhoneAccount);
method public android.telecom.PhoneAccount.Builder addSupportedUriScheme(java.lang.String);
method public android.telecom.PhoneAccount build();
- method public android.telecom.PhoneAccount.Builder setAccountHandle(android.telecom.PhoneAccountHandle);
method public android.telecom.PhoneAccount.Builder setAddress(android.net.Uri);
method public android.telecom.PhoneAccount.Builder setCapabilities(int);
method public android.telecom.PhoneAccount.Builder setHighlightColor(int);
@@ -32311,7 +32428,8 @@
method public void addNewIncomingCall(android.telecom.PhoneAccountHandle, android.os.Bundle);
method public void addNewUnknownCall(android.telecom.PhoneAccountHandle, android.os.Bundle);
method public void cancelMissedCallsNotification();
- method public void clearAccounts();
+ method public deprecated void clearAccounts();
+ method public void clearPhoneAccounts();
method public boolean endCall();
method public android.net.Uri getAdnUriForPhoneAccount(android.telecom.PhoneAccountHandle);
method public java.util.List<android.telecom.PhoneAccountHandle> getAllPhoneAccountHandles();
@@ -32327,9 +32445,10 @@
method public java.util.List<android.telecom.PhoneAccountHandle> getPhoneAccountsForPackage();
method public java.util.List<android.telecom.PhoneAccountHandle> getPhoneAccountsSupportingScheme(java.lang.String);
method public java.util.List<android.telecom.PhoneAccountHandle> getRegisteredConnectionManagers();
+ method public android.telecom.PhoneAccountHandle getSimCallManager();
+ method public android.telecom.PhoneAccountHandle getUserSelectedOutgoingPhoneAccount();
method public boolean handleMmi(java.lang.String);
- method public boolean handleMmi(android.telecom.PhoneAccountHandle, java.lang.String);
- method public boolean hasMultipleCallCapableAccounts();
+ method public boolean handleMmi(java.lang.String, android.telecom.PhoneAccountHandle);
method public boolean hasVoiceMailNumber(android.telecom.PhoneAccountHandle);
method public boolean isInCall();
method public boolean isRinging();
@@ -32341,6 +32460,7 @@
method public void unregisterPhoneAccount(android.telecom.PhoneAccountHandle);
field public static final java.lang.String ACTION_CHANGE_PHONE_ACCOUNTS = "android.telecom.action.CHANGE_PHONE_ACCOUNTS";
field public static final java.lang.String ACTION_CONNECTION_SERVICE_CONFIGURE = "android.telecom.action.CONNECTION_SERVICE_CONFIGURE";
+ field public static final java.lang.String ACTION_INCOMING_CALL = "android.telecom.action.INCOMING_CALL";
field public static final java.lang.String ACTION_PHONE_ACCOUNT_REGISTERED = "android.telecom.action.PHONE_ACCOUNT_REGISTERED";
field public static final java.lang.String ACTION_SHOW_CALL_ACCESSIBILITY_SETTINGS = "android.telecom.action.SHOW_CALL_ACCESSIBILITY_SETTINGS";
field public static final java.lang.String ACTION_SHOW_CALL_SETTINGS = "android.telecom.action.SHOW_CALL_SETTINGS";
@@ -32392,36 +32512,6 @@
field public static final int TX_ENABLED = 1; // 0x1
}
- public class Voicemail implements android.os.Parcelable {
- method public static android.telecom.Voicemail.Builder createForInsertion(long, java.lang.String);
- method public static android.telecom.Voicemail.Builder createForUpdate(long, java.lang.String);
- method public int describeContents();
- method public long getDuration();
- method public long getId();
- method public java.lang.String getNumber();
- method public java.lang.String getSourceData();
- method public java.lang.String getSourcePackage();
- method public long getTimestampMillis();
- method public android.net.Uri getUri();
- method public boolean hasContent();
- method public boolean isRead();
- method public void writeToParcel(android.os.Parcel, int);
- field public static final android.os.Parcelable.Creator<android.telecom.Voicemail> CREATOR;
- }
-
- public static class Voicemail.Builder {
- method public android.telecom.Voicemail build();
- method public android.telecom.Voicemail.Builder setDuration(long);
- method public android.telecom.Voicemail.Builder setHasContent(boolean);
- method public android.telecom.Voicemail.Builder setId(long);
- method public android.telecom.Voicemail.Builder setIsRead(boolean);
- method public android.telecom.Voicemail.Builder setNumber(java.lang.String);
- method public android.telecom.Voicemail.Builder setSourceData(java.lang.String);
- method public android.telecom.Voicemail.Builder setSourcePackage(java.lang.String);
- method public android.telecom.Voicemail.Builder setTimestamp(long);
- method public android.telecom.Voicemail.Builder setUri(android.net.Uri);
- }
-
}
package android.telephony {
@@ -32915,6 +33005,7 @@
method public boolean getDataEnabled(int);
method public int getDataState();
method public java.lang.String getDeviceId();
+ method public java.lang.String getDeviceId(int);
method public java.lang.String getDeviceSoftwareVersion();
method public java.lang.String getGroupIdLevel1();
method public java.lang.String getLine1Number();
@@ -32925,6 +33016,7 @@
method public java.lang.String getNetworkOperator();
method public java.lang.String getNetworkOperatorName();
method public int getNetworkType();
+ method public int getPhoneCount();
method public int getPhoneType();
method public java.lang.String getSimCountryIso();
method public java.lang.String getSimOperator();
@@ -39151,6 +39243,7 @@
field public static final int TITLE_CHANGED = 64; // 0x40
field public static final int TYPE_ACCESSIBILITY_OVERLAY = 2032; // 0x7f0
field public static final int TYPE_APPLICATION = 2; // 0x2
+ field public static final int TYPE_APPLICATION_ABOVE_SUB_PANEL = 1005; // 0x3ed
field public static final int TYPE_APPLICATION_ATTACHED_DIALOG = 1003; // 0x3eb
field public static final int TYPE_APPLICATION_MEDIA = 1001; // 0x3e9
field public static final int TYPE_APPLICATION_PANEL = 1000; // 0x3e8
diff --git a/core/java/android/app/ApplicationPackageManager.java b/core/java/android/app/ApplicationPackageManager.java
index 907ae26..fe6e4f3 100644
--- a/core/java/android/app/ApplicationPackageManager.java
+++ b/core/java/android/app/ApplicationPackageManager.java
@@ -771,10 +771,12 @@
.getCompatibilityInfo().applicationScale,
e);
}
- if (DEBUG_ICONS)
+ if (DEBUG_ICONS) {
Log.v(TAG, "Getting drawable 0x"
+ Integer.toHexString(resId) + " from " + r
+ ": " + dr);
+ }
+ return dr;
} catch (NameNotFoundException e) {
Log.w("PackageManager", "Failure retrieving resources for "
+ appInfo.packageName);
diff --git a/core/java/android/app/SystemServiceRegistry.java b/core/java/android/app/SystemServiceRegistry.java
index b3aa6be..4ede5b1 100644
--- a/core/java/android/app/SystemServiceRegistry.java
+++ b/core/java/android/app/SystemServiceRegistry.java
@@ -55,6 +55,7 @@
import android.location.ICountryDetector;
import android.location.ILocationManager;
import android.location.LocationManager;
+import android.media.AudioDevicesManager;
import android.media.AudioManager;
import android.media.MediaRouter;
import android.media.midi.IMidiManager;
@@ -693,6 +694,13 @@
public RadioManager createService(ContextImpl ctx) {
return new RadioManager(ctx);
}});
+
+ registerService(Context.AUDIO_DEVICES_SERVICE, AudioDevicesManager.class,
+ new CachedServiceFetcher<AudioDevicesManager>() {
+ @Override
+ public AudioDevicesManager createService(ContextImpl ctx) {
+ return new AudioDevicesManager(ctx);
+ }});
}
/**
diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java
index a0a6c4c..44760ce 100644
--- a/core/java/android/app/admin/DevicePolicyManager.java
+++ b/core/java/android/app/admin/DevicePolicyManager.java
@@ -4210,4 +4210,20 @@
return false;
}
}
+
+ /**
+ * Called by device owner to set the enabled state of the status bar. Disabling the status
+ * bar blocks notifications, quick settings and other screen overlays that allow escaping from
+ * a single use device.
+ *
+ * @param admin Which {@link DeviceAdminReceiver} this request is associated with.
+ * @param enabled New state of the status bar.
+ */
+ public void setStatusBarEnabledState(ComponentName admin, boolean enabled) {
+ try {
+ mService.setStatusBarEnabledState(admin, enabled);
+ } catch (RemoteException re) {
+ Log.w(TAG, "Failed talking with device policy service", re);
+ }
+ }
}
diff --git a/core/java/android/app/admin/IDevicePolicyManager.aidl b/core/java/android/app/admin/IDevicePolicyManager.aidl
index 131b99c..7502e1d 100644
--- a/core/java/android/app/admin/IDevicePolicyManager.aidl
+++ b/core/java/android/app/admin/IDevicePolicyManager.aidl
@@ -223,4 +223,5 @@
PersistableBundle getOtaPolicy();
boolean setKeyguardEnabledState(in ComponentName admin, boolean enabled);
+ void setStatusBarEnabledState(in ComponentName who, boolean enabled);
}
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java
index e5e55d6..0cbf960 100644
--- a/core/java/android/content/Context.java
+++ b/core/java/android/content/Context.java
@@ -3077,6 +3077,15 @@
*/
public static final String RADIO_SERVICE = "radio";
+ /**
+ * Use with {@link #getSystemService} to retrieve a
+ * {@link android.media.AudioDevicesManager} for handling device enumeration & notification.
+ *
+ * @see #getSystemService
+ * @see android.media.AudioDevicesManager
+ */
+ public static final String AUDIO_DEVICES_SERVICE = "audio_devices_manager";
+
/**
* Determine whether the given permission is allowed for a particular
diff --git a/core/java/android/hardware/Camera.java b/core/java/android/hardware/Camera.java
index 49f6513..d88594d 100644
--- a/core/java/android/hardware/Camera.java
+++ b/core/java/android/hardware/Camera.java
@@ -1803,8 +1803,6 @@
public Point mouth = null;
}
- // Error codes match the enum in include/ui/Camera.h
-
/**
* Unspecified camera error.
* @see Camera.ErrorCallback
@@ -1812,6 +1810,12 @@
public static final int CAMERA_ERROR_UNKNOWN = 1;
/**
+ * Camera was disconnected due to use by higher priority user.
+ * @see Camera.ErrorCallback
+ */
+ public static final int CAMERA_ERROR_EVICTED = 2;
+
+ /**
* Media server died. In this case, the application must release the
* Camera object and instantiate a new one.
* @see Camera.ErrorCallback
diff --git a/core/java/android/hardware/camera2/CameraCaptureSession.java b/core/java/android/hardware/camera2/CameraCaptureSession.java
index 6b6f026..31e6e25 100644
--- a/core/java/android/hardware/camera2/CameraCaptureSession.java
+++ b/core/java/android/hardware/camera2/CameraCaptureSession.java
@@ -18,6 +18,7 @@
import android.os.Handler;
import android.view.Surface;
+
import java.util.List;
@@ -69,6 +70,61 @@
public abstract CameraDevice getDevice();
/**
+ * <p>Pre-allocate all buffers for an output Surface.</p>
+ *
+ * <p>Normally, the image buffers for a given output Surface are allocated on-demand,
+ * to minimize startup latency and memory overhead.</p>
+ *
+ * <p>However, in some cases, it may be desirable for the buffers to be allocated before
+ * any requests targeting the Surface are actually submitted to the device. Large buffers
+ * may take some time to allocate, which can result in delays in submitting requests until
+ * sufficient buffers are allocated to reach steady-state behavior. Such delays can cause
+ * bursts to take longer than desired, or cause skips or stutters in preview output.</p>
+ *
+ * <p>The prepare() method can be used to perform this preallocation. It may only be called for
+ * a given output Surface before that Surface is used as a target for a request. The number of
+ * buffers allocated is the sum of the count needed by the consumer providing the output
+ * Surface, and the maximum number needed by the camera device to fill its pipeline. Since this
+ * may be a larger number than what is actually required for steady-state operation, using
+ * prepare may result in higher memory consumption than the normal on-demand behavior results
+ * in. Prepare() will also delay the time to first output to a given Surface, in exchange for
+ * smoother frame rate once the allocation is complete.</p>
+ *
+ * <p>For example, an application that creates an
+ * {@link android.media.ImageReader#newInstance ImageReader} with a maxImages argument of 10,
+ * but only uses 3 simultaneous Images at once would normally only cause those 3 images to be
+ * allocated (plus what is needed by the camera device for smooth operation). But using
+ * prepare() on the ImageReader Surface will result in all 10 Images being allocated. So
+ * applications using this method should take care to request only the number of buffers
+ * actually necessary for their application.</p>
+ *
+ * <p>If the same output Surface is used in consecutive sessions (without closing the first
+ * session explicitly), then its already-allocated buffers are carried over, and if it was
+ * used as a target of a capture request in the first session, prepare cannot be called on it
+ * in the second session.</p>
+ *
+ * <p>Once allocation is complete, {@link StateCallback#onSurfacePrepared} will be invoked with
+ * the Surface provided to this method. Between the prepare call and the onSurfacePrepared call,
+ * the Surface provided to prepare must not be used as a target of a CaptureRequest submitted
+ * to this session.</p>
+ *
+ * @param surface the output Surface for which buffers should be pre-allocated. Must be one of
+ * the output Surfaces used to create this session.
+ *
+ * @throws CameraAccessException if the camera device is no longer connected or has
+ * encountered a fatal error
+ * @throws IllegalStateException if this session is no longer active, either because the session
+ * was explicitly closed, a new session has been created
+ * or the camera device has been closed.
+ * @throws IllegalArgumentException if the Surface is invalid, not part of this Session, or has
+ * already been used as a target of a CaptureRequest in this
+ * session or immediately prior sessions.
+ *
+ * @see StateCallback#onSurfacePrepared
+ */
+ public abstract void prepare(Surface surface) throws CameraAccessException;
+
+ /**
* <p>Submit a request for an image to be captured by the camera device.</p>
*
* <p>The request defines all the parameters for capturing the single image,
@@ -110,9 +166,10 @@
* was explicitly closed, a new session has been created
* or the camera device has been closed.
* @throws IllegalArgumentException if the request targets no Surfaces or Surfaces that are not
- * configured as outputs for this session. Or if a reprocess
+ * configured as outputs for this session; or a reprocess
* capture request is submitted in a non-reprocessible capture
- * session. Or if the handler is
+ * session; or the capture targets a Surface in the middle
+ * of being {@link #prepare prepared}; or the handler is
* null, the listener is not null, and the calling thread has
* no looper.
*
@@ -164,13 +221,15 @@
* @throws IllegalStateException if this session is no longer active, either because the session
* was explicitly closed, a new session has been created
* or the camera device has been closed.
- * @throws IllegalArgumentException If the requests target no Surfaces, or target Surfaces not
- * currently configured as outputs. Or if a reprocess
+ * @throws IllegalArgumentException If the requests target no Surfaces, or the requests target
+ * Surfaces not currently configured as outputs; or a reprocess
* capture request is submitted in a non-reprocessible capture
- * session. Or if the list of requests contains both requests
- * to capture images from the camera and reprocess capture
- * requests. Or if the handler is null, the listener is not
- * null, and the calling thread has no looper.
+ * session; or the list of requests contains both requests to
+ * capture images from the camera and reprocess capture
+ * requests; or one of the captures targets a Surface in the
+ * middle of being {@link #prepare prepared}; or if the handler
+ * is null, the listener is not null, and the calling thread
+ * has no looper.
*
* @see #capture
* @see #setRepeatingRequest
@@ -230,11 +289,12 @@
* @throws IllegalStateException if this session is no longer active, either because the session
* was explicitly closed, a new session has been created
* or the camera device has been closed.
- * @throws IllegalArgumentException If the requests reference no Surfaces or Surfaces that are
- * not currently configured as outputs. Or if the request is
- * a reprocess capture request. Or if the handler is null, the
- * listener is not null, and the calling thread has no looper.
- * Or if no requests were passed in.
+ * @throws IllegalArgumentException If the request references no Surfaces or references Surfaces
+ * that are not currently configured as outputs; or the request
+ * is a reprocess capture request; or the capture targets a
+ * Surface in the middle of being {@link #prepare prepared}; or
+ * the handler is null, the listener is not null, and the
+ * calling thread has no looper; or no requests were passed in.
*
* @see #capture
* @see #captureBurst
@@ -299,11 +359,13 @@
* @throws IllegalStateException if this session is no longer active, either because the session
* was explicitly closed, a new session has been created
* or the camera device has been closed.
- * @throws IllegalArgumentException If the requests reference no Surfaces or Surfaces not
- * currently configured as outputs. Or if one of the requests
- * is a reprocess capture request. Or if the handler is null,
- * the listener is not null, and the calling thread has no
- * looper. Or if no requests were passed in.
+ * @throws IllegalArgumentException If the requests reference no Surfaces or reference Surfaces
+ * not currently configured as outputs; or one of the requests
+ * is a reprocess capture request; or one of the captures
+ * targets a Surface in the middle of being
+ * {@link #prepare prepared}; or the handler is null, the
+ * listener is not null, and the calling thread has no looper;
+ * or no requests were passed in.
*
* @see #capture
* @see #captureBurst
@@ -514,6 +576,25 @@
public void onClosed(CameraCaptureSession session) {
// default empty implementation
}
+
+ /**
+ * This method is called when the buffer pre-allocation for an output Surface is complete.
+ *
+ * <p>Buffer pre-allocation for an output Surface is started by the {@link #prepare} call.
+ * While allocation is underway, the Surface must not be used as a capture target.
+ * Once this callback fires, the output Surface provided can again be used as a target for
+ * a capture request.</p>
+ *
+ * <p>In case of a error during pre-allocation (such as running out of suitable memory),
+ * this callback is still invoked after the error is encountered, though some buffers may
+ * not have been successfully pre-allocated.</p>
+ *
+ * @param session the session returned by {@link CameraDevice#createCaptureSession}
+ * @param surface the Surface that was used with the {@link #prepare} call.
+ */
+ public void onSurfacePrepared(CameraCaptureSession session, Surface surface) {
+ // default empty implementation
+ }
}
/**
diff --git a/core/java/android/hardware/camera2/ICameraDeviceCallbacks.aidl b/core/java/android/hardware/camera2/ICameraDeviceCallbacks.aidl
index ca0935c..151c918 100644
--- a/core/java/android/hardware/camera2/ICameraDeviceCallbacks.aidl
+++ b/core/java/android/hardware/camera2/ICameraDeviceCallbacks.aidl
@@ -31,4 +31,5 @@
oneway void onCaptureStarted(in CaptureResultExtras resultExtras, long timestamp);
oneway void onResultReceived(in CameraMetadataNative result,
in CaptureResultExtras resultExtras);
+ oneway void onPrepared(int streamId);
}
diff --git a/core/java/android/hardware/camera2/ICameraDeviceUser.aidl b/core/java/android/hardware/camera2/ICameraDeviceUser.aidl
index 23bfa66..375b310 100644
--- a/core/java/android/hardware/camera2/ICameraDeviceUser.aidl
+++ b/core/java/android/hardware/camera2/ICameraDeviceUser.aidl
@@ -98,4 +98,6 @@
int waitUntilIdle();
int flush(out LongParcelable lastFrameNumber);
+
+ int prepare(int streamId);
}
diff --git a/core/java/android/hardware/camera2/impl/CallbackProxies.java b/core/java/android/hardware/camera2/impl/CallbackProxies.java
index f0217ac..dac2ef8 100644
--- a/core/java/android/hardware/camera2/impl/CallbackProxies.java
+++ b/core/java/android/hardware/camera2/impl/CallbackProxies.java
@@ -23,6 +23,7 @@
import android.hardware.camera2.TotalCaptureResult;
import android.hardware.camera2.dispatch.Dispatchable;
import android.hardware.camera2.dispatch.MethodNameInvoker;
+import android.view.Surface;
import static com.android.internal.util.Preconditions.*;
@@ -175,6 +176,12 @@
public void onClosed(CameraCaptureSession session) {
mProxy.invoke("onClosed", session);
}
+
+ @Override
+ public void onSurfacePrepared(CameraCaptureSession session, Surface surface) {
+ mProxy.invoke("onSurfacePrepared", session, surface);
+ }
+
}
private CallbackProxies() {
diff --git a/core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java b/core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java
index fb5b13c..c74204d 100644
--- a/core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java
+++ b/core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java
@@ -144,6 +144,11 @@
}
@Override
+ public void prepare(Surface surface) throws CameraAccessException {
+ mDeviceImpl.prepare(surface);
+ }
+
+ @Override
public synchronized int capture(CaptureRequest request, CaptureCallback callback,
Handler handler) throws CameraAccessException {
if (request == null) {
@@ -589,6 +594,13 @@
}
}
}
+
+ @Override
+ public void onSurfacePrepared(Surface surface) {
+ if (VERBOSE) Log.v(TAG, mIdString + "onPrepared");
+ mStateCallback.onSurfacePrepared(session, surface);
+ }
+
};
}
diff --git a/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java b/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java
index 91388c3..1e680dfd 100644
--- a/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java
+++ b/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java
@@ -605,6 +605,29 @@
}
}
+ public void prepare(Surface surface) throws CameraAccessException {
+ synchronized(mInterfaceLock) {
+ int streamId = -1;
+ for (int i = 0; i < mConfiguredOutputs.size(); i++) {
+ if (surface == mConfiguredOutputs.valueAt(i).getSurface()) {
+ streamId = mConfiguredOutputs.keyAt(i);
+ break;
+ }
+ }
+ if (streamId == -1) {
+ throw new IllegalArgumentException("Surface is not part of this session");
+ }
+ try {
+ mRemoteDevice.prepare(streamId);
+ } catch (CameraRuntimeException e) {
+ throw e.asChecked();
+ } catch (RemoteException e) {
+ // impossible
+ return;
+ }
+ }
+ }
+
public int capture(CaptureRequest request, CaptureCallback callback, Handler handler)
throws CameraAccessException {
if (DEBUG) {
@@ -1056,6 +1079,14 @@
public void onIdle(CameraDevice camera) {
// Default empty implementation
}
+
+ /**
+ * The method called when the camera device has finished preparing
+ * an output Surface
+ */
+ public void onSurfacePrepared(Surface surface) {
+ // Default empty implementation
+ }
}
static class CaptureCallbackHolder {
@@ -1643,6 +1674,31 @@
}
}
+ @Override
+ public void onPrepared(int streamId) {
+ final OutputConfiguration output;
+ final StateCallbackKK sessionCallback;
+
+ if (DEBUG) {
+ Log.v(TAG, "Stream " + streamId + " is prepared");
+ }
+
+ synchronized(mInterfaceLock) {
+ output = mConfiguredOutputs.get(streamId);
+ sessionCallback = mSessionStateCallback;
+ }
+
+ if (sessionCallback == null) return;
+
+ if (output == null) {
+ Log.w(TAG, "onPrepared invoked for unknown output Surface");
+ return;
+ }
+ final Surface surface = output.getSurface();
+
+ sessionCallback.onSurfacePrepared(surface);
+ }
+
/**
* Called by onDeviceError for handling single-capture failures.
*/
diff --git a/core/java/android/hardware/camera2/legacy/CameraDeviceUserShim.java b/core/java/android/hardware/camera2/legacy/CameraDeviceUserShim.java
index 4cd9414..abe26ea 100644
--- a/core/java/android/hardware/camera2/legacy/CameraDeviceUserShim.java
+++ b/core/java/android/hardware/camera2/legacy/CameraDeviceUserShim.java
@@ -252,6 +252,11 @@
}
@Override
+ public void onPrepared(int streamId) {
+ // TODO
+ }
+
+ @Override
public IBinder asBinder() {
// This is solely intended to be used for in-process binding.
return null;
@@ -617,6 +622,19 @@
return CameraBinderDecorator.NO_ERROR;
}
+ public int prepare(int streamId) {
+ if (DEBUG) {
+ Log.d(TAG, "prepare called.");
+ }
+ if (mLegacyDevice.isClosed()) {
+ Log.e(TAG, "Cannot prepare stream, device has been closed.");
+ return CameraBinderDecorator.ENODEV;
+ }
+
+ // TODO: Implement and fire callback
+ return CameraBinderDecorator.NO_ERROR;
+ }
+
@Override
public IBinder asBinder() {
// This is solely intended to be used for in-process binding.
diff --git a/core/java/android/os/Binder.java b/core/java/android/os/Binder.java
index b77b82cd..64562a4 100644
--- a/core/java/android/os/Binder.java
+++ b/core/java/android/os/Binder.java
@@ -189,6 +189,7 @@
/**
* Call blocks until the number of executing binder threads is less
* than the maximum number of binder threads allowed for this process.
+ * @hide
*/
public static final native void blockUntilThreadAvailable();
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 109c23b..f640f0d 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -2766,8 +2766,6 @@
* It was about AudioManager's setting and thus affected all the applications which
* relied on the setting, while this is purely about the vibration setting for incoming
* calls.
- *
- * @hide
*/
public static final String VIBRATE_WHEN_RINGING = "vibrate_when_ringing";
@@ -2788,7 +2786,6 @@
* DTMF tone type played by the dialer when dialing.
* 0 = Normal
* 1 = Long
- * @hide
*/
public static final String DTMF_TONE_TYPE_WHEN_DIALING = "dtmf_tone_type";
@@ -7057,7 +7054,6 @@
/**
* Setting to 1 will hide carrier network settings.
* Default is 0.
- * @hide
*/
public static final String HIDE_CARRIER_NETWORK_SETTINGS =
"hide_carrier_network_settings";
diff --git a/core/java/android/view/PhoneWindow.java b/core/java/android/view/PhoneWindow.java
index 5af2832..794c8e7 100644
--- a/core/java/android/view/PhoneWindow.java
+++ b/core/java/android/view/PhoneWindow.java
@@ -4257,7 +4257,13 @@
if (deviceId != 0) {
searchEvent = new SearchEvent(InputDevice.getDevice(deviceId));
}
- result = cb.onSearchRequested(searchEvent);
+ try {
+ result = cb.onSearchRequested(searchEvent);
+ } catch (AbstractMethodError e) {
+ Log.e(TAG, "WindowCallback " + cb.getClass().getName() + " does not implement"
+ + " method onSearchRequested(SearchEvent); fa", e);
+ result = cb.onSearchRequested();
+ }
}
if (!result && (getContext().getResources().getConfiguration().uiMode
& Configuration.UI_MODE_TYPE_MASK) == Configuration.UI_MODE_TYPE_TELEVISION) {
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 6b28746..25fa349 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -15205,27 +15205,33 @@
/**
* This method is called by ViewGroup.drawChild() to have each child view draw itself.
- * This draw() method is an implementation detail and is not intended to be overridden or
- * to be called from anywhere else other than ViewGroup.drawChild().
+ *
+ * This is where the View specializes rendering behavior based on layer type,
+ * and hardware acceleration.
*/
boolean draw(Canvas canvas, ViewGroup parent, long drawingTime) {
- boolean usingRenderNodeProperties = mAttachInfo != null && mAttachInfo.mHardwareAccelerated;
+ final boolean hardwareAcceleratedCanvas = canvas.isHardwareAccelerated();
+ /* If an attached view draws to a HW canvas, it may use its RenderNode + DisplayList.
+ *
+ * If a view is dettached, its DisplayList shouldn't exist. If the canvas isn't
+ * HW accelerated, it can't handle drawing RenderNodes.
+ */
+ boolean drawingWithRenderNode = mAttachInfo != null
+ && mAttachInfo.mHardwareAccelerated
+ && hardwareAcceleratedCanvas;
+
boolean more = false;
final boolean childHasIdentityMatrix = hasIdentityMatrix();
- final int flags = parent.mGroupFlags;
+ final int parentFlags = parent.mGroupFlags;
- if ((flags & ViewGroup.FLAG_CLEAR_TRANSFORMATION) == ViewGroup.FLAG_CLEAR_TRANSFORMATION) {
+ if ((parentFlags & ViewGroup.FLAG_CLEAR_TRANSFORMATION) != 0) {
parent.getChildTransformation().clear();
parent.mGroupFlags &= ~ViewGroup.FLAG_CLEAR_TRANSFORMATION;
}
Transformation transformToApply = null;
boolean concatMatrix = false;
-
- boolean scalingRequired = mAttachInfo != null && mAttachInfo.mScalingRequired;
- int layerType = getLayerType();
- final boolean hardwareAccelerated = canvas.isHardwareAccelerated();
-
+ final boolean scalingRequired = mAttachInfo != null && mAttachInfo.mScalingRequired;
final Animation a = getAnimation();
if (a != null) {
more = applyLegacyAnimation(parent, drawingTime, a, scalingRequired);
@@ -15240,8 +15246,8 @@
mRenderNode.setAnimationMatrix(null);
mPrivateFlags3 &= ~PFLAG3_VIEW_IS_ANIMATING_TRANSFORM;
}
- if (!usingRenderNodeProperties &&
- (flags & ViewGroup.FLAG_SUPPORT_STATIC_TRANSFORMATIONS) != 0) {
+ if (!drawingWithRenderNode
+ && (parentFlags & ViewGroup.FLAG_SUPPORT_STATIC_TRANSFORMATIONS) != 0) {
final Transformation t = parent.getChildTransformation();
final boolean hasTransform = parent.getChildStaticTransformation(this, t);
if (hasTransform) {
@@ -15259,7 +15265,7 @@
mPrivateFlags |= PFLAG_DRAWN;
if (!concatMatrix &&
- (flags & (ViewGroup.FLAG_SUPPORT_STATIC_TRANSFORMATIONS |
+ (parentFlags & (ViewGroup.FLAG_SUPPORT_STATIC_TRANSFORMATIONS |
ViewGroup.FLAG_CLIP_CHILDREN)) == ViewGroup.FLAG_CLIP_CHILDREN &&
canvas.quickReject(mLeft, mTop, mRight, mBottom, Canvas.EdgeType.BW) &&
(mPrivateFlags & PFLAG_DRAW_ANIMATION) == 0) {
@@ -15268,81 +15274,61 @@
}
mPrivateFlags2 &= ~PFLAG2_VIEW_QUICK_REJECTED;
- if (hardwareAccelerated) {
+ if (hardwareAcceleratedCanvas) {
// Clear INVALIDATED flag to allow invalidation to occur during rendering, but
// retain the flag's value temporarily in the mRecreateDisplayList flag
- mRecreateDisplayList = (mPrivateFlags & PFLAG_INVALIDATED) == PFLAG_INVALIDATED;
+ mRecreateDisplayList = (mPrivateFlags & PFLAG_INVALIDATED) != 0;
mPrivateFlags &= ~PFLAG_INVALIDATED;
}
RenderNode renderNode = null;
Bitmap cache = null;
- boolean hasDisplayList = false;
- if (!hardwareAccelerated) {
- if (layerType != LAYER_TYPE_NONE) {
- layerType = LAYER_TYPE_SOFTWARE;
- buildDrawingCache(true);
- }
+ int layerType = getLayerType();
+ if (layerType == LAYER_TYPE_SOFTWARE
+ || (!drawingWithRenderNode && layerType != LAYER_TYPE_NONE)) {
+ layerType = LAYER_TYPE_SOFTWARE;
+ buildDrawingCache(true);
cache = getDrawingCache(true);
- } else {
- switch (layerType) {
- case LAYER_TYPE_SOFTWARE:
- if (usingRenderNodeProperties) {
- hasDisplayList = canHaveDisplayList();
- } else {
- buildDrawingCache(true);
- cache = getDrawingCache(true);
- }
- break;
- case LAYER_TYPE_HARDWARE:
- if (usingRenderNodeProperties) {
- hasDisplayList = canHaveDisplayList();
- }
- break;
- case LAYER_TYPE_NONE:
- // Delay getting the display list until animation-driven alpha values are
- // set up and possibly passed on to the view
- hasDisplayList = canHaveDisplayList();
- break;
- }
}
- usingRenderNodeProperties &= hasDisplayList;
- if (usingRenderNodeProperties) {
+
+ if (drawingWithRenderNode) {
+ // Delay getting the display list until animation-driven alpha values are
+ // set up and possibly passed on to the view
renderNode = getDisplayList();
if (!renderNode.isValid()) {
// Uncommon, but possible. If a view is removed from the hierarchy during the call
// to getDisplayList(), the display list will be marked invalid and we should not
// try to use it again.
renderNode = null;
- hasDisplayList = false;
- usingRenderNodeProperties = false;
+ drawingWithRenderNode = false;
}
}
int sx = 0;
int sy = 0;
- if (!hasDisplayList) {
+ if (!drawingWithRenderNode) {
computeScroll();
sx = mScrollX;
sy = mScrollY;
}
- final boolean hasNoCache = cache == null || hasDisplayList;
- final boolean offsetForScroll = cache == null && !hasDisplayList &&
- layerType != LAYER_TYPE_HARDWARE;
+ final boolean hasNoCache = cache == null || drawingWithRenderNode;
+ final boolean offsetForScroll = cache == null
+ && !drawingWithRenderNode
+ && layerType != LAYER_TYPE_HARDWARE;
int restoreTo = -1;
- if (!usingRenderNodeProperties || transformToApply != null) {
+ if (!drawingWithRenderNode || transformToApply != null) {
restoreTo = canvas.save();
}
if (offsetForScroll) {
canvas.translate(mLeft - sx, mTop - sy);
} else {
- if (!usingRenderNodeProperties) {
+ if (!drawingWithRenderNode) {
canvas.translate(mLeft, mTop);
}
if (scalingRequired) {
- if (usingRenderNodeProperties) {
+ if (drawingWithRenderNode) {
// TODO: Might not need this if we put everything inside the DL
restoreTo = canvas.save();
}
@@ -15352,9 +15338,11 @@
}
}
- float alpha = usingRenderNodeProperties ? 1 : (getAlpha() * getTransitionAlpha());
- if (transformToApply != null || alpha < 1 || !hasIdentityMatrix() ||
- (mPrivateFlags3 & PFLAG3_VIEW_IS_ANIMATING_ALPHA) == PFLAG3_VIEW_IS_ANIMATING_ALPHA) {
+ float alpha = drawingWithRenderNode ? 1 : (getAlpha() * getTransitionAlpha());
+ if (transformToApply != null
+ || alpha < 1
+ || !hasIdentityMatrix()
+ || (mPrivateFlags3 & PFLAG3_VIEW_IS_ANIMATING_ALPHA) != 0) {
if (transformToApply != null || !childHasIdentityMatrix) {
int transX = 0;
int transY = 0;
@@ -15366,7 +15354,7 @@
if (transformToApply != null) {
if (concatMatrix) {
- if (usingRenderNodeProperties) {
+ if (drawingWithRenderNode) {
renderNode.setAnimationMatrix(transformToApply.getMatrix());
} else {
// Undo the scroll translation, apply the transformation matrix,
@@ -15385,7 +15373,7 @@
}
}
- if (!childHasIdentityMatrix && !usingRenderNodeProperties) {
+ if (!childHasIdentityMatrix && !drawingWithRenderNode) {
canvas.translate(-transX, -transY);
canvas.concat(getMatrix());
canvas.translate(transX, transY);
@@ -15393,8 +15381,7 @@
}
// Deal with alpha if it is or used to be <1
- if (alpha < 1 ||
- (mPrivateFlags3 & PFLAG3_VIEW_IS_ANIMATING_ALPHA) == PFLAG3_VIEW_IS_ANIMATING_ALPHA) {
+ if (alpha < 1 || (mPrivateFlags3 & PFLAG3_VIEW_IS_ANIMATING_ALPHA) != 0) {
if (alpha < 1) {
mPrivateFlags3 |= PFLAG3_VIEW_IS_ANIMATING_ALPHA;
} else {
@@ -15405,17 +15392,14 @@
final int multipliedAlpha = (int) (255 * alpha);
if (!onSetAlpha(multipliedAlpha)) {
int layerFlags = Canvas.HAS_ALPHA_LAYER_SAVE_FLAG;
- if ((flags & ViewGroup.FLAG_CLIP_CHILDREN) != 0 ||
- layerType != LAYER_TYPE_NONE) {
+ if ((parentFlags & ViewGroup.FLAG_CLIP_CHILDREN) != 0
+ || layerType != LAYER_TYPE_NONE) {
layerFlags |= Canvas.CLIP_TO_LAYER_SAVE_FLAG;
}
- if (usingRenderNodeProperties) {
+ if (drawingWithRenderNode) {
renderNode.setAlpha(alpha * getAlpha() * getTransitionAlpha());
- } else if (layerType == LAYER_TYPE_NONE) {
- final int scrollX = hasDisplayList ? 0 : sx;
- final int scrollY = hasDisplayList ? 0 : sy;
- canvas.saveLayerAlpha(scrollX, scrollY,
- scrollX + (mRight - mLeft), scrollY + (mBottom - mTop),
+ } else if (layerType == LAYER_TYPE_NONE) {
+ canvas.saveLayerAlpha(sx, sy, sx + getWidth(), sy + getHeight(),
multipliedAlpha, layerFlags);
}
} else {
@@ -15429,15 +15413,14 @@
mPrivateFlags &= ~PFLAG_ALPHA_SET;
}
- if (!usingRenderNodeProperties) {
+ if (!drawingWithRenderNode) {
// apply clips directly, since RenderNode won't do it for this draw
- if ((flags & ViewGroup.FLAG_CLIP_CHILDREN) == ViewGroup.FLAG_CLIP_CHILDREN
- && cache == null) {
+ if ((parentFlags & ViewGroup.FLAG_CLIP_CHILDREN) != 0 && cache == null) {
if (offsetForScroll) {
- canvas.clipRect(sx, sy, sx + (mRight - mLeft), sy + (mBottom - mTop));
+ canvas.clipRect(sx, sy, sx + getWidth(), sy + getHeight());
} else {
if (!scalingRequired || cache == null) {
- canvas.clipRect(0, 0, mRight - mLeft, mBottom - mTop);
+ canvas.clipRect(0, 0, getWidth(), getHeight());
} else {
canvas.clipRect(0, 0, cache.getWidth(), cache.getHeight());
}
@@ -15450,22 +15433,9 @@
}
}
-
-
- if (!usingRenderNodeProperties && hasDisplayList) {
- renderNode = getDisplayList();
- if (!renderNode.isValid()) {
- // Uncommon, but possible. If a view is removed from the hierarchy during the call
- // to getDisplayList(), the display list will be marked invalid and we should not
- // try to use it again.
- renderNode = null;
- hasDisplayList = false;
- }
- }
-
if (hasNoCache) {
boolean layerRendered = false;
- if (layerType == LAYER_TYPE_HARDWARE && !usingRenderNodeProperties) {
+ if (layerType == LAYER_TYPE_HARDWARE && !drawingWithRenderNode) {
final HardwareLayer layer = getHardwareLayer();
if (layer != null && layer.isValid()) {
int restoreAlpha = mLayerPaint.getAlpha();
@@ -15474,16 +15444,12 @@
mLayerPaint.setAlpha(restoreAlpha);
layerRendered = true;
} else {
- final int scrollX = hasDisplayList ? 0 : sx;
- final int scrollY = hasDisplayList ? 0 : sy;
- canvas.saveLayer(scrollX, scrollY,
- scrollX + mRight - mLeft, scrollY + mBottom - mTop, mLayerPaint,
- Canvas.HAS_ALPHA_LAYER_SAVE_FLAG | Canvas.CLIP_TO_LAYER_SAVE_FLAG);
+ canvas.saveLayer(sx, sy, sx + getWidth(), sy + getHeight(), mLayerPaint);
}
}
if (!layerRendered) {
- if (!hasDisplayList) {
+ if (!drawingWithRenderNode) {
// Fast path for layouts with no backgrounds
if ((mPrivateFlags & PFLAG_SKIP_DRAW) == PFLAG_SKIP_DRAW) {
mPrivateFlags &= ~PFLAG_DIRTY_MASK;
@@ -15493,7 +15459,7 @@
}
} else {
mPrivateFlags &= ~PFLAG_DIRTY_MASK;
- ((DisplayListCanvas) canvas).drawRenderNode(renderNode, flags);
+ ((DisplayListCanvas) canvas).drawRenderNode(renderNode, parentFlags);
}
}
} else if (cache != null) {
@@ -15522,13 +15488,13 @@
}
if (a != null && !more) {
- if (!hardwareAccelerated && !a.getFillAfter()) {
+ if (!hardwareAcceleratedCanvas && !a.getFillAfter()) {
onSetAlpha(255);
}
parent.finishAnimatingView(this, a);
}
- if (more && hardwareAccelerated) {
+ if (more && hardwareAcceleratedCanvas) {
if (a.hasAlpha() && (mPrivateFlags & PFLAG_ALPHA_SET) == PFLAG_ALPHA_SET) {
// alpha animations should cause the child to recreate its display list
invalidate(true);
diff --git a/core/java/android/view/Window.java b/core/java/android/view/Window.java
index 9d0d5ff4..49a72ce 100644
--- a/core/java/android/view/Window.java
+++ b/core/java/android/view/Window.java
@@ -595,6 +595,8 @@
title="Panel";
} else if (wp.type == WindowManager.LayoutParams.TYPE_APPLICATION_SUB_PANEL) {
title="SubPanel";
+ } else if (wp.type == WindowManager.LayoutParams.TYPE_APPLICATION_ABOVE_SUB_PANEL) {
+ title="AboveSubPanel";
} else if (wp.type == WindowManager.LayoutParams.TYPE_APPLICATION_ATTACHED_DIALOG) {
title="AtchDlg";
} else {
diff --git a/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java
index 54d78f3..e983910 100644
--- a/core/java/android/view/WindowManager.java
+++ b/core/java/android/view/WindowManager.java
@@ -164,13 +164,14 @@
* be used by applications, and a special permission is required
* to use them.
* </ul>
- *
+ *
* @see #TYPE_BASE_APPLICATION
* @see #TYPE_APPLICATION
* @see #TYPE_APPLICATION_STARTING
* @see #TYPE_APPLICATION_PANEL
* @see #TYPE_APPLICATION_MEDIA
* @see #TYPE_APPLICATION_SUB_PANEL
+ * @see #TYPE_APPLICATION_ABOVE_SUB_PANEL
* @see #TYPE_APPLICATION_ATTACHED_DIALOG
* @see #TYPE_STATUS_BAR
* @see #TYPE_SEARCH_BAR
@@ -193,6 +194,7 @@
@ViewDebug.IntToString(from = TYPE_APPLICATION_PANEL, to = "TYPE_APPLICATION_PANEL"),
@ViewDebug.IntToString(from = TYPE_APPLICATION_MEDIA, to = "TYPE_APPLICATION_MEDIA"),
@ViewDebug.IntToString(from = TYPE_APPLICATION_SUB_PANEL, to = "TYPE_APPLICATION_SUB_PANEL"),
+ @ViewDebug.IntToString(from = TYPE_APPLICATION_ABOVE_SUB_PANEL, to = "TYPE_APPLICATION_ABOVE_SUB_PANEL"),
@ViewDebug.IntToString(from = TYPE_APPLICATION_ATTACHED_DIALOG, to = "TYPE_APPLICATION_ATTACHED_DIALOG"),
@ViewDebug.IntToString(from = TYPE_APPLICATION_MEDIA_OVERLAY, to = "TYPE_APPLICATION_MEDIA_OVERLAY"),
@ViewDebug.IntToString(from = TYPE_STATUS_BAR, to = "TYPE_STATUS_BAR"),
@@ -260,40 +262,40 @@
* End of types of application windows.
*/
public static final int LAST_APPLICATION_WINDOW = 99;
-
+
/**
* Start of types of sub-windows. The {@link #token} of these windows
* must be set to the window they are attached to. These types of
* windows are kept next to their attached window in Z-order, and their
* coordinate space is relative to their attached window.
*/
- public static final int FIRST_SUB_WINDOW = 1000;
-
+ public static final int FIRST_SUB_WINDOW = 1000;
+
/**
* Window type: a panel on top of an application window. These windows
* appear on top of their attached window.
*/
- public static final int TYPE_APPLICATION_PANEL = FIRST_SUB_WINDOW;
-
+ public static final int TYPE_APPLICATION_PANEL = FIRST_SUB_WINDOW;
+
/**
* Window type: window for showing media (such as video). These windows
* are displayed behind their attached window.
*/
- public static final int TYPE_APPLICATION_MEDIA = FIRST_SUB_WINDOW+1;
-
+ public static final int TYPE_APPLICATION_MEDIA = FIRST_SUB_WINDOW + 1;
+
/**
* Window type: a sub-panel on top of an application window. These
* windows are displayed on top their attached window and any
* {@link #TYPE_APPLICATION_PANEL} panels.
*/
- public static final int TYPE_APPLICATION_SUB_PANEL = FIRST_SUB_WINDOW+2;
+ public static final int TYPE_APPLICATION_SUB_PANEL = FIRST_SUB_WINDOW + 2;
/** Window type: like {@link #TYPE_APPLICATION_PANEL}, but layout
* of the window happens as that of a top-level window, <em>not</em>
* as a child of its container.
*/
- public static final int TYPE_APPLICATION_ATTACHED_DIALOG = FIRST_SUB_WINDOW+3;
-
+ public static final int TYPE_APPLICATION_ATTACHED_DIALOG = FIRST_SUB_WINDOW + 3;
+
/**
* Window type: window for showing overlays on top of media windows.
* These windows are displayed between TYPE_APPLICATION_MEDIA and the
@@ -301,19 +303,26 @@
* is a big ugly hack so:
* @hide
*/
- public static final int TYPE_APPLICATION_MEDIA_OVERLAY = FIRST_SUB_WINDOW+4;
-
+ public static final int TYPE_APPLICATION_MEDIA_OVERLAY = FIRST_SUB_WINDOW + 4;
+
+ /**
+ * Window type: a above sub-panel on top of an application window and it's
+ * sub-panel windows. These windows are displayed on top of their attached window
+ * and any {@link #TYPE_APPLICATION_SUB_PANEL} panels.
+ */
+ public static final int TYPE_APPLICATION_ABOVE_SUB_PANEL = FIRST_SUB_WINDOW + 5;
+
/**
* End of types of sub-windows.
*/
- public static final int LAST_SUB_WINDOW = 1999;
-
+ public static final int LAST_SUB_WINDOW = 1999;
+
/**
* Start of system-specific window types. These are not normally
* created by applications.
*/
public static final int FIRST_SYSTEM_WINDOW = 2000;
-
+
/**
* Window type: the status bar. There can be only one status bar
* window; it is placed at the top of the screen, and all other
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index e7c4328..7ab5aaa 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -2427,9 +2427,7 @@
@Override
public void onProvideVirtualAssistStructure(ViewAssistStructure structure) {
- super.onProvideVirtualAssistStructure(structure);
- // TODO: enable when chromium backend lands.
- // mProvider.getViewDelegate().onProvideVirtualAssistStructure(structure);
+ mProvider.getViewDelegate().onProvideVirtualAssistStructure(structure);
}
/** @hide */
diff --git a/core/java/com/android/internal/statusbar/IStatusBarService.aidl b/core/java/com/android/internal/statusbar/IStatusBarService.aidl
index 6cb839e..87e0603 100644
--- a/core/java/com/android/internal/statusbar/IStatusBarService.aidl
+++ b/core/java/com/android/internal/statusbar/IStatusBarService.aidl
@@ -27,6 +27,7 @@
void expandNotificationsPanel();
void collapsePanels();
void disable(int what, IBinder token, String pkg);
+ void disableForUser(int what, IBinder token, String pkg, int userId);
void setIcon(String slot, String iconPackage, int iconId, int iconLevel, String contentDescription);
void setIconVisibility(String slot, boolean visible);
void removeIcon(String slot);
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 9ec5221..3d1fd7c 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -3939,7 +3939,7 @@
<string name="toolbar_collapse_description">Collapse</string>
<!-- Zen mode - feature name. [CHAR LIMIT=40] -->
- <string name="zen_mode_feature_name">Block interruptions</string>
+ <string name="zen_mode_feature_name">Do not disturb</string>
<!-- Zen mode - downtime legacy feature name. [CHAR LIMIT=40] -->
<string name="zen_mode_downtime_feature_name">Downtime</string>
diff --git a/keystore/java/android/security/AndroidKeyStore.java b/keystore/java/android/security/AndroidKeyStore.java
index b9317741..1c068be 100644
--- a/keystore/java/android/security/AndroidKeyStore.java
+++ b/keystore/java/android/security/AndroidKeyStore.java
@@ -55,6 +55,7 @@
import java.util.Enumeration;
import java.util.HashSet;
import java.util.Iterator;
+import java.util.List;
import java.util.Set;
import javax.crypto.SecretKey;
@@ -116,11 +117,15 @@
throw new UnrecoverableKeyException("Key algorithm unknown");
}
- int keymasterDigest =
- keyCharacteristics.hwEnforced.getInt(KeymasterDefs.KM_TAG_DIGEST, -1);
- if (keymasterDigest == -1) {
- keymasterDigest =
- keyCharacteristics.swEnforced.getInt(KeymasterDefs.KM_TAG_DIGEST, -1);
+ List<Integer> keymasterDigests =
+ keyCharacteristics.getInts(KeymasterDefs.KM_TAG_DIGEST);
+ int keymasterDigest;
+ if (keymasterDigests.isEmpty()) {
+ keymasterDigest = -1;
+ } else {
+ // More than one digest can be permitted for this key. Use the first one to form the
+ // JCA key algorithm name.
+ keymasterDigest = keymasterDigests.get(0);
}
String keyAlgorithmString;
diff --git a/libs/hwui/SkiaCanvasProxy.cpp b/libs/hwui/SkiaCanvasProxy.cpp
index ec1bb90..8a6c8c5 100644
--- a/libs/hwui/SkiaCanvasProxy.cpp
+++ b/libs/hwui/SkiaCanvasProxy.cpp
@@ -289,6 +289,7 @@
// but even more conservative bounds if this is too slow.
SkRect bounds;
glyphs.paint.measureText(glyphs.glyphIDs, glyphs.count << 1, &bounds);
+ bounds.offset(x, y);
SK_COMPILE_ASSERT(sizeof(SkPoint) == sizeof(float)*2, SkPoint_is_no_longer_2_floats);
mCanvas->drawText(glyphs.glyphIDs, &posArray[0].fX, glyphs.count, glyphs.paint, x, y,
diff --git a/location/java/android/location/GpsMeasurement.java b/location/java/android/location/GpsMeasurement.java
index 05bcf79..df128c9 100644
--- a/location/java/android/location/GpsMeasurement.java
+++ b/location/java/android/location/GpsMeasurement.java
@@ -80,6 +80,8 @@
private static final int HAS_TIME_FROM_LAST_BIT = (1<<14);
private static final int HAS_DOPPLER_SHIFT = (1<<15);
private static final int HAS_DOPPLER_SHIFT_UNCERTAINTY = (1<<16);
+ private static final int HAS_USED_IN_FIX = (1<<17);
+ private static final int GPS_MEASUREMENT_HAS_UNCORRECTED_PSEUDORANGE_RATE = (1<<18);
/**
* The indicator is not available or it is unknown.
@@ -137,10 +139,17 @@
public static final short STATE_TOW_DECODED = (1<<3);
/**
+ * The state of the GPS receiver contains millisecond ambiguity.
+ *
+ * @hide
+ */
+ public static final short STATE_MSEC_AMBIGUOUS = (1<<4);
+
+ /**
* All the GPS receiver state flags.
*/
- private static final short STATE_ALL =
- STATE_CODE_LOCK | STATE_BIT_SYNC | STATE_SUBFRAME_SYNC | STATE_TOW_DECODED;
+ private static final short STATE_ALL = STATE_CODE_LOCK | STATE_BIT_SYNC | STATE_SUBFRAME_SYNC
+ | STATE_TOW_DECODED | STATE_MSEC_AMBIGUOUS;
/**
* The state of the 'Accumulated Delta Range' is invalid or unknown.
@@ -295,6 +304,9 @@
if ((mState & STATE_TOW_DECODED) == STATE_TOW_DECODED) {
builder.append("TowDecoded|");
}
+ if ((mState & STATE_MSEC_AMBIGUOUS) == STATE_MSEC_AMBIGUOUS) {
+ builder.append("MsecAmbiguous");
+ }
int remainingStates = mState & ~STATE_ALL;
if (remainingStates > 0) {
builder.append("Other(");
@@ -361,6 +373,15 @@
/**
* Gets the Pseudorange rate at the timestamp in m/s.
* The reported value includes {@link #getPseudorangeRateUncertaintyInMetersPerSec()}.
+ *
+ * The correction of a given Pseudorange Rate value includes corrections from receiver and
+ * satellite clock frequency errors.
+ * {@link #isPseudorangeRateCorrected()} identifies the type of value reported.
+ *
+ * A positive 'uncorrected' value indicates that the SV is moving away from the receiver.
+ * The sign of the 'uncorrected' Pseudorange Rate and its relation to the sign of
+ * {@link #getDopplerShiftInHz()} is given by the equation:
+ * pseudorange rate = -k * doppler shift (where k is a constant)
*/
public double getPseudorangeRateInMetersPerSec() {
return mPseudorangeRateInMetersPerSec;
@@ -374,6 +395,18 @@
}
/**
+ * See {@link #getPseudorangeRateInMetersPerSec()} for more details.
+ *
+ * @return {@code true} if {@link #getPseudorangeRateInMetersPerSec()} contains a corrected
+ * value, {@code false} if it contains an uncorrected value.
+ *
+ * @hide
+ */
+ public boolean isPseudorangeRateCorrected() {
+ return !isFlagSet(GPS_MEASUREMENT_HAS_UNCORRECTED_PSEUDORANGE_RATE);
+ }
+
+ /**
* Gets the pseudorange's rate uncertainty (1-Sigma) in m/s.
* The uncertainty is represented as an absolute (single sided) value.
*/
@@ -437,6 +470,11 @@
* The reported value includes {@link #getAccumulatedDeltaRangeUncertaintyInMeters()}.
*
* The availability of the value is represented by {@link #getAccumulatedDeltaRangeState()}.
+ *
+ * A positive value indicates that the SV is moving away from the receiver.
+ * The sign of {@link #getAccumulatedDeltaRangeInMeters()} and its relation to the sign of
+ * {@link #getCarrierPhase()} is given by the equation:
+ * accumulated delta range = -k * carrier phase (where k is a constant)
*/
public double getAccumulatedDeltaRangeInMeters() {
return mAccumulatedDeltaRangeInMeters;
@@ -452,6 +490,8 @@
/**
* Gets the accumulated delta range's uncertainty (1-Sigma) in meters.
* The uncertainty is represented as an absolute (single sided) value.
+ *
+ * The status of the value is represented by {@link #getAccumulatedDeltaRangeState()}.
*/
public double getAccumulatedDeltaRangeUncertaintyInMeters() {
return mAccumulatedDeltaRangeUncertaintyInMeters;
@@ -460,7 +500,7 @@
/**
* Sets the accumulated delta range's uncertainty (1-sigma) in meters.
*
- * The availability of the value is represented by {@link #getAccumulatedDeltaRangeState()}.
+ * The status of the value is represented by {@link #getAccumulatedDeltaRangeState()}.
*/
public void setAccumulatedDeltaRangeUncertaintyInMeters(double value) {
mAccumulatedDeltaRangeUncertaintyInMeters = value;
@@ -1235,6 +1275,10 @@
mPseudorangeRateInMetersPerSec,
"PseudorangeRateUncertaintyInMetersPerSec",
mPseudorangeRateUncertaintyInMetersPerSec));
+ builder.append(String.format(
+ format,
+ "PseudorangeRateIsCorrected",
+ isPseudorangeRateCorrected()));
builder.append(String.format(
format,
diff --git a/location/java/android/location/GpsNavigationMessage.java b/location/java/android/location/GpsNavigationMessage.java
index b893f3f..5b12a61 100644
--- a/location/java/android/location/GpsNavigationMessage.java
+++ b/location/java/android/location/GpsNavigationMessage.java
@@ -60,6 +60,28 @@
*/
public static final byte TYPE_CNAV2 = 4;
+ /**
+ * The Navigation Message Status is 'unknown'.
+ *
+ * @hide
+ */
+ public static final short STATUS_UNKNOWN = 0;
+
+ /**
+ * The Navigation Message was received without any parity error in its navigation words.
+ *
+ * @hide
+ */
+ public static final short STATUS_PARITY_PASSED = (1<<0);
+
+ /**
+ * The Navigation Message was received with words that failed parity check, but the receiver was
+ * able to correct those words.
+ *
+ * @hide
+ */
+ public static final short STATUS_PARITY_REBUILT = (1<<1);
+
// End enumerations in sync with gps.h
private byte mType;
@@ -67,6 +89,7 @@
private short mMessageId;
private short mSubmessageId;
private byte[] mData;
+ private short mStatus;
GpsNavigationMessage() {
initialize();
@@ -81,6 +104,7 @@
mMessageId = navigationMessage.mMessageId;
mSubmessageId = navigationMessage.mSubmessageId;
mData = navigationMessage.mData;
+ mStatus = navigationMessage.mStatus;
}
/**
@@ -194,6 +218,41 @@
mData = value;
}
+ /**
+ * Gets the Status of the navigation message contained in the object.
+ *
+ * @hide
+ */
+ public short getStatus() {
+ return mStatus;
+ }
+
+ /**
+ * Sets the status of the navigation message.
+ *
+ * @hide
+ */
+ public void setStatus(short value) {
+ mStatus = value;
+ }
+
+ /**
+ * Gets a string representation of the 'status'.
+ * For internal and logging use only.
+ */
+ private String getStatusString() {
+ switch (mStatus) {
+ case STATUS_UNKNOWN:
+ return "Unknown";
+ case STATUS_PARITY_PASSED:
+ return "ParityPassed";
+ case STATUS_PARITY_REBUILT:
+ return "ParityRebuilt";
+ default:
+ return "<Invalid:" + mStatus + ">";
+ }
+ }
+
public static final Creator<GpsNavigationMessage> CREATOR =
new Creator<GpsNavigationMessage>() {
@Override
@@ -210,6 +269,13 @@
parcel.readByteArray(data);
navigationMessage.setData(data);
+ if (parcel.dataAvail() >= Integer.SIZE) {
+ int status = parcel.readInt();
+ navigationMessage.setStatus((short) status);
+ } else {
+ navigationMessage.setStatus(STATUS_UNKNOWN);
+ }
+
return navigationMessage;
}
@@ -226,6 +292,7 @@
parcel.writeInt(mSubmessageId);
parcel.writeInt(mData.length);
parcel.writeByteArray(mData);
+ parcel.writeInt(mStatus);
}
@Override
@@ -240,6 +307,7 @@
builder.append(String.format(format, "Type", getTypeString()));
builder.append(String.format(format, "Prn", mPrn));
+ builder.append(String.format(format, "Status", getStatusString()));
builder.append(String.format(format, "MessageId", mMessageId));
builder.append(String.format(format, "SubmessageId", mSubmessageId));
@@ -261,5 +329,6 @@
mMessageId = -1;
mSubmessageId = -1;
mData = EMPTY_ARRAY;
+ mStatus = STATUS_UNKNOWN;
}
}
diff --git a/media/java/android/media/AudioDevice.java b/media/java/android/media/AudioDeviceInfo.java
similarity index 80%
rename from media/java/android/media/AudioDevice.java
rename to media/java/android/media/AudioDeviceInfo.java
index df4d60d..d58b1d1 100644
--- a/media/java/android/media/AudioDevice.java
+++ b/media/java/android/media/AudioDeviceInfo.java
@@ -20,9 +20,8 @@
/**
* Class to provide information about the audio devices.
- * @hide
*/
-public class AudioDevice {
+public class AudioDeviceInfo {
/**
* A device type associated with an unknown or uninitialized device.
@@ -42,7 +41,7 @@
*/
public static final int TYPE_WIRED_HEADSET = 3;
/**
- * A device type describing a pair of wired headphones .
+ * A device type describing a pair of wired headphones.
*/
public static final int TYPE_WIRED_HEADPHONES = 4;
/**
@@ -54,7 +53,7 @@
*/
public static final int TYPE_LINE_DIGITAL = 6;
/**
- * A device type describing a Bluetooth device typically used for telephony .
+ * A device type describing a Bluetooth device typically used for telephony.
*/
public static final int TYPE_BLUETOOTH_SCO = 7;
/**
@@ -106,46 +105,92 @@
*/
public static final int TYPE_AUX_LINE = 19;
- AudioDevicePortConfig mConfig;
+ private final AudioDevicePort mPort;
- AudioDevice(AudioDevicePortConfig config) {
- mConfig = new AudioDevicePortConfig(config);
+ AudioDeviceInfo(AudioDevicePort port) {
+ mPort = port;
}
/**
* @hide
- * CANDIDATE FOR PUBLIC API
- * @return
+ * @return The internal device ID.
*/
- public boolean isInputDevice() {
- return (mConfig.port().role() == AudioPort.ROLE_SOURCE);
+ public int getId() {
+ return mPort.handle().id();
}
/**
- * @hide
- * CANDIDATE FOR PUBLIC API
- * @return
+ * @return The human-readable name of the audio device.
*/
- public boolean isOutputDevice() {
- return (mConfig.port().role() == AudioPort.ROLE_SINK);
+ public String getName() {
+ return mPort.name();
}
/**
- * @hide
- * CANDIDATE FOR PUBLIC API
- * @return
+ * @return The "address" string of the device. This generally contains device-specific
+ * parameters.
*/
- public int getDeviceType() {
- return INT_TO_EXT_DEVICE_MAPPING.get(mConfig.port().type(), TYPE_UNKNOWN);
- }
-
- /**
- * @hide
- * CANDIDATE FOR PUBLIC API
- * @return
- */
+ // TODO Is there a compelling reason to expose this?
public String getAddress() {
- return mConfig.port().address();
+ return mPort.address();
+ }
+
+ /**
+ * @return true if the audio device is a source for audio data (e.e an input).
+ */
+ public boolean isSource() {
+ return mPort.role() == AudioPort.ROLE_SOURCE;
+ }
+
+ /**
+ * @return true if the audio device is a sink for audio data (i.e. an output).
+ */
+ public boolean isSink() {
+ return mPort.role() == AudioPort.ROLE_SINK;
+ }
+
+ /**
+ * @return An array of sample rates supported by the audio device.
+ */
+ public int[] getSampleRates() {
+ return mPort.samplingRates();
+ }
+
+ /**
+ * @return An array of channel masks supported by the audio device (defined in
+ * AudioFormat.java).
+ */
+ public int[] getChannelMasks() {
+ return mPort.channelMasks();
+ }
+
+ /**
+ * @return An array of channel counts supported by the audio device.
+ */
+ public int[] getChannelCounts() {
+ int[] masks = getChannelMasks();
+ int[] counts = new int[masks.length];
+ for (int mask_index = 0; mask_index < masks.length; mask_index++) {
+ counts[mask_index] = isSink()
+ ? AudioFormat.channelCountFromOutChannelMask(masks[mask_index])
+ : AudioFormat.channelCountFromInChannelMask(masks[mask_index]);
+ }
+ return counts;
+ }
+
+ /**
+ * @return An array of audio format IDs supported by the audio device (defined in
+ * AudioFormat.java)
+ */
+ public int[] getFormats() {
+ return mPort.formats();
+ }
+
+ /**
+ * @return The device type identifier of the audio device (i.e. TYPE_BUILTIN_SPEAKER).
+ */
+ public int getType() {
+ return INT_TO_EXT_DEVICE_MAPPING.get(mPort.type(), TYPE_UNKNOWN);
}
/** @hide */
diff --git a/media/java/android/media/AudioDevicesManager.java b/media/java/android/media/AudioDevicesManager.java
index ee11eef..ca238d7 100644
--- a/media/java/android/media/AudioDevicesManager.java
+++ b/media/java/android/media/AudioDevicesManager.java
@@ -17,24 +17,54 @@
package android.media;
import android.content.Context;
+import android.os.Handler;
+import android.os.Looper;
+import android.os.Message;
+import android.util.ArrayMap;
+import android.util.Pair;
import android.util.Slog;
import java.util.ArrayList;
+import java.util.Collection;
+import java.util.concurrent.CopyOnWriteArrayList;
import java.util.HashMap;
import java.util.Iterator;
-/** @hide
- * API candidate
+/**
+ * AudioDevicesManager implements the Android Media Audio device enumeration and notification
+ * functionality. This functionality is in two comlementary parts.
+ * <ol>
+ * <li>{@link AudioDevicesManager#listDevices(int)} gets the list of current audio devices
+ * </li>
+ * <li>{@link AudioDevicesManager#addOnAudioDeviceConnectionListener(OnAudioDeviceConnectionListener, android.os.Handler)}
+ * provides a mechanism for applications to be informed of audio device connect/disconnect events.
+ * </li>
+ * </ol>
*/
public class AudioDevicesManager {
+
private static String TAG = "AudioDevicesManager";
- private static boolean DEBUG = true;
+
+ private static boolean DEBUG = false;
private AudioManager mAudioManager = null;
+
private OnAmPortUpdateListener mPortListener = null;
- /*
- * Enum/Selection API
+ /**
+ * The message sent to apps when the contents of the device list changes if they provide
+ * a {#link Handler} object to addOnAudioDeviceConnectionListener().
+ */
+ private final static int MSG_DEVICES_LIST_CHANGE = 0;
+
+ private ArrayMap<OnAudioDeviceConnectionListener, NativeEventHandlerDelegate>
+ mDeviceConnectionListeners =
+ new ArrayMap<OnAudioDeviceConnectionListener, NativeEventHandlerDelegate>();
+
+ /**
+ * @hide
+ * The AudioDevicesManager class is used to enumerate the physical audio devices connected
+ * to the system. See also {@link AudioDeviceInfo}.
*/
public AudioDevicesManager(Context context) {
mAudioManager = (AudioManager)context.getSystemService(Context.AUDIO_SERVICE);
@@ -42,214 +72,120 @@
mAudioManager.registerAudioPortUpdateListener(mPortListener);
}
- /** @hide
- * API candidate
+ /**
+ * Specifies to the {@link AudioDevicesManager#listDevices(int)} method to include
+ * source (i.e. input) audio devices.
*/
- //TODO Merge this class into android.media.AudioDevice
- public class AudioDeviceInfo {
- private AudioDevicePort mPort = null;
+ public static final int LIST_DEVICES_INPUTS = 0x0001;
- /** @hide */
- /* package */ AudioDeviceInfo(AudioDevicePort port) {
- mPort = port;
- }
+ /**
+ * Specifies to the {@link AudioDevicesManager#listDevices(int)} method to include
+ * sink (i.e. output) audio devices.
+ */
+ public static final int LIST_DEVICES_OUTPUTS = 0x0002;
- public int getId() { return mPort.handle().id(); }
-
- public String getName() { return mPort.name(); }
-
- public int getType() {
- return mPort.type();
- }
-
- public String getAddress() {
- return mPort.address();
- }
-
- public int getRole() { return mPort.role(); }
-
- public int[] getSampleRates() { return mPort.samplingRates(); }
-
- public int[] getChannelMasks() { return mPort.channelMasks(); }
-
- public int[] getChannelCounts() {
- int[] masks = getChannelMasks();
- int[] counts = new int[masks.length];
- for (int mask_index = 0; mask_index < masks.length; mask_index++) {
- counts[mask_index] = getRole() == AudioPort.ROLE_SINK
- ? AudioFormat.channelCountFromOutChannelMask(masks[mask_index])
- : AudioFormat.channelCountFromInChannelMask(masks[mask_index]);
- }
- return counts;
- }
-
- /* The format IDs are in AudioFormat.java */
- public int[] getFormats() { return mPort.formats(); }
-
- public String toString() { return "" + getId() + " - " + getName(); }
- }
-
- /** @hide */
- public static final int LIST_DEVICES_OUTPUTS = 0x0001;
- /** @hide */
- public static final int LIST_DEVICES_INPUTS = 0x0002;
- /** @hide */
- public static final int LIST_DEVICES_BUILTIN = 0x0004;
- /** @hide */
- public static final int LIST_DEVICES_USB = 0x0008;
- // TODO implement the semantics for these.
- /** @hide */
- public static final int LIST_DEVICES_WIRED = 0x0010;
- /** @hide */
- public static final int LIST_DEVICES_UNWIRED = 0x0020;
-
- /** @hide */
+ /**
+ * Specifies to the {@link AudioDevicesManager#listDevices(int)} method to include both
+ * source and sink devices.
+ */
public static final int LIST_DEVICES_ALL = LIST_DEVICES_OUTPUTS | LIST_DEVICES_INPUTS;
+ /**
+ * Determines if a given AudioDevicePort meets the specified filter criteria.
+ * @param port The port to test.
+ * @param flags A set of bitflags specifying the criteria to test.
+ * @see {@link LIST_DEVICES_OUTPUTS} and {@link LIST_DEVICES_INPUTS}
+ **/
private boolean checkFlags(AudioDevicePort port, int flags) {
- // Inputs / Outputs
- boolean passed =
- port.role() == AudioPort.ROLE_SINK && (flags & LIST_DEVICES_OUTPUTS) != 0 ||
- port.role() == AudioPort.ROLE_SOURCE && (flags & LIST_DEVICES_INPUTS) != 0;
-
- // USB
- if (passed && (flags & LIST_DEVICES_USB) != 0) {
- int role = port.role();
- int type = port.type();
- Slog.i(TAG, " role:" + role + " type:0x" + Integer.toHexString(type));
- passed =
- (role == AudioPort.ROLE_SINK && (type & AudioSystem.DEVICE_OUT_ALL_USB) != 0) ||
- (role == AudioPort.ROLE_SOURCE && (type & AudioSystem.DEVICE_IN_ALL_USB) != 0);
- }
-
- return passed;
+ return port.role() == AudioPort.ROLE_SINK && (flags & LIST_DEVICES_OUTPUTS) != 0 ||
+ port.role() == AudioPort.ROLE_SOURCE && (flags & LIST_DEVICES_INPUTS) != 0;
}
- /** @hide */
- public ArrayList<AudioDeviceInfo> listDevices(int flags) {
- Slog.i(TAG, "AudioManager.listDevices(" + Integer.toHexString(flags) + ")");
-
+ /**
+ * Generates a list of AudioDeviceInfo objects corresponding to the audio devices currently
+ * connected to the system and meeting the criteria specified in the <code>flags</code>
+ * parameter.
+ * @param flags A set of bitflags specifying the criteria to test.
+ * @see {@link LIST_DEVICES_OUTPUTS}, {@link LIST_DEVICES_INPUTS} and {@link LIST_DEVICES_ALL}.
+ * @return A (possibly zero-length) array of AudioDeviceInfo objects.
+ */
+ public AudioDeviceInfo[] listDevices(int flags) {
ArrayList<AudioDevicePort> ports = new ArrayList<AudioDevicePort>();
int status = mAudioManager.listAudioDevicePorts(ports);
+ if (status != AudioManager.SUCCESS) {
+ // fail and bail!
+ return new AudioDeviceInfo[0];
+ }
- Slog.i(TAG, " status:" + status + " numPorts:" + ports.size());
-
- ArrayList<AudioDeviceInfo> deviceList = new ArrayList<AudioDeviceInfo>();
-
- if (status == AudioManager.SUCCESS) {
- deviceList = new ArrayList<AudioDeviceInfo>();
- for (AudioDevicePort port : ports) {
- if (checkFlags(port, flags)) {
- deviceList.add(new AudioDeviceInfo(port));
- }
+ // figure out how many AudioDeviceInfo we need space for
+ int numRecs = 0;
+ for (AudioDevicePort port : ports) {
+ if (checkFlags(port, flags)) {
+ numRecs++;
}
}
+
+ // Now load them up
+ AudioDeviceInfo[] deviceList = new AudioDeviceInfo[numRecs];
+ int slot = 0;
+ for (AudioDevicePort port : ports) {
+ if (checkFlags(port, flags)) {
+ deviceList[slot++] = new AudioDeviceInfo(port);
+ }
+ }
+
return deviceList;
}
- private ArrayList<OnAudioDeviceConnectionListener> mDeviceConnectionListeners =
- new ArrayList<OnAudioDeviceConnectionListener>();
-
- private HashMap<Integer, AudioPort> mCurrentPortlist =
- new HashMap<Integer, AudioPort>();
-
- private ArrayList<AudioDeviceInfo> calcAddedDevices(AudioPort[] portList) {
- ArrayList<AudioDeviceInfo> addedDevices = new ArrayList<AudioDeviceInfo>();
- synchronized(mCurrentPortlist) {
- for(int portIndex = 0; portIndex < portList.length; portIndex++) {
- if (portList[portIndex] instanceof AudioDevicePort) {
- if (!mCurrentPortlist.containsKey(portList[portIndex].handle().id())) {
- addedDevices.add(new AudioDeviceInfo((AudioDevicePort)portList[portIndex]));
- }
- }
+ /**
+ * Adds an {@link OnAudioDeviceConnectionListener} to receive notifications of changes
+ * to the set of connected audio devices.
+ */
+ public void addOnAudioDeviceConnectionListener(OnAudioDeviceConnectionListener listener,
+ android.os.Handler handler) {
+ if (listener != null && !mDeviceConnectionListeners.containsKey(listener)) {
+ synchronized (mDeviceConnectionListeners) {
+ mDeviceConnectionListeners.put(
+ listener, new NativeEventHandlerDelegate(listener, handler));
}
}
- return addedDevices;
- }
-
- private boolean hasPortId(AudioPort[] portList, int id) {
- for(int portIndex = 0; portIndex < portList.length; portIndex++) {
- if (portList[portIndex].handle().id() == id) {
- return true;
- }
- }
- return false;
- }
-
- private ArrayList<AudioDeviceInfo> calcRemovedDevices(AudioPort[] portList) {
- ArrayList<AudioDeviceInfo> removedDevices = new ArrayList<AudioDeviceInfo>();
-
- synchronized (mCurrentPortlist) {
- Iterator it = mCurrentPortlist.entrySet().iterator();
- while (it.hasNext()) {
- HashMap.Entry pairs = (HashMap.Entry)it.next();
- if (pairs.getValue() instanceof AudioDevicePort) {
- if (!hasPortId(portList, ((Integer)pairs.getKey()).intValue())) {
- removedDevices.add(new AudioDeviceInfo((AudioDevicePort)pairs.getValue()));
- }
- }
- }
- }
- return removedDevices;
- }
-
- private void buildCurrentDevicesList(AudioPort[] portList) {
- synchronized (mCurrentPortlist) {
- mCurrentPortlist.clear();
- for (int portIndex = 0; portIndex < portList.length; portIndex++) {
- if (portList[portIndex] instanceof AudioDevicePort) {
- mCurrentPortlist.put(portList[portIndex].handle().id(),
- (AudioDevicePort)portList[portIndex]);
- }
- }
- }
- }
-
- /** @hide */
- public void addDeviceConnectionListener(OnAudioDeviceConnectionListener listener) {
- synchronized (mDeviceConnectionListeners) {
- mDeviceConnectionListeners.add(listener);
- }
- }
-
- /** @hide */
- public void removeDeviceConnectionListener(OnAudioDeviceConnectionListener listener) {
- synchronized (mDeviceConnectionListeners) {
- mDeviceConnectionListeners.remove(listener);
- }
}
/**
- * @hide
+ * Removes an {@link OnAudioDeviceConnectionListener} which has been previously registered
+ * to receive notifications of changes to the set of connected audio devices.
+ */
+ public void removeOnAudioDeviceConnectionListener(OnAudioDeviceConnectionListener listener) {
+ synchronized (mDeviceConnectionListeners) {
+ if (mDeviceConnectionListeners.containsKey(listener)) {
+ mDeviceConnectionListeners.remove(listener);
+ }
+ }
+ }
+
+ /**
+ * Sends device list change notification to all listeners.
+ */
+ private void broadcastDeviceListChange() {
+ Collection<NativeEventHandlerDelegate> values;
+ synchronized (mDeviceConnectionListeners) {
+ values = mDeviceConnectionListeners.values();
+ }
+ for(NativeEventHandlerDelegate delegate : values) {
+ Handler handler = delegate.getHandler();
+ if (handler != null) {
+ handler.sendEmptyMessage(MSG_DEVICES_LIST_CHANGE);
+ }
+ }
+ }
+
+ /**
+ * Handles Port list update notifications from the AudioManager
*/
private class OnAmPortUpdateListener implements AudioManager.OnAudioPortUpdateListener {
static final String TAG = "OnAmPortUpdateListener";
public void onAudioPortListUpdate(AudioPort[] portList) {
- Slog.i(TAG, "onAudioPortListUpdate() " + portList.length + " ports.");
- ArrayList<AudioDeviceInfo> addedDevices = calcAddedDevices(portList);
- ArrayList<AudioDeviceInfo> removedDevices = calcRemovedDevices(portList);
-
- ArrayList<OnAudioDeviceConnectionListener> listeners = null;
- synchronized (mDeviceConnectionListeners) {
- listeners =
- new ArrayList<OnAudioDeviceConnectionListener>(mDeviceConnectionListeners);
- }
-
- // Connect
- if (addedDevices.size() != 0) {
- for (OnAudioDeviceConnectionListener listener : listeners) {
- listener.onConnect(addedDevices);
- }
- }
-
- // Disconnect?
- if (removedDevices.size() != 0) {
- for (OnAudioDeviceConnectionListener listener : listeners) {
- listener.onDisconnect(removedDevices);
- }
- }
-
- buildCurrentDevicesList(portList);
+ broadcastDeviceListChange();
}
/**
@@ -257,14 +193,70 @@
* @param patchList the updated list of audio patches
*/
public void onAudioPatchListUpdate(AudioPatch[] patchList) {
- Slog.i(TAG, "onAudioPatchListUpdate() " + patchList.length + " patches.");
+ if (DEBUG) {
+ Slog.d(TAG, "onAudioPatchListUpdate() " + patchList.length + " patches.");
+ }
}
/**
* Callback method called when the mediaserver dies
*/
public void onServiceDied() {
- Slog.i(TAG, "onServiceDied()");
+ if (DEBUG) {
+ Slog.i(TAG, "onServiceDied()");
+ }
+
+ broadcastDeviceListChange();
+ }
+ }
+
+ //---------------------------------------------------------
+ // Inner classes
+ //--------------------
+ /**
+ * Helper class to handle the forwarding of native events to the appropriate listener
+ * (potentially) handled in a different thread.
+ */
+ private class NativeEventHandlerDelegate {
+ private final Handler mHandler;
+
+ NativeEventHandlerDelegate(final OnAudioDeviceConnectionListener listener,
+ Handler handler) {
+ // find the looper for our new event handler
+ Looper looper;
+ if (handler != null) {
+ looper = handler.getLooper();
+ } else {
+ // no given handler, use the looper the addListener call was called in
+ looper = Looper.getMainLooper();
+ }
+
+ // construct the event handler with this looper
+ if (looper != null) {
+ // implement the event handler delegate
+ mHandler = new Handler(looper) {
+ @Override
+ public void handleMessage(Message msg) {
+ switch(msg.what) {
+ case MSG_DEVICES_LIST_CHANGE:
+ // call the OnAudioDeviceConnectionListener
+ if (listener != null) {
+ listener.onAudioDeviceConnection();
+ }
+ break;
+ default:
+ Slog.e(TAG, "Unknown native event type: " + msg.what);
+ break;
+ }
+ }
+ };
+ } else {
+ mHandler = null;
+ }
+ }
+
+ Handler getHandler() {
+ return mHandler;
}
}
}
diff --git a/media/java/android/media/OnAudioDeviceConnectionListener.java b/media/java/android/media/OnAudioDeviceConnectionListener.java
index 4bdd4d0..71c135a 100644
--- a/media/java/android/media/OnAudioDeviceConnectionListener.java
+++ b/media/java/android/media/OnAudioDeviceConnectionListener.java
@@ -16,13 +16,16 @@
package android.media;
-import java.util.ArrayList;
-
/**
- * @hide
- * API candidate
+ * OnAudioDeviceConnectionListener defines the interface for notification listeners in the
+ * {@link AudioDevicesManager}
*/
-public abstract class OnAudioDeviceConnectionListener {
- public void onConnect(ArrayList<AudioDevicesManager.AudioDeviceInfo> devices) {}
- public void onDisconnect(ArrayList<AudioDevicesManager.AudioDeviceInfo> devices) {}
+public interface OnAudioDeviceConnectionListener {
+ /**
+ * Called by the {@link AudioDevicesManager} to indicate that an audio device has been
+ * connected or disconnected. A listener will probably call the
+ * {@link AudioDevicesManager#listDevices} method to retrieve the current list of audio
+ * devices.
+ */
+ public void onAudioDeviceConnection();
}
diff --git a/media/java/android/media/audiofx/Virtualizer.java b/media/java/android/media/audiofx/Virtualizer.java
index be5adc8..49e56bc 100644
--- a/media/java/android/media/audiofx/Virtualizer.java
+++ b/media/java/android/media/audiofx/Virtualizer.java
@@ -17,7 +17,7 @@
package android.media.audiofx;
import android.annotation.IntDef;
-import android.media.AudioDevice;
+import android.media.AudioDeviceInfo;
import android.media.AudioFormat;
import android.media.audiofx.AudioEffect;
import android.util.Log;
@@ -204,7 +204,7 @@
// convert channel mask to internal native representation
paramsConverter.putInt(AudioFormat.convertChannelOutMaskToNativeMask(channelMask));
// convert Java device type to internal representation
- paramsConverter.putInt(AudioDevice.convertDeviceTypeToInternalDevice(deviceType));
+ paramsConverter.putInt(AudioDeviceInfo.convertDeviceTypeToInternalDevice(deviceType));
// allocate an array to store the results
byte[] result = new byte[nbChannels * 4/*int to byte*/ * 3/*for mask, azimuth, elevation*/];
@@ -305,9 +305,9 @@
throws IllegalArgumentException {
switch (virtualizationMode) {
case VIRTUALIZATION_MODE_BINAURAL:
- return AudioDevice.TYPE_WIRED_HEADPHONES;
+ return AudioDeviceInfo.TYPE_WIRED_HEADPHONES;
case VIRTUALIZATION_MODE_TRANSAURAL:
- return AudioDevice.TYPE_BUILTIN_SPEAKER;
+ return AudioDeviceInfo.TYPE_BUILTIN_SPEAKER;
default:
throw (new IllegalArgumentException(
"Virtualizer: illegal virtualization mode " + virtualizationMode));
@@ -317,7 +317,7 @@
private static int getDeviceForModeForce(@ForceVirtualizationMode int virtualizationMode)
throws IllegalArgumentException {
if (virtualizationMode == VIRTUALIZATION_MODE_AUTO) {
- return AudioDevice.TYPE_UNKNOWN;
+ return AudioDeviceInfo.TYPE_UNKNOWN;
} else {
return getDeviceForModeQuery(virtualizationMode);
}
@@ -325,24 +325,24 @@
private static int deviceToMode(int deviceType) {
switch (deviceType) {
- case AudioDevice.TYPE_WIRED_HEADSET:
- case AudioDevice.TYPE_WIRED_HEADPHONES:
- case AudioDevice.TYPE_BLUETOOTH_SCO:
- case AudioDevice.TYPE_BUILTIN_EARPIECE:
+ case AudioDeviceInfo.TYPE_WIRED_HEADSET:
+ case AudioDeviceInfo.TYPE_WIRED_HEADPHONES:
+ case AudioDeviceInfo.TYPE_BLUETOOTH_SCO:
+ case AudioDeviceInfo.TYPE_BUILTIN_EARPIECE:
return VIRTUALIZATION_MODE_BINAURAL;
- case AudioDevice.TYPE_BUILTIN_SPEAKER:
- case AudioDevice.TYPE_LINE_ANALOG:
- case AudioDevice.TYPE_LINE_DIGITAL:
- case AudioDevice.TYPE_BLUETOOTH_A2DP:
- case AudioDevice.TYPE_HDMI:
- case AudioDevice.TYPE_HDMI_ARC:
- case AudioDevice.TYPE_USB_DEVICE:
- case AudioDevice.TYPE_USB_ACCESSORY:
- case AudioDevice.TYPE_DOCK:
- case AudioDevice.TYPE_FM:
- case AudioDevice.TYPE_AUX_LINE:
+ case AudioDeviceInfo.TYPE_BUILTIN_SPEAKER:
+ case AudioDeviceInfo.TYPE_LINE_ANALOG:
+ case AudioDeviceInfo.TYPE_LINE_DIGITAL:
+ case AudioDeviceInfo.TYPE_BLUETOOTH_A2DP:
+ case AudioDeviceInfo.TYPE_HDMI:
+ case AudioDeviceInfo.TYPE_HDMI_ARC:
+ case AudioDeviceInfo.TYPE_USB_DEVICE:
+ case AudioDeviceInfo.TYPE_USB_ACCESSORY:
+ case AudioDeviceInfo.TYPE_DOCK:
+ case AudioDeviceInfo.TYPE_FM:
+ case AudioDeviceInfo.TYPE_AUX_LINE:
return VIRTUALIZATION_MODE_TRANSAURAL;
- case AudioDevice.TYPE_UNKNOWN:
+ case AudioDeviceInfo.TYPE_UNKNOWN:
default:
return VIRTUALIZATION_MODE_OFF;
}
@@ -433,7 +433,7 @@
throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
// convert Java device type to internal representation
int deviceType = getDeviceForModeForce(virtualizationMode);
- int internalDevice = AudioDevice.convertDeviceTypeToInternalDevice(deviceType);
+ int internalDevice = AudioDeviceInfo.convertDeviceTypeToInternalDevice(deviceType);
int status = setParameter(PARAM_FORCE_VIRTUALIZATION_MODE, internalDevice);
@@ -470,7 +470,7 @@
int[] value = new int[1];
int status = getParameter(PARAM_VIRTUALIZATION_MODE, value);
if (status >= 0) {
- return deviceToMode(AudioDevice.convertInternalDeviceToDeviceType(value[0]));
+ return deviceToMode(AudioDeviceInfo.convertInternalDeviceToDeviceType(value[0]));
} else if (status == AudioEffect.ERROR_BAD_VALUE) {
return VIRTUALIZATION_MODE_OFF;
} else {
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraBinderTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraBinderTest.java
index 3bb5f01..14c2619 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraBinderTest.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraBinderTest.java
@@ -261,6 +261,16 @@
// TODO Auto-generated method stub
}
+
+ /*
+ * (non-Javadoc)
+ * @see android.hardware.camera2.ICameraDeviceCallbacks#onPrepared()
+ */
+ @Override
+ public void onPrepared(int streamId) throws RemoteException {
+ // TODO Auto-generated method stub
+
+ }
}
@SmallTest
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraDeviceBinderTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraDeviceBinderTest.java
index 0466540..6f33672 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraDeviceBinderTest.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraDeviceBinderTest.java
@@ -132,6 +132,16 @@
// TODO Auto-generated method stub
}
+
+ /*
+ * (non-Javadoc)
+ * @see android.hardware.camera2.ICameraDeviceCallbacks#onPrepared()
+ */
+ @Override
+ public void onPrepared(int streamId) throws RemoteException {
+ // TODO Auto-generated method stub
+
+ }
}
class IsMetadataNotEmpty extends ArgumentMatcher<CameraMetadataNative> {
diff --git a/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java b/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java
index bb5ff1b..82a77d2 100644
--- a/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java
+++ b/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java
@@ -3154,6 +3154,7 @@
case WindowManager.LayoutParams.TYPE_APPLICATION_PANEL:
case WindowManager.LayoutParams.TYPE_APPLICATION_STARTING:
case WindowManager.LayoutParams.TYPE_APPLICATION_SUB_PANEL:
+ case WindowManager.LayoutParams.TYPE_APPLICATION_ABOVE_SUB_PANEL:
case WindowManager.LayoutParams.TYPE_BASE_APPLICATION:
case WindowManager.LayoutParams.TYPE_PHONE:
case WindowManager.LayoutParams.TYPE_PRIORITY_PHONE:
diff --git a/services/core/java/com/android/server/Watchdog.java b/services/core/java/com/android/server/Watchdog.java
index 69e61f6..772a15c 100644
--- a/services/core/java/com/android/server/Watchdog.java
+++ b/services/core/java/com/android/server/Watchdog.java
@@ -190,6 +190,17 @@
}
}
+ /** Monitor for checking the availability of binder threads. The monitor will block until
+ * there is a binder thread available to process in coming IPCs to make sure other processes
+ * can still communicate with the service.
+ */
+ private static final class BinderThreadMonitor implements Watchdog.Monitor {
+ @Override
+ public void monitor() {
+ Binder.blockUntilThreadAvailable();
+ }
+ }
+
public interface Monitor {
void monitor();
}
@@ -227,6 +238,9 @@
// And the display thread.
mHandlerCheckers.add(new HandlerChecker(DisplayThread.getHandler(),
"display thread", DEFAULT_TIMEOUT));
+
+ // Initialize monitor for Binder threads.
+ addMonitor(new BinderThreadMonitor());
}
public void init(Context context, ActivityManagerService activity) {
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index 37f0e35..b606353 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -2179,15 +2179,6 @@
}
}
- public static final class BinderThreadMonitor implements Watchdog.Monitor {
- /** This method will block until there is a binder thread available to process
- * in coming IPCs to make sure other processes can still communicate with the service.
- */
- @Override
- public void monitor() {
- Binder.blockUntilThreadAvailable();
- }
- }
// Note: This method is invoked on the main thread but may need to attach various
// handlers to other threads. So take care to be explicit about the looper.
public ActivityManagerService(Context systemContext) {
@@ -2282,7 +2273,6 @@
};
Watchdog.getInstance().addMonitor(this);
- Watchdog.getInstance().addMonitor(new BinderThreadMonitor());
Watchdog.getInstance().addThread(mHandler);
}
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java
index 936840a..fce01e5 100644
--- a/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -183,6 +183,7 @@
static final int APPLICATION_MEDIA_OVERLAY_SUBLAYER = -1;
static final int APPLICATION_PANEL_SUBLAYER = 1;
static final int APPLICATION_SUB_PANEL_SUBLAYER = 2;
+ static final int APPLICATION_ABOVE_SUB_PANEL_SUBLAYER = 3;
static public final String SYSTEM_DIALOG_REASON_KEY = "reason";
static public final String SYSTEM_DIALOG_REASON_GLOBAL_ACTIONS = "globalactions";
@@ -2015,6 +2016,8 @@
return APPLICATION_MEDIA_OVERLAY_SUBLAYER;
case TYPE_APPLICATION_SUB_PANEL:
return APPLICATION_SUB_PANEL_SUBLAYER;
+ case TYPE_APPLICATION_ABOVE_SUB_PANEL:
+ return APPLICATION_ABOVE_SUB_PANEL_SUBLAYER;
}
Log.e(TAG, "Unknown sub-window type: " + type);
return 0;
diff --git a/services/core/java/com/android/server/statusbar/StatusBarManagerService.java b/services/core/java/com/android/server/statusbar/StatusBarManagerService.java
index f6df757..184224b 100644
--- a/services/core/java/com/android/server/statusbar/StatusBarManagerService.java
+++ b/services/core/java/com/android/server/statusbar/StatusBarManagerService.java
@@ -79,7 +79,7 @@
public void binderDied() {
Slog.i(TAG, "binder died for pkg=" + pkg);
- disableInternal(userId, 0, token, pkg);
+ disableForUser(0, token, pkg, userId);
token.unlinkToDeath(this, 0);
}
}
@@ -194,10 +194,11 @@
@Override
public void disable(int what, IBinder token, String pkg) {
- disableInternal(mCurrentUserId, what, token, pkg);
+ disableForUser(what, token, pkg, mCurrentUserId);
}
- private void disableInternal(int userId, int what, IBinder token, String pkg) {
+ @Override
+ public void disableForUser(int what, IBinder token, String pkg, int userId) {
enforceStatusBar();
synchronized (mLock) {
diff --git a/services/core/java/com/android/server/wm/AccessibilityController.java b/services/core/java/com/android/server/wm/AccessibilityController.java
index ae8832a..91ce739 100644
--- a/services/core/java/com/android/server/wm/AccessibilityController.java
+++ b/services/core/java/com/android/server/wm/AccessibilityController.java
@@ -339,6 +339,7 @@
case WindowManager.LayoutParams.TYPE_APPLICATION_PANEL:
case WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA:
case WindowManager.LayoutParams.TYPE_APPLICATION_SUB_PANEL:
+ case WindowManager.LayoutParams.TYPE_APPLICATION_ABOVE_SUB_PANEL:
case WindowManager.LayoutParams.TYPE_APPLICATION_ATTACHED_DIALOG:
case WindowManager.LayoutParams.TYPE_SEARCH_BAR:
case WindowManager.LayoutParams.TYPE_PHONE:
diff --git a/services/core/jni/com_android_server_fingerprint_FingerprintService.cpp b/services/core/jni/com_android_server_fingerprint_FingerprintService.cpp
index 17f86ca..5a86923 100644
--- a/services/core/jni/com_android_server_fingerprint_FingerprintService.cpp
+++ b/services/core/jni/com_android_server_fingerprint_FingerprintService.cpp
@@ -26,6 +26,7 @@
#include <utils/String16.h>
#include <utils/Looper.h>
#include <keystore/IKeystoreService.h>
+#include <keystore/keystore.h> // for error code
#include <hardware/hardware.h>
#include <hardware/fingerprint.h>
@@ -74,8 +75,9 @@
sp<IBinder> binder = sm->getService(String16("android.security.keystore"));
sp<IKeystoreService> service = interface_cast<IKeystoreService>(binder);
if (service != NULL) {
- if (service->addAuthToken(auth_token, auth_token_length) != NO_ERROR) {
- ALOGE("Falure sending auth token to KeyStore");
+ status_t ret = service->addAuthToken(auth_token, auth_token_length);
+ if (ret != ResponseCode::NO_ERROR) {
+ ALOGE("Falure sending auth token to KeyStore: %d", ret);
}
} else {
ALOGE("Unable to communicate with KeyStore");
@@ -136,14 +138,15 @@
ALOG(LOG_VERBOSE, LOG_TAG, "nativeEnroll() : invalid token size %d\n", tokenSize);
return -1;
}
- int ret = gContext.device->enroll(gContext.device, (hw_auth_token_t*) tokenData, groupId, timeout);
+ int ret = gContext.device->enroll(gContext.device,
+ reinterpret_cast<const hw_auth_token_t*>(tokenData), groupId, timeout);
env->ReleaseByteArrayElements(token, tokenData, 0);
return reinterpret_cast<jint>(ret);
}
-static jint nativePreEnroll(JNIEnv* env, jobject clazz) {
+static jlong nativePreEnroll(JNIEnv* env, jobject clazz) {
uint64_t ret = gContext.device->pre_enroll(gContext.device);
- ALOG(LOG_VERBOSE, LOG_TAG, "nativePreEnroll(), result = %" PRId64 "\n", ret);
+ // ALOG(LOG_VERBOSE, LOG_TAG, "nativePreEnroll(), result = %llx", ret);
return reinterpret_cast<jlong>((int64_t)ret);
}
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
index 7e59943..452b3eb 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -32,6 +32,7 @@
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
+import android.app.StatusBarManager;
import android.app.admin.DeviceAdminInfo;
import android.app.admin.DeviceAdminReceiver;
import android.app.admin.DevicePolicyManager;
@@ -102,6 +103,7 @@
import com.android.internal.R;
import com.android.internal.os.storage.ExternalStorageFormatter;
+import com.android.internal.statusbar.IStatusBarService;
import com.android.internal.util.FastXmlSerializer;
import com.android.internal.util.JournaledFile;
import com.android.internal.util.Preconditions;
@@ -152,7 +154,11 @@
private static final String DEVICE_POLICIES_XML = "device_policies.xml";
- private static final String LOCK_TASK_COMPONENTS_XML = "lock-task-component";
+ private static final String TAG_LOCK_TASK_COMPONENTS = "lock-task-component";
+
+ private static final String TAG_STATUS_BAR = "statusbar";
+
+ private static final String ATTR_ENABLED = "enabled";
private static final int REQUEST_EXPIRE_PASSWORD = 5571;
@@ -172,6 +178,12 @@
private static final String ATTR_DELEGATED_CERT_INSTALLER = "delegated-cert-installer";
+ private static final int STATUS_BAR_DISABLE_MASK =
+ StatusBarManager.DISABLE_EXPAND |
+ StatusBarManager.DISABLE_NOTIFICATION_ICONS |
+ StatusBarManager.DISABLE_NOTIFICATION_ALERTS |
+ StatusBarManager.DISABLE_SEARCH;
+
private static final Set<String> DEVICE_OWNER_USER_RESTRICTIONS;
static {
DEVICE_OWNER_USER_RESTRICTIONS = new HashSet();
@@ -237,6 +249,8 @@
// Stores and loads state on device and profile owners.
private DeviceOwner mDeviceOwner;
+ private final Binder mToken = new Binder();
+
/**
* Whether or not device admin feature is supported. If it isn't return defaults for all
* public methods.
@@ -287,6 +301,8 @@
// This is the list of component allowed to start lock task mode.
final List<String> mLockTaskPackages = new ArrayList<>();
+ boolean mStatusBarEnabledState = true;
+
ComponentName mRestrictionsProvider;
String mDelegatedCertInstallerPackage;
@@ -1429,9 +1445,15 @@
for (int i=0; i<policy.mLockTaskPackages.size(); i++) {
String component = policy.mLockTaskPackages.get(i);
- out.startTag(null, LOCK_TASK_COMPONENTS_XML);
+ out.startTag(null, TAG_LOCK_TASK_COMPONENTS);
out.attribute(null, "name", component);
- out.endTag(null, LOCK_TASK_COMPONENTS_XML);
+ out.endTag(null, TAG_LOCK_TASK_COMPONENTS);
+ }
+
+ if (!policy.mStatusBarEnabledState) {
+ out.startTag(null, TAG_STATUS_BAR);
+ out.attribute(null, ATTR_ENABLED, Boolean.toString(policy.mStatusBarEnabledState));
+ out.endTag(null, TAG_STATUS_BAR);
}
out.endTag(null, "policies");
@@ -1552,9 +1574,13 @@
policy.mActivePasswordNonLetter = Integer.parseInt(
parser.getAttributeValue(null, "nonletter"));
XmlUtils.skipCurrentTag(parser);
- } else if (LOCK_TASK_COMPONENTS_XML.equals(tag)) {
+ } else if (TAG_LOCK_TASK_COMPONENTS.equals(tag)) {
policy.mLockTaskPackages.add(parser.getAttributeValue(null, "name"));
XmlUtils.skipCurrentTag(parser);
+ } else if (TAG_STATUS_BAR.equals(tag)) {
+ policy.mStatusBarEnabledState = Boolean.parseBoolean(
+ parser.getAttributeValue(null, ATTR_ENABLED));
+ XmlUtils.skipCurrentTag(parser);
} else {
Slog.w(LOG_TAG, "Unknown tag: " + tag);
XmlUtils.skipCurrentTag(parser);
@@ -1679,7 +1705,7 @@
if (!mHasFeature) {
return;
}
- getUserData(UserHandle.USER_OWNER);
+ DevicePolicyData policy = getUserData(UserHandle.USER_OWNER);
loadDeviceOwner();
cleanUpOldUsers();
// Register an observer for watching for user setup complete.
@@ -1696,6 +1722,10 @@
getScreenCaptureDisabled(null, userHandle));
}
+ if (mDeviceOwner != null && mDeviceOwner.hasDeviceOwner()
+ && !policy.mStatusBarEnabledState) {
+ setStatusBarEnabledStateInternal(STATUS_BAR_DISABLE_MASK, UserHandle.USER_OWNER);
+ }
}
private void cleanUpOldUsers() {
@@ -5830,6 +5860,38 @@
return true;
}
+ @Override
+ public void setStatusBarEnabledState(ComponentName who, boolean enabled) {
+ int userId = UserHandle.getCallingUserId();
+ synchronized (this) {
+ getActiveAdminForCallerLocked(who, DeviceAdminInfo.USES_POLICY_DEVICE_OWNER);
+ DevicePolicyData policy = getUserData(userId);
+ if (policy.mStatusBarEnabledState != enabled) {
+ policy.mStatusBarEnabledState = enabled;
+ setStatusBarEnabledStateInternal(
+ enabled ? StatusBarManager.DISABLE_NONE : STATUS_BAR_DISABLE_MASK,
+ userId);
+ saveSettingsLocked(userId);
+ }
+ }
+ }
+
+ private void setStatusBarEnabledStateInternal(int flags, int userId) {
+ long ident = Binder.clearCallingIdentity();
+ try {
+ IStatusBarService statusBarService = IStatusBarService.Stub.asInterface(
+ ServiceManager.checkService(Context.STATUS_BAR_SERVICE));
+ if (statusBarService != null) {
+ statusBarService.disableForUser(flags, mToken,
+ mDeviceOwner.getDeviceOwnerPackageName(), userId);
+ }
+ } catch (RemoteException e) {
+ Slog.e(LOG_TAG, "Failed to disable the status bar", e);
+ } finally {
+ Binder.restoreCallingIdentity(ident);
+ }
+ }
+
/**
* We need to update the internal state of whether a user has completed setup once. After
* that, we ignore any changes that reset the Settings.Secure.USER_SETUP_COMPLETE changes
diff --git a/telecomm/java/android/telecom/AudioState.java b/telecomm/java/android/telecom/AudioState.java
index 9c03319..465c5f4 100644
--- a/telecomm/java/android/telecom/AudioState.java
+++ b/telecomm/java/android/telecom/AudioState.java
@@ -16,7 +16,6 @@
package android.telecom;
-import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -25,9 +24,7 @@
/**
* Encapsulates the telecom audio state, including the current audio routing, supported audio
* routing and mute.
- * @hide
*/
-@SystemApi
public final class AudioState implements Parcelable {
/** Direct the audio stream through the device's earpiece. */
public static final int ROUTE_EARPIECE = 0x00000001;
@@ -47,21 +44,13 @@
*/
public static final int ROUTE_WIRED_OR_EARPIECE = ROUTE_EARPIECE | ROUTE_WIRED_HEADSET;
- /** Bit mask of all possible audio routes.
- *
- * @hide
- */
- public static final int ROUTE_ALL = ROUTE_EARPIECE | ROUTE_BLUETOOTH | ROUTE_WIRED_HEADSET |
+ /** Bit mask of all possible audio routes. */
+ private static final int ROUTE_ALL = ROUTE_EARPIECE | ROUTE_BLUETOOTH | ROUTE_WIRED_HEADSET |
ROUTE_SPEAKER;
- /** Note: Deprecated, please do not use if possible. */
- @SystemApi public final boolean isMuted;
-
- /** Note: Deprecated, please do not use if possible. */
- @SystemApi public final int route;
-
- /** Note: Deprecated, please do not use if possible. */
- @SystemApi public final int supportedRouteMask;
+ private final boolean isMuted;
+ private final int route;
+ private final int supportedRouteMask;
public AudioState(boolean muted, int route, int supportedRouteMask) {
this.isMuted = muted;
@@ -97,7 +86,6 @@
audioRouteToString(supportedRouteMask));
}
- /** @hide */
public static String audioRouteToString(int route) {
if (route == 0 || (route & ~ROUTE_ALL) != 0x0) {
return "UNKNOWN";
diff --git a/telecomm/java/android/telecom/AuthenticatorService.java b/telecomm/java/android/telecom/AuthenticatorService.java
index 7aa105d..1e43c71 100644
--- a/telecomm/java/android/telecom/AuthenticatorService.java
+++ b/telecomm/java/android/telecom/AuthenticatorService.java
@@ -19,7 +19,6 @@
import android.accounts.Account;
import android.accounts.AccountAuthenticatorResponse;
import android.accounts.NetworkErrorException;
-import android.annotation.SystemApi;
import android.app.Service;
import android.content.Context;
import android.content.Intent;
@@ -32,7 +31,6 @@
*
* @hide
*/
-@SystemApi
public class AuthenticatorService extends Service {
private static Authenticator mAuthenticator;
diff --git a/telecomm/java/android/telecom/Call.java b/telecomm/java/android/telecom/Call.java
index ba0aaf3..719dd76 100644
--- a/telecomm/java/android/telecom/Call.java
+++ b/telecomm/java/android/telecom/Call.java
@@ -16,7 +16,6 @@
package android.telecom;
-import android.annotation.SystemApi;
import android.net.Uri;
import android.os.Bundle;
@@ -30,10 +29,7 @@
/**
* Represents an ongoing phone call that the in-call app should present to the user.
- *
- * {@hide}
*/
-@SystemApi
public final class Call {
/**
* The state of a {@code Call} when newly created.
@@ -91,8 +87,6 @@
* The key to retrieve the optional {@code PhoneAccount}s Telecom can bundle with its Call
* extras. Used to pass the phone accounts to display on the front end to the user in order to
* select phone accounts to (for example) place a call.
- *
- * @hide
*/
public static final String AVAILABLE_PHONE_ACCOUNTS = "selectPhoneAccountAccounts";
@@ -142,38 +136,32 @@
/**
* Local device supports receiving video.
- * @hide
*/
public static final int CAPABILITY_SUPPORTS_VT_LOCAL_RX = 0x00000100;
/**
* Local device supports transmitting video.
- * @hide
*/
public static final int CAPABILITY_SUPPORTS_VT_LOCAL_TX = 0x00000200;
/**
* Local device supports bidirectional video calling.
- * @hide
*/
public static final int CAPABILITY_SUPPORTS_VT_LOCAL_BIDIRECTIONAL =
CAPABILITY_SUPPORTS_VT_LOCAL_RX | CAPABILITY_SUPPORTS_VT_LOCAL_TX;
/**
* Remote device supports receiving video.
- * @hide
*/
public static final int CAPABILITY_SUPPORTS_VT_REMOTE_RX = 0x00000400;
/**
* Remote device supports transmitting video.
- * @hide
*/
public static final int CAPABILITY_SUPPORTS_VT_REMOTE_TX = 0x00000800;
/**
* Remote device supports bidirectional video calling.
- * @hide
*/
public static final int CAPABILITY_SUPPORTS_VT_REMOTE_BIDIRECTIONAL =
CAPABILITY_SUPPORTS_VT_REMOTE_RX | CAPABILITY_SUPPORTS_VT_REMOTE_TX;
@@ -191,27 +179,21 @@
/**
* Whether the call is a generic conference, where we do not know the precise state of
* participants in the conference (eg. on CDMA).
- *
- * @hide
*/
public static final int CAPABILITY_GENERIC_CONFERENCE = 0x00004000;
/**
* Call is using high definition audio.
- * @hide
*/
public static final int CAPABILITY_HIGH_DEF_AUDIO = 0x00008000;
/**
* Call is using WIFI.
- * @hide
*/
public static final int CAPABILITY_WIFI = 0x00010000;
/**
* Indicates that the current device callback number should be shown.
- *
- * @hide
*/
public static final int CAPABILITY_SHOW_CALLBACK_NUMBER = 0x00020000;
@@ -252,7 +234,6 @@
* @param capabilities A bit field of capabilities.
* @param capability The capability to check capabilities for.
* @return Whether the specified capability is supported.
- * @hide
*/
public static boolean can(int capabilities, int capability) {
return (capabilities & capability) != 0;
@@ -263,7 +244,6 @@
*
* @param capability The capability to check capabilities for.
* @return Whether the specified capability is supported.
- * @hide
*/
public boolean can(int capability) {
return can(mCallCapabilities, capability);
@@ -407,7 +387,7 @@
* periodically, but user interfaces should not rely on this to display any "call time
* clock".
*/
- public long getConnectTimeMillis() {
+ public final long getConnectTimeMillis() {
return mConnectTimeMillis;
}
@@ -583,7 +563,6 @@
*
* @param call The {@code Call} invoking this method.
* @param videoCall The {@code Call.VideoCall} associated with the {@code Call}.
- * @hide
*/
public void onVideoCallChanged(Call call, InCallService.VideoCall videoCall) {}
@@ -836,7 +815,6 @@
* Obtains an object that can be used to display video from this {@code Call}.
*
* @return An {@code Call.VideoCall}.
- * @hide
*/
public InCallService.VideoCall getVideoCall() {
return mVideoCall;
diff --git a/telecomm/java/android/telecom/CallProperties.java b/telecomm/java/android/telecom/CallProperties.java
index b1b82e2..1721a39 100644
--- a/telecomm/java/android/telecom/CallProperties.java
+++ b/telecomm/java/android/telecom/CallProperties.java
@@ -18,7 +18,6 @@
/**
* Defines properties of a phone call which may be affected by changes to the call.
- * @hide
*/
public class CallProperties {
/** Call is currently in a conference call. */
diff --git a/telecomm/java/android/telecom/CallState.java b/telecomm/java/android/telecom/CallState.java
index bd9223a..5584226 100644
--- a/telecomm/java/android/telecom/CallState.java
+++ b/telecomm/java/android/telecom/CallState.java
@@ -16,17 +16,12 @@
package android.telecom;
-import android.annotation.SystemApi;
-
/**
* Defines call-state constants of the different states in which a call can exist. Although states
* have the notion of normal transitions, due to the volatile nature of telephony systems, code
* that uses these states should be resilient to unexpected state changes outside of what is
* considered traditional.
- *
- * {@hide}
*/
-@SystemApi
public final class CallState {
private CallState() {}
diff --git a/telecomm/java/android/telecom/CameraCapabilities.java b/telecomm/java/android/telecom/CameraCapabilities.java
index 6eaf6a2..62429569 100644
--- a/telecomm/java/android/telecom/CameraCapabilities.java
+++ b/telecomm/java/android/telecom/CameraCapabilities.java
@@ -21,7 +21,6 @@
/**
* Represents the camera capabilities important to a Video Telephony provider.
- * @hide
*/
public final class CameraCapabilities implements Parcelable {
@@ -46,7 +45,7 @@
private final float mMaxZoom;
/**
- * Create a call camera capabilities instance that doesn't support zoom.
+ * Create a call camera capabilities instance.
*
* @param width The width of the camera video (in pixels).
* @param height The height of the camera video (in pixels).
@@ -56,7 +55,8 @@
}
/**
- * Create a call camera capabilities instance.
+ * Create a call camera capabilities instance that optionally
+ * supports zoom.
*
* @param width The width of the camera video (in pixels).
* @param height The height of the camera video (in pixels).
diff --git a/telecomm/java/android/telecom/Conference.java b/telecomm/java/android/telecom/Conference.java
index ddaedcd..15a1da1 100644
--- a/telecomm/java/android/telecom/Conference.java
+++ b/telecomm/java/android/telecom/Conference.java
@@ -16,7 +16,6 @@
package android.telecom;
-import android.annotation.SystemApi;
import android.telecom.Connection.VideoProvider;
import java.util.ArrayList;
@@ -29,16 +28,14 @@
/**
* Represents a conference call which can contain any number of {@link Connection} objects.
- * @hide
*/
-@SystemApi
public abstract class Conference implements IConferenceable {
/**
* Used to indicate that the conference connection time is not specified. If not specified,
* Telecom will set the connect time.
*/
- public static long CONNECT_TIME_NOT_SPECIFIED = 0;
+ public static final long CONNECT_TIME_NOT_SPECIFIED = 0;
/** @hide */
public abstract static class Listener {
@@ -63,7 +60,7 @@
private final List<Connection> mUnmodifiableConferenceableConnections =
Collections.unmodifiableList(mConferenceableConnections);
- protected PhoneAccountHandle mPhoneAccount;
+ private PhoneAccountHandle mPhoneAccount;
private AudioState mAudioState;
private int mState = Connection.STATE_NEW;
private DisconnectCause mDisconnectCause;
@@ -116,11 +113,6 @@
return mState;
}
- /** @hide */
- @Deprecated public final int getCapabilities() {
- return getConnectionCapabilities();
- }
-
/**
* Returns the capabilities of a conference. See {@code CAPABILITY_*} constants in class
* {@link Connection} for valid values.
@@ -301,11 +293,6 @@
return mDisconnectCause;
}
- /** @hide */
- @Deprecated public final void setCapabilities(int connectionCapabilities) {
- setConnectionCapabilities(connectionCapabilities);
- }
-
/**
* Sets the capabilities of a conference. See {@code CAPABILITY_*} constants of class
* {@link Connection} for valid values.
@@ -497,7 +484,7 @@
*
* @return The time the {@code Conference} has been connected.
*/
- public long getConnectTimeMillis() {
+ public final long getConnectTimeMillis() {
return mConnectTimeMillis;
}
diff --git a/telecomm/java/android/telecom/Connection.java b/telecomm/java/android/telecom/Connection.java
index 6858cee..3a54b1c 100644
--- a/telecomm/java/android/telecom/Connection.java
+++ b/telecomm/java/android/telecom/Connection.java
@@ -19,7 +19,6 @@
import com.android.internal.telecom.IVideoCallback;
import com.android.internal.telecom.IVideoProvider;
-import android.annotation.SystemApi;
import android.net.Uri;
import android.os.Handler;
import android.os.IBinder;
@@ -44,9 +43,7 @@
* Implementations are then responsible for updating the state of the {@code Connection}, and
* must call {@link #destroy()} to signal to the framework that the {@code Connection} is no
* longer used and associated resources may be recovered.
- * @hide
*/
-@SystemApi
public abstract class Connection implements IConferenceable {
public static final int STATE_INITIALIZING = 0;
@@ -376,7 +373,6 @@
public void onCallSubstateChanged(Connection c, int substate) {}
}
- /** @hide */
public static abstract class VideoProvider {
/**
@@ -994,11 +990,6 @@
return mConnectionCapabilities;
}
- /** @hide */
- @SystemApi @Deprecated public final int getCallCapabilities() {
- return getConnectionCapabilities();
- }
-
/**
* Sets the value of the {@link #getAddress()} property.
*
@@ -1134,7 +1125,6 @@
}
}
- /** @hide */
public final VideoProvider getVideoProvider() {
return mVideoProvider;
}
@@ -1202,11 +1192,6 @@
}
}
- /** @hide */
- @SystemApi @Deprecated public final void setCallCapabilities(int connectionCapabilities) {
- setConnectionCapabilities(connectionCapabilities);
- }
-
/**
* Sets the connection's capabilities as a bit mask of the {@code CAPABILITY_*} constants.
*
@@ -1596,6 +1581,7 @@
/**
* Notifies listeners that a conference call has been started.
+ * @hide
*/
protected void notifyConferenceStarted() {
for (Listener l : mListeners) {
diff --git a/telecomm/java/android/telecom/ConnectionRequest.java b/telecomm/java/android/telecom/ConnectionRequest.java
index f691c17..71b481b 100644
--- a/telecomm/java/android/telecom/ConnectionRequest.java
+++ b/telecomm/java/android/telecom/ConnectionRequest.java
@@ -16,7 +16,6 @@
package android.telecom;
-import android.annotation.SystemApi;
import android.net.Uri;
import android.os.Bundle;
import android.os.Parcel;
@@ -25,9 +24,7 @@
/**
* Simple data container encapsulating a request to some entity to
* create a new {@link Connection}.
- * @hide
*/
-@SystemApi
public final class ConnectionRequest implements Parcelable {
// TODO: Token to limit recursive invocations
diff --git a/telecomm/java/android/telecom/ConnectionService.java b/telecomm/java/android/telecom/ConnectionService.java
index 0c719cd..e36d32b 100644
--- a/telecomm/java/android/telecom/ConnectionService.java
+++ b/telecomm/java/android/telecom/ConnectionService.java
@@ -17,7 +17,6 @@
package android.telecom;
import android.annotation.SdkConstant;
-import android.annotation.SystemApi;
import android.app.Service;
import android.content.ComponentName;
import android.content.Intent;
@@ -72,9 +71,7 @@
* receives call-commands such as answer, reject, hold and disconnect.
* <p>
* When there are no more live calls, telecom will unbind from the {@code ConnectionService}.
- * @hide
*/
-@SystemApi
public abstract class ConnectionService extends Service {
/**
* The {@link Intent} that must be declared as handled by the service.
diff --git a/telecomm/java/android/telecom/DisconnectCause.java b/telecomm/java/android/telecom/DisconnectCause.java
index 130d676..73bcd0c 100644
--- a/telecomm/java/android/telecom/DisconnectCause.java
+++ b/telecomm/java/android/telecom/DisconnectCause.java
@@ -16,7 +16,6 @@
package android.telecom;
-import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
import android.media.ToneGenerator;
@@ -30,9 +29,7 @@
* user. It is the responsibility of the {@link ConnectionService} to provide localized versions of
* the label and description. It also may contain a reason for the disconnect, which is intended for
* logging and not for display to the user.
- * @hide
*/
-@SystemApi
public final class DisconnectCause implements Parcelable {
/** Disconnected because of an unknown or unspecified reason. */
diff --git a/telecomm/java/android/telecom/GatewayInfo.java b/telecomm/java/android/telecom/GatewayInfo.java
index 5b8e4ab..928570e 100644
--- a/telecomm/java/android/telecom/GatewayInfo.java
+++ b/telecomm/java/android/telecom/GatewayInfo.java
@@ -16,7 +16,6 @@
package android.telecom;
-import android.annotation.SystemApi;
import android.net.Uri;
import android.os.Parcel;
import android.os.Parcelable;
@@ -34,17 +33,13 @@
* <li> Call the appropriate gateway address.
* <li> Display information about how the call is being routed to the user.
* </ol>
- * @hide
*/
-@SystemApi
public class GatewayInfo implements Parcelable {
private final String mGatewayProviderPackageName;
private final Uri mGatewayAddress;
private final Uri mOriginalAddress;
- /** @hide */
- @SystemApi
public GatewayInfo(String packageName, Uri gatewayUri, Uri originalAddress) {
mGatewayProviderPackageName = packageName;
mGatewayAddress = gatewayUri;
diff --git a/telecomm/java/android/telecom/IConferenceable.java b/telecomm/java/android/telecom/IConferenceable.java
index 095d7cb..a9be20b 100644
--- a/telecomm/java/android/telecom/IConferenceable.java
+++ b/telecomm/java/android/telecom/IConferenceable.java
@@ -16,16 +16,11 @@
package android.telecom;
-import android.annotation.SystemApi;
-
/**
* Interface used to identify entities with which another entity can participate in a conference
* call with. The {@link ConnectionService} implementation will only recognize
* {@link IConferenceable}s which are {@link Connection}s or {@link Conference}s.
- *
- * @hide
*/
-@SystemApi
public interface IConferenceable {
}
diff --git a/telecomm/java/android/telecom/InCallService.java b/telecomm/java/android/telecom/InCallService.java
index c0c59fa..66072da 100644
--- a/telecomm/java/android/telecom/InCallService.java
+++ b/telecomm/java/android/telecom/InCallService.java
@@ -16,7 +16,6 @@
package android.telecom;
-import android.annotation.SystemApi;
import android.annotation.SdkConstant;
import android.app.Service;
import android.content.Intent;
@@ -36,10 +35,7 @@
* This service is implemented by any app that wishes to provide the user-interface for managing
* phone calls. Telecom binds to this service while there exists a live (active or incoming) call,
* and uses it to notify the in-call app of any live and and recently disconnected calls.
- *
- * {@hide}
*/
-@SystemApi
public abstract class InCallService extends Service {
/**
@@ -177,7 +173,7 @@
* if the {@code InCallService} is not in a state where it has an associated
* {@code Phone}.
*/
- public Phone getPhone() {
+ public final Phone getPhone() {
return mPhone;
}
@@ -205,7 +201,6 @@
/**
* Class to invoke functionality related to video calls.
- * @hide
*/
public static abstract class VideoCall {
@@ -302,7 +297,6 @@
/**
* Listener class which invokes callbacks after video call actions occur.
- * @hide
*/
public static abstract class Listener {
/**
diff --git a/telecomm/java/android/telecom/Phone.java b/telecomm/java/android/telecom/Phone.java
index cc73109..d9a9cdf 100644
--- a/telecomm/java/android/telecom/Phone.java
+++ b/telecomm/java/android/telecom/Phone.java
@@ -16,7 +16,6 @@
package android.telecom;
-import android.annotation.SystemApi;
import android.util.ArrayMap;
import java.util.Collections;
@@ -27,10 +26,7 @@
/**
* A unified virtual device providing a means of voice (and other) communication on a device.
- *
- * {@hide}
*/
-@SystemApi
public final class Phone {
public abstract static class Listener {
diff --git a/telecomm/java/android/telecom/PhoneAccount.java b/telecomm/java/android/telecom/PhoneAccount.java
index 07f9053..bab460d 100644
--- a/telecomm/java/android/telecom/PhoneAccount.java
+++ b/telecomm/java/android/telecom/PhoneAccount.java
@@ -60,9 +60,7 @@
* if the user has explicitly selected it to be used as the default connection manager.
* <p>
* See {@link #getCapabilities}
- * @hide
*/
- @SystemApi
public static final int CAPABILITY_CONNECTION_MANAGER = 0x1;
/**
@@ -74,9 +72,7 @@
* <p>
* See {@link #getCapabilities}
* <p>
- * {@hide}
*/
- @SystemApi
public static final int CAPABILITY_CALL_PROVIDER = 0x2;
/**
@@ -203,13 +199,6 @@
mSupportedUriSchemes.addAll(phoneAccount.getSupportedUriSchemes());
}
- /** @hide */
- @SystemApi
- public Builder setAccountHandle(PhoneAccountHandle accountHandle) {
- mAccountHandle = accountHandle;
- return this;
- }
-
/**
* Sets the address. See {@link PhoneAccount#getAddress}.
*
@@ -333,9 +322,7 @@
*
* @param uriScheme The URI scheme.
* @return The builder.
- * @hide
*/
- @SystemApi
public Builder addSupportedUriScheme(String uriScheme) {
if (!TextUtils.isEmpty(uriScheme) && !mSupportedUriSchemes.contains(uriScheme)) {
this.mSupportedUriSchemes.add(uriScheme);
@@ -424,9 +411,7 @@
* Returns a builder initialized with the current {@link PhoneAccount} instance.
*
* @return The builder.
- * @hide
*/
- @SystemApi
public Builder toBuilder() { return new Builder(this); }
/**
diff --git a/telecomm/java/android/telecom/PhoneAccountHandle.java b/telecomm/java/android/telecom/PhoneAccountHandle.java
index 4600b72..60917b2 100644
--- a/telecomm/java/android/telecom/PhoneAccountHandle.java
+++ b/telecomm/java/android/telecom/PhoneAccountHandle.java
@@ -16,7 +16,6 @@
package android.telecom;
-import android.annotation.SystemApi;
import android.content.ComponentName;
import android.os.Parcel;
import android.os.Parcelable;
@@ -47,8 +46,6 @@
this(componentName, id, Process.myUserHandle());
}
- /** @hide */
- @SystemApi
public PhoneAccountHandle(
ComponentName componentName,
String id,
@@ -91,9 +88,7 @@
/**
* @return the {@link UserHandle} to use when connecting to this PhoneAccount.
- * @hide
*/
- @SystemApi
public UserHandle getUserHandle() {
return mUserHandle;
}
diff --git a/telecomm/java/android/telecom/RemoteConference.java b/telecomm/java/android/telecom/RemoteConference.java
index a8879ae..fba3ee3 100644
--- a/telecomm/java/android/telecom/RemoteConference.java
+++ b/telecomm/java/android/telecom/RemoteConference.java
@@ -18,7 +18,6 @@
import com.android.internal.telecom.IConnectionService;
-import android.annotation.SystemApi;
import android.os.RemoteException;
import java.util.ArrayList;
@@ -30,9 +29,7 @@
/**
* Represents a conference call which can contain any number of {@link Connection} objects.
- * @hide
*/
-@SystemApi
public final class RemoteConference {
public abstract static class Callback {
@@ -164,11 +161,6 @@
return mState;
}
- /** @hide */
- @Deprecated public final int getCallCapabilities() {
- return getConnectionCapabilities();
- }
-
public final int getConnectionCapabilities() {
return mConnectionCapabilities;
}
diff --git a/telecomm/java/android/telecom/RemoteConnection.java b/telecomm/java/android/telecom/RemoteConnection.java
index be7a0a0..009ec5b 100644
--- a/telecomm/java/android/telecom/RemoteConnection.java
+++ b/telecomm/java/android/telecom/RemoteConnection.java
@@ -20,7 +20,6 @@
import com.android.internal.telecom.IVideoCallback;
import com.android.internal.telecom.IVideoProvider;
-import android.annotation.SystemApi;
import android.net.Uri;
import android.os.IBinder;
import android.os.RemoteException;
@@ -38,9 +37,7 @@
*
* @see ConnectionService#createRemoteOutgoingConnection(PhoneAccountHandle, ConnectionRequest)
* @see ConnectionService#createRemoteIncomingConnection(PhoneAccountHandle, ConnectionRequest)
- * @hide
*/
-@SystemApi
public final class RemoteConnection {
public static abstract class Callback {
@@ -73,11 +70,6 @@
*/
public void onRingbackRequested(RemoteConnection connection, boolean ringback) {}
- /** @hide */
- @Deprecated public void onCallCapabilitiesChanged(
- RemoteConnection connection,
- int callCapabilities) {}
-
/**
* Indicates that the call capabilities of this {@code RemoteConnection} have changed.
* See {@link #getConnectionCapabilities()}.
@@ -870,7 +862,6 @@
mConnectionCapabilities = connectionCapabilities;
for (Callback c : mCallbacks) {
c.onConnectionCapabilitiesChanged(this, connectionCapabilities);
- c.onCallCapabilitiesChanged(this, connectionCapabilities);
}
}
diff --git a/telecomm/java/android/telecom/StatusHints.java b/telecomm/java/android/telecom/StatusHints.java
index dd3a639..a32eae7 100644
--- a/telecomm/java/android/telecom/StatusHints.java
+++ b/telecomm/java/android/telecom/StatusHints.java
@@ -16,7 +16,6 @@
package android.telecom;
-import android.annotation.SystemApi;
import android.content.ComponentName;
import android.content.Context;
import android.content.pm.PackageManager;
@@ -30,9 +29,7 @@
/**
* Contains status label and icon displayed in the in-call UI.
- * @hide
*/
-@SystemApi
public final class StatusHints implements Parcelable {
private final ComponentName mPackageName;
diff --git a/telecomm/java/android/telecom/TelecomManager.java b/telecomm/java/android/telecom/TelecomManager.java
index ab7864b..c10834a 100644
--- a/telecomm/java/android/telecom/TelecomManager.java
+++ b/telecomm/java/android/telecom/TelecomManager.java
@@ -55,8 +55,6 @@
* Input: get*Extra field {@link #EXTRA_PHONE_ACCOUNT_HANDLE} contains the component name of the
* {@link android.telecom.ConnectionService} that Telecom should bind to. Telecom will then
* ask the connection service for more information about the call prior to showing any UI.
- *
- * @hide
*/
public static final String ACTION_INCOMING_CALL = "android.telecom.action.INCOMING_CALL";
@@ -97,9 +95,7 @@
/**
* The {@link android.content.Intent} action used to show the settings page used to configure
* {@link PhoneAccount} preferences.
- * @hide
*/
- @SystemApi
public static final String ACTION_CHANGE_PHONE_ACCOUNTS =
"android.telecom.action.CHANGE_PHONE_ACCOUNTS";
@@ -145,10 +141,7 @@
* Optional extra for {@link #ACTION_INCOMING_CALL} containing a {@link Bundle} which contains
* metadata about the call. This {@link Bundle} will be returned to the
* {@link ConnectionService}.
- *
- * @hide
*/
- @SystemApi
public static final String EXTRA_INCOMING_CALL_EXTRAS =
"android.telecom.extra.INCOMING_CALL_EXTRAS";
@@ -221,9 +214,7 @@
* {@link ConnectionService}s which interact with {@link RemoteConnection}s should only populate
* this if the {@link android.telephony.TelephonyManager#getLine1Number()} value, as that is the
* user's expected caller ID.
- * @hide
*/
- @SystemApi
public static final String EXTRA_CALL_BACK_NUMBER = "android.telecom.extra.CALL_BACK_NUMBER";
/**
@@ -387,7 +378,6 @@
* exists no user-chosen default {@code PhoneAccount}.
*
* @return The user outgoing phone account selected by the user.
- * @hide
*/
public PhoneAccountHandle getUserSelectedOutgoingPhoneAccount() {
try {
@@ -419,7 +409,6 @@
* {@code null}, indicating that there currently exists no user-chosen default
* {@code PhoneAccount}.
* @return The phone account handle of the current sim call manager.
- * @hide
*/
public PhoneAccountHandle getSimCallManager() {
try {
@@ -532,19 +521,6 @@
}
/**
- * Determine whether the device has more than one account registered that can make and receive
- * phone calls.
- *
- * @return {@code true} if the device has more than one account registered and {@code false}
- * otherwise.
- * @hide
- */
- @SystemApi
- public boolean hasMultipleCallCapableAccounts() {
- return getCallCapablePhoneAccounts().size() > 1;
- }
-
- /**
* Returns a list of all {@link PhoneAccount}s registered for the calling package.
*
* @return A list of {@code PhoneAccountHandle} objects.
@@ -647,10 +623,7 @@
* {@link PhoneAccountHandle#getComponentName()} does not match the package name of the app.
*
* @param account The complete {@link PhoneAccount}.
- *
- * @hide
*/
- @SystemApi
public void registerPhoneAccount(PhoneAccount account) {
try {
if (isServiceConnected()) {
@@ -665,9 +638,7 @@
* Remove a {@link PhoneAccount} registration from the system.
*
* @param accountHandle A {@link PhoneAccountHandle} for the {@link PhoneAccount} to unregister.
- * @hide
*/
- @SystemApi
public void unregisterPhoneAccount(PhoneAccountHandle accountHandle) {
try {
if (isServiceConnected()) {
@@ -683,6 +654,15 @@
* @hide
*/
@SystemApi
+ public void clearPhoneAccounts() {
+ clearAccounts();
+ }
+ /**
+ * Remove all Accounts that belong to the calling package from the system.
+ * @deprecated Use {@link #clearPhoneAccounts()} instead.
+ * @hide
+ */
+ @SystemApi
public void clearAccounts() {
try {
if (isServiceConnected()) {
@@ -728,10 +708,7 @@
*
* @param accountHandle The handle for the account to check the voicemail number against
* @param number The number to look up.
- *
- * @hide
*/
- @SystemApi
public boolean isVoiceMailNumber(PhoneAccountHandle accountHandle, String number) {
try {
if (isServiceConnected()) {
@@ -748,10 +725,7 @@
*
* @param accountHandle The handle for the account to check for a voicemail number.
* @return {@code true} If the given phone account has a voicemail number.
- *
- * @hide
*/
- @SystemApi
public boolean hasVoiceMailNumber(PhoneAccountHandle accountHandle) {
try {
if (isServiceConnected()) {
@@ -768,10 +742,7 @@
*
* @param accountHandle The handle for the account retrieve a number for.
* @return A string representation of the line 1 phone number.
- *
- * @hide
*/
- @SystemApi
public String getLine1Number(PhoneAccountHandle accountHandle) {
try {
if (isServiceConnected()) {
@@ -881,10 +852,7 @@
/**
* Silences the ringer if a ringing call exists.
- *
- * @hide
*/
- @SystemApi
public void silenceRinger() {
try {
if (isServiceConnected()) {
@@ -945,9 +913,7 @@
* {@link #registerPhoneAccount}.
* @param extras A bundle that will be passed through to
* {@link ConnectionService#onCreateIncomingConnection}.
- * @hide
*/
- @SystemApi
public void addNewIncomingCall(PhoneAccountHandle phoneAccount, Bundle extras) {
try {
if (isServiceConnected()) {
@@ -1017,10 +983,8 @@
* @param accountHandle The handle for the account the MMI code should apply to.
* @param dialString The digits to dial.
* @return True if the digits were processed as an MMI code, false otherwise.
- * @hide
*/
- @SystemApi
- public boolean handleMmi(PhoneAccountHandle accountHandle, String dialString) {
+ public boolean handleMmi(String dialString, PhoneAccountHandle accountHandle) {
ITelecomService service = getTelecomService();
if (service != null) {
try {
@@ -1037,9 +1001,7 @@
* {@code null} to return a URI which will use the default account.
* @return The URI (with the content:// scheme) specific to the specified {@link PhoneAccount}
* for the the content retrieve.
- * @hide
*/
- @SystemApi
public Uri getAdnUriForPhoneAccount(PhoneAccountHandle accountHandle) {
ITelecomService service = getTelecomService();
if (service != null && accountHandle != null) {
diff --git a/telecomm/java/android/telecom/Voicemail.java b/telecomm/java/android/telecom/Voicemail.java
index 186c199..f5b8052 100644
--- a/telecomm/java/android/telecom/Voicemail.java
+++ b/telecomm/java/android/telecom/Voicemail.java
@@ -16,7 +16,6 @@
package android.telecom;
-import android.annotation.SystemApi;
import android.net.Uri;
import android.os.Parcel;
import android.os.Parcelable;
@@ -26,7 +25,6 @@
*
* @hide
*/
-@SystemApi
public class Voicemail implements Parcelable {
private final Long mTimestamp;
private final String mNumber;
@@ -277,4 +275,4 @@
mIsRead = in.readInt() > 0 ? true : false;
mHasContent = in.readInt() > 0 ? true : false;
}
-}
\ No newline at end of file
+}
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index c5573ba..4486c95 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -160,7 +160,6 @@
* Returns 1 for Single standby mode (Single SIM functionality)
* Returns 2 for Dual standby mode.(Dual SIM functionality)
*/
- /** {@hide} */
public int getPhoneCount() {
int phoneCount = 1;
switch (getMultiSimConfiguration()) {
@@ -682,7 +681,6 @@
*
* @param slotId of which deviceID is returned
*/
- /** {@hide} */
public String getDeviceId(int slotId) {
// FIXME this assumes phoneId == slotId
try {