Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

cmstats: Remove preferences and always enable stats

 * Not having an accurate count of how many people are using CM is
   painful. I am making an executive decision to remove the opt-out and
   always turn stats on. The data is anonymized and there is nothing
   evil that can be done with it. The only purpose here is to tell us if
   we are a successful project or not.

Change-Id: I915c5e824d4e15c05feb37a3d8ed911464b5d61b
commit 3c052c2d927d3a668793989cf9e7d091035128b8 1 parent 31a8a13
@cyanogen cyanogen authored
Showing with 28 additions and 802 deletions.
  1. +0 −8 AndroidManifest.xml
  2. +0 −21 res/values-af/strings.xml
  3. +0 −15 res/values-cs/strings.xml
  4. +0 −22 res/values-da/strings.xml
  5. +0 −21 res/values-de/strings.xml
  6. +0 −26 res/values-el/strings.xml
  7. +0 −14 res/values-es/strings.xml
  8. +0 −15 res/values-fi/strings.xml
  9. +0 −22 res/values-fr/strings.xml
  10. +0 −15 res/values-hu/strings.xml
  11. +0 −15 res/values-it/cm_strings.xml
  12. +0 −22 res/values-iw/strings.xml
  13. +0 −24 res/values-ja/strings.xml
  14. +0 −14 res/values-ko/strings.xml
  15. +0 −22 res/values-lt/strings.xml
  16. +0 −14 res/values-nl/strings.xml
  17. +0 −18 res/values-pl/strings.xml
  18. +1 −18 res/values-pt/strings.xml
  19. +0 −16 res/values-ro/strings.xml
  20. +0 −22 res/values-ru/strings.xml
  21. +0 −22 res/values-uk/strings.xml
  22. +0 −21 res/values-zh-rCN/strings.xml
  23. +0 −24 res/values/strings.xml
  24. +0 −35 res/xml/anonymous_stats.xml
  25. +0 −8 res/xml/device_info_settings.xml
  26. +0 −53 res/xml/preview_data.xml
  27. +0 −1  src/com/android/settings/Settings.java
  28. +0 −138 src/com/android/settings/cmstats/AnonymousStats.java
  29. +0 −76 src/com/android/settings/cmstats/PreviewData.java
  30. +20 −45 src/com/android/settings/cmstats/ReportingService.java
  31. +7 −15 src/com/android/settings/cmstats/ReportingServiceManager.java
