{"size": 751, "ext": "js", "max_stars_repo_path": "apps/system/js/camera_trigger.js", "max_stars_repo_name": "TheoChevalier/gaia", "max_stars_repo_stars_event_min_datetime": "2016-08-17T08:52:51.000Z", "max_stars_repo_stars_event_max_datetime": "2020-03-29T04:56:45.000Z", "max_issues_repo_path": "apps/system/js/camera_trigger.js", "max_issues_repo_name": "TheoChevalier/gaia", "max_issues_repo_issues_event_min_datetime": "2017-02-21T21:36:12.000Z", "max_issues_repo_issues_event_max_datetime": "2017-02-21T21:36:30.000Z", "max_forks_repo_path": "apps/system/js/camera_trigger.js", "max_forks_repo_name": "TheoChevalier/gaia", "max_forks_repo_forks_event_min_datetime": "2021-11-18T21:21:19.000Z", "max_forks_repo_forks_event_max_datetime": "2021-11-18T21:21:19.000Z"}
{"max_stars_count": 3, "max_issues_count": 1, "max_forks_count": 1, "avg_line_length": 20.8611111111, "max_line_length": 76, "alphanum_fraction": 0.5872170439}
/* globals BaseModule, MozActivity, Service */

'use strict';

(function(exports) {
  var CameraTrigger = function() {};

  CameraTrigger.EVENTS = [
    'holdcamera'
  ];

  BaseModule.create(CameraTrigger, {
    name: 'CameraTrigger',
    DEBUG: false,
    TRACE: false,

    _handle_holdcamera: function(event) {
      // Avoid triggering the Camera app multiple times if the lockscreen is
      // locked, and prevent bailing during FTU
      if (Service.query('locked') || Service.query('isFtuRunning')) {
        return;
      }

      this.debug('Received holdcamera');
      /* jshint unused:false */
      var activity = new MozActivity({
        name: 'record',
        data: {
          type: 'photos'
        }
      });
    }

  });
}());
