summaryrefslogtreecommitdiffstats
path: root/telecomm
diff options
context:
space:
mode:
authorSantos Cordon <santoscordon@google.com>2015-04-16 15:34:07 -0700
committerSantos Cordon <santoscordon@google.com>2015-04-16 16:12:20 -0700
commit29886d8571b703c4b9559d51421e8051bb1641c1 (patch)
treebb01e5d27e81a03befdb71bcd8c08e246f1be87c /telecomm
parenta2492810dfb0cd290b5466e33d5bdc5be4fb330e (diff)
downloadframeworks_base-29886d8571b703c4b9559d51421e8051bb1641c1.zip
frameworks_base-29886d8571b703c4b9559d51421e8051bb1641c1.tar.gz
frameworks_base-29886d8571b703c4b9559d51421e8051bb1641c1.tar.bz2
Unfinal getPhone.
The change to make it final was breaking existing apps. ...and other changes. Bug: 20283873 Change-Id: I8db4243850ad15f688dbca59ff5427b4799cbd1b
Diffstat (limited to 'telecomm')
-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 a17474a..8d6ae82 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) {