Re-add removed APIs per API council feedback.

Some APIs were removed erroneously in the Q release; these methods were
just deprecated in Q,

Test: Make API, build
Bug: 116801893
Change-Id: I38ddf8bcd9fe39f4ba50bc892ac2f6d20209f7a9
This commit is contained in:
Tyler Gunn
2018-10-22 14:26:19 -07:00
parent 50242ce28a
commit 1c285f0ac2
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 handlePinMmiForSubscriber(int, java.lang.String);
method public boolean isDataConnectivityPossible();
method public deprecated boolean isIdle();
method public deprecated boolean isOffhook();
method public deprecated boolean isRadioOn();
method public deprecated boolean isRinging();
method public boolean isVideoCallingEnabled();
method public deprecated boolean isVisualVoicemailEnabled(android.telecom.PhoneAccountHandle);
method public boolean needsOtaServiceProvisioning();

View File

@@ -148,9 +148,6 @@ package android.telephony {
public class TelephonyManager {
method public deprecated void answerRingingCall();
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();
}

View File

@@ -6560,7 +6560,7 @@ public class TelephonyManager {
}
/**
* @removed Use {@link android.telecom.TelecomManager#isInCall} instead
* @deprecated Use {@link android.telecom.TelecomManager#isInCall} instead
* @hide
*/
@Deprecated
@@ -6570,11 +6570,12 @@ public class TelephonyManager {
android.Manifest.permission.READ_PHONE_STATE
})
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
*/
@Deprecated
@@ -6584,11 +6585,12 @@ public class TelephonyManager {
android.Manifest.permission.READ_PHONE_STATE
})
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
*/
@Deprecated
@@ -6598,7 +6600,8 @@ public class TelephonyManager {
android.Manifest.permission.READ_PHONE_STATE
})
public boolean isIdle() {
return true;
TelecomManager tm = (TelecomManager) mContext.getSystemService(TELECOM_SERVICE);
return !tm.isInCall();
}
/**