diff options
author | Santos Cordon <santoscordon@google.com> | 2015-04-16 15:34:07 -0700 |
---|---|---|
committer | Santos Cordon <santoscordon@google.com> | 2015-04-16 17:27:45 -0700 |
commit | cffc3605ce338471b5dcd76dcf3a1c5c6f1a12ad (patch) | |
tree | e8345931322201eebcddc5c33df7f6bc047f912a /telecomm | |
parent | 8eb87f0da838c5ca371a54ff2fc5924bf8664ba9 (diff) | |
download | frameworks_base-cffc3605ce338471b5dcd76dcf3a1c5c6f1a12ad.zip frameworks_base-cffc3605ce338471b5dcd76dcf3a1c5c6f1a12ad.tar.gz frameworks_base-cffc3605ce338471b5dcd76dcf3a1c5c6f1a12ad.tar.bz2 |
DO NOT MERGE 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.java | 8 | ||||
-rw-r--r-- | telecomm/java/android/telecom/Phone.java | 16 |
2 files changed, 13 insertions, 11 deletions
diff --git a/telecomm/java/android/telecom/InCallService.java b/telecomm/java/android/telecom/InCallService.java index 846768f..020a33f 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 42256da..3d9acda 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,7 +119,6 @@ public final class Phone { fireCallAdded(call); } - /** {@hide} */ final void internalRemoveCall(Call call) { mCallByTelecomCallId.remove(call.internalGetCallId()); mCalls.remove(call); @@ -127,7 +130,6 @@ public final class Phone { fireCallRemoved(call); } - /** {@hide} */ final void internalUpdateCall(ParcelableCall parcelableCall) { Call call = mCallByTelecomCallId.get(parcelableCall.getId()); if (call != null) { @@ -136,7 +138,6 @@ public final class Phone { } } - /** {@hide} */ final void internalSetPostDialWait(String telecomId, String remaining) { Call call = mCallByTelecomCallId.get(telecomId); if (call != null) { @@ -144,7 +145,6 @@ public final class Phone { } } - /** {@hide} */ final void internalAudioStateChanged(AudioState audioState) { if (!Objects.equals(mAudioState, audioState)) { mAudioState = audioState; @@ -152,17 +152,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; @@ -172,7 +169,6 @@ public final class Phone { /** * Called to destroy the phone and cleanup any lingering calls. - * @hide */ final void destroy() { for (Call call : mCalls) { |