summaryrefslogtreecommitdiffstats
path: root/telecomm/java/android
diff options
context:
space:
mode:
authorSantos Cordon <santoscordon@google.com>2015-04-16 23:42:00 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-04-16 23:42:01 +0000
commit223a80d7c6c40d468319f15af2a73c8681b19f1c (patch)
tree787e271937e3e14b6f5477f16c18048218dfa344 /telecomm/java/android
parentf8e24ccf374ff4c0e41ffa0ff474f90b3c9cf1a2 (diff)
parent29886d8571b703c4b9559d51421e8051bb1641c1 (diff)
downloadframeworks_base-223a80d7c6c40d468319f15af2a73c8681b19f1c.zip
frameworks_base-223a80d7c6c40d468319f15af2a73c8681b19f1c.tar.gz
frameworks_base-223a80d7c6c40d468319f15af2a73c8681b19f1c.tar.bz2
Merge "Unfinal getPhone."
Diffstat (limited to 'telecomm/java/android')
-rw-r--r--telecomm/java/android/telecom/InCallService.java8
-rw-r--r--telecomm/java/android/telecom/Phone.java16
2 files changed, 13 insertions, 11 deletions
diff --git a/telecomm/java/android/telecom/InCallService.java b/telecomm/java/android/telecom/InCallService.java
index 4229db8..07ba6fb 100644
--- a/telecomm/java/android/telecom/InCallService.java
+++ b/telecomm/java/android/telecom/InCallService.java
@@ -216,9 +216,11 @@ public abstract class InCallService extends Service {
* if the {@code InCallService} is not in a state where it has an associated
* {@code Phone}.
* @hide
+ * @deprecated Use direct methods on InCallService instead of {@link Phone}.
*/
@SystemApi
- public final Phone getPhone() {
+ @Deprecated
+ public Phone getPhone() {
return mPhone;
}
@@ -282,8 +284,10 @@ public abstract class InCallService extends Service {
*
* @param phone The {@code Phone} object associated with this {@code InCallService}.
* @hide
+ * @deprecated Use direct methods on InCallService instead of {@link Phone}.
*/
@SystemApi
+ @Deprecated
public void onPhoneCreated(Phone phone) {
}
@@ -295,8 +299,10 @@ public abstract class InCallService extends Service {
*
* @param phone The {@code Phone} object associated with this {@code InCallService}.
* @hide
+ * @deprecated Use direct methods on InCallService instead of {@link Phone}.
*/
@SystemApi
+ @Deprecated
public void onPhoneDestroyed(Phone phone) {
}
diff --git a/telecomm/java/android/telecom/Phone.java b/telecomm/java/android/telecom/Phone.java
index d9a9cdf..c1c1129 100644
--- a/telecomm/java/android/telecom/Phone.java
+++ b/telecomm/java/android/telecom/Phone.java
@@ -16,6 +16,7 @@
package android.telecom;
+import android.annotation.SystemApi;
import android.util.ArrayMap;
import java.util.Collections;
@@ -26,7 +27,12 @@ import java.util.concurrent.CopyOnWriteArrayList;
/**
* A unified virtual device providing a means of voice (and other) communication on a device.
+ *
+ * @hide
+ * @deprecated Use {@link InCallService} directly instead of using this class.
*/
+@SystemApi
+@Deprecated
public final class Phone {
public abstract static class Listener {
@@ -100,12 +106,10 @@ public final class Phone {
private boolean mCanAddCall = true;
- /** {@hide} */
Phone(InCallAdapter adapter) {
mInCallAdapter = adapter;
}
- /** {@hide} */
final void internalAddCall(ParcelableCall parcelableCall) {
Call call = new Call(this, parcelableCall.getId(), mInCallAdapter);
mCallByTelecomCallId.put(parcelableCall.getId(), call);
@@ -115,14 +119,12 @@ public final class Phone {
fireCallAdded(call);
}
- /** {@hide} */
final void internalRemoveCall(Call call) {
mCallByTelecomCallId.remove(call.internalGetCallId());
mCalls.remove(call);
fireCallRemoved(call);
}
- /** {@hide} */
final void internalUpdateCall(ParcelableCall parcelableCall) {
Call call = mCallByTelecomCallId.get(parcelableCall.getId());
if (call != null) {
@@ -131,7 +133,6 @@ public final class Phone {
}
}
- /** {@hide} */
final void internalSetPostDialWait(String telecomId, String remaining) {
Call call = mCallByTelecomCallId.get(telecomId);
if (call != null) {
@@ -139,7 +140,6 @@ public final class Phone {
}
}
- /** {@hide} */
final void internalAudioStateChanged(AudioState audioState) {
if (!Objects.equals(mAudioState, audioState)) {
mAudioState = audioState;
@@ -147,17 +147,14 @@ public final class Phone {
}
}
- /** {@hide} */
final Call internalGetCallByTelecomId(String telecomId) {
return mCallByTelecomCallId.get(telecomId);
}
- /** {@hide} */
final void internalBringToForeground(boolean showDialpad) {
fireBringToForeground(showDialpad);
}
- /** {@hide} */
final void internalSetCanAddCall(boolean canAddCall) {
if (mCanAddCall != canAddCall) {
mCanAddCall = canAddCall;
@@ -167,7 +164,6 @@ public final class Phone {
/**
* Called to destroy the phone and cleanup any lingering calls.
- * @hide
*/
final void destroy() {
for (Call call : mCalls) {