* commit 'e6a8bf80089ddea5cca01389df7fd827c5db7af2': Add default dialer checks to Telecom/Telephony
This commit is contained in:
@@ -921,7 +921,7 @@ public class TelecomManager {
|
||||
public void silenceRinger() {
|
||||
try {
|
||||
if (isServiceConnected()) {
|
||||
getTelecomService().silenceRinger();
|
||||
getTelecomService().silenceRinger(mContext.getOpPackageName());
|
||||
}
|
||||
} catch (RemoteException e) {
|
||||
Log.e(TAG, "Error calling ITelecomService#silenceRinger", e);
|
||||
@@ -1029,7 +1029,7 @@ public class TelecomManager {
|
||||
ITelecomService service = getTelecomService();
|
||||
if (service != null) {
|
||||
try {
|
||||
return service.handlePinMmi(dialString);
|
||||
return service.handlePinMmi(dialString, mContext.getOpPackageName());
|
||||
} catch (RemoteException e) {
|
||||
Log.e(TAG, "Error calling ITelecomService#handlePinMmi", e);
|
||||
}
|
||||
@@ -1053,7 +1053,8 @@ public class TelecomManager {
|
||||
ITelecomService service = getTelecomService();
|
||||
if (service != null) {
|
||||
try {
|
||||
return service.handlePinMmiForPhoneAccount(accountHandle, dialString);
|
||||
return service.handlePinMmiForPhoneAccount(accountHandle, dialString,
|
||||
mContext.getOpPackageName());
|
||||
} catch (RemoteException e) {
|
||||
Log.e(TAG, "Error calling ITelecomService#handlePinMmi", e);
|
||||
}
|
||||
@@ -1071,7 +1072,7 @@ public class TelecomManager {
|
||||
ITelecomService service = getTelecomService();
|
||||
if (service != null && accountHandle != null) {
|
||||
try {
|
||||
return service.getAdnUriForPhoneAccount(accountHandle);
|
||||
return service.getAdnUriForPhoneAccount(accountHandle, mContext.getOpPackageName());
|
||||
} catch (RemoteException e) {
|
||||
Log.e(TAG, "Error calling ITelecomService#getAdnUriForPhoneAccount", e);
|
||||
}
|
||||
@@ -1089,7 +1090,7 @@ public class TelecomManager {
|
||||
ITelecomService service = getTelecomService();
|
||||
if (service != null) {
|
||||
try {
|
||||
service.cancelMissedCallsNotification();
|
||||
service.cancelMissedCallsNotification(mContext.getOpPackageName());
|
||||
} catch (RemoteException e) {
|
||||
Log.e(TAG, "Error calling ITelecomService#cancelMissedCallsNotification", e);
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ interface ITelecomService {
|
||||
/**
|
||||
* @see TelecomServiceImpl#silenceRinger
|
||||
*/
|
||||
void silenceRinger();
|
||||
void silenceRinger(String callingPackage);
|
||||
|
||||
/**
|
||||
* @see TelecomServiceImpl#isInCall
|
||||
@@ -184,22 +184,23 @@ interface ITelecomService {
|
||||
/**
|
||||
* @see TelecomServiceImpl#cancelMissedCallsNotification
|
||||
*/
|
||||
void cancelMissedCallsNotification();
|
||||
void cancelMissedCallsNotification(String callingPackage);
|
||||
|
||||
/**
|
||||
* @see TelecomServiceImpl#handleMmi
|
||||
*/
|
||||
boolean handlePinMmi(String dialString);
|
||||
boolean handlePinMmi(String dialString, String callingPackage);
|
||||
|
||||
/**
|
||||
* @see TelecomServiceImpl#handleMmi
|
||||
*/
|
||||
boolean handlePinMmiForPhoneAccount(in PhoneAccountHandle accountHandle, String dialString);
|
||||
boolean handlePinMmiForPhoneAccount(in PhoneAccountHandle accountHandle, String dialString,
|
||||
String callingPackage);
|
||||
|
||||
/**
|
||||
* @see TelecomServiceImpl#getAdnUriForPhoneAccount
|
||||
*/
|
||||
Uri getAdnUriForPhoneAccount(in PhoneAccountHandle accountHandle);
|
||||
Uri getAdnUriForPhoneAccount(in PhoneAccountHandle accountHandle, String callingPackage);
|
||||
|
||||
/**
|
||||
* @see TelecomServiceImpl#isTtySupported
|
||||
|
||||
@@ -3703,7 +3703,7 @@ public class TelephonyManager {
|
||||
@SystemApi
|
||||
public void silenceRinger() {
|
||||
try {
|
||||
getTelecomService().silenceRinger();
|
||||
getTelecomService().silenceRinger(mContext.getOpPackageName());
|
||||
} catch (RemoteException e) {
|
||||
Log.e(TAG, "Error calling ITelecomService#silenceRinger", e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user