Update Reject with Text Message path to only use default sms app.
In KLP we have added the concept of a default SMS app to the platform. Only
this application has write permission to the SMS database. To help ensure
a better user experience we will always direct "reject via SMS" to the one
app that the user has selected as their default SMS app.
Bug: 10870624 System should direct "SENDTO" intent with "sms" and "mms" schemes to the default SMS app
Bug: 10818880 Telephony needs to direct RESPOND_VIA_MESSAGE intent only to the default SMS app
Change-Id: Id56b92285fb701db4432231950714ad2845bae60
diff --git a/src/com/android/phone/CallCommandService.java b/src/com/android/phone/CallCommandService.java
index 212ce45..f26fff7 100644
--- a/src/com/android/phone/CallCommandService.java
+++ b/src/com/android/phone/CallCommandService.java
@@ -44,17 +44,14 @@
private final CallModeler mCallModeler;
private final DTMFTonePlayer mDtmfTonePlayer;
private final AudioRouter mAudioRouter;
- private final RejectWithTextMessageManager mRejectWithTextMessageManager;
public CallCommandService(Context context, CallManager callManager, CallModeler callModeler,
- DTMFTonePlayer dtmfTonePlayer, AudioRouter audioRouter,
- RejectWithTextMessageManager rejectWithTextMessageManager) {
+ DTMFTonePlayer dtmfTonePlayer, AudioRouter audioRouter) {
mContext = context;
mCallManager = callManager;
mCallModeler = callModeler;
mDtmfTonePlayer = dtmfTonePlayer;
mAudioRouter = audioRouter;
- mRejectWithTextMessageManager = rejectWithTextMessageManager;
}
/**
@@ -82,13 +79,13 @@
if (result != null) {
final String number = result.getConnection().getAddress();
- Log.v(TAG, "Hanging up");
- PhoneUtils.hangupRingingCall(result.getConnection().getCall());
-
if (rejectWithMessage) {
- mRejectWithTextMessageManager.rejectCallWithMessage(
+ RejectWithTextMessageManager.rejectCallWithMessage(
result.getConnection().getCall(), message);
}
+
+ Log.v(TAG, "Hanging up");
+ PhoneUtils.hangupRingingCall(result.getConnection().getCall());
}
} catch (Exception e) {
Log.e(TAG, "Error during rejectCall().", e);