Index: chrome/browser/resources/hotword/state_manager.js |
diff --git a/chrome/browser/resources/hotword/state_manager.js b/chrome/browser/resources/hotword/state_manager.js |
index 67d4f41923f35fc1513a8493551b64db3e371e81..72a40785abcb210aac5e588b01c35fcc3d2f4d08 100644 |
--- a/chrome/browser/resources/hotword/state_manager.js |
+++ b/chrome/browser/resources/hotword/state_manager.js |
@@ -157,6 +157,14 @@ cr.define('hotword', function() { |
}, |
/** |
+ * @return {boolean} True if training is enabled. |
+ */ |
+ isTrainingEnabled: function() { |
+ assert(this.hotwordStatus_, 'No hotword status (isAlwaysOnEnabled)'); |
Anand Mistry (off Chromium)
2014/10/30 03:53:12
isAlwaysOnEnabled?
kcarattini
2014/10/30 05:27:06
Done.
|
+ return this.hotwordStatus_.trainingEnabled; |
+ }, |
+ |
+ /** |
* Callback for hotwordPrivate.getStatus() function. |
* @param {chrome.hotwordPrivate.StatusDetails} status Current hotword |
* status. |
@@ -178,7 +186,7 @@ cr.define('hotword', function() { |
if (!this.hotwordStatus_) |
return; |
- if (this.hotwordStatus_.enabled) { |
+ if (this.hotwordStatus_.enabled || this.hotwordStatus_.trainingEnabled) { |
// Start the detector if there's a session, and shut it down if there |
// isn't. |
// NOTE(amistry): With always-on, we want a different behaviour with |