summaryrefslogtreecommitdiff
path: root/src/components/HMI
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/HMI')
-rw-r--r--src/components/HMI/app/controller/SettingsController.js25
-rw-r--r--src/components/HMI/app/model/sdl/Model.js9
-rw-r--r--src/components/HMI/app/view/sdl/TTSPopUp.js2
-rw-r--r--src/components/HMI/ffw/BasicCommunicationRPC.js21
4 files changed, 54 insertions, 3 deletions
diff --git a/src/components/HMI/app/controller/SettingsController.js b/src/components/HMI/app/controller/SettingsController.js
index e8f7c84653..a9a5d1a004 100644
--- a/src/components/HMI/app/controller/SettingsController.js
+++ b/src/components/HMI/app/controller/SettingsController.js
@@ -64,9 +64,32 @@ SDL.SettingsController = Em.Object.create( {
},
phoneCall: function() {
+
+ FFW.BasicCommunication.OnPhoneCall(true);
+
+ SDL.SDLModel.phoneCallActive = true;
+
+ var appID = null;
+
if (SDL.SDLAppController.model) {
- SDL.SDLModel.onDeactivateApp('call', SDL.SDLAppController.model.appID);
+ appID = SDL.SDLAppController.model.appID;
+ }
+
+
+ if (appID) {
+ SDL.SDLModel.onDeactivateApp('call', appID);
SDL.States.goToStates('phone.dialpad');
+
+ setTimeout(function () {
+ FFW.BasicCommunication.OnPhoneCall(false);
+ SDL.SDLController.getApplicationModel(appID).turnOnSDL(appID);
+ SDL.SDLModel.phoneCallActive = false;
+ }, 5000); //Magic number - 5 seconds timeout for emulating conversation call
+ } else {
+ setTimeout(function () {
+ FFW.BasicCommunication.OnPhoneCall(false);
+ SDL.SDLModel.phoneCallActive = false;
+ }, 5000); //Magic number - 5 seconds timeout for emulating conversation call
}
},
diff --git a/src/components/HMI/app/model/sdl/Model.js b/src/components/HMI/app/model/sdl/Model.js
index 106e95c88d..a902e649ec 100644
--- a/src/components/HMI/app/model/sdl/Model.js
+++ b/src/components/HMI/app/model/sdl/Model.js
@@ -99,6 +99,11 @@ SDL.SDLModel = Em.Object.create({
stateLimited: null,
/**
+ * Active state of phone call on HMI for Deactivate app to handle event
+ */
+ phoneCallActive: false,
+
+ /**
* FLAG of any app in limited level exists
*/
limitedExist: false,
@@ -1470,7 +1475,9 @@ SDL.SDLModel = Em.Object.create({
SDL.TurnByTurnView.deactivate();
- FFW.BasicCommunication.OnAppDeactivated(reason, appID);
+ if (!SDL.SDLModel.phoneCallActive) {
+ FFW.BasicCommunication.OnAppDeactivated(reason, appID);
+ }
}
}
});
diff --git a/src/components/HMI/app/view/sdl/TTSPopUp.js b/src/components/HMI/app/view/sdl/TTSPopUp.js
index 3b12b5266c..4fc0c7669c 100644
--- a/src/components/HMI/app/view/sdl/TTSPopUp.js
+++ b/src/components/HMI/app/view/sdl/TTSPopUp.js
@@ -58,7 +58,7 @@ SDL.TTSPopUp = Em.ContainerView.create( {
appID: null,
- timerSeconds: 10,
+ timerSeconds: 5,
popUp: Ember.TextArea.extend( {
diff --git a/src/components/HMI/ffw/BasicCommunicationRPC.js b/src/components/HMI/ffw/BasicCommunicationRPC.js
index 9614c125c4..4c541bf727 100644
--- a/src/components/HMI/ffw/BasicCommunicationRPC.js
+++ b/src/components/HMI/ffw/BasicCommunicationRPC.js
@@ -966,6 +966,27 @@ FFW.BasicCommunication = FFW.RPCObserver
},
/**
+ * Sender: HMI->SDL. When: upon phone-call event started or ended
+ *
+ * @params {Boolean}
+ */
+ OnPhoneCall: function(isActive) {
+
+ Em.Logger.log("FFW.BasicCommunication.OnPhoneCall");
+
+ // send request
+
+ var JSONMessage = {
+ "jsonrpc": "2.0",
+ "method": "BasicCommunication.OnPhoneCall",
+ "params": {
+ "isActive": isActive
+ }
+ };
+ this.client.send(JSONMessage);
+ },
+
+ /**
* Initiated by HMI user. In response optional list of found devices -
* if not provided, not were found.
*/