summaryrefslogtreecommitdiffstats
path: root/telecomm
diff options
context:
space:
mode:
authorNancy Chen <nancychen@google.com>2014-09-08 14:17:59 -0700
committerNancy Chen <nancychen@google.com>2014-09-08 17:57:47 -0700
commit9d568c01db1f90fbe9cbff1d9385e7e7b809e066 (patch)
tree82336183e256b0f04ae13296ab1dcdf7d3806772 /telecomm
parentbe5b6569407635eb8d23b1934f90a508da0e60be (diff)
downloadframeworks_base-9d568c01db1f90fbe9cbff1d9385e7e7b809e066.zip
frameworks_base-9d568c01db1f90fbe9cbff1d9385e7e7b809e066.tar.gz
frameworks_base-9d568c01db1f90fbe9cbff1d9385e7e7b809e066.tar.bz2
API changes in GatewayInfo, Response, and PropertyPresentation (1/4)
* GatewayInfo: handle -> address, becomes SystemApi * Response: hidden * PropertyPresentation: class goes away, constants move to TelecommManager Bug: 17329632 Change-Id: I6577ed95ed1535aaf66dfa1853eee85ec6c506d2
Diffstat (limited to 'telecomm')
-rw-r--r--telecomm/java/android/telecomm/Call.java4
-rw-r--r--telecomm/java/android/telecomm/Connection.java15
-rw-r--r--telecomm/java/android/telecomm/GatewayInfo.java34
-rw-r--r--telecomm/java/android/telecomm/ParcelableCall.java9
-rw-r--r--telecomm/java/android/telecomm/PropertyPresentation.java34
-rw-r--r--telecomm/java/android/telecomm/RemoteConnection.java12
-rw-r--r--telecomm/java/android/telecomm/Response.java5
-rw-r--r--telecomm/java/android/telecomm/TelecommManager.java17
8 files changed, 59 insertions, 71 deletions
diff --git a/telecomm/java/android/telecomm/Call.java b/telecomm/java/android/telecomm/Call.java
index c3aa2a0..129880f 100644
--- a/telecomm/java/android/telecomm/Call.java
+++ b/telecomm/java/android/telecomm/Call.java
@@ -108,7 +108,7 @@ public final class Call {
/**
* @return The presentation requirements for the handle. See
- * {@link PropertyPresentation} for valid values.
+ * {@link TelecommManager} for valid values.
*/
public int getHandlePresentation() {
return mHandlePresentation;
@@ -123,7 +123,7 @@ public final class Call {
/**
* @return The presentation requirements for the caller display name. See
- * {@link PropertyPresentation} for valid values.
+ * {@link TelecommManager} for valid values.
*/
public int getCallerDisplayNamePresentation() {
return mCallerDisplayNamePresentation;
diff --git a/telecomm/java/android/telecomm/Connection.java b/telecomm/java/android/telecomm/Connection.java
index 6df117e..4644902 100644
--- a/telecomm/java/android/telecomm/Connection.java
+++ b/telecomm/java/android/telecomm/Connection.java
@@ -492,7 +492,8 @@ public abstract class Connection {
}
/**
- * @return The {@link PropertyPresentation} which controls how the handle is shown.
+ * @return The presentation requirements for the handle.
+ * See {@link TelecommManager} for valid values.
*/
public final int getHandlePresentation() {
return mHandlePresentation;
@@ -506,8 +507,8 @@ public abstract class Connection {
}
/**
- * @return The {@link PropertyPresentation} which controls how the caller display name is
- * shown.
+ * @return The presentation requirements for the handle.
+ * See {@link TelecommManager} for valid values.
*/
public final int getCallerDisplayNamePresentation() {
return mCallerDisplayNamePresentation;
@@ -664,8 +665,8 @@ public abstract class Connection {
* Sets the value of the {@link #getHandle()} property.
*
* @param handle The new handle.
- * @param presentation The {@link PropertyPresentation} which controls how the handle is
- * shown.
+ * @param presentation The presentation requirements for the handle.
+ * See {@link TelecommManager} for valid values.
*/
public final void setHandle(Uri handle, int presentation) {
Log.d(this, "setHandle %s", handle);
@@ -680,8 +681,8 @@ public abstract class Connection {
* Sets the caller display name (CNAP).
*
* @param callerDisplayName The new display name.
- * @param presentation The {@link PropertyPresentation} which controls how the name is
- * shown.
+ * @param presentation The presentation requirements for the handle.
+ * See {@link TelecommManager} for valid values.
*/
public final void setCallerDisplayName(String callerDisplayName, int presentation) {
Log.d(this, "setCallerDisplayName %s", callerDisplayName);
diff --git a/telecomm/java/android/telecomm/GatewayInfo.java b/telecomm/java/android/telecomm/GatewayInfo.java
index b95e6b6..a720284 100644
--- a/telecomm/java/android/telecomm/GatewayInfo.java
+++ b/telecomm/java/android/telecomm/GatewayInfo.java
@@ -16,6 +16,7 @@
package android.telecomm;
+import android.annotation.SystemApi;
import android.net.Uri;
import android.os.Parcel;
import android.os.Parcelable;
@@ -33,14 +34,15 @@ import android.text.TextUtils;
public class GatewayInfo implements Parcelable {
private final String mGatewayProviderPackageName;
- private final Uri mGatewayHandle;
- private final Uri mOriginalHandle;
+ private final Uri mGatewayAddress;
+ private final Uri mOriginalAddress;
/** @hide */
- public GatewayInfo(String packageName, Uri gatewayUri, Uri originalHandle) {
+ @SystemApi
+ public GatewayInfo(String packageName, Uri gatewayUri, Uri originalAddress) {
mGatewayProviderPackageName = packageName;
- mGatewayHandle = gatewayUri;
- mOriginalHandle = originalHandle;
+ mGatewayAddress = gatewayUri;
+ mOriginalAddress = originalAddress;
}
/**
@@ -51,21 +53,21 @@ public class GatewayInfo implements Parcelable {
}
/**
- * Gateway provider handle to use when actually placing the call.
+ * Gateway provider address to use when actually placing the call.
*/
- public Uri getGatewayHandle() {
- return mGatewayHandle;
+ public Uri getGatewayAddress() {
+ return mGatewayAddress;
}
/**
- * The actual call handle that the user is trying to connect to via the gateway.
+ * The actual call address that the user is trying to connect to via the gateway.
*/
- public Uri getOriginalHandle() {
- return mOriginalHandle;
+ public Uri getOriginalAddress() {
+ return mOriginalAddress;
}
public boolean isEmpty() {
- return TextUtils.isEmpty(mGatewayProviderPackageName) || mGatewayHandle == null;
+ return TextUtils.isEmpty(mGatewayProviderPackageName) || mGatewayAddress == null;
}
/** Implement the Parcelable interface */
@@ -76,8 +78,8 @@ public class GatewayInfo implements Parcelable {
public GatewayInfo createFromParcel(Parcel source) {
String gatewayPackageName = source.readString();
Uri gatewayUri = Uri.CREATOR.createFromParcel(source);
- Uri originalHandle = Uri.CREATOR.createFromParcel(source);
- return new GatewayInfo(gatewayPackageName, gatewayUri, originalHandle);
+ Uri originalAddress = Uri.CREATOR.createFromParcel(source);
+ return new GatewayInfo(gatewayPackageName, gatewayUri, originalAddress);
}
@Override
@@ -100,7 +102,7 @@ public class GatewayInfo implements Parcelable {
@Override
public void writeToParcel(Parcel destination, int flags) {
destination.writeString(mGatewayProviderPackageName);
- mGatewayHandle.writeToParcel(destination, 0);
- mOriginalHandle.writeToParcel(destination, 0);
+ mGatewayAddress.writeToParcel(destination, 0);
+ mOriginalAddress.writeToParcel(destination, 0);
}
}
diff --git a/telecomm/java/android/telecomm/ParcelableCall.java b/telecomm/java/android/telecomm/ParcelableCall.java
index a2aa192..f7fc125 100644
--- a/telecomm/java/android/telecomm/ParcelableCall.java
+++ b/telecomm/java/android/telecomm/ParcelableCall.java
@@ -153,7 +153,9 @@ public final class ParcelableCall implements Parcelable {
return mHandle;
}
- /** The {@link PropertyPresentation} which controls how the handle is shown. */
+ /**
+ * The presentation requirements for the handle. See {@link TelecommManager} for valid values.
+ */
public int getHandlePresentation() {
return mHandlePresentation;
}
@@ -163,7 +165,10 @@ public final class ParcelableCall implements Parcelable {
return mCallerDisplayName;
}
- /** The {@link PropertyPresentation} which controls how the caller display name is shown. */
+ /**
+ * The presentation requirements for the caller display name.
+ * See {@link TelecommManager} for valid values.
+ */
public int getCallerDisplayNamePresentation() {
return mCallerDisplayNamePresentation;
}
diff --git a/telecomm/java/android/telecomm/PropertyPresentation.java b/telecomm/java/android/telecomm/PropertyPresentation.java
deleted file mode 100644
index fe97b3d..0000000
--- a/telecomm/java/android/telecomm/PropertyPresentation.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright 2014, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.telecomm;
-
-/**
- * Defines how properties such as phone numbers and names are displayed to the user.
- */
-public class PropertyPresentation {
- /** Property is displayed normally. */
- public static final int ALLOWED = 1;
-
- /** Property was blocked. */
- public static final int RESTRICTED = 2;
-
- /** Presentation was not specified or is unknown. */
- public static final int UNKNOWN = 3;
-
- /** Property should be displayed as a pay phone. */
- public static final int PAYPHONE = 4;
-}
diff --git a/telecomm/java/android/telecomm/RemoteConnection.java b/telecomm/java/android/telecomm/RemoteConnection.java
index 31afb4b..6c43008 100644
--- a/telecomm/java/android/telecomm/RemoteConnection.java
+++ b/telecomm/java/android/telecomm/RemoteConnection.java
@@ -135,8 +135,8 @@ public final class RemoteConnection {
*
* @param connection The {@code RemoteConnection} invoking this method.
* @param handle The new handle of the {@code RemoteConnection}.
- * @param presentation The {@link PropertyPresentation} which controls how the
- * handle is shown.
+ * @param presentation The presentation requirements for the handle.
+ * See {@link TelecommManager} for valid values.
*/
public void onHandleChanged(RemoteConnection connection, Uri handle, int presentation) {}
@@ -146,8 +146,8 @@ public final class RemoteConnection {
*
* @param connection The {@code RemoteConnection} invoking this method.
* @param callerDisplayName The new caller display name of the {@code RemoteConnection}.
- * @param presentation The {@link PropertyPresentation} which controls how the
- * caller display name is shown.
+ * @param presentation The presentation requirements for the handle.
+ * See {@link TelecommManager} for valid values.
*/
public void onCallerDisplayNameChanged(
RemoteConnection connection, String callerDisplayName, int presentation) {}
@@ -349,7 +349,7 @@ public final class RemoteConnection {
/**
* @return The presentation requirements for the handle. See
- * {@link PropertyPresentation} for valid values.
+ * {@link TelecommManager} for valid values.
*/
public int getHandlePresentation() {
return mHandlePresentation;
@@ -364,7 +364,7 @@ public final class RemoteConnection {
/**
* @return The presentation requirements for the caller display name. See
- * {@link PropertyPresentation} for valid values.
+ * {@link TelecommManager} for valid values.
*/
public int getCallerDisplayNamePresentation() {
return mCallerDisplayNamePresentation;
diff --git a/telecomm/java/android/telecomm/Response.java b/telecomm/java/android/telecomm/Response.java
index f879756..ad78ebd 100644
--- a/telecomm/java/android/telecomm/Response.java
+++ b/telecomm/java/android/telecomm/Response.java
@@ -17,10 +17,7 @@
package android.telecomm;
/**
- * <strong>OBSOLETE</strong> Used to inform a client of asynchronously returned results.
- * <p>
- * <strong>TODO:</strong> Remove onCreateConferenceConnection() async method
- * then delete this interface.
+ * @hide
*/
public interface Response<IN, OUT> {
diff --git a/telecomm/java/android/telecomm/TelecommManager.java b/telecomm/java/android/telecomm/TelecommManager.java
index 5e9e6d0..41ba787 100644
--- a/telecomm/java/android/telecomm/TelecommManager.java
+++ b/telecomm/java/android/telecomm/TelecommManager.java
@@ -238,6 +238,23 @@ public class TelecommManager {
public static final String EXTRA_TTY_PREFERRED_MODE =
"android.telecomm.intent.extra.TTY_PREFERRED";
+ /**
+ * The following 4 constants define how properties such as phone numbers and names are
+ * displayed to the user.
+ */
+
+ /** Property is displayed normally. */
+ public static final int PRESENTATION_ALLOWED = 1;
+
+ /** Property was blocked. */
+ public static final int PRESENTATION_RESTRICTED = 2;
+
+ /** Presentation was not specified or is unknown. */
+ public static final int PRESENTATION_UNKNOWN = 3;
+
+ /** Property should be displayed as a pay phone. */
+ public static final int PRESENTATION_PAYPHONE = 4;
+
private static final String TAG = "TelecommManager";
private static final String TELECOMM_SERVICE_NAME = "telecomm";