Move cancelMissedCallsNotification to PhoneManager.
Change-Id: I2ce26e77ef1f0acc11552bf28efc039391e09766
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
@@ -80,4 +80,9 @@ interface ITelecommService {
|
||||
* @see TelecommManager#acceptRingingCall
|
||||
*/
|
||||
void acceptRingingCall();
|
||||
|
||||
/**
|
||||
* @see PhoneManager#cancelMissedCallsNotification
|
||||
*/
|
||||
void cancelMissedCallsNotification();
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user