Merge "Re-add removed APIs per API council feedback."

am: a94a71af13

Change-Id: Ibfe3060a13c131315c19552376d4d989205cd8b1
This commit is contained in:
Tyler Gunn
2018-10-23 14:27:17 -07:00
committed by android-build-merger
3 changed files with 12 additions and 9 deletions

View File

@@ -5299,7 +5299,10 @@ package android.telephony {
method public boolean handlePinMmi(java.lang.String); method public boolean handlePinMmi(java.lang.String);
method public boolean handlePinMmiForSubscriber(int, java.lang.String); method public boolean handlePinMmiForSubscriber(int, java.lang.String);
method public boolean isDataConnectivityPossible(); method public boolean isDataConnectivityPossible();
method public deprecated boolean isIdle();
method public deprecated boolean isOffhook();
method public deprecated boolean isRadioOn(); method public deprecated boolean isRadioOn();
method public deprecated boolean isRinging();
method public boolean isVideoCallingEnabled(); method public boolean isVideoCallingEnabled();
method public deprecated boolean isVisualVoicemailEnabled(android.telecom.PhoneAccountHandle); method public deprecated boolean isVisualVoicemailEnabled(android.telecom.PhoneAccountHandle);
method public boolean needsOtaServiceProvisioning(); method public boolean needsOtaServiceProvisioning();

View File

@@ -148,9 +148,6 @@ package android.telephony {
public class TelephonyManager { public class TelephonyManager {
method public deprecated void answerRingingCall(); method public deprecated void answerRingingCall();
method public deprecated boolean endCall(); method public deprecated boolean endCall();
method public deprecated boolean isIdle();
method public deprecated boolean isOffhook();
method public deprecated boolean isRinging();
method public deprecated void silenceRinger(); method public deprecated void silenceRinger();
} }

View File

@@ -6571,7 +6571,7 @@ public class TelephonyManager {
} }
/** /**
* @removed Use {@link android.telecom.TelecomManager#isInCall} instead * @deprecated Use {@link android.telecom.TelecomManager#isInCall} instead
* @hide * @hide
*/ */
@Deprecated @Deprecated
@@ -6581,11 +6581,12 @@ public class TelephonyManager {
android.Manifest.permission.READ_PHONE_STATE android.Manifest.permission.READ_PHONE_STATE
}) })
public boolean isOffhook() { public boolean isOffhook() {
return false; TelecomManager tm = (TelecomManager) mContext.getSystemService(TELECOM_SERVICE);
return tm.isInCall();
} }
/** /**
* @removed Use {@link android.telecom.TelecomManager#isRinging} instead * @deprecated Use {@link android.telecom.TelecomManager#isRinging} instead
* @hide * @hide
*/ */
@Deprecated @Deprecated
@@ -6595,11 +6596,12 @@ public class TelephonyManager {
android.Manifest.permission.READ_PHONE_STATE android.Manifest.permission.READ_PHONE_STATE
}) })
public boolean isRinging() { public boolean isRinging() {
return false; TelecomManager tm = (TelecomManager) mContext.getSystemService(TELECOM_SERVICE);
return tm.isRinging();
} }
/** /**
* @removed Use {@link android.telecom.TelecomManager#isInCall} instead * @deprecated Use {@link android.telecom.TelecomManager#isInCall} instead
* @hide * @hide
*/ */
@Deprecated @Deprecated
@@ -6609,7 +6611,8 @@ public class TelephonyManager {
android.Manifest.permission.READ_PHONE_STATE android.Manifest.permission.READ_PHONE_STATE
}) })
public boolean isIdle() { public boolean isIdle() {
return true; TelecomManager tm = (TelecomManager) mContext.getSystemService(TELECOM_SERVICE);
return !tm.isInCall();
} }
/** /**