• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubypythonwindowsphpgamebathyscaphegui翻訳comegattwitterframeworkbtronvb.net計画中(planning stage)testdomarduinodirectxpreviewerゲームエンジン

packages/services/Analytics


Commit MetaInfo

Revisiond0b38893139c5aacd9bfa7b63351f62c1e524ffb (tree)
Zeit2016-08-15 14:13:43
AutorChih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Log Message

HardwareCollector: send sensors info

Send the sensors hal name if it's not the default kbd.

Ändern Zusammenfassung

Diff

--- a/HardwareCollector/src/org/android_x86/hardwarecollector/HardwareCollectorService.java
+++ b/HardwareCollector/src/org/android_x86/hardwarecollector/HardwareCollectorService.java
@@ -55,6 +55,7 @@ public class HardwareCollectorService extends IntentService {
5555 private static final String GA_ACTION_HAS_BATTERY = "has_battery";
5656 private static final String GA_ACTION_HAS_WIFI = "has_wifi";
5757 private static final String GA_ACTION_HAS_ETHERNET = "has_ethernet";
58+ private static final String GA_ACTION_HAS_SENSORS = "has_sensors";
5859 private static final String GA_LABEL_HAS_BATTERY = "battery";
5960 private static final String GA_LABEL_NO_BATTERY = "no_battery";
6061
@@ -95,6 +96,7 @@ public class HardwareCollectorService extends IntentService {
9596 collectTouchScreenInfo();
9697 collectBatteryInfo();
9798 collectNetworkInfo();
99+ collectSensorsInfo();
98100 }
99101
100102 private void collectOpenGLInfo() {
@@ -189,6 +191,13 @@ public class HardwareCollectorService extends IntentService {
189191 }
190192 }
191193
194+ private void collectSensorsInfo() {
195+ String sensors = SystemProperties.get("ro.hardware.sensors", "");
196+ if (!sensors.isEmpty() && !"kbd".equals(sensors)) {
197+ checkAndSend(GA_ACTION_HAS_SENSORS, sensors);
198+ }
199+ }
200+
192201 private void getLastInfo() {
193202 try {
194203 if (mInfoFile.exists()) {