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