View
8 AndroidManifest.xml
@@ -1631,14 +1631,6 @@
<activity android:name=".ApnEditor" />
- <activity android:name="Settings$AnonymousStatsActivity"
- android:label="@string/anonymous_statistics_title"
- android:configChanges="orientation|keyboardHidden|screenSize"
- android:clearTaskOnLaunch="true">
- <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
- android:value="com.android.settings.cmstats.AnonymousStats" />
- </activity>
-
<!-- CyanogenMod activities End -->
<!-- Pseudo-activity used to provide an intent-filter entry point to encryption settings -->
View
21 res/values-af/strings.xml
@@ -1891,27 +1891,6 @@
<string name="mem_info">Geheue</string>
<!-- About phone screen, status item label -->
- <!-- Anonymous Statistics #CM -->
- <!-- About device screen, list item title. Takes the user to the screen about opting in or out of anonymous statistics. -->
- <string name="anonymous_statistics_title">CyanogenMod statistieke</string>
- <string name="anonymous_statistics_summary">Help CyanogenMod verbeter deur anonieme statistiek verslagdoening te keis</string>
- <string name="anonymous_statistics_warning_title">Inligting</string>
- <string name="anonymous_statistics_warning">"Deur CyanogenMod statistieke toe te laat sal nie-persoonlike data ingestuur word na die ontwikkelaars van CyanogenMod installasies. Die inligting sluit in \'n unieke identifikasienommer in wat nie privaatheid of persoonlike data in gevaar stel nie. Die data word ingestuur tydens elke \'boot\'.\n\nVir \'n voorbeeld van die data wat ingestuur word, raak "<b>"Voorskou"</b>"</string>
- <string name="preview_data_title">Voorskou</string>
- <string name="preview_data_summary">%s</string>
- <string name="view_stats_title">Kyk na statistieke</string>
- <string name="anonymous_learn_more">Leer meer</string>
-
- <!-- Anonymous Statistics - Notification -->
- <string name="anonymous_notification_desc">Aktiveer of deaktiveer unieke CyanogenMod statistieke</string>
-
- <!-- Anonymous Statistics - Preview -->
- <string name="preview_id_title">Unieke ID</string>
- <string name="preview_device_title">Toestel</string>
- <string name="preview_version_title">Weergawe</string>
- <string name="preview_country_title">Land</string>
- <string name="preview_carrier_title">Draer</string>
-
<!-- INTERFACE Settings -->
<!-- Settings main menu category heading. Interface (Launcher, Themes, System). [CHAR LIMIT=40] -->
<string name="header_category_interface">KOPPELVLAK</string>
View
15 res/values-cs/strings.xml
@@ -1889,21 +1889,6 @@
<string name="build_date_default">2012-01-01-0000</string>
<string name="cpu_info">Informace o CPU</string>
<string name="mem_info">Informace o paměti (dostupná/celková)</string>
- <string name="anonymous_statistics_title">CyanogenMod statistiky</string>
- <string name="anonymous_statistics_summary">Pomozte ke zlepšení CyanogenModu pomocí posíláním anonymních statistik</string>
- <string name="anonymous_statistics_warning_title">Info</string>
- <string name="anonymous_statistics_warning">Pokud povolíte zasílání anonymních statistik z vašeho zařízení, budou se odesílat data bez vašich osobních údajů k vývojářům. Data jsou odesílána během startu zařízení.\n\nMůžete se také podívat do náhledu odesílaných dat.</string>
- <string name="enable_reporting_title">Povolit odesílání</string>
- <string name="preview_data_title">Prohlédnout data</string>
- <string name="preview_data_summary">%s</string>
- <string name="view_stats_title">Zobrazit statistiky</string>
- <string name="anonymous_learn_more">Zjistit více</string>
- <string name="anonymous_notification_desc">Povolit, nebo zakázat CyanogenMod statistiky</string>
- <string name="preview_id_title">Unikátní ID</string>
- <string name="preview_device_title">Zařízení</string>
- <string name="preview_version_title">Verze</string>
- <string name="preview_country_title">Země</string>
- <string name="preview_carrier_title">Operátor</string>
<string name="header_category_interface">ROZHRANÍ</string>
<string name="launcher_settings_title">Launcher</string>
<string name="themes_settings_title">Motiv vzhledu</string>
View
22 res/values-da/strings.xml
@@ -1889,28 +1889,6 @@
<!-- About phone screen, Free memory info -->
<string name="mem_info">Hukommelse</string>
- <!-- Anonymous Statistics -->
- <!-- About device screen, list item title. Takes the user to the screen about opting in or out of anonymous statistics. -->
- <string name="anonymous_statistics_title">CyanogenMod-statistikker</string>
- <string name="anonymous_statistics_summary">Hjælp med at gøre CyanogenMod bedre ved at deltage i rapportering af anonyme statistikker</string>
- <string name="anonymous_statistics_warning_title">Om</string>
- <string name="anonymous_statistics_warning">Deltagelse af CyanogenMod-statistikker vil tillade ikke-personlige data, der skal forelægges for udviklerne af CyanogenMod, at spore unikke installationer på tværs af enheder. De indsendte oplysninger omfatter en entydig indikator, som ikke kompromitterer dit privatliv eller personlige data. Dataene indsendes under hver opstart.\n\nFor et eksempel på de data, der er indsendt, skal du trykke på Få vist data.</string>
- <string name="enable_reporting_title">Aktivér rapportering</string>
- <string name="preview_data_title">Få vist data</string>
- <string name="preview_data_summary">%s</string>
- <string name="view_stats_title">Vis statistikker</string>
- <string name="anonymous_learn_more">Læs mere</string>
-
- <!-- Anonymous Statistics - Notification -->
- <string name="anonymous_notification_desc">Aktivér eller deaktiver CyanogenMod-statistikker</string>
-
- <!-- Anonymous Statistics - Preview -->
- <string name="preview_id_title">Unikt ID</string>
- <string name="preview_device_title">Enhed</string>
- <string name="preview_version_title">Version</string>
- <string name="preview_country_title">Land</string>
- <string name="preview_carrier_title">Operatør</string>
-
<!-- INTERFACE Settings -->
<!-- Settings main menu category heading. Interface (Launcher, Themes, System). [CHAR LIMIT=40] -->
<string name="header_category_interface">BRUGERFLADE</string>
View
21 res/values-de/strings.xml
@@ -1887,27 +1887,6 @@
<!-- About phone screen - Free memory info -->
<string name="mem_info">Arbeitsspeicher</string>
- <!-- Anonymous statistics -->
- <string name="anonymous_statistics_title">Anonyme Statistiken</string>
- <string name="anonymous_statistics_summary">Durch anonyme Gerätestatistiken dabei helfen, CyanogenMod zu verbessern</string>
- <string name="anonymous_statistics_warning_title">ACHTUNG</string>
- <string name="anonymous_statistics_warning">Die bei jedem Neustart des Gerätes übermittelten Daten beeinträchtigen nicht die Privatsphäre, da sie keinerlei Rückschlüsse auf den Benutzer zulassen.\n\nFür ein Beispiel der gesendeten Daten bitte auf Vorschau klicken.</string>
- <string name="enable_reporting_title">Berichte einschalten</string>
- <string name="preview_data_title">Vorschau</string>
- <string name="preview_data_summary">%s</string>
- <string name="view_stats_title">Statistiken ansehen</string>
- <string name="anonymous_learn_more">Mehr erfahren</string>
-
- <!-- Anonymous statistics - Notification -->
- <string name="anonymous_notification_desc">Anonyme Statistiken ein- oder ausschalten</string>
-
- <!-- Anonymous statistics - Preview -->
- <string name="preview_id_title">Eindeutige ID</string>
- <string name="preview_device_title">Gerät</string>
- <string name="preview_version_title">Version</string>
- <string name="preview_country_title">Land</string>
- <string name="preview_carrier_title">Anbieter</string>
-
<!-- Settings main menu category heading -->
<string name="header_category_interface">Benutzeroberfläche</string>
View
26 res/values-el/strings.xml
@@ -1889,32 +1889,6 @@
<!-- About phone screen, Free memory info -->
<string name="mem_info">Μνήμη</string>
- <!-- Anonymous Statistics -->
- <!-- About device screen, list item title. Takes the user to the screen about opting in or out of anonymous statistics. -->
- <string name="anonymous_statistics_title">Στατιστικά CyanogenMod</string>
- <string name="anonymous_statistics_summary">Βοηθήστε το CyanogenMod να γίνει καλύτερο ενεργοποιώντας την αποστολή ανώνυμων στατιστικών στοιχείων</string>
- <string name="anonymous_statistics_warning_title">Σχετικά</string>
- <string name="anonymous_statistics_warning">Ενεργοποιώντας τα στατιστικά του CyanogenMod επιτρέπετε την αποστολή
- μη προσωπικών δεδομένων στους προγραμματιστές του CyanogenMod για παρακολούθηση του αριθμού μοναδικών εγκαταστάσεων
- σε όλες τις συσκευές. Οι πληροφορίες που αποστέλλονται συμπεριλαμβάνουν ένα μοναδικό αναγνωριστικό, το οποίο δεν θέτει
- σε κίνδυνο την ασφάλεια σας ή τα προσωπικά δεδομένα. Τα δεδομένα αποστέλλονται σε κάθε εκκίνηση.\n\nΓια ένα παράδειγμα
- των δεδομένων που αποστέλλονται, πατήστε στην Προεπισκόπηση δεδομένων.</string>
- <string name="enable_reporting_title">Ενεργοποίηση αναφοράς</string>
- <string name="preview_data_title">Προεπισκόπηση δεδομένων</string>
- <string name="preview_data_summary">%s</string>
- <string name="view_stats_title">Εμφάνιση στατιστικών</string>
- <string name="anonymous_learn_more">Μάθετε περισσότερα</string>
-
- <!-- Anonymous Statistics - Notification -->
- <string name="anonymous_notification_desc">Ενεργοποίηση ή απενεργοποίηση των στατιστικών του CyanogenMod</string>
-
- <!-- Anonymous Statistics - Preview -->
- <string name="preview_id_title">Μοναδικό αναγνωριστικό</string>
- <string name="preview_device_title">Συσκευή</string>
- <string name="preview_version_title">Έκδοση</string>
- <string name="preview_country_title">Χώρα</string>
- <string name="preview_carrier_title">Εταιρία δικτύου</string>
-
<!-- INTERFACE Settings -->
<!-- Settings main menu category heading. Interface (Launcher, Themes, System). [CHAR LIMIT=40] -->
<string name="header_category_interface">ΔΙΕΠΑΦΗ</string>
View
14 res/values-es/strings.xml
@@ -1888,20 +1888,6 @@
<string name="build_date">Fecha de compilación</string>
<string name="cpu_info">CPU</string>
<string name="mem_info">Memoria</string>
- <string name="anonymous_statistics_title">Estadísticas CyanogenMod</string>
- <string name="anonymous_statistics_summary">Ayude a mejorar CyanogenMod mediante el envío anónimo de estadísticas</string>
- <string name="anonymous_statistics_warning_title">Aviso</string>
- <string name="anonymous_statistics_warning">Permitiendo la recopilación y envío de estadísticas de CyanogenMod, autoriza el envío de información de carácter no personal a los desarrolladores de CyanogenMod para realizar un seguimiento de las instalaciones que realice en los dispositivos. La información enviada incluye un identificador único que no compromete su privacidad o su información personal. Esta información es enviada durante el arranque.\n\nPara ver un ejemplo de la información enviada, pulse en \u00ABPrevisualizar datos\u00BB</string>
- <string name="enable_reporting_title">Activar envío estadísticas</string>
- <string name="preview_data_title">Previsualizar datos</string>
- <string name="view_stats_title">Ver estadísticas</string>
- <string name="anonymous_learn_more">Leer más</string>
- <string name="anonymous_notification_desc">Activar o desactivar estadísticas de CyanogenMod</string>
- <string name="preview_id_title">Identificador único</string>
- <string name="preview_device_title">Dispositivo</string>
- <string name="preview_version_title">Versión</string>
- <string name="preview_country_title">País</string>
- <string name="preview_carrier_title">Operadora móvil</string>
<string name="header_category_interface">Interfaz gráfica</string>
<string name="launcher_settings_title">Inicio</string>
<string name="themes_settings_title">Temas</string>
View
15 res/values-fi/strings.xml
@@ -1863,21 +1863,6 @@
<string name="build_date_default">2012-01-01-0000</string>
<string name="cpu_info">Prosessori</string>
<string name="mem_info">Muisti</string>
- <string name="anonymous_statistics_title">CyanogenMod-tilastointi</string>
- <string name="anonymous_statistics_summary">Auta tekemään CyanogenModista parempi tarjoamalla anonyymejä tilastoraportteja</string>
- <string name="anonymous_statistics_warning_title">Tietoja</string>
- <string name="anonymous_statistics_warning">CyanogenMod-tilastojen käyttöönotto sallii anonyymien tietojen lähettämisen CyanogenModin kehittäjille, jotta laitteiden järjestelmäasennuksia voidaan seurata. Informaatio sisältää uniikin tunnisteen, joka ei sisällä henkilökohtaisia tietojasi. Tietoa lähetetään jokaisella uudelleenkäynnistyskerralla.\n\nValitse Esikatsele tietoja nähdäksesi, minkälaisia tietoja laitteestasi lähetetään.</string>
- <string name="enable_reporting_title">Ota lähettäminen käyttöön</string>
- <string name="preview_data_title">Esikatsele tietoja</string>
- <string name="preview_data_summary">%s</string>
- <string name="view_stats_title">Näytä tilastot</string>
- <string name="anonymous_learn_more">Lue lisää</string>
- <string name="anonymous_notification_desc">Salli tai estä CyanogenMod-tilastointi</string>
- <string name="preview_id_title">Uniikki tunniste</string>
- <string name="preview_device_title">Laite</string>
- <string name="preview_version_title">Versio</string>
- <string name="preview_country_title">Valtio</string>
- <string name="preview_carrier_title">Operaattori</string>
<string name="header_category_interface">KÄYTTÖLIITTYMÄ</string>
<string name="launcher_settings_title">Launcher</string>
<string name="themes_settings_title">Teemat</string>
View
22 res/values-fr/strings.xml
@@ -1892,28 +1892,6 @@
<string name="mem_info">Mémoire</string>
<!-- About phone screen, status item label -->
- <!-- Anonymous Statistics #CM -->
- <!-- About device screen, list item title. Takes the user to the screen about opting in or out of anonymous statistics. -->
- <string name="anonymous_statistics_title">Statistiques CyanogenMod</string>
- <string name="anonymous_statistics_summary">Aidez CyanogenMod en participant à l\'envoi de données anonymes pour comptabiliser les installations par type d\'appareil</string>
- <string name="anonymous_statistics_warning_title">À propos</string>
- <string name="anonymous_statistics_warning">Autoriser l\'envoi de statistiques permet pour les développeurs du système CyanogenMod de collecter des données anonymes afin de comptabiliser le nombre d\'installations par type d\'appareil. Les informations envoyées contiennent un identifiant unique de appareil afin de limiter les doublons et en aucune manière ne compromet la sécurité de vos données. Ce jeu d\'informations est envoyé à chaque redémarrage pour ne conserver que les installations actives.\n\nVous pouvez visualiser ces données en sélectionnant \"Prévisualiser les données\".</string>
- <string name="enable_reporting_title">Activer l\'envoi</string>
- <string name="preview_data_title">Prévisualiser les données</string>
- <string name="preview_data_summary">%s</string>
- <string name="view_stats_title">Afficher les statistiques</string>
- <string name="anonymous_learn_more">En savoir plus…</string>
-
- <!-- Anonymous Statistics - Notification -->
- <string name="anonymous_notification_desc">Activer ou non les statistiques CyanogenMod</string>
-
- <!-- Anonymous Statistics - Preview -->
- <string name="preview_id_title">Identifiant unique</string>
- <string name="preview_device_title">Appareil</string>
- <string name="preview_version_title">Version</string>
- <string name="preview_country_title">Pays</string>
- <string name="preview_carrier_title">Opérateur</string>
-
<!-- INTERFACE Settings -->
<!-- Settings main menu category heading. Interface (Launcher, Themes, System). [CHAR LIMIT=40] -->
<string name="header_category_interface">INTERFACE</string>
View
15 res/values-hu/strings.xml
@@ -1890,21 +1890,6 @@
<string name="build_date_default">2012-01-01-0000</string>
<string name="cpu_info">Processzor</string>
<string name="mem_info">Memória</string>
- <string name="anonymous_statistics_title">CyanogenMod Statisztika</string>
- <string name="anonymous_statistics_summary">Segítsen a CyanogenMod jobbá tételében, kapcsolja be a névtelen statisztikai adatok gyűjtését</string>
- <string name="anonymous_statistics_warning_title">Tudnivalók</string>
- <string name="anonymous_statistics_warning">A CyanogenMod statisztika engedélyezése nem terjed ki személyes adatokra, csak egy egyedi azonosítóval azonosítjuk az eszközöket. A statisztika minden rendszerindításkor elküldésre kerül, hogy követni tudjuk az új telepítéseket.\n\nAz elküldött adatok menüpont alatt tekintheti meg a statisztikai adatokat.</string>
- <string name="enable_reporting_title">Statisztika engedélyezése</string>
- <string name="preview_data_title">Elküldött adatok</string>
- <string name="preview_data_summary">%s</string>
- <string name="view_stats_title">Statisztika megtekintése</string>
- <string name="anonymous_learn_more">Tudjon meg többet</string>
- <string name="anonymous_notification_desc">CyanogenMod Statisztika engedélyezése/tiltása</string>
- <string name="preview_id_title">Egyedi azonosító</string>
- <string name="preview_device_title">Eszköz</string>
- <string name="preview_version_title">Verzió</string>
- <string name="preview_country_title">Ország kód</string>
- <string name="preview_carrier_title">Szolgáltató</string>
<string name="header_category_interface">FELHASZNÁLÓI FELÜLET</string>
<string name="launcher_settings_title">Programindító</string>
<string name="themes_settings_title">Témák</string>
View
15 res/values-it/cm_strings.xml
@@ -73,21 +73,6 @@
<string name="build_date_default">2012-01-01-0000</string>
<string name="cpu_info">CPU</string>
<string name="mem_info">Memoria</string>
- <string name="anonymous_statistics_title">Statistiche CyanogenMod</string>
- <string name="anonymous_statistics_summary">Aiuta a migliorare la Cyanogenmod acconsentendo ad inviare statistiche anonime</string>
- <string name="anonymous_statistics_warning_title">Informazioni</string>
- <string name="anonymous_statistics_warning">Consentire di inviare statistiche anonime permetterà l\'invio di dati non personali agli sviluppatori di Cyanogenmod per contare il numero di installazioni uniche sui diversi terminali. Le informazioni inviate includono un identificativo univoco che non compromette la tua privacy o i tuoi dati personali. I dati sono inviati ad ogni avvio.\n\nPer un esempio dei dati inviati premere su Anteprima dati.</string>
- <string name="enable_reporting_title">Attiva invio</string>
- <string name="preview_data_title">Anteprima dati</string>
- <string name="preview_data_summary">%s</string>
- <string name="view_stats_title">Guarda statistiche</string>
- <string name="anonymous_learn_more">Maggiori informazioni</string>
- <string name="anonymous_notification_desc">Attiva o disattiva le statistiche CyanogenMod</string>
- <string name="preview_id_title">ID Univoco</string>
- <string name="preview_device_title">Dispositivo</string>
- <string name="preview_version_title">Versione</string>
- <string name="preview_country_title">Nazione</string>
- <string name="preview_carrier_title">Operatore</string>
<string name="header_category_interface">INTERFACCIA</string>
<string name="launcher_settings_title">Launcher</string>
<string name="themes_settings_title">Temi</string>
View
22 res/values-iw/strings.xml
@@ -1882,28 +1882,6 @@
<string name="mem_info">זיכרון</string>
<!-- About phone screen, status item label -->
- <!-- Anonymous Statistics #CM -->
- <!-- About device screen, list item title. Takes the user to the screen about opting in or out of anonymous statistics. -->
- <string name="anonymous_statistics_title">סטטיסטיקות CyanogenMod</string>
- <string name="anonymous_statistics_summary">עזור לנו לשפר את CyanogenMod בעזרת הצטרפות לדיווח של סטטיסטיקות חסויות</string>
- <string name="anonymous_statistics_warning_title">אודות</string>
- <string name="anonymous_statistics_warning">הצטרפות לסטטיסטיקות CyanogenMod יאפשרו למידע שאינו אישי להשלח אל מפתחי CyanogenMod לשם מעקב אחר התקנות מכשירים יחודיות. המידע שנשלח כולל מזהה ייחודי, שאינו פוגע בפרטיותך ואינו חושף מידע אישי. המידע ישלח בכל פעם בה יופעל המכשיר.\n\nלהצגת דוגמה של המידע הנשלח לחץ על \"תצוגה מקדימה\".</string>
- <string name="enable_reporting_title">הפעל דיווח</string>
- <string name="preview_data_title">תצוגה מקדימה</string>
- <string name="preview_data_summary">%s</string>
- <string name="view_stats_title">הצג סטטיסטיקות</string>
- <string name="anonymous_learn_more">למד עוד</string>
-
- <!-- Anonymous Statistics - Notification -->
- <string name="anonymous_notification_desc">הפעל או בטל את סטטיסטיקות CyanogenMod</string>
-
- <!-- Anonymous Statistics - Preview -->
- <string name="preview_id_title">מזהה ייחודי</string>
- <string name="preview_device_title">מכשיר</string>
- <string name="preview_version_title">גרסה</string>
- <string name="preview_country_title">מדינה</string>
- <string name="preview_carrier_title">ספקית</string>
-
<!-- INTERFACE Settings -->
<!-- Settings main menu category heading. Interface (Launcher, Themes, System). [CHAR LIMIT=40] -->
<string name="header_category_interface">ממשק</string>
View
24 res/values-ja/strings.xml
@@ -2332,30 +2332,6 @@
<string name="pref_use_16bpp_alpha_summary">16ビット透過を使用することでスクロールのパフォーマンスが向上しますが、低品質で稀に不自然に見えます(
要再起動)</string>
- <!-- Anonymous Statistics #CM -->
- <!-- About device screen, list item title. Takes the user to the screen about opting in or out of anonymous statistics. -->
- <string name="anonymous_statistics_title">CyanogenMod 利用統計</string>
- <string name="anonymous_statistics_summary">CyanogenMod をより良くするための匿名利用統計報告をオプトインする</string>
- <string name="anonymous_statistics_warning_title">利用統計について</string>
- <string name="anonymous_statistics_warning">匿名利用状況の送信を許諾することによって、CyanogenModの開発者がデバイス単位のユニークインストール数を追跡することができます。
- 送信される情報にはユニークIDが含まれますが、これはあなたの個人情報、端末のタイプ及びバージョン情報とは結びつきません。
- データ送信は端末の起動時に毎回行われ、送信されるデータの例はプレビューをクリックすることにより確認できます。</string>
- <string name="enable_reporting_title">リポートを有効にする</string>
- <string name="preview_data_title">データのプレビュー</string>
- <string name="preview_data_summary">%s</string>
- <string name="view_stats_title">ステータスを見る</string>
- <string name="anonymous_learn_more">詳細</string>
-
- <!-- Anonymous Statistics - Notification -->
- <string name="anonymous_notification_desc">CyanogenMod 利用統計を有効/無効にする</string>
-
- <!-- Anonymous Statistics - Preview -->
- <string name="preview_id_title">ユニークID</string>
- <string name="preview_device_title">デバイス</string>
- <string name="preview_version_title">バージョン</string>
- <string name="preview_country_title">国</string>
- <string name="preview_carrier_title">キャリア</string>
-
<!-- About device screen, version of modification of Android. -->
<string name="mod_version">CyanogenMod バージョン</string>
<string name="mod_version_default">不明</string>
View
14 res/values-ko/strings.xml
@@ -1870,20 +1870,6 @@
<string name="mod_version">CyanogenMod 버전</string>
<string name="mod_version_default">알 수 없음</string>
<string name="build_date">빌드 날짜</string>
- <string name="anonymous_statistics_title">CyanogenMod 사용 통계</string>
- <string name="anonymous_statistics_summary">CyanogenMod 개선을 위해 익명으로 사용 통계 보내기</string>
- <string name="anonymous_statistics_warning_title">정보</string>
- <string name="anonymous_statistics_warning">CyanogenMod 사용 통계를 보내도록 설정하면 익명의 장치 설치 정보를 CyanogenMod 개발자에게 전송합니다. 전송되는 정보에는 고유 ID가 부여되어 있으며, 이는 귀하의 어떠한 개인 정보도 포함되어 있지 않습니다. 정보는 장치 부팅 시 전송됩니다.\n\n전송되는 정보의 예를 보려면 정보 미리보기를 선택하십시오.</string>
- <string name="enable_reporting_title">사용 통계 제공</string>
- <string name="preview_data_title">정보 미리보기</string>
- <string name="view_stats_title">통계 보기</string>
- <string name="anonymous_learn_more">자세히 알아보기</string>
- <string name="anonymous_notification_desc">CyanogenMod 사용 통계 사용 또는 사용 안함</string>
- <string name="preview_id_title">고유 ID</string>
- <string name="preview_device_title">장치</string>
- <string name="preview_version_title">버전</string>
- <string name="preview_country_title">국가</string>
- <string name="preview_carrier_title">통신사</string>
<string name="header_category_interface">인터페이스</string>
<string name="launcher_settings_title">런처</string>
<string name="themes_settings_title">테마</string>
View
22 res/values-lt/strings.xml
@@ -1881,28 +1881,6 @@
<string name="mem_info">Atmintis</string>
<!-- About phone screen, status item label -->
- <!-- Anonymous Statistics #CM -->
- <!-- About device screen, list item title. Takes the user to the screen about opting in or out of anonymous statistics. -->
- <string name="anonymous_statistics_title">CyanogenMod statistika</string>
- <string name="anonymous_statistics_summary">Padėkite tobulinti CyanogenMod įjungdami statistikos siuntimą</string>
- <string name="anonymous_statistics_warning_title">Apie</string>
- <string name="anonymous_statistics_warning">Dalinantis CyanogenMod Statistika nebus renkama Jūsų asmeninė informacija, o tik sistemos darbas bei klaidos. Ši informacija padės kūrėjams tobulinti CyanogenMod bei šalinti klaidas.</string>
- <string name="enable_reporting_title">Įjungti raportavimą</string>
- <string name="preview_data_title">Žiūrėti duomenis</string>
- <string name="preview_data_summary">%s</string>
- <string name="view_stats_title">Žiūrėti statistiką</string>
- <string name="anonymous_learn_more">Sužinok daugiau</string>
-
- <!-- Anonymous Statistics - Notification -->
- <string name="anonymous_notification_desc">Įjunkite ar išjunkite CyanogenMod Statistiką</string>
-
- <!-- Anonymous Statistics - Preview -->
- <string name="preview_id_title">Unikalus ID</string>
- <string name="preview_device_title">Įrenginys</string>
- <string name="preview_version_title">Versija</string>
- <string name="preview_country_title">Šalis</string>
- <string name="preview_carrier_title">Operatorius</string>
-
<!-- INTERFACE Settings -->
<!-- Settings main menu category heading. Interface (Launcher, Themes, System). [CHAR LIMIT=40] -->
<string name="header_category_interface">Išvaizda</string>
View
14 res/values-nl/strings.xml
@@ -1870,20 +1870,6 @@
<string name="build_date_default">2012-01-01-0000</string>
<string name="cpu_info">CPU</string>
<string name="mem_info">Geheugen</string>
- <string name="anonymous_statistics_title">Statistieken</string>
- <string name="anonymous_statistics_summary">Help mee met het verbeteren van CyanogenMod door anonieme statistieke te versturen</string>
- <string name="anonymous_statistics_warning_title">Over</string>
- <string name="anonymous_statistics_warning">Door de statistieken te verzenden, worden anonieme gegevens naar de ontwikkelaars van CyanogenMod verzonden tijdens het opstarten om unieke installaties te volgen. In de gegevens zit een uniek id-nummer, dat uw privacy niet schendt.\nOm een voorbeeld te zien, raakt u \'Voorbeeld van gegevens\' aan.\nVoor meer informatie raakt u \'Lees meer\' aan.\nHebben wij u niet kunnen overtuigen, dan raakt u \'Annuleren\' aan.</string>
- <string name="enable_reporting_title">Statistieken verzenden</string>
- <string name="preview_data_title">Voorbeeld van gegevens</string>
- <string name="view_stats_title">Statistieken tonen</string>
- <string name="anonymous_learn_more">Lees meer</string>
- <string name="anonymous_notification_desc">Statistieken in-/uitschakelen</string>
- <string name="preview_id_title">Uniek id</string>
- <string name="preview_device_title">Apparaat</string>
- <string name="preview_version_title">Versie</string>
- <string name="preview_country_title">Land</string>
- <string name="preview_carrier_title">Provider</string>
<string name="header_category_interface">UITERLIJK</string>
<string name="launcher_settings_title">Launcher</string>
<string name="themes_settings_title">Thema\'s</string>
View
18 res/values-pl/strings.xml
@@ -1876,24 +1876,6 @@
<string name="cpu_info">Procesor</string>
<string name="mem_info">Pamięć</string>
- <string name="anonymous_statistics_title">Statystyki CyanogenMod</string>
- <string name="anonymous_statistics_summary">Pomóż ulepszyć CyanogenMod, pozwalając na wysyłanie anonimowych statystyk</string>
- <string name="anonymous_statistics_warning_title">Informacje</string>
- <string name="anonymous_statistics_warning">Udział w statystykach zezwoli na przesyłanie anonimowych danych twórcom CyanogenModa w celu badania liczby aktywnych urządzeń. Raport zawiera unikatowy ID, który nie zagraża Twojej prywatności ani danym osobowym. Dane są przesyłane przy każdym uruchomieniu.\n\nAby zobaczyć przykładowe wysyłane informacje, podejrzyj swoje dane.</string>
- <string name="enable_reporting_title">Włącz raportowanie</string>
- <string name="preview_data_title">Podejrzyj swoje dane</string>
- <string name="preview_data_summary">%s</string>
- <string name="view_stats_title">Zobacz statystyki</string>
- <string name="anonymous_learn_more">Dowiedz się więcej</string>
-
- <string name="anonymous_notification_desc">Włącz lub wyłącz statystyki CyanogenMod</string>
-
- <string name="preview_id_title">Unikatowy ID</string>
- <string name="preview_device_title">Urządzenie</string>
- <string name="preview_version_title">Wersja</string>
- <string name="preview_country_title">Kraj</string>
- <string name="preview_carrier_title">Operator GSM</string>
-
<string name="header_category_interface">INTERFEJS</string>
<string name="launcher_settings_title">Ekran domowy</string>
View
19 res/values-pt/strings.xml
@@ -1880,23 +1880,6 @@
<string name="build_date_default">2012-01-01-0000</string>
<string name="cpu_info">CPU</string>
<string name="mem_info">Memória</string>
- <string name="anonymous_statistics_title">Estatísticas CyanogenMod</string>
- <string name="anonymous_statistics_summary">Ajude a melhorar o CyanogenMod optando por enviar estatísticas anonimas</string>
- <string name="anonymous_statistics_warning_title">Sobre</string>
- <string name="anonymous_statistics_warning">Optar por enviar estatísticas anonimas do CyanogenMod permitirá que dados não-pessoais sejam enviados para os
- desenvolvedores do CyanogenMod para rastrear instalações únicas em dispositivos. As informações enviadas incluem um identificador unico,
- que não compromete sua privacidade ou dados pessoais. Os dados são enviados durante cada inicialização.\n\nPara um exemplo de dados que são enviados, toque em Pré-visualizar Dados.</string>
- <string name="enable_reporting_title">Habilitar relatório</string>
- <string name="preview_data_title">Pré-visualizar dados</string>
- <string name="preview_data_summary">%s</string>
- <string name="view_stats_title">Ver estatísticas</string>
- <string name="anonymous_learn_more">Saiba mais</string>
- <string name="anonymous_notification_desc">Habilitar ou desabilitar estatísticas CyanogenMod</string>
- <string name="preview_id_title">ID unico</string>
- <string name="preview_device_title">Dispositivo</string>
- <string name="preview_version_title">Versão</string>
- <string name="preview_country_title">País</string>
- <string name="preview_carrier_title">Operadora</string>
<string name="header_category_interface">INTERFACE</string>
<string name="launcher_settings_title">Launcher</string>
<string name="themes_settings_title">Temas</string>
@@ -2446,4 +2429,4 @@
<string name="pie_control_trigger_right">Borda direita da tela</string>
<string name="pie_control_trigger_top">Borda superior da tela</string>
<string name="pie_control_trigger_top_summary">Somente navegação sera exibida na parte superior</string>
-</resources>
+</resources>
View
16 res/values-ro/strings.xml
@@ -1869,22 +1869,6 @@
<string name="cpu_info">"Procesor"</string>
<string name="mem_info">"Memorie"</string>
- <string name="anonymous_statistics_title">"Statistici CyanogenMod"</string>
- <string name="anonymous_statistics_summary">"Ajutaţi la îmbunătăţirea CyanogenMod, optând pentru expedierea rapoartelor statistice anonime"</string>
- <string name="anonymous_statistics_warning_title">"Despre"</string>
- <string name="anonymous_statistics_warning">"Optând pentru Statisticile CyanogenMod permiteţi expedierea datelor non-personale către dezvoltatorii CyanogenMod pentru urmărirea instalărilor unice în dispozitive. Informaţiile transmise includ un identificator unic, care nu compromite confidenţialitatea dvs. sau a datelor cu caracter personal. Datele sunt transmise în timpul fiecărei conectări a dispozitivului. \n\nPentru un exemplu de date care sunt expediate, apăsaţi pe Previzualizare date."</string>
- <string name="enable_reporting_title">"Activaţi raportarea"</string>
- <string name="preview_data_title">"Previzualizare date"</string>
- <string name="view_stats_title">"Vizualizare statistici"</string>
- <string name="anonymous_learn_more">"Aflaţi mai multe"</string>
- <string name="anonymous_notification_desc">"Activaţi sau Dezactivaţi Statisticile CyanogenMod"</string>
-
- <string name="preview_id_title">"ID-ul unic"</string>
- <string name="preview_device_title">"Dispozitiv"</string>
- <string name="preview_version_title">"Versiune"</string>
- <string name="preview_country_title">"Ţară"</string>
- <string name="preview_carrier_title">"Reţea"</string>
-
<string name="header_category_interface">"INTERFAŢĂ"</string>
<string name="launcher_settings_title">"Lansator"</string>
View
22 res/values-ru/strings.xml
@@ -1896,28 +1896,6 @@
<string name="mem_info">Память</string>
<!-- About phone screen, status item label -->
- <!-- Anonymous Statistics #CM -->
- <!-- About device screen, list item title. Takes the user to the screen about opting in or out of anonymous statistics. -->
- <string name="anonymous_statistics_title">Статистика CyanogenMod</string>
- <string name="anonymous_statistics_summary">Помогите сделать CM лучше, включив отправку анонимных отчётов</string>
- <string name="anonymous_statistics_warning_title">Информация об использовании</string>
- <string name="anonymous_statistics_warning">Анонимные отчёты позволяют разработчикам CyanogenMod отслеживать установки на различные устройства. Отсылаемая информацию включает в себя тип устройства, версию прошивки и уникальный идентификатор, отправка которого никаким образом не вредит Вашей конфиденциальности. Отчёт отсылается при каждой загрузке устройства.\n\nЧтобы посмотреть, какие данные отсылаются, нажмите \"Предпросмотр\".</string>
- <string name="enable_reporting_title">Включить отправку отчётов</string>
- <string name="preview_data_title">Предпросмотр</string>
- <string name="preview_data_summary">%s</string>
- <string name="view_stats_title">Статистика</string>
- <string name="anonymous_learn_more">Подробнее</string>
-
- <!-- Anonymous Statistics - Notification -->
- <string name="anonymous_notification_desc">Анонимная статистика CyanogenMod</string>
-
- <!-- Anonymous Statistics - Preview -->
- <string name="preview_id_title">Уникальный идентификатор</string>
- <string name="preview_device_title">Устройство</string>
- <string name="preview_version_title">Версия</string>
- <string name="preview_country_title">Страна</string>
- <string name="preview_carrier_title">Оператор</string>
-
<!-- INTERFACE Settings -->
<!-- Settings main menu category heading. Interface (Launcher, Themes, System). [CHAR LIMIT=40] -->
<string name="header_category_interface">ИНТЕРФЕЙС</string>
View
22 res/values-uk/strings.xml
@@ -1883,28 +1883,6 @@
<string name="mem_info">Пам’ять</string>
<!-- About phone screen, status item label -->
- <!-- Anonymous Statistics #CM -->
- <!-- About device screen, list item title. Takes the user to the screen about opting in or out of anonymous statistics. -->
- <string name="anonymous_statistics_title">Статистика CyanogenMod</string>
- <string name="anonymous_statistics_summary">Допоможіть зробити CM краще, увімкнувши відправку анонімних звітів</string>
- <string name="anonymous_statistics_warning_title">Інформація про використання</string>
- <string name="anonymous_statistics_warning">Анонімні звіти дозволяють розробникам CyanogenMod відслідковвувати встановлення на різні пристрої. Інформація, що відправляється включає в себе тип пристрою, версію прошивки і унікальний ідентифікатор, відправка якого ніяким способом не шкодить Вашій конфіденційності. Звіт відсилається при кожному завантаженні пристрою.\n\nДля перегляду даних, які відправляються, нитисніть \"Перегляд\".</string>
- <string name="enable_reporting_title">Увімкнути відправку звітів</string>
- <string name="preview_data_title">Перегляд</string>
- <string name="preview_data_summary">%s</string>
- <string name="view_stats_title">Статистика</string>
- <string name="anonymous_learn_more">Детальніше</string>
-
- <!-- Anonymous Statistics - Notification -->
- <string name="anonymous_notification_desc">Анонімна статистика CyanogenMod</string>
-
- <!-- Anonymous Statistics - Preview -->
- <string name="preview_id_title">Унікальний ідентифікатор</string>
- <string name="preview_device_title">Пристрій</string>
- <string name="preview_version_title">Версія</string>
- <string name="preview_country_title">Країна</string>
- <string name="preview_carrier_title">Оператор</string>
-
<!-- INTERFACE Settings -->
<!-- Settings main menu category heading. Interface (Launcher, Themes, System). [CHAR LIMIT=40] -->
<string name="header_category_interface">ІНТЕРФЕЙС</string>
View
21 res/values-zh-rCN/strings.xml
@@ -1907,27 +1907,6 @@
<string name="mem_info">内存</string>
<!-- About phone screen, status item label -->
- <!-- Anonymous Statistics #CM -->
- <!-- About device screen, list item title. Takes the user to the screen about opting in or out of anonymous statistics. -->
- <string name="anonymous_statistics_title">CyanogenMod 统计</string>
- <string name="anonymous_statistics_summary">开启匿名统计报告以便帮助 CyanogenMod 未来向更好的方向发展</string>
- <string name="anonymous_statistics_warning_title">关于统计</string>
- <string name="anonymous_statistics_warning">开启 CyanogenMod 统计将允许非个人数据被提交到 CyanogenMod 的开发者以便记录各种设备上的独特安装. 提交的信息包含一个独特的标识符, 而不会涉及您的隐私与个人数据. 该数据将在每次启动时被提交.\n\n如您想看一个作为被提交数据的实例, 请点击预览数据.</string>
- <string name="enable_reporting_title">开启报告</string>
- <string name="preview_data_title">预览数据</string>
- <string name="view_stats_title">查看统计</string>
- <string name="anonymous_learn_more">查看更多</string>
-
- <!-- Anonymous Statistics - Notification -->
- <string name="anonymous_notification_desc">启用或禁用 CyanogenMod 统计</string>
-
- <!-- Anonymous Statistics - Preview -->
- <string name="preview_id_title">独特 ID</string>
- <string name="preview_device_title">设备</string>
- <string name="preview_version_title">版本</string>
- <string name="preview_country_title">国家</string>
- <string name="preview_carrier_title">运营商</string>
-
<!-- INTERFACE Settings -->
<!-- Settings main menu category heading. Interface (Launcher, Themes, System). [CHAR LIMIT=40] -->
<string name="header_category_interface">界面</string>
View
24 res/values/strings.xml
@@ -4487,30 +4487,6 @@
<string name="mem_info">Memory</string>
<!-- About phone screen, status item label -->
- <!-- Anonymous Statistics #CM -->
- <!-- About device screen, list item title. Takes the user to the screen about opting in or out of anonymous statistics. -->
- <string name="anonymous_statistics_title">CyanogenMod statistics</string>
- <string name="anonymous_statistics_summary">Help make CyanogenMod better by opting into anonymous statistics reporting</string>
- <string name="anonymous_statistics_warning_title">About</string>
- <string name="anonymous_statistics_warning">Opting into CyanogenMod Statistics will allow non-personal data to be submitted to the
- developers of CyanogenMod to track unique installations across devices. The information submitted includes an unique identifier,
- which does not compromise your privacy or personal data. The data is submitted during each boot.\n\nFor an example of the data that is submitted, tap on Preview Data.</string>
- <string name="enable_reporting_title">Enable reporting</string>
- <string name="preview_data_title">Preview data</string>
- <string name="preview_data_summary">%s</string>
- <string name="view_stats_title">View stats</string>
- <string name="anonymous_learn_more">Learn more</string>
-
- <!-- Anonymous Statistics - Notification -->
- <string name="anonymous_notification_desc">Enable or Disable CyanogenMod Statistics</string>
-
- <!-- Anonymous Statistics - Preview -->
- <string name="preview_id_title">Unique ID</string>
- <string name="preview_device_title">Device</string>
- <string name="preview_version_title">Version</string>
- <string name="preview_country_title">Country</string>
- <string name="preview_carrier_title">Carrier</string>
-
<!-- INTERFACE Settings -->
<!-- Settings main menu category heading. Interface (Launcher, Themes, System). [CHAR LIMIT=40] -->
<string name="header_category_interface">INTERFACE</string>
View
35 res/xml/anonymous_stats.xml
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2012 The CyanogenMod Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<PreferenceScreen
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:title="@string/anonymous_statistics_title"
- xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
-
- <CheckBoxPreference
- android:key="pref_anonymous_opt_in"
- android:defaultValue="true"
- android:title="@string/enable_reporting_title" />
-
- <PreferenceScreen
- android:title="@string/preview_data_title"
- android:fragment="com.android.settings.cmstats.PreviewData" />
-
- <Preference
- android:key="pref_view_stats"
- android:title="@string/view_stats_title" />
-
-</PreferenceScreen>
View
8 res/xml/device_info_settings.xml
@@ -49,14 +49,6 @@
android:targetClass="com.cyanogenmod.updater.UpdatesSettings" />
</PreferenceScreen>
- <!-- Anonymous statistics - (CMStats) -->
- <PreferenceScreen
- android:key="cmstats"
- android:title="@string/anonymous_statistics_title"
- android:summary="@string/anonymous_statistics_summary"
- android:fragment="com.android.settings.cmstats.AnonymousStats" >
- </PreferenceScreen>
-
<!-- Change Log -->
<PreferenceScreen android:key="changelog"
android:title="@string/changelog_title"
View
53 res/xml/preview_data.xml
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2012 The CyanogenMod Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<PreferenceScreen
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:title="@string/preview_data_title"
- xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
-
- <Preference
- android:key="preview_id"
- style="?android:preferenceInformationStyle"
- android:title="@string/preview_id_title"
- android:summary="%s" />
-
- <Preference
- android:key="preview_device"
- style="?android:preferenceInformationStyle"
- android:title="@string/preview_device_title"
- android:summary="%s" />
-
- <Preference
- android:key="preview_version"
- style="?android:preferenceInformationStyle"
- android:title="@string/preview_version_title"
- android:summary="%s" />
-
- <Preference
- android:key="preview_country"
- style="?android:preferenceInformationStyle"
- android:title="@string/preview_country_title"
- android:summary="%s" />
-
- <Preference
- android:key="preview_carrier"
- style="?android:preferenceInformationStyle"
- android:title="@string/preview_carrier_title"
- android:summary="%s" />
-
-</PreferenceScreen>
-
View
1  src/com/android/settings/Settings.java
@@ -875,7 +875,6 @@ public void onAccountsUpdated(Account[] accounts) {
public static class TextToSpeechSettingsActivity extends Settings { /* empty */ }
public static class AndroidBeamSettingsActivity extends Settings { /* empty */ }
public static class WifiDisplaySettingsActivity extends Settings { /* empty */ }
- public static class AnonymousStatsActivity extends Settings { /* empty */ }
public static class ApnSettingsActivity extends Settings { /* empty */ }
public static class ApnEditorActivity extends Settings { /* empty */ }
public static class ProfilesSettingsActivity extends Settings { /* empty */ }
View
138 src/com/android/settings/cmstats/AnonymousStats.java
@@ -1,138 +0,0 @@
-/*
- * Copyright (C) 2012 The CyanogenMod Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.settings.cmstats;
-
-import android.app.AlertDialog;
-import android.app.Dialog;
-import android.app.NotificationManager;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.Intent;
-import android.content.SharedPreferences;
-import android.net.Uri;
-import android.os.Bundle;
-import android.preference.CheckBoxPreference;
-import android.preference.Preference;
-import android.preference.PreferenceScreen;
-
-import com.android.settings.R;
-import com.android.settings.SettingsPreferenceFragment;
-
-public class AnonymousStats extends SettingsPreferenceFragment
- implements DialogInterface.OnClickListener, DialogInterface.OnDismissListener,
- Preference.OnPreferenceChangeListener {
-
- private static final String VIEW_STATS = "pref_view_stats";
-
- protected static final String ANONYMOUS_OPT_IN = "pref_anonymous_opt_in";
-
- protected static final String ANONYMOUS_FIRST_BOOT = "pref_anonymous_first_boot";
-
- protected static final String ANONYMOUS_LAST_CHECKED = "pref_anonymous_checked_in";
-
- protected static final String ANONYMOUS_ALARM_SET = "pref_anonymous_alarm_set";
-
- private CheckBoxPreference mEnableReporting;
-
- private Preference mViewStats;
-
- private Dialog mOkDialog;
-
- private boolean mOkClicked;
-
- private SharedPreferences mPrefs;
-
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- if (getPreferenceManager() != null) {
- addPreferencesFromResource(R.xml.anonymous_stats);
- PreferenceScreen prefSet = getPreferenceScreen();
- mPrefs = getActivity().getSharedPreferences("CMStats", 0);
- mEnableReporting = (CheckBoxPreference) prefSet.findPreference(ANONYMOUS_OPT_IN);
- mViewStats = (Preference) prefSet.findPreference(VIEW_STATS);
- boolean firstBoot = mPrefs.getBoolean(ANONYMOUS_FIRST_BOOT, true);
- if (mEnableReporting.isChecked() && firstBoot) {
- mPrefs.edit().putBoolean(ANONYMOUS_FIRST_BOOT, false).apply();
- ReportingServiceManager.launchService(getActivity());
- }
- NotificationManager nm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
- nm.cancel(1);
- }
- }
-
- @Override
- public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {
- if (preference == mEnableReporting) {
- if (mEnableReporting.isChecked()) {
- // Display the confirmation dialog
- mOkClicked = false;
- if (mOkDialog != null) {
- mOkDialog.dismiss();
- mOkDialog = null;
- }
- mOkDialog = new AlertDialog.Builder(getActivity()).setMessage(
- getActivity().getResources().getString(R.string.anonymous_statistics_warning))
- .setTitle(R.string.anonymous_statistics_warning_title)
- .setIconAttribute(android.R.attr.alertDialogIcon)
- .setPositiveButton(android.R.string.yes, this)
- .setNeutralButton(getString(R.string.anonymous_learn_more), this)
- .setNegativeButton(android.R.string.no, this)
- .show();
- mOkDialog.setOnDismissListener(this);
- } else {
- // Disable reporting
- mPrefs.edit().putBoolean(ANONYMOUS_OPT_IN, false).apply();
- }
- } else if (preference == mViewStats) {
- // Display the stats page
- Uri uri = Uri.parse("http://stats.cyanogenmod.com");
- startActivity(new Intent(Intent.ACTION_VIEW, uri));
- } else {
- // If we didn't handle it, let preferences handle it.
- return super.onPreferenceTreeClick(preferenceScreen, preference);
- }
- return true;
- }
-
- @Override
- public boolean onPreferenceChange(Preference preference, Object newValue) {
- return false;
- }
-
- @Override
- public void onDismiss(DialogInterface dialog) {
- if (!mOkClicked) {
- mEnableReporting.setChecked(false);
- }
- }
-
- @Override
- public void onClick(DialogInterface dialog, int which) {
- if (which == DialogInterface.BUTTON_POSITIVE) {
- mOkClicked = true;
- mPrefs.edit().putBoolean(ANONYMOUS_OPT_IN, true).apply();
- ReportingServiceManager.launchService(getActivity());
- } else if (which == DialogInterface.BUTTON_NEGATIVE){
- mEnableReporting.setChecked(false);
- } else {
- Uri uri = Uri.parse("http://www.cyanogenmod.com/blog/cmstats-what-it-is-and-why-you-should-opt-in");
- startActivity(new Intent(Intent.ACTION_VIEW, uri));
- }
- }
-
-}
View
76 src/com/android/settings/cmstats/PreviewData.java
@@ -1,76 +0,0 @@
-/*
- * Copyright (C) 2012 The CyanogenMod Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.settings.cmstats;
-
-import android.os.Bundle;
-import android.preference.Preference;
-import android.preference.PreferenceScreen;
-
-import com.android.settings.R;
-import com.android.settings.SettingsPreferenceFragment;
-
-public class PreviewData extends SettingsPreferenceFragment
- implements Preference.OnPreferenceChangeListener{
-
- private static final String UNIQUE_ID = "preview_id";
-
- private static final String DEVICE = "preview_device";
-
- private static final String VERSION = "preview_version";
-
- private static final String COUNTRY = "preview_country";
-
- private static final String CARRIER = "preview_carrier";
-
- private Preference mId;
-
- private Preference mDevice;
-
- private Preference mVersion;
-
- private Preference mCountry;
-
- private Preference mCarrier;
-
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- if (getPreferenceManager() != null) {
-
- addPreferencesFromResource(R.xml.preview_data);
- PreferenceScreen prefSet = getPreferenceScreen();
-
- mId = (Preference) prefSet.findPreference(UNIQUE_ID);
- mDevice = (Preference) prefSet.findPreference(DEVICE);
- mVersion = (Preference) prefSet.findPreference(VERSION);
- mCountry = (Preference) prefSet.findPreference(COUNTRY);
- mCarrier = (Preference) prefSet.findPreference(CARRIER);
-
- mId.setSummary(Utilities.getUniqueID(getActivity().getApplicationContext()));
- mDevice.setSummary(Utilities.getDevice());
- mVersion.setSummary(Utilities.getModVersion());
- mCountry.setSummary(Utilities.getCountryCode(getActivity().getApplicationContext()));
- mCarrier.setSummary(Utilities.getCarrier(getActivity().getApplicationContext()));
- }
- }
-
- @Override
- public boolean onPreferenceChange(Preference preference, Object newValue) {
- return false;
- }
-}
View
65 src/com/android/settings/cmstats/ReportingService.java
@@ -16,8 +16,10 @@
package com.android.settings.cmstats;
-import java.util.ArrayList;
-import java.util.List;
+import android.app.Service;
+import android.content.Intent;
+import android.os.IBinder;
+import android.util.Log;
import org.apache.http.NameValuePair;
import org.apache.http.client.HttpClient;
@@ -26,42 +28,31 @@
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicNameValuePair;
-import android.app.Notification;
-import android.app.NotificationManager;
-import android.app.PendingIntent;
-import android.app.Service;
-import android.content.ComponentName;
-import android.content.Context;
-import android.content.Intent;
-import android.os.IBinder;
-import android.util.Log;
-
-import com.android.settings.R;
-import com.android.settings.Settings;
+import java.util.ArrayList;
+import java.util.List;
public class ReportingService extends Service {
protected static final String TAG = "CMStats";
+ protected static final String ANONYMOUS_LAST_CHECKED = "pref_anonymous_checked_in";
+
+ protected static final String ANONYMOUS_ALARM_SET = "pref_anonymous_alarm_set";
+
@Override
public IBinder onBind(Intent intent) {
return null;
}
@Override
- public int onStartCommand (Intent intent, int flags, int startId) {
- if (intent.getBooleanExtra("firstBoot", false)) {
- promptUser();
- Log.d(TAG, "Prompting user for opt-in.");
- } else {
- Log.d(TAG, "User has opted in -- reporting.");
- Thread thread = new Thread() {
- @Override
- public void run() {
- report();
- }
- };
- thread.start();
- }
+ public int onStartCommand(Intent intent, int flags, int startId) {
+ Log.d(TAG, "Sending anonymous statistics data..");
+ Thread thread = new Thread() {
+ @Override
+ public void run() {
+ report();
+ }
+ };
+ thread.start();
return Service.START_REDELIVER_INTENT;
}
@@ -92,7 +83,7 @@ private void report() {
kv.add(new BasicNameValuePair("device_carrier_id", deviceCarrierId));
httppost.setEntity(new UrlEncodedFormEntity(kv));
httpclient.execute(httppost);
- getSharedPreferences("CMStats", 0).edit().putLong(AnonymousStats.ANONYMOUS_LAST_CHECKED,
+ getSharedPreferences("CMStats", 0).edit().putLong(ANONYMOUS_LAST_CHECKED,
System.currentTimeMillis()).apply();
} catch (Exception e) {
Log.e(TAG, "Got Exception", e);
@@ -100,20 +91,4 @@ private void report() {
ReportingServiceManager.setAlarm(this);
stopSelf();
}
-
- private void promptUser() {
- NotificationManager nm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
- Intent nI = new Intent();
- nI.setComponent(new ComponentName(getPackageName(),Settings.AnonymousStatsActivity.class.getName()));
- PendingIntent pI = PendingIntent.getActivity(this, 0, nI, 0);
- Notification.Builder builder = new Notification.Builder(this)
- .setSmallIcon(R.drawable.ic_cm_stats_notif)
- .setAutoCancel(true)
- .setTicker(getString(R.string.anonymous_statistics_title))
- .setContentIntent(pI)
- .setWhen(0)
- .setContentTitle(getString(R.string.anonymous_statistics_title))
- .setContentText(getString(R.string.anonymous_notification_desc));
- nm.notify(1, builder.getNotification());
- }
}
View
22 src/com/android/settings/cmstats/ReportingServiceManager.java
@@ -43,13 +43,8 @@ public void onReceive(Context ctx, Intent intent) {
protected static void setAlarm (Context ctx) {
SharedPreferences prefs = ctx.getSharedPreferences("CMStats", 0);
- prefs.edit().putBoolean(AnonymousStats.ANONYMOUS_ALARM_SET, false).apply();
- boolean optedIn = prefs.getBoolean(AnonymousStats.ANONYMOUS_OPT_IN, true);
- boolean firstBoot = prefs.getBoolean(AnonymousStats.ANONYMOUS_FIRST_BOOT, true);
- if (!optedIn || firstBoot) {
- return;
- }
- long lastSynced = prefs.getLong(AnonymousStats.ANONYMOUS_LAST_CHECKED, 0);
+ prefs.edit().putBoolean(ReportingService.ANONYMOUS_ALARM_SET, false).apply();
+ long lastSynced = prefs.getLong(ReportingService.ANONYMOUS_LAST_CHECKED, 0);
if (lastSynced == 0) {
return;
}
@@ -59,7 +54,7 @@ protected static void setAlarm (Context ctx) {
AlarmManager alarmManager = (AlarmManager) ctx.getSystemService(Context.ALARM_SERVICE);
alarmManager.set(AlarmManager.RTC_WAKEUP, System.currentTimeMillis() + timeLeft, PendingIntent.getBroadcast(ctx, 0, sIntent, 0));
Log.d(ReportingService.TAG, "Next sync attempt in : " + timeLeft / dMill + " days");
- prefs.edit().putBoolean(AnonymousStats.ANONYMOUS_ALARM_SET, true).apply();
+ prefs.edit().putBoolean(ReportingService.ANONYMOUS_ALARM_SET, true).apply();
}
public static void launchService (Context ctx) {
@@ -67,10 +62,8 @@ public static void launchService (Context ctx) {
NetworkInfo networkInfo = cm.getActiveNetworkInfo();
if (networkInfo != null && networkInfo.isConnected()) {
SharedPreferences prefs = ctx.getSharedPreferences("CMStats", 0);
- long lastSynced = prefs.getLong(AnonymousStats.ANONYMOUS_LAST_CHECKED, 0);
- boolean firstBoot = prefs.getBoolean(AnonymousStats.ANONYMOUS_FIRST_BOOT, true);
- boolean optedIn = prefs.getBoolean(AnonymousStats.ANONYMOUS_OPT_IN, true);
- boolean alarmSet = prefs.getBoolean(AnonymousStats.ANONYMOUS_ALARM_SET, false);
+ long lastSynced = prefs.getLong(ReportingService.ANONYMOUS_LAST_CHECKED, 0);
+ boolean alarmSet = prefs.getBoolean(ReportingService.ANONYMOUS_ALARM_SET, false);
if (alarmSet) {
return;
}
@@ -80,12 +73,11 @@ public static void launchService (Context ctx) {
} else if (System.currentTimeMillis() - lastSynced >= tFrame) {
shouldSync = true;
}
- if ((shouldSync && optedIn) || firstBoot) {
+ if (shouldSync) {
Intent sIntent = new Intent();
sIntent.setComponent(new ComponentName(ctx.getPackageName(), ReportingService.class.getName()));
- sIntent.putExtra("firstBoot", firstBoot);
ctx.startService(sIntent);
- } else if (optedIn) {
+ } else {
setAlarm(ctx);
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.