Merge "Cleanup deprecated or removed telephony methods." am: c4833e862e
am: 95981b0488
Change-Id: I6f8deead4a501d6a01b08ded93815028dd590412
This commit is contained in:
@@ -5267,10 +5267,7 @@ 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();
|
||||
@@ -5284,7 +5281,6 @@ package android.telephony {
|
||||
method public void setSimPowerStateForSlot(int, int);
|
||||
method public deprecated void setVisualVoicemailEnabled(android.telecom.PhoneAccountHandle, boolean);
|
||||
method public void setVoiceActivationState(int);
|
||||
method public deprecated void silenceRinger();
|
||||
method public boolean supplyPin(java.lang.String);
|
||||
method public int[] supplyPinReportResult(java.lang.String);
|
||||
method public boolean supplyPuk(java.lang.String, java.lang.String);
|
||||
|
||||
@@ -148,6 +148,10 @@ 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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2147,27 +2147,20 @@ Lcom/android/internal/telephony/ISub;->getDefaultDataSubId()I
|
||||
Lcom/android/internal/telephony/ISub;->getDefaultSubId()I
|
||||
Lcom/android/internal/telephony/ISub;->setDefaultDataSubId(I)V
|
||||
Lcom/android/internal/telephony/ITelephony$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
|
||||
Lcom/android/internal/telephony/ITelephony$Stub$Proxy;->endCall()Z
|
||||
Lcom/android/internal/telephony/ITelephony$Stub$Proxy;->endCallForSubscriber(I)Z
|
||||
Lcom/android/internal/telephony/ITelephony$Stub$Proxy;->getDeviceId(Ljava/lang/String;)Ljava/lang/String;
|
||||
Lcom/android/internal/telephony/ITelephony$Stub$Proxy;->isRadioOn(Ljava/lang/String;)Z
|
||||
Lcom/android/internal/telephony/ITelephony$Stub$Proxy;->mRemote:Landroid/os/IBinder;
|
||||
Lcom/android/internal/telephony/ITelephony$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/telephony/ITelephony;
|
||||
Lcom/android/internal/telephony/ITelephony$Stub;->DESCRIPTOR:Ljava/lang/String;
|
||||
Lcom/android/internal/telephony/ITelephony$Stub;->TRANSACTION_answerRingingCall:I
|
||||
Lcom/android/internal/telephony/ITelephony$Stub;->TRANSACTION_call:I
|
||||
Lcom/android/internal/telephony/ITelephony$Stub;->TRANSACTION_dial:I
|
||||
Lcom/android/internal/telephony/ITelephony$Stub;->TRANSACTION_endCall:I
|
||||
Lcom/android/internal/telephony/ITelephony$Stub;->TRANSACTION_getDeviceId:I
|
||||
Lcom/android/internal/telephony/ITelephony;->answerRingingCall()V
|
||||
Lcom/android/internal/telephony/ITelephony;->call(Ljava/lang/String;Ljava/lang/String;)V
|
||||
Lcom/android/internal/telephony/ITelephony;->dial(Ljava/lang/String;)V
|
||||
Lcom/android/internal/telephony/ITelephony;->disableDataConnectivity()Z
|
||||
Lcom/android/internal/telephony/ITelephony;->disableLocationUpdates()V
|
||||
Lcom/android/internal/telephony/ITelephony;->enableDataConnectivity()Z
|
||||
Lcom/android/internal/telephony/ITelephony;->enableLocationUpdates()V
|
||||
Lcom/android/internal/telephony/ITelephony;->endCall()Z
|
||||
Lcom/android/internal/telephony/ITelephony;->endCallForSubscriber(I)Z
|
||||
Lcom/android/internal/telephony/ITelephony;->getActivePhoneType()I
|
||||
Lcom/android/internal/telephony/ITelephony;->getCallState()I
|
||||
Lcom/android/internal/telephony/ITelephony;->getDataActivity()I
|
||||
@@ -2179,12 +2172,8 @@ Lcom/android/internal/telephony/ITelephony;->handlePinMmiForSubscriber(ILjava/la
|
||||
Lcom/android/internal/telephony/ITelephony;->hasIccCard()Z
|
||||
Lcom/android/internal/telephony/ITelephony;->iccCloseLogicalChannel(II)Z
|
||||
Lcom/android/internal/telephony/ITelephony;->iccTransmitApduLogicalChannel(IIIIIIILjava/lang/String;)Ljava/lang/String;
|
||||
Lcom/android/internal/telephony/ITelephony;->isIdle(Ljava/lang/String;)Z
|
||||
Lcom/android/internal/telephony/ITelephony;->isIdleForSubscriber(ILjava/lang/String;)Z
|
||||
Lcom/android/internal/telephony/ITelephony;->isRadioOnForSubscriber(ILjava/lang/String;)Z
|
||||
Lcom/android/internal/telephony/ITelephony;->isRinging(Ljava/lang/String;)Z
|
||||
Lcom/android/internal/telephony/ITelephony;->setRadio(Z)Z
|
||||
Lcom/android/internal/telephony/ITelephony;->silenceRinger()V
|
||||
Lcom/android/internal/telephony/ITelephony;->supplyPin(Ljava/lang/String;)Z
|
||||
Lcom/android/internal/telephony/ITelephony;->toggleRadioOnOff()V
|
||||
Lcom/android/internal/telephony/ITelephony;->updateServiceLocation()V
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
|
||||
package android.telephony;
|
||||
|
||||
import static android.content.Context.TELECOM_SERVICE;
|
||||
|
||||
import static com.android.internal.util.Preconditions.checkNotNull;
|
||||
|
||||
import android.annotation.IntDef;
|
||||
@@ -4403,7 +4405,7 @@ public class TelephonyManager {
|
||||
* @hide
|
||||
*/
|
||||
private ITelecomService getTelecomService() {
|
||||
return ITelecomService.Stub.asInterface(ServiceManager.getService(Context.TELECOM_SERVICE));
|
||||
return ITelecomService.Stub.asInterface(ServiceManager.getService(TELECOM_SERVICE));
|
||||
}
|
||||
|
||||
private ITelephonyRegistry getTelephonyRegistry() {
|
||||
@@ -6313,7 +6315,7 @@ public class TelephonyManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link android.telecom.TelecomManager#endCall()} instead.
|
||||
* @removed Use {@link android.telecom.TelecomManager#endCall()} instead.
|
||||
* @hide
|
||||
* @removed
|
||||
*/
|
||||
@@ -6325,7 +6327,7 @@ public class TelephonyManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link android.telecom.TelecomManager#acceptRingingCall} instead
|
||||
* @removed Use {@link android.telecom.TelecomManager#acceptRingingCall} instead
|
||||
* @hide
|
||||
* @removed
|
||||
*/
|
||||
@@ -6333,26 +6335,22 @@ public class TelephonyManager {
|
||||
@SystemApi
|
||||
@RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
|
||||
public void answerRingingCall() {
|
||||
|
||||
// No-op
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link android.telecom.TelecomManager#silenceRinger} instead
|
||||
* @removed Use {@link android.telecom.TelecomManager#silenceRinger} instead
|
||||
* @hide
|
||||
*/
|
||||
@Deprecated
|
||||
@SystemApi
|
||||
@SuppressLint("Doclava125")
|
||||
public void silenceRinger() {
|
||||
try {
|
||||
getTelecomService().silenceRinger(getOpPackageName());
|
||||
} catch (RemoteException e) {
|
||||
Log.e(TAG, "Error calling ITelecomService#silenceRinger", e);
|
||||
}
|
||||
// No-op
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link android.telecom.TelecomManager#isInCall} instead
|
||||
* @removed Use {@link android.telecom.TelecomManager#isInCall} instead
|
||||
* @hide
|
||||
*/
|
||||
@Deprecated
|
||||
@@ -6362,18 +6360,11 @@ public class TelephonyManager {
|
||||
android.Manifest.permission.READ_PHONE_STATE
|
||||
})
|
||||
public boolean isOffhook() {
|
||||
try {
|
||||
ITelephony telephony = getITelephony();
|
||||
if (telephony != null)
|
||||
return telephony.isOffhook(getOpPackageName());
|
||||
} catch (RemoteException e) {
|
||||
Log.e(TAG, "Error calling ITelephony#isOffhook", e);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link android.telecom.TelecomManager#isRinging} instead
|
||||
* @removed Use {@link android.telecom.TelecomManager#isRinging} instead
|
||||
* @hide
|
||||
*/
|
||||
@Deprecated
|
||||
@@ -6383,18 +6374,11 @@ public class TelephonyManager {
|
||||
android.Manifest.permission.READ_PHONE_STATE
|
||||
})
|
||||
public boolean isRinging() {
|
||||
try {
|
||||
ITelephony telephony = getITelephony();
|
||||
if (telephony != null)
|
||||
return telephony.isRinging(getOpPackageName());
|
||||
} catch (RemoteException e) {
|
||||
Log.e(TAG, "Error calling ITelephony#isRinging", e);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link android.telecom.TelecomManager#isInCall} instead
|
||||
* @removed Use {@link android.telecom.TelecomManager#isInCall} instead
|
||||
* @hide
|
||||
*/
|
||||
@Deprecated
|
||||
@@ -6404,13 +6388,6 @@ public class TelephonyManager {
|
||||
android.Manifest.permission.READ_PHONE_STATE
|
||||
})
|
||||
public boolean isIdle() {
|
||||
try {
|
||||
ITelephony telephony = getITelephony();
|
||||
if (telephony != null)
|
||||
return telephony.isIdle(getOpPackageName());
|
||||
} catch (RemoteException e) {
|
||||
Log.e(TAG, "Error calling ITelephony#isIdle", e);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -74,116 +74,6 @@ interface ITelephony {
|
||||
*/
|
||||
void call(String callingPackage, String number);
|
||||
|
||||
/**
|
||||
* End call if there is a call in progress, otherwise does nothing.
|
||||
*
|
||||
* @return whether it hung up
|
||||
*/
|
||||
boolean endCall();
|
||||
|
||||
/**
|
||||
* End call on particular subId or go to the Home screen
|
||||
* @param subId user preferred subId.
|
||||
* @return whether it hung up
|
||||
*/
|
||||
boolean endCallForSubscriber(int subId);
|
||||
|
||||
/**
|
||||
* Answer the currently-ringing call.
|
||||
*
|
||||
* If there's already a current active call, that call will be
|
||||
* automatically put on hold. If both lines are currently in use, the
|
||||
* current active call will be ended.
|
||||
*
|
||||
* TODO: provide a flag to let the caller specify what policy to use
|
||||
* if both lines are in use. (The current behavior is hardwired to
|
||||
* "answer incoming, end ongoing", which is how the CALL button
|
||||
* is specced to behave.)
|
||||
*
|
||||
* TODO: this should be a oneway call (especially since it's called
|
||||
* directly from the key queue thread).
|
||||
*/
|
||||
void answerRingingCall();
|
||||
|
||||
/**
|
||||
* Answer the currently-ringing call on particular subId .
|
||||
*
|
||||
* If there's already a current active call, that call will be
|
||||
* automatically put on hold. If both lines are currently in use, the
|
||||
* current active call will be ended.
|
||||
*
|
||||
* TODO: provide a flag to let the caller specify what policy to use
|
||||
* if both lines are in use. (The current behavior is hardwired to
|
||||
* "answer incoming, end ongoing", which is how the CALL button
|
||||
* is specced to behave.)
|
||||
*
|
||||
* TODO: this should be a oneway call (especially since it's called
|
||||
* directly from the key queue thread).
|
||||
*/
|
||||
void answerRingingCallForSubscriber(int subId);
|
||||
|
||||
/**
|
||||
* Silence the ringer if an incoming call is currently ringing.
|
||||
* (If vibrating, stop the vibrator also.)
|
||||
*
|
||||
* It's safe to call this if the ringer has already been silenced, or
|
||||
* even if there's no incoming call. (If so, this method will do nothing.)
|
||||
*
|
||||
* TODO: this should be a oneway call too (see above).
|
||||
* (Actually *all* the methods here that return void can
|
||||
* probably be oneway.)
|
||||
*/
|
||||
void silenceRinger();
|
||||
|
||||
/**
|
||||
* Check if we are in either an active or holding call
|
||||
* @param callingPackage the name of the package making the call.
|
||||
* @return true if the phone state is OFFHOOK.
|
||||
*/
|
||||
boolean isOffhook(String callingPackage);
|
||||
|
||||
/**
|
||||
* Check if a particular subId has an active or holding call
|
||||
*
|
||||
* @param subId user preferred subId.
|
||||
* @param callingPackage the name of the package making the call.
|
||||
* @return true if the phone state is OFFHOOK.
|
||||
*/
|
||||
boolean isOffhookForSubscriber(int subId, String callingPackage);
|
||||
|
||||
/**
|
||||
* Check if an incoming phone call is ringing or call waiting
|
||||
* on a particular subId.
|
||||
*
|
||||
* @param subId user preferred subId.
|
||||
* @param callingPackage the name of the package making the call.
|
||||
* @return true if the phone state is RINGING.
|
||||
*/
|
||||
boolean isRingingForSubscriber(int subId, String callingPackage);
|
||||
|
||||
/**
|
||||
* Check if an incoming phone call is ringing or call waiting.
|
||||
* @param callingPackage the name of the package making the call.
|
||||
* @return true if the phone state is RINGING.
|
||||
*/
|
||||
boolean isRinging(String callingPackage);
|
||||
|
||||
/**
|
||||
* Check if the phone is idle.
|
||||
* @param callingPackage the name of the package making the call.
|
||||
* @return true if the phone state is IDLE.
|
||||
*/
|
||||
boolean isIdle(String callingPackage);
|
||||
|
||||
/**
|
||||
* Check if the phone is idle on a particular subId.
|
||||
*
|
||||
* @param subId user preferred subId.
|
||||
* @param callingPackage the name of the package making the call.
|
||||
* @return true if the phone state is IDLE.
|
||||
*/
|
||||
boolean isIdleForSubscriber(int subId, String callingPackage);
|
||||
|
||||
/**
|
||||
* Check to see if the radio is on or not.
|
||||
* @param callingPackage the name of the package making the call.
|
||||
|
||||
Reference in New Issue
Block a user