Adds speakerphone extra to ACTION_DIAL (1/2).
If optional extra EXTRA_SPEAKERPHONE_ON is added
to an ACTION_DIAL intent, the speakerphone will turn
on automatically once the call is connected.
Bug: 6810980
Change-Id: I37ac7737e3b85fa3c8e2d5a87a5a1de157f2da08
diff --git a/src/com/android/telecomm/Call.java b/src/com/android/telecomm/Call.java
index 104ff4e..bf0f349 100644
--- a/src/com/android/telecomm/Call.java
+++ b/src/com/android/telecomm/Call.java
@@ -141,6 +141,8 @@
private boolean mIsEmergencyCall;
+ private boolean mSpeakerphoneOn;
+
/**
* Disconnect cause for the call. Only valid if the state of the call is DISCONNECTED.
* See {@link android.telephony.DisconnectCause}.
@@ -1037,4 +1039,20 @@
Log.d(this, "maybeLoadCannedSmsResponses: doing nothing");
}
}
+
+ /**
+ * Sets speakerphone option on when call begins.
+ */
+ public void setStartWithSpeakerphoneOn(boolean startWithSpeakerphone) {
+ mSpeakerphoneOn = startWithSpeakerphone;
+ }
+
+ /**
+ * Returns speakerphone option.
+ *
+ * @return Whether or not speakerphone should be set automatically when call begins.
+ */
+ public boolean getStartWithSpeakerphoneOn() {
+ return mSpeakerphoneOn;
+ }
}