-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathdeviceReporter.js
More file actions
49 lines (37 loc) · 1.22 KB
/
deviceReporter.js
File metadata and controls
49 lines (37 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*!
GPII Android Device Reporter
Copyright 2014 Emergya
Licensed under the New BSD license. You may not use this file except in
compliance with this License.
You may obtain a copy of the License at
https://github.com/gpii/universal/LICENSE.txt
*/
// Currently we need to do this in order to work correctly with
(function () {
"use strict";
var fluid = require("universal");
var gpii = fluid.registerNamespace("gpii");
fluid.registerNamespace("gpii.androidDeviceReporter");
fluid.defaults("gpii.androidDeviceReporter.findService", {
gradeNames: "fluid.function",
argumentMap: {
name: 0
}
});
fluid.defaults("gpii.androidDeviceReporter.findApplication", {
gradeNames: "fluid.function",
argumentMap: {
name: 0
}
});
gpii.androidDeviceReporter.findService = function (name) {
return gpii.androidDeviceReporter.deviceInfoCache.Services.some(function (srv) {
return srv === name;
});
};
gpii.androidDeviceReporter.findApplication = function (name) {
return gpii.androidDeviceReporter.deviceInfoCache.Applications.some(function (app) {
return app === name;
});
};
})();