Move cancelMissedCallsNotification to PhoneManager.

Change-Id: I2ce26e77ef1f0acc11552bf28efc039391e09766
This commit is contained in:
Santos Cordon
2014-07-02 13:20:40 -07:00
parent 53e3b38b09
commit 3c4ff9effc
5 changed files with 20 additions and 15 deletions

View File

@@ -21781,6 +21781,7 @@ package android.os.storage {
package android.phone {
public final class PhoneManager {
method public void cancelMissedCallsNotification();
method public boolean handlePinMmi(java.lang.String);
}

View File

@@ -62,6 +62,20 @@ public final class PhoneManager {
return false;
}
/**
* Removes the missed-call notification if one is present.
* <p>
* Requires that the caller be set at the system dialer app.
* </p>
*/
public void cancelMissedCallsNotification() {
try {
mService.cancelMissedCallsNotification();
} catch (RemoteException e) {
Log.e(TAG, "Error calling ITelecommService#cancelMissedCallNotification", e);
}
}
private ITelephony getITelephony() {
return ITelephony.Stub.asInterface(ServiceManager.getService(Context.TELEPHONY_SERVICE));
}

View File

@@ -80,4 +80,9 @@ interface ITelecommService {
* @see TelecommManager#acceptRingingCall
*/
void acceptRingingCall();
/**
* @see PhoneManager#cancelMissedCallsNotification
*/
void cancelMissedCallsNotification();
}

View File

@@ -2945,16 +2945,6 @@ public class TelephonyManager {
return false;
}
/** @hide */
@SystemApi
public void cancelMissedCallsNotification() {
try {
getITelephony().cancelMissedCallsNotification();
} catch (RemoteException e) {
Log.e(TAG, "Error calling ITelephony#cancelMissedCallsNotification", e);
}
}
/** @hide */
@SystemApi
public boolean supplyPin(String pin) {

View File

@@ -151,11 +151,6 @@ interface ITelephony {
*/
boolean isSimPinEnabled();
/**
* Cancels the missed calls notification.
*/
void cancelMissedCallsNotification();
/**
* Supply a pin to unlock the SIM. Blocks until a result is determined.
* @param pin The pin to check.