Android-x86
Fork
Faire un don

  • R/O
  • HTTP
  • SSH
  • HTTPS

packages-services-Analytics: Commit

packages/services/Analytics


Commit MetaInfo

Révisione59c4f3b57158de857b2b39e1f84f7d729014690 (tree)
l'heure2016-08-10 18:48:55
AuteurChih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Message de Log

Invoke HardwareCollector conditionally

Only collect hardware information if the users agree.

Change Summary

Modification

--- a/HardwareCollector/src/org/android_x86/hardwarecollector/BootCompletedReceiver.java
+++ b/HardwareCollector/src/org/android_x86/hardwarecollector/BootCompletedReceiver.java
@@ -18,13 +18,16 @@ package org.android_x86.hardwarecollector;
1818 import android.content.BroadcastReceiver;
1919 import android.content.Context;
2020 import android.content.Intent;
21+import android.os.SystemProperties;
2122
2223 public class BootCompletedReceiver extends BroadcastReceiver {
2324 @Override
2425 public void onReceive(Context context, Intent data) {
25- String action = data.getAction();
26- Intent startIntent = new Intent(context, HardwareCollectorService.class);
27- startIntent.setAction(action);
28- context.startService(startIntent);
26+ if (SystemProperties.getBoolean("persist.sys.hw_statistics", true)) {
27+ String action = data.getAction();
28+ Intent startIntent = new Intent(context, HardwareCollectorService.class);
29+ startIntent.setAction(action);
30+ context.startService(startIntent);
31+ }
2932 }
3033 }
Afficher sur ancien navigateur de dépôt.