diff --git a/java/res/layout/research_feedback_activity.xml b/java/res/layout/research_feedback_activity.xml
deleted file mode 100644
index a6b8b8a43..000000000
--- a/java/res/layout/research_feedback_activity.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
-
-
-
diff --git a/java/res/layout/research_feedback_fragment_layout.xml b/java/res/layout/research_feedback_fragment_layout.xml
deleted file mode 100644
index fb5c27815..000000000
--- a/java/res/layout/research_feedback_fragment_layout.xml
+++ /dev/null
@@ -1,115 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/java/res/layout/research_feedback_layout.xml b/java/res/layout/research_feedback_layout.xml
deleted file mode 100644
index bacd19101..000000000
--- a/java/res/layout/research_feedback_layout.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/java/res/values-af/strings.xml b/java/res/values-af/strings.xml
index ce7cb18fc..6230cbe16 100644
--- a/java/res/values-af/strings.xml
+++ b/java/res/values-af/strings.xml
@@ -21,7 +21,6 @@
"Invoeropsies"
- "Navorsing-loglêerbevele""Soek kontakname op""Speltoetser gebruik inskrywings uit jou kontaklys""Vibreer met sleuteldruk"
diff --git a/java/res/values-am/strings.xml b/java/res/values-am/strings.xml
index 32eed413b..138989e1d 100644
--- a/java/res/values-am/strings.xml
+++ b/java/res/values-am/strings.xml
@@ -21,7 +21,6 @@
"ግቤት አማራጮች"
- "የጥናት የምዝግብ ማስታወሻ ትዕዛዞች""የእውቅያ ስሞችን ተመልከት""ፊደል አራሚ ከእውቅያ ዝርዝርህ የገቡትን ይጠቀማል""በቁልፍመጫንጊዜ አንዝር"
diff --git a/java/res/values-ar/strings.xml b/java/res/values-ar/strings.xml
index 13aef2a67..7df155aef 100644
--- a/java/res/values-ar/strings.xml
+++ b/java/res/values-ar/strings.xml
@@ -21,7 +21,6 @@
"خيارات الإرسال"
- "أوامر سجلات البحث""بحث في أسماء جهات الاتصال""يستخدم المدقق الإملائي إدخالات من قائمة جهات الاتصال""اهتزاز عند ضغط مفتاح"
diff --git a/java/res/values-az-rAZ/strings.xml b/java/res/values-az-rAZ/strings.xml
index 5a40e9f14..a929f8b90 100644
--- a/java/res/values-az-rAZ/strings.xml
+++ b/java/res/values-az-rAZ/strings.xml
@@ -21,7 +21,6 @@
"Daxiletmə seçimləri"
- "Araşdırma Jurnalı Əmrləri""Kontakt adlarına baxın""Orfoqrafik yoxlanış kontakt siyahınızdakı qeydlərdən istifadə edir""Vibrasiyalı klikləmə"
diff --git a/java/res/values-bg/strings.xml b/java/res/values-bg/strings.xml
index 562e71b4f..4c9496206 100644
--- a/java/res/values-bg/strings.xml
+++ b/java/res/values-bg/strings.xml
@@ -21,7 +21,6 @@
"Опции за въвеждане"
- "Команди за рег. файл за проучвания""Търсене на имена""За проверка на правописа се ползват записи от списъка с контакти""Да вибрира при натискане на клавиш"
diff --git a/java/res/values-ca/strings.xml b/java/res/values-ca/strings.xml
index e946ba78b..d438bb194 100644
--- a/java/res/values-ca/strings.xml
+++ b/java/res/values-ca/strings.xml
@@ -21,7 +21,6 @@
"Opcions d\'entrada"
- "Recerca d\'ordres de reg.""Cerca noms de contactes""El corrector ortogràfic utilitza entrades de la llista de contactes""Vibra en prémer tecles"
diff --git a/java/res/values-cs/strings.xml b/java/res/values-cs/strings.xml
index c093d8c50..c90c450fa 100644
--- a/java/res/values-cs/strings.xml
+++ b/java/res/values-cs/strings.xml
@@ -21,7 +21,6 @@
"Možnosti zadávání textu a dat"
- "Příkazy vývoj. protokolu""Vyhledat kontakty""Kontrola pravopisu používá záznamy z vašeho seznamu kontaktů.""Při stisku klávesy vibrovat"
diff --git a/java/res/values-da/strings.xml b/java/res/values-da/strings.xml
index 65025b7a8..e761157c0 100644
--- a/java/res/values-da/strings.xml
+++ b/java/res/values-da/strings.xml
@@ -21,7 +21,6 @@
"Indstillinger for input"
- "Forskningslogkommandoer""Anvend kontaktnavne""Stavekontrollen bruger ord fra dine kontaktpersondata""Vibration ved tastetryk"
diff --git a/java/res/values-de/strings.xml b/java/res/values-de/strings.xml
index f2074b762..b5b0feec7 100644
--- a/java/res/values-de/strings.xml
+++ b/java/res/values-de/strings.xml
@@ -21,7 +21,6 @@
"Eingabeoptionen"
- "Forschungsprotokollbefehle""Kontaktnamen prüfen""Rechtschreibprüfung kann Einträge aus meiner Kontaktliste verwenden""Bei Tastendruck vibrieren"
diff --git a/java/res/values-el/strings.xml b/java/res/values-el/strings.xml
index 7f0e3f3d7..150c8069b 100644
--- a/java/res/values-el/strings.xml
+++ b/java/res/values-el/strings.xml
@@ -21,7 +21,6 @@
"Επιλογές εισόδου"
- "Έρευνα εντολών καταγραφής""Αναζήτηση ονομάτων επαφών""Ο ορθογρ. έλεγχος χρησιμοπ. καταχωρίσεις από τη λίστα επαφών σας""Δόνηση κατά το πάτημα πλήκτρων"
diff --git a/java/res/values-en-rGB/strings.xml b/java/res/values-en-rGB/strings.xml
index 89e978925..2be2a5674 100644
--- a/java/res/values-en-rGB/strings.xml
+++ b/java/res/values-en-rGB/strings.xml
@@ -21,7 +21,6 @@
"Input options"
- "Research Log Commands""Look up contact names""Spell checker uses entries from your contact list""Vibrate on keypress"
diff --git a/java/res/values-en-rIN/strings.xml b/java/res/values-en-rIN/strings.xml
index 89e978925..2be2a5674 100644
--- a/java/res/values-en-rIN/strings.xml
+++ b/java/res/values-en-rIN/strings.xml
@@ -21,7 +21,6 @@
"Input options"
- "Research Log Commands""Look up contact names""Spell checker uses entries from your contact list""Vibrate on keypress"
diff --git a/java/res/values-es-rUS/strings.xml b/java/res/values-es-rUS/strings.xml
index d440c0ce6..cf88e192e 100644
--- a/java/res/values-es-rUS/strings.xml
+++ b/java/res/values-es-rUS/strings.xml
@@ -21,7 +21,6 @@
"Opciones de entrada"
- "Comandos registro invest.""Buscar nombres contactos""El corrector ortográfico usa entradas de tu lista de contactos.""Vibrar al pulsar teclas"
diff --git a/java/res/values-es/strings.xml b/java/res/values-es/strings.xml
index 3476ac5dd..66a551dcc 100644
--- a/java/res/values-es/strings.xml
+++ b/java/res/values-es/strings.xml
@@ -21,7 +21,6 @@
"Opciones entrada texto"
- "Comandos registro investigación""Nombres de contactos""Añadir nombres de tu lista de contactos al corrector""Vibrar al pulsar tecla"
diff --git a/java/res/values-et-rEE/strings.xml b/java/res/values-et-rEE/strings.xml
index 6fbc4b40c..4c8042a73 100644
--- a/java/res/values-et-rEE/strings.xml
+++ b/java/res/values-et-rEE/strings.xml
@@ -21,7 +21,6 @@
"Sisestusvalikud"
- "Uuringulogi käsud""Kontakti nimede kontroll.""Õigekirjakontroll kasutab teie kontaktisikute loendi sissekandeid""Vibreeri klahvivajutusel"
diff --git a/java/res/values-fa/strings.xml b/java/res/values-fa/strings.xml
index 04c6a5aca..b8cfe035b 100644
--- a/java/res/values-fa/strings.xml
+++ b/java/res/values-fa/strings.xml
@@ -21,7 +21,6 @@
"گزینههای ورودی"
- "فرمانهای گزارشگیری پژوهش""جستجوی نام مخاطبین""غلطگیر املا از ورودیهای لیست مخاطبین شما استفاده میکند""لرزش با فشار کلید"
diff --git a/java/res/values-fi/strings.xml b/java/res/values-fi/strings.xml
index 756684ae0..75b949ff6 100644
--- a/java/res/values-fi/strings.xml
+++ b/java/res/values-fi/strings.xml
@@ -21,7 +21,6 @@
"Syöttövalinnat"
- "Tutkimuslokin komennot""Hae yht.tietojen nimiä""Oikeinkirjoituksen tarkistus käyttää yhteystietojasi.""Käytä värinää näppäimiä painettaessa"
diff --git a/java/res/values-fr-rCA/strings.xml b/java/res/values-fr-rCA/strings.xml
index 5b1308166..da44271af 100644
--- a/java/res/values-fr-rCA/strings.xml
+++ b/java/res/values-fr-rCA/strings.xml
@@ -21,7 +21,6 @@
"Options de saisie"
- "Commandes journaux rech.""Rechercher noms contacts""Correcteur orthographique utilise entrées de liste de contacts.""Vibrer à chaque touche"
diff --git a/java/res/values-fr/strings.xml b/java/res/values-fr/strings.xml
index 1bb856783..55f4afd82 100644
--- a/java/res/values-fr/strings.xml
+++ b/java/res/values-fr/strings.xml
@@ -21,7 +21,6 @@
"Options de saisie"
- "Commandes journaux rech.""Rechercher noms contacts""Correcteur orthographique utilise entrées de liste de contacts.""Vibrer à chaque touche"
diff --git a/java/res/values-hi/strings.xml b/java/res/values-hi/strings.xml
index 3129d86cc..73d1c8787 100644
--- a/java/res/values-hi/strings.xml
+++ b/java/res/values-hi/strings.xml
@@ -21,7 +21,6 @@
"इनपुट विकल्प"
- "लॉग आदेशों का शोध करें""संपर्क नामों को खोजें""वर्तनी परीक्षक आपकी संपर्क सूची की प्रविष्टियों का उपयोग करता है""कुंजी दबाने पर कंपन करता है"
diff --git a/java/res/values-hr/strings.xml b/java/res/values-hr/strings.xml
index 0882faad4..656ba387f 100644
--- a/java/res/values-hr/strings.xml
+++ b/java/res/values-hr/strings.xml
@@ -21,7 +21,6 @@
"Opcije ulaza"
- "Istraživanje naredbi dnevnika""Potražite imena kontakata""Provjera pravopisa upotrebljava unose iz vašeg popisa kontakata""Vibracija pri pritisku na tipku"
diff --git a/java/res/values-hu/strings.xml b/java/res/values-hu/strings.xml
index 8a953ab9d..575f116bd 100644
--- a/java/res/values-hu/strings.xml
+++ b/java/res/values-hu/strings.xml
@@ -21,7 +21,6 @@
"Beviteli beállítások"
- "Naplózási parancsok""Névjegyek keresése""A helyesírás-ellenőrző használja a névjegyek bejegyzéseit""Rezgés gombnyomásra"
diff --git a/java/res/values-hy-rAM/strings.xml b/java/res/values-hy-rAM/strings.xml
index 03d56a626..d55af47c9 100644
--- a/java/res/values-hy-rAM/strings.xml
+++ b/java/res/values-hy-rAM/strings.xml
@@ -21,7 +21,6 @@
"Ներածման ընտրանքներ"
- "Հետազոտական գրառումների հրամաններ""Փնտրել կոնտակտային անուններ""Տառասխալների ուղղիչն օգտագործում է ձեր կոնտակտների ցանկի տվյալները""Թրթռալ սեղմման ժամանակ"
diff --git a/java/res/values-in/strings.xml b/java/res/values-in/strings.xml
index e3c551629..b2c12dd4c 100644
--- a/java/res/values-in/strings.xml
+++ b/java/res/values-in/strings.xml
@@ -21,7 +21,6 @@
"Opsi masukan"
- "Riset Perintah Log""Cari nama kontak""Pemeriksa ejaan menggunakan entri dari daftar kontak Anda""Getar jika tombol ditekan"
diff --git a/java/res/values-is/strings.xml b/java/res/values-is/strings.xml
index 1588534c9..e3efe1ff5 100644
--- a/java/res/values-is/strings.xml
+++ b/java/res/values-is/strings.xml
@@ -22,7 +22,6 @@
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-
diff --git a/java/res/values-it/strings.xml b/java/res/values-it/strings.xml
index 6685095be..eee572930 100644
--- a/java/res/values-it/strings.xml
+++ b/java/res/values-it/strings.xml
@@ -21,7 +21,6 @@
"Opzioni inserimento"
- "Ricerca comandi di log""Cerca in nomi contatti""La funzione di controllo ortografico usa voci dell\'elenco contatti""Vibrazione tasti"
diff --git a/java/res/values-iw/strings.xml b/java/res/values-iw/strings.xml
index dab2d8ed8..089aa0840 100644
--- a/java/res/values-iw/strings.xml
+++ b/java/res/values-iw/strings.xml
@@ -21,7 +21,6 @@
"אפשרויות קלט"
- "פקודות יומן מחקר""חפש שמות של אנשי קשר""בודק האיות משתמש בערכים מרשימת אנשי הקשר שלך""רטט בלחיצה על מקשים"
diff --git a/java/res/values-ja/strings.xml b/java/res/values-ja/strings.xml
index 7d749a6a2..dc5c88986 100644
--- a/java/res/values-ja/strings.xml
+++ b/java/res/values-ja/strings.xml
@@ -21,7 +21,6 @@
"入力オプション"
- "ログコマンドの検索""連絡先名の検索""スペルチェッカーでは連絡先リストのエントリを使用します""キー操作バイブ"
diff --git a/java/res/values-ka-rGE/strings.xml b/java/res/values-ka-rGE/strings.xml
index 547bf29ca..74da2d00f 100644
--- a/java/res/values-ka-rGE/strings.xml
+++ b/java/res/values-ka-rGE/strings.xml
@@ -21,7 +21,6 @@
"შეყვანის მეთოდები"
- "კვლევის აღრიცხვის ბრძანებები""კონტაქტებში ძებნა""კონტაქტების სიის გამოყენება მართლწერის შემოწმებისას""ვიბრაცია კლავიშზე დაჭერისას"
diff --git a/java/res/values-kk/strings.xml b/java/res/values-kk/strings.xml
index 83ac0daf7..9ce3c52b8 100644
--- a/java/res/values-kk/strings.xml
+++ b/java/res/values-kk/strings.xml
@@ -21,7 +21,6 @@
"Енгізу опциялары"
- "Журнал пәрмендерін зерттеу""Контакт аттарын іздеу""Емлені тексеру құралы контактілер тізімінің жазбаларын пайдаланады""Пернені басқан кездегі діріл"
diff --git a/java/res/values-km-rKH/strings.xml b/java/res/values-km-rKH/strings.xml
index 519aa44d0..671137c87 100644
--- a/java/res/values-km-rKH/strings.xml
+++ b/java/res/values-km-rKH/strings.xml
@@ -21,7 +21,6 @@
"ជម្រើសបញ្ចូល"
- "ពាក្យបញ្ជាកំណត់ហេតុការស្រាវជ្រាវ""រកមើលឈ្មោះទំនាក់ទំនង""កម្មវិធីពិនិត្យអក្ខរាវិរុទ្ធប្រើធាតុពីក្នុងបញ្ជីទំនាក់ទំនងរបស់អ្នក""ញ័រនៅពេលចុចគ្រាប់ចុច"
diff --git a/java/res/values-ko/strings.xml b/java/res/values-ko/strings.xml
index 4037abd02..d6a6653b3 100644
--- a/java/res/values-ko/strings.xml
+++ b/java/res/values-ko/strings.xml
@@ -21,7 +21,6 @@
"입력 옵션"
- "로그 명령 탐색""연락처 이름 조회""맞춤법 검사기가 주소록의 항목을 사용합니다.""키를 누를 때 진동 발생"
diff --git a/java/res/values-lo-rLA/strings.xml b/java/res/values-lo-rLA/strings.xml
index 76fe5e042..8e996cdff 100644
--- a/java/res/values-lo-rLA/strings.xml
+++ b/java/res/values-lo-rLA/strings.xml
@@ -21,7 +21,6 @@
"ຕົວເລືອກການປ້ອນຂໍ້ມູນ"
- "Research Log Commands""ເບິ່ງທີ່ຊື່ຂອງລາຍຊື່ຜູ່ຕິດຕໍ່""ໂຕຊ່ວຍສະກົດໃຊ້ຂໍ້ມູນຈາກລາຍການຂອງລາຍຊື່ຜູ່ຕິດຕໍ່ຂອງທ່ານ""ສັ່ນເຕືອນເມື່ອພິມ"
diff --git a/java/res/values-lt/strings.xml b/java/res/values-lt/strings.xml
index c049a165e..afd968d68 100644
--- a/java/res/values-lt/strings.xml
+++ b/java/res/values-lt/strings.xml
@@ -21,7 +21,6 @@
"Įvesties parinktys"
- "Tyrinėti žurnalo komandas""Kontaktų vardų paieška""Rašybos tikrinimo progr. naudoja įrašus, esančius kontaktų sąraše""Vibruoti, kai paspaudžiami klavišai"
diff --git a/java/res/values-lv/strings.xml b/java/res/values-lv/strings.xml
index 901c3486f..92c3b266a 100644
--- a/java/res/values-lv/strings.xml
+++ b/java/res/values-lv/strings.xml
@@ -21,7 +21,6 @@
"Ievades opcijas"
- "Izpētes žurnāla komandas""Meklēt kontaktp. vārdus""Pareizrakst. pārbaudītājs lieto ierakstus no kontaktp. saraksta.""Vibrēt, nospiežot taustiņu"
diff --git a/java/res/values-mk/strings.xml b/java/res/values-mk/strings.xml
index 1588534c9..e3efe1ff5 100644
--- a/java/res/values-mk/strings.xml
+++ b/java/res/values-mk/strings.xml
@@ -22,7 +22,6 @@
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-
diff --git a/java/res/values-mn-rMN/strings.xml b/java/res/values-mn-rMN/strings.xml
index 4c64b3354..cdbe65d80 100644
--- a/java/res/values-mn-rMN/strings.xml
+++ b/java/res/values-mn-rMN/strings.xml
@@ -21,7 +21,6 @@
"Оруулах сонголтууд"
- "Судалгааны протоколын командууд""Харилцагчийн нэр хайх""Алдаа шалгагч нь таны харилцагчдын жагсаалтаас ашиглана""Товч дарахад чичрэх"
diff --git a/java/res/values-ms-rMY/strings.xml b/java/res/values-ms-rMY/strings.xml
index cea20217e..1c1bbd547 100644
--- a/java/res/values-ms-rMY/strings.xml
+++ b/java/res/values-ms-rMY/strings.xml
@@ -21,7 +21,6 @@
"Pilihan input"
- "Arahan Log Penyelidikan""Cari nama kenalan""Penyemak ejaan menggunakan entri dari senarai kenalan anda""Getar pada tekanan kekunci"
diff --git a/java/res/values-nb/strings.xml b/java/res/values-nb/strings.xml
index e4f16032c..e61f75b49 100644
--- a/java/res/values-nb/strings.xml
+++ b/java/res/values-nb/strings.xml
@@ -21,7 +21,6 @@
"Inndataalternativer"
- "Kommandoer for undersøkelseslogging""Slå opp kontaktnavn""Stavekontrollen bruker oppføringer fra kontaktlisten din""Vibrer ved tastetrykk"
diff --git a/java/res/values-ne-rNP/strings.xml b/java/res/values-ne-rNP/strings.xml
index f467443b3..537685cf2 100644
--- a/java/res/values-ne-rNP/strings.xml
+++ b/java/res/values-ne-rNP/strings.xml
@@ -21,7 +21,6 @@
"इनपुट विकल्पहरू"
- "लग निर्देशनहरू शोध गर्नुहोस्""सम्पर्क नामहरू हेर्नुहोस्""तपाईँको सम्पर्क सूचीबाट हिज्जे परीक्षकले प्रविष्टिहरूको प्रयोग गर्छ""कुञ्जी थिच्दा भाइब्रेट"
diff --git a/java/res/values-nl/strings.xml b/java/res/values-nl/strings.xml
index 342464fc8..d123d36d4 100644
--- a/java/res/values-nl/strings.xml
+++ b/java/res/values-nl/strings.xml
@@ -21,7 +21,6 @@
"Invoeropties"
- "Opdrachten in onderzoekslogbestand""Contactnamen opzoeken""De spellingcontrole gebruikt items uit uw contactenlijst""Trillen bij toetsaanslag"
diff --git a/java/res/values-pl/strings.xml b/java/res/values-pl/strings.xml
index c4261c60e..cdd7d418b 100644
--- a/java/res/values-pl/strings.xml
+++ b/java/res/values-pl/strings.xml
@@ -21,7 +21,6 @@
"Opcje wprowadzania"
- "Polecenia dziennika badań""Przeszukaj kontakty""Sprawdzanie pisowni bierze pod uwagę wpisy z listy kontaktów.""Wibracja przy naciśnięciu"
diff --git a/java/res/values-pt-rPT/strings.xml b/java/res/values-pt-rPT/strings.xml
index 8b75dd0dd..d865f4764 100644
--- a/java/res/values-pt-rPT/strings.xml
+++ b/java/res/values-pt-rPT/strings.xml
@@ -21,7 +21,6 @@
"Opções de introdução"
- "Comandos de Reg. Invest.""Procurar nomes de contac.""O corretor ortográfico utiliza entradas da sua lista de contactos""Vibrar ao primir as teclas"
diff --git a/java/res/values-pt/strings.xml b/java/res/values-pt/strings.xml
index afee26d25..5b4d39bff 100644
--- a/java/res/values-pt/strings.xml
+++ b/java/res/values-pt/strings.xml
@@ -21,7 +21,6 @@
"Opções de entrada"
- "Pesq. comandos de reg.""Buscar nomes de contatos""O corretor ortográfico usa entradas de sua lista de contatos""Vibrar ao tocar a tecla"
diff --git a/java/res/values-rm/strings.xml b/java/res/values-rm/strings.xml
index 2ea98cf53..43e15836a 100644
--- a/java/res/values-rm/strings.xml
+++ b/java/res/values-rm/strings.xml
@@ -22,7 +22,6 @@
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-
diff --git a/java/res/values-ro/strings.xml b/java/res/values-ro/strings.xml
index 51d3c5901..dc8c1b8b6 100644
--- a/java/res/values-ro/strings.xml
+++ b/java/res/values-ro/strings.xml
@@ -21,7 +21,6 @@
"Opţiuni de introducere text"
- "Comenzi jurnal cercetare""Verificare nume în agendă""Verificatorul ortografic utilizează intrări din lista de contacte""Vibrare la apăsarea tastei"
diff --git a/java/res/values-ru/strings.xml b/java/res/values-ru/strings.xml
index bef248385..065007e77 100644
--- a/java/res/values-ru/strings.xml
+++ b/java/res/values-ru/strings.xml
@@ -21,7 +21,6 @@
"Настройки"
- "Все команды""Поиск контактов""Обращаться к списку контактов при проверке правописания""Виброотклик клавиш"
diff --git a/java/res/values-sk/strings.xml b/java/res/values-sk/strings.xml
index 9a3564782..4eefab9cb 100644
--- a/java/res/values-sk/strings.xml
+++ b/java/res/values-sk/strings.xml
@@ -21,7 +21,6 @@
"Možnosti zadávania textu a údajov"
- "Príkazy denníka výskumu""Vyhľadať kontakty""Kontrola pravopisu používa záznamy z vášho zoznamu kontaktov""Pri stlačení klávesu vibrovať"
diff --git a/java/res/values-sl/strings.xml b/java/res/values-sl/strings.xml
index 2594aaec4..b411dc4d0 100644
--- a/java/res/values-sl/strings.xml
+++ b/java/res/values-sl/strings.xml
@@ -21,7 +21,6 @@
"Možnosti vnosa"
- "Ukazi za dnevnik raziskav""Iskanje imen stikov""Črkovalnik uporablja vnose s seznama stikov""Vibriranje ob pritisku tipke"
diff --git a/java/res/values-sr/strings.xml b/java/res/values-sr/strings.xml
index 7bd7f67e5..2db47044f 100644
--- a/java/res/values-sr/strings.xml
+++ b/java/res/values-sr/strings.xml
@@ -21,7 +21,6 @@
"Опције уноса"
- "Команде евиденције истраживања""Потражи имена контаката""Контролор правописа користи уносе са листе контаката""Вибрирај на притисак тастера"
diff --git a/java/res/values-sv/strings.xml b/java/res/values-sv/strings.xml
index 7092e6876..116d2f493 100644
--- a/java/res/values-sv/strings.xml
+++ b/java/res/values-sv/strings.xml
@@ -21,7 +21,6 @@
"Inmatningsalternativ"
- "Loggkommandon""Sök namn på kontakter""I stavningskontrollen används poster från kontaktlistan""Vibrera vid tangenttryck"
diff --git a/java/res/values-sw/strings.xml b/java/res/values-sw/strings.xml
index 56312899d..7a40e5cf2 100644
--- a/java/res/values-sw/strings.xml
+++ b/java/res/values-sw/strings.xml
@@ -21,7 +21,6 @@
"Chaguo za uingizaji"
- "Amri za Kumbukumbu za Utafiti""Angalia majina ya unaowasiliana nao""Kikagua tahajia hutumia majina yaliyoingizwa katika orodha yako ya anwani""Tetema unabofya kitufe"
diff --git a/java/res/values-th/strings.xml b/java/res/values-th/strings.xml
index ece0c4ba9..02fbd617d 100644
--- a/java/res/values-th/strings.xml
+++ b/java/res/values-th/strings.xml
@@ -21,7 +21,6 @@
"ตัวเลือกการป้อนข้อมูล"
- "คำสั่งบันทึกการวิจัย""ค้นหารายชื่อติดต่อ""เครื่องมือตรวจการสะกดใช้รายการจากรายชื่อติดต่อของคุณ""สั่นเมื่อกดปุ่ม"
diff --git a/java/res/values-tl/strings.xml b/java/res/values-tl/strings.xml
index ce1207a5f..43bbcd03b 100644
--- a/java/res/values-tl/strings.xml
+++ b/java/res/values-tl/strings.xml
@@ -21,7 +21,6 @@
"Mga pagpipilian sa input"
- "Cmmnd sa Log ng Pnnliksik""Maghanap pangalan contact""Gumagamit ang Spell Checker ng entries mula sa iyong contact list.""Mag-vibrate sa keypress"
diff --git a/java/res/values-tr/strings.xml b/java/res/values-tr/strings.xml
index 3584ec5db..329c7c6b3 100644
--- a/java/res/values-tr/strings.xml
+++ b/java/res/values-tr/strings.xml
@@ -21,7 +21,6 @@
"Giriş seçenekleri"
- "Araştırma Günlüğü Komutları""Kişi adlarını denetle""Yazım denetleyici, kişi listenizdeki girişleri kullanır""Tuşa basıldığında titret"
diff --git a/java/res/values-uk/strings.xml b/java/res/values-uk/strings.xml
index 15a30805e..ab4283257 100644
--- a/java/res/values-uk/strings.xml
+++ b/java/res/values-uk/strings.xml
@@ -21,7 +21,6 @@
"Парам. введення"
- "Команди журналу дослідж.""Шукати імена контактів""Програма перевірки правопису використ. записи зі списку контактів""Вібр. при натисканні клавіш"
diff --git a/java/res/values-vi/strings.xml b/java/res/values-vi/strings.xml
index 529dcec17..019620761 100644
--- a/java/res/values-vi/strings.xml
+++ b/java/res/values-vi/strings.xml
@@ -21,7 +21,6 @@
"Tùy chọn nhập"
- "Lệnh ghi nhật ký cho nghiên cứu""Tra cứu tên liên hệ""Trình kiểm tra chính tả sử dụng các mục nhập từ danh sách liên hệ của bạn""Rung khi nhấn phím"
diff --git a/java/res/values-zh-rCN/strings.xml b/java/res/values-zh-rCN/strings.xml
index 41fe0bfb6..134b9d5bf 100644
--- a/java/res/values-zh-rCN/strings.xml
+++ b/java/res/values-zh-rCN/strings.xml
@@ -21,7 +21,6 @@
"输入选项"
- "研究记录命令""查找联系人姓名""拼写检查工具会使用您的联系人列表中的条目""按键振动"
diff --git a/java/res/values-zh-rHK/strings.xml b/java/res/values-zh-rHK/strings.xml
index 34fa9c037..f2453a7ed 100644
--- a/java/res/values-zh-rHK/strings.xml
+++ b/java/res/values-zh-rHK/strings.xml
@@ -21,7 +21,6 @@
"輸入選項"
- "研究記錄指令""查找聯絡人姓名""拼字檢查程式使用您的聯絡人名單中的各項記錄""按鍵時震動"
diff --git a/java/res/values-zh-rTW/strings.xml b/java/res/values-zh-rTW/strings.xml
index 9c9f5e052..d9ee7906f 100644
--- a/java/res/values-zh-rTW/strings.xml
+++ b/java/res/values-zh-rTW/strings.xml
@@ -21,7 +21,6 @@
"輸入選項"
- "研究紀錄指令""查詢聯絡人姓名""拼字檢查程式使用您的聯絡人清單項目""按鍵時震動"
diff --git a/java/res/values-zu/strings.xml b/java/res/values-zu/strings.xml
index c79d81dcc..488fcdfb6 100644
--- a/java/res/values-zu/strings.xml
+++ b/java/res/values-zu/strings.xml
@@ -21,7 +21,6 @@
"Okukhethwa kukho kokungenayo"
- "Imiyalo yefayela lokungena lokucwaninga""Bheka amagama woxhumana nabo""Isihloli sokupela sisebenzisa okungenayo kusuka kuhlu lalabo oxhumana nabo""Dlidlizelisa ngokucindezela inkinobho"
diff --git a/java/res/values/donottranslate.xml b/java/res/values/donottranslate.xml
index 415dd0b65..83d082f82 100644
--- a/java/res/values/donottranslate.xml
+++ b/java/res/values/donottranslate.xml
@@ -137,6 +137,4 @@
tr:AsciiCapable,SupportTouchPositionCorrection,EmojiCapableqwerty
-
- Attention! You are using the special keyboard for research purposes.
diff --git a/java/res/values/research_strings.xml b/java/res/values/research_strings.xml
deleted file mode 100644
index e73871109..000000000
--- a/java/res/values/research_strings.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
- Send feedback
-
-
- Send feedback
-
-
- Enter your feedback here.
-
-
- The feedback field must not be empty.
-
diff --git a/java/res/values/strings.xml b/java/res/values/strings.xml
index 9f93055e2..a053b0b09 100644
--- a/java/res/values/strings.xml
+++ b/java/res/values/strings.xml
@@ -21,9 +21,6 @@
Input options
-
- Research Log Commands
-
Look up contact names
@@ -166,68 +163,8 @@
Input languages
-
-
- Suspend logging
-
-
- Enable logging
-
-
- Deleting session log
-
-
- Logging temporarily suspended. To disable permanently, go to Android Keyboard Settings
-
-
- Session log NOT deleted
-
-
- Session logging enabled
-
-
-
- Include session history
-
-
- Include account name
-
-
- Include recorded demonstration
-
-
- Send
-
-
- Cancel
-
-
- Please demonstrate the issue you are writing about.\n\nWhen finished, select the \"Bug?\" button again."Send feedback
-
-
- Recording cancelled due to timeout
-
-
- Please exit the feedback dialog to access the research log menu
-
-
-
- Warning
-
-
-
- Logging Disabled
-
-
-
- Research Uploader Service
-
-
-
- Research Replayer ServiceInput languages
diff --git a/java/res/values/urls.xml b/java/res/values/urls.xml
deleted file mode 100644
index a8e9ad7d3..000000000
--- a/java/res/values/urls.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardView.java b/java/src/com/android/inputmethod/keyboard/KeyboardView.java
index f90ad7975..ca7da6eb8 100644
--- a/java/src/com/android/inputmethod/keyboard/KeyboardView.java
+++ b/java/src/com/android/inputmethod/keyboard/KeyboardView.java
@@ -37,9 +37,7 @@ import com.android.inputmethod.keyboard.internal.KeyVisualAttributes;
import com.android.inputmethod.latin.Constants;
import com.android.inputmethod.latin.LatinImeLogger;
import com.android.inputmethod.latin.R;
-import com.android.inputmethod.latin.define.ProductionFlag;
import com.android.inputmethod.latin.utils.TypefaceUtils;
-import com.android.inputmethod.research.ResearchLogger;
import java.util.HashSet;
@@ -317,13 +315,6 @@ public class KeyboardView extends View {
}
}
- // Research Logging (Development Only Diagnostics) indicator.
- // TODO: Reimplement using a keyboard background image specific to the ResearchLogger,
- // and remove this call.
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.getInstance().paintIndicator(this, paint, canvas, width, height);
- }
-
mInvalidatedKeys.clear();
mInvalidateAllKeys = false;
}
diff --git a/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java
index f291a7ed0..4362a242f 100644
--- a/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java
+++ b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java
@@ -55,13 +55,11 @@ import com.android.inputmethod.latin.Constants;
import com.android.inputmethod.latin.LatinImeLogger;
import com.android.inputmethod.latin.R;
import com.android.inputmethod.latin.SuggestedWords;
-import com.android.inputmethod.latin.define.ProductionFlag;
import com.android.inputmethod.latin.settings.DebugSettings;
import com.android.inputmethod.latin.utils.CoordinateUtils;
import com.android.inputmethod.latin.utils.SpacebarLanguageUtils;
import com.android.inputmethod.latin.utils.TypefaceUtils;
import com.android.inputmethod.latin.utils.UsabilityStudyLogUtils;
-import com.android.inputmethod.research.ResearchLogger;
import java.util.WeakHashMap;
@@ -387,10 +385,6 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
mSpaceKey = keyboard.getKey(Constants.CODE_SPACE);
final int keyHeight = keyboard.mMostCommonKeyHeight - keyboard.mVerticalGap;
mLanguageOnSpacebarTextSize = keyHeight * mLanguageOnSpacebarTextRatio;
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- final int orientation = getContext().getResources().getConfiguration().orientation;
- ResearchLogger.mainKeyboardView_setKeyboard(keyboard, orientation);
- }
mAccessibilityDelegate.setKeyboard(keyboard);
}
@@ -552,24 +546,12 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
protected void onAttachedToWindow() {
super.onAttachedToWindow();
installPreviewPlacerView();
- // Notify the ResearchLogger (development only diagnostics) that the keyboard view has
- // been attached. This is needed to properly show the splash screen, which requires that
- // the window token of the KeyboardView be non-null.
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.getInstance().mainKeyboardView_onAttachedToWindow(this);
- }
}
@Override
protected void onDetachedFromWindow() {
super.onDetachedFromWindow();
mDrawingPreviewPlacerView.removeAllViews();
- // Notify the ResearchLogger (development only diagnostics) that the keyboard view has
- // been detached. This is needed to invalidate the reference of {@link MainKeyboardView}
- // to null.
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.getInstance().mainKeyboardView_onDetachedFromWindow();
- }
}
private MoreKeysPanel onCreateMoreKeysPanel(final Key key, final Context context) {
@@ -605,9 +587,6 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
if (key == null) {
return;
}
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.mainKeyboardView_onLongPress();
- }
final KeyboardActionListener listener = mKeyboardActionListener;
if (key.hasNoPanelAutoMoreKey()) {
final int moreKeyCode = key.getMoreKeys()[0].mCode;
@@ -723,10 +702,6 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
if (LatinImeLogger.sUsabilityStudy) {
UsabilityStudyLogUtils.writeMotionEvent(me);
}
- // Currently the same "move" event is being logged twice.
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.mainKeyboardView_processMotionEvent(me);
- }
final int index = me.getActionIndex();
final int id = me.getPointerId(index);
diff --git a/java/src/com/android/inputmethod/keyboard/PointerTracker.java b/java/src/com/android/inputmethod/keyboard/PointerTracker.java
index 303886cd3..f80761132 100644
--- a/java/src/com/android/inputmethod/keyboard/PointerTracker.java
+++ b/java/src/com/android/inputmethod/keyboard/PointerTracker.java
@@ -35,11 +35,9 @@ import com.android.inputmethod.latin.Constants;
import com.android.inputmethod.latin.InputPointers;
import com.android.inputmethod.latin.LatinImeLogger;
import com.android.inputmethod.latin.R;
-import com.android.inputmethod.latin.define.ProductionFlag;
import com.android.inputmethod.latin.settings.Settings;
import com.android.inputmethod.latin.utils.CoordinateUtils;
import com.android.inputmethod.latin.utils.ResourceUtils;
-import com.android.inputmethod.research.ResearchLogger;
import java.util.ArrayList;
@@ -335,10 +333,6 @@ public final class PointerTracker implements PointerTrackerQueue.Element,
output, ignoreModifierKey ? " ignoreModifier" : "",
altersCode ? " altersCode" : "", key.isEnabled() ? "" : " disabled"));
}
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.pointerTracker_callListenerOnCodeInput(key, x, y, ignoreModifierKey,
- altersCode, code);
- }
if (ignoreModifierKey) {
return;
}
@@ -373,10 +367,6 @@ public final class PointerTracker implements PointerTrackerQueue.Element,
withSliding ? " sliding" : "", ignoreModifierKey ? " ignoreModifier" : "",
key.isEnabled() ? "": " disabled"));
}
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.pointerTracker_callListenerOnRelease(key, primaryCode, withSliding,
- ignoreModifierKey);
- }
if (ignoreModifierKey) {
return;
}
@@ -396,9 +386,6 @@ public final class PointerTracker implements PointerTrackerQueue.Element,
if (DEBUG_LISTENER) {
Log.d(TAG, String.format("[%d] onCancelInput", mPointerId));
}
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.pointerTracker_callListenerOnCancelInput();
- }
sListener.onCancelInput();
}
@@ -702,9 +689,6 @@ public final class PointerTracker implements PointerTrackerQueue.Element,
Log.w(TAG, String.format("[%d] onDownEvent:"
+ " ignore potential noise: time=%d distance=%d",
mPointerId, deltaT, distance));
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.pointerTracker_onDownEvent(deltaT, distance * distance);
- }
cancelTrackingForAction();
return;
}
@@ -876,10 +860,6 @@ public final class PointerTracker implements PointerTrackerQueue.Element,
lastX, lastY, Constants.printableCode(oldKey.getCode()),
x, y, Constants.printableCode(key.getCode())));
}
- // TODO: This should be moved to outside of this nested if-clause?
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.pointerTracker_onMoveEvent(x, y, lastX, lastY);
- }
onUpEventInternal(x, y, eventTime);
onDownEventInternal(x, y, eventTime);
}
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index aeae6aab4..a3254161d 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -28,7 +28,6 @@ import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.content.Intent;
import android.content.IntentFilter;
-import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.Rect;
@@ -38,7 +37,6 @@ import android.net.ConnectivityManager;
import android.os.Debug;
import android.os.IBinder;
import android.os.Message;
-import android.preference.PreferenceManager;
import android.text.InputType;
import android.text.TextUtils;
import android.util.Log;
@@ -90,7 +88,6 @@ import com.android.inputmethod.latin.utils.JniUtils;
import com.android.inputmethod.latin.utils.LeakGuardHandlerWrapper;
import com.android.inputmethod.latin.utils.StatsUtils;
import com.android.inputmethod.latin.utils.SubtypeLocaleUtils;
-import com.android.inputmethod.research.ResearchLogger;
import java.io.FileDescriptor;
import java.io.PrintWriter;
@@ -494,11 +491,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
loadSettings();
resetSuggest();
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.getInstance().init(this, mKeyboardSwitcher);
- ResearchLogger.getInstance().initDictionary(mDictionaryFacilitator);
- }
-
// Register to receive ringer mode change and network state change.
// Also receive installation and removal of a dictionary pack.
final IntentFilter filter = new IntentFilter();
@@ -631,9 +623,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
mDictionaryFacilitator.closeDictionaries();
mSettings.onDestroy();
unregisterReceiver(mConnectivityAndRingerModeChangeReceiver);
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.getInstance().onDestroy();
- }
unregisterReceiver(mDictionaryPackInstallReceiver);
unregisterReceiver(mDictionaryDumpBroadcastReceiver);
PersonalizationDictionarySessionRegistrar.close(this);
@@ -757,10 +746,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
}
Log.i(TAG, "Starting input. Cursor position = "
+ editorInfo.initialSelStart + "," + editorInfo.initialSelEnd);
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
- ResearchLogger.latinIME_onStartInputViewInternal(editorInfo, prefs);
- }
if (InputAttributes.inPrivateImeOptions(null, NO_MICROPHONE_COMPAT, editorInfo)) {
Log.w(TAG, "Deprecated private IME option specified: " + editorInfo.privateImeOptions);
Log.w(TAG, "Use " + getPackageName() + "." + NO_MICROPHONE + " instead");
@@ -905,10 +890,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
mHandler.cancelUpdateSuggestionStrip();
// Should do the following in onFinishInputInternal but until JB MR2 it's not called :(
mInputLogic.finishInput();
- // Notify ResearchLogger
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.latinIME_onFinishInputViewInternal(finishingInput);
- }
}
@Override
@@ -922,11 +903,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
+ ", nss=" + newSelStart + ", nse=" + newSelEnd
+ ", cs=" + composingSpanStart + ", ce=" + composingSpanEnd);
}
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.latinIME_onUpdateSelection(oldSelStart, oldSelEnd,
- oldSelStart, oldSelEnd, newSelStart, newSelEnd, composingSpanStart,
- composingSpanEnd, mInputLogic.mConnection);
- }
// If the keyboard is not visible, we don't need to do all the housekeeping work, as it
// will be reset when the keyboard shows up anyway.
@@ -1013,9 +989,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
}
if (applicationSpecifiedCompletions == null) {
setNeutralSuggestionStrip();
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.latinIME_onDisplayCompletions(null);
- }
return;
}
@@ -1027,9 +1000,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
false /* isObsoleteSuggestions */, false /* isPrediction */);
// When in fullscreen mode, show completions generated by the application forcibly
setSuggestedWords(suggestedWords, true /* isSuggestionStripVisible */);
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.latinIME_onDisplayCompletions(applicationSpecifiedCompletions);
- }
}
private int getAdjustedBackingViewHeight() {
diff --git a/java/src/com/android/inputmethod/latin/RichInputConnection.java b/java/src/com/android/inputmethod/latin/RichInputConnection.java
index e7c163606..46c015116 100644
--- a/java/src/com/android/inputmethod/latin/RichInputConnection.java
+++ b/java/src/com/android/inputmethod/latin/RichInputConnection.java
@@ -26,14 +26,12 @@ import android.view.inputmethod.ExtractedText;
import android.view.inputmethod.ExtractedTextRequest;
import android.view.inputmethod.InputConnection;
-import com.android.inputmethod.latin.define.ProductionFlag;
import com.android.inputmethod.latin.settings.SpacingAndPunctuations;
import com.android.inputmethod.latin.utils.CapsModeUtils;
import com.android.inputmethod.latin.utils.DebugLogUtils;
import com.android.inputmethod.latin.utils.SpannableStringUtils;
import com.android.inputmethod.latin.utils.StringUtils;
import com.android.inputmethod.latin.utils.TextRange;
-import com.android.inputmethod.research.ResearchLogger;
import java.util.Arrays;
import java.util.regex.Pattern;
@@ -174,9 +172,6 @@ public final class RichInputConnection {
}
if (null != mIC && shouldFinishComposition) {
mIC.finishComposingText();
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.richInputConnection_finishComposingText();
- }
}
return true;
}
@@ -223,9 +218,6 @@ public final class RichInputConnection {
mComposingText.setLength(0);
if (null != mIC) {
mIC.finishComposingText();
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.richInputConnection_finishComposingText();
- }
}
}
@@ -363,9 +355,6 @@ public final class RichInputConnection {
}
if (null != mIC) {
mIC.deleteSurroundingText(beforeLength, afterLength);
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.richInputConnection_deleteSurroundingText(beforeLength, afterLength);
- }
}
if (DEBUG_PREVIOUS_TEXT) checkConsistencyForDebug();
}
@@ -374,9 +363,6 @@ public final class RichInputConnection {
mIC = mParent.getCurrentInputConnection();
if (null != mIC) {
mIC.performEditorAction(actionId);
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.richInputConnection_performEditorAction(actionId);
- }
}
}
@@ -429,9 +415,6 @@ public final class RichInputConnection {
}
if (null != mIC) {
mIC.sendKeyEvent(keyEvent);
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.richInputConnection_sendKeyEvent(keyEvent);
- }
}
}
@@ -469,9 +452,6 @@ public final class RichInputConnection {
// newCursorPosition != 1.
if (null != mIC) {
mIC.setComposingText(text, newCursorPosition);
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.richInputConnection_setComposingText(text, newCursorPosition);
- }
}
if (DEBUG_PREVIOUS_TEXT) checkConsistencyForDebug();
}
@@ -500,9 +480,6 @@ public final class RichInputConnection {
if (!isIcValid) {
return false;
}
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.richInputConnection_setSelection(start, end);
- }
}
return reloadTextCache();
}
@@ -530,9 +507,6 @@ public final class RichInputConnection {
mComposingText.setLength(0);
if (null != mIC) {
mIC.commitCompletion(completionInfo);
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.richInputConnection_commitCompletion(completionInfo);
- }
}
if (DEBUG_PREVIOUS_TEXT) checkConsistencyForDebug();
}
@@ -765,9 +739,6 @@ public final class RichInputConnection {
deleteSurroundingText(2, 0);
final String singleSpace = " ";
commitText(singleSpace, 1);
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.richInputConnection_revertDoubleSpacePeriod();
- }
return true;
}
@@ -790,9 +761,6 @@ public final class RichInputConnection {
deleteSurroundingText(2, 0);
final String text = " " + textBeforeCursor.subSequence(0, 1);
commitText(text, 1);
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.richInputConnection_revertSwapPunctuation();
- }
return true;
}
diff --git a/java/src/com/android/inputmethod/latin/define/ProductionFlag.java b/java/src/com/android/inputmethod/latin/define/ProductionFlag.java
index 761f457ea..972580298 100644
--- a/java/src/com/android/inputmethod/latin/define/ProductionFlag.java
+++ b/java/src/com/android/inputmethod/latin/define/ProductionFlag.java
@@ -21,13 +21,6 @@ public final class ProductionFlag {
// This class is not publicly instantiable.
}
- public static final boolean USES_DEVELOPMENT_ONLY_DIAGNOSTICS = false;
-
- // When false, USES_DEVELOPMENT_ONLY_DIAGNOSTICS_DEBUG suggests that all guarded
- // class-private DEBUG flags should be false, and any privacy controls should be enforced.
- // USES_DEVELOPMENT_ONLY_DIAGNOSTICS must be false for any production build.
- public static final boolean USES_DEVELOPMENT_ONLY_DIAGNOSTICS_DEBUG = false;
-
public static final boolean IS_HARDWARE_KEYBOARD_SUPPORTED = false;
// When true, enable {@link InputMethodService#onUpdateCursor} callback with
diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
index 2b7024ad6..2530f64f9 100644
--- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
+++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
@@ -44,7 +44,6 @@ import com.android.inputmethod.latin.Suggest.OnGetSuggestedWordsCallback;
import com.android.inputmethod.latin.SuggestedWords;
import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo;
import com.android.inputmethod.latin.WordComposer;
-import com.android.inputmethod.latin.define.ProductionFlag;
import com.android.inputmethod.latin.settings.SettingsValues;
import com.android.inputmethod.latin.settings.SpacingAndPunctuations;
import com.android.inputmethod.latin.suggestions.SuggestionStripViewAccessor;
@@ -54,7 +53,6 @@ import com.android.inputmethod.latin.utils.LatinImeLoggerUtils;
import com.android.inputmethod.latin.utils.RecapitalizeStatus;
import com.android.inputmethod.latin.utils.StringUtils;
import com.android.inputmethod.latin.utils.TextRange;
-import com.android.inputmethod.research.ResearchLogger;
import java.util.ArrayList;
import java.util.TreeSet;
@@ -201,19 +199,11 @@ public final class InputLogic {
resetComposingState(true /* alsoResetLastComposedWord */);
}
handler.postUpdateSuggestionStrip();
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS
- && ResearchLogger.RESEARCH_KEY_OUTPUT_TEXT.equals(rawText)) {
- ResearchLogger.getInstance().onResearchKeySelected(mLatinIME);
- return;
- }
final String text = performSpecificTldProcessingOnTextInput(rawText);
if (SpaceState.PHANTOM == mSpaceState) {
promotePhantomSpace(settingsValues);
}
mConnection.commitText(text, 1);
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.latinIME_onTextInput(text, false /* isBatchMode */);
- }
mConnection.endBatchEdit();
// Space state must be updated before calling updateShiftState
mSpaceState = SpaceState.NONE;
@@ -244,10 +234,6 @@ public final class InputLogic {
LatinImeLogger.logOnManualSuggestion("", suggestion, index, suggestedWords);
// Rely on onCodeInput to do the complicated swapping/stripping logic consistently.
final Event event = Event.createPunctuationSuggestionPickedEvent(suggestionInfo);
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.latinIME_punctuationSuggestion(index, suggestion,
- false /* isBatchMode */, suggestedWords.mIsPrediction);
- }
return onCodeInput(settingsValues, event, keyboardShiftState, handler);
}
@@ -286,11 +272,6 @@ public final class InputLogic {
LatinImeLogger.logOnManualSuggestion(replacedWord, suggestion, index, suggestedWords);
commitChosenWord(settingsValues, suggestion,
LastComposedWord.COMMIT_TYPE_MANUAL_PICK, LastComposedWord.NOT_A_SEPARATOR);
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.latinIME_pickSuggestionManually(replacedWord, index, suggestion,
- mWordComposer.isBatchMode(), suggestionInfo.mScore,
- suggestionInfo.mKindAndFlags, suggestionInfo.mSourceDict.mDictType);
- }
mConnection.endBatchEdit();
// Don't allow cancellation of manual pick
mLastComposedWord.deactivate();
@@ -403,9 +384,6 @@ public final class InputLogic {
final InputTransaction inputTransaction = new InputTransaction(settingsValues, event,
SystemClock.uptimeMillis(), mSpaceState,
getActualCapsMode(settingsValues, keyboardShiftMode));
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.latinIME_onCodeInput(code, event.mX, event.mY);
- }
if (event.mKeyCode != Constants.CODE_DELETE
|| inputTransaction.mTimestamp > mLastKeyTime + Constants.LONG_PRESS_MILLISECONDS) {
mDeleteCount = 0;
@@ -854,9 +832,6 @@ public final class InputLogic {
if (needsPrecedingSpace) {
promotePhantomSpace(settingsValues);
}
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.latinIME_handleSeparator(codePoint, mWordComposer.isComposingWord());
- }
if (!shouldAvoidSendingCode) {
sendKeyCodePoint(settingsValues, codePoint);
@@ -932,10 +907,6 @@ public final class InputLogic {
}
if (mWordComposer.isComposingWord()) {
if (mWordComposer.isBatchMode()) {
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- final String word = mWordComposer.getTypedWord();
- ResearchLogger.latinIME_handleBackspace_batch(word, 1);
- }
final String rejectedSuggestion = mWordComposer.getTypedWord();
mWordComposer.reset();
mWordComposer.setRejectedBatchModeSuggestion(rejectedSuggestion);
@@ -961,9 +932,6 @@ public final class InputLogic {
// This is triggered on backspace after a key that inputs multiple characters,
// like the smiley key or the .com key.
mConnection.deleteSurroundingText(mEnteredText.length(), 0);
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.latinIME_handleBackspace_cancelTextInput(mEnteredText);
- }
mEnteredText = null;
// If we have mEnteredText, then we know that mHasUncommittedTypedChars == false.
// In addition we know that spaceState is false, and that we should not be
@@ -993,10 +961,6 @@ public final class InputLogic {
mConnection.setSelection(mConnection.getExpectedSelectionEnd(),
mConnection.getExpectedSelectionEnd());
mConnection.deleteSurroundingText(numCharsDeleted, 0);
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.latinIME_handleBackspace(numCharsDeleted,
- false /* shouldUncommitLogUnit */);
- }
} else {
// There is no selection, just delete one character.
if (Constants.NOT_A_CURSOR_POSITION == mConnection.getExpectedSelectionEnd()) {
@@ -1031,10 +995,6 @@ public final class InputLogic {
final int lengthToDelete =
Character.isSupplementaryCodePoint(codePointBeforeCursor) ? 2 : 1;
mConnection.deleteSurroundingText(lengthToDelete, 0);
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.latinIME_handleBackspace(lengthToDelete,
- true /* shouldUncommitLogUnit */);
- }
if (mDeleteCount > Constants.DELETE_ACCELERATE_AT) {
final int codePointBeforeCursorToDeleteAgain =
mConnection.getCodePointBeforeCursor();
@@ -1042,10 +1002,6 @@ public final class InputLogic {
final int lengthToDeleteAgain = Character.isSupplementaryCodePoint(
codePointBeforeCursorToDeleteAgain) ? 2 : 1;
mConnection.deleteSurroundingText(lengthToDeleteAgain, 0);
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.latinIME_handleBackspace(lengthToDeleteAgain,
- true /* shouldUncommitLogUnit */);
- }
}
}
}
@@ -1083,9 +1039,6 @@ public final class InputLogic {
mConnection.deleteSurroundingText(2, 0);
final String text = lastTwo.charAt(1) + " ";
mConnection.commitText(text, 1);
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.latinIME_swapSwapperAndSpace(lastTwo, text);
- }
inputTransaction.requireShiftUpdate(InputTransaction.SHIFT_UPDATE_NOW);
}
}
@@ -1169,10 +1122,6 @@ public final class InputLogic {
final String textToInsert = inputTransaction.mSettingsValues.mSpacingAndPunctuations
.mSentenceSeparatorAndSpace;
mConnection.commitText(textToInsert, 1);
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.latinIME_maybeDoubleSpacePeriod(textToInsert,
- false /* isBatchMode */);
- }
mWordComposer.discardPreviousWordForSuggestion();
return true;
}
@@ -1519,13 +1468,7 @@ public final class InputLogic {
LatinImeLoggerUtils.onSeparator(mLastComposedWord.mSeparatorString,
Constants.NOT_A_COORDINATE, Constants.NOT_A_COORDINATE);
}
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.latinIME_revertCommit(committedWord.toString(),
- originallyTypedWord.toString(),
- mWordComposer.isBatchMode(), mLastComposedWord.mSeparatorString);
- }
- // Don't restart suggestion yet. We'll restart if the user deletes the
- // separator.
+ // Don't restart suggestion yet. We'll restart if the user deletes the separator.
mLastComposedWord = LastComposedWord.NOT_A_COMPOSED_WORD;
// We have a separator between the word and the cursor: we should show predictions.
inputTransaction.setRequiresUpdateSuggestions();
@@ -1789,9 +1732,6 @@ public final class InputLogic {
*/
// TODO: replace these two parameters with an InputTransaction
private void sendKeyCodePoint(final SettingsValues settingsValues, final int codePoint) {
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.latinIME_sendKeyCodePoint(codePoint);
- }
// TODO: Remove this special handling of digit letters.
// For backward compatibility. See {@link InputMethodService#sendKeyChar(char)}.
if (codePoint >= '0' && codePoint <= '9') {
@@ -1823,9 +1763,6 @@ public final class InputLogic {
if (settingsValues.shouldInsertSpacesAutomatically()
&& settingsValues.mSpacingAndPunctuations.mCurrentLanguageHasSpaces
&& !mConnection.textBeforeCursorLooksLikeURL()) {
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.latinIME_promotePhantomSpace();
- }
sendKeyCodePoint(settingsValues, Constants.CODE_SPACE);
}
}
@@ -1867,9 +1804,6 @@ public final class InputLogic {
mConnection.setComposingText(batchInputText, 1);
}
mConnection.endBatchEdit();
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.latinIME_onEndBatchInput(batchInputText, 0, suggestedWords);
- }
// Space state must be updated before calling updateShiftState
mSpaceState = SpaceState.PHANTOM;
keyboardSwitcher.requestUpdatingShiftState(getCurrentAutoCapsState(settingsValues),
@@ -1896,9 +1830,6 @@ public final class InputLogic {
if (!mWordComposer.isComposingWord()) return;
final String typedWord = mWordComposer.getTypedWord();
if (typedWord.length() > 0) {
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.getInstance().onWordFinished(typedWord, mWordComposer.isBatchMode());
- }
commitChosenWord(settingsValues, typedWord,
LastComposedWord.COMMIT_TYPE_USER_TYPED_WORD, separatorString);
}
@@ -1942,11 +1873,6 @@ public final class InputLogic {
LatinImeLoggerUtils.onAutoCorrection(
typedWord, autoCorrection, separator, mWordComposer);
}
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- final SuggestedWords suggestedWords = mSuggestedWords;
- ResearchLogger.latinIme_commitCurrentAutoCorrection(typedWord, autoCorrection,
- separator, mWordComposer.isBatchMode(), suggestedWords);
- }
commitChosenWord(settingsValues, autoCorrection,
LastComposedWord.COMMIT_TYPE_DECIDED_WORD, separator);
if (!typedWord.equals(autoCorrection)) {
diff --git a/java/src/com/android/inputmethod/latin/settings/DebugSettings.java b/java/src/com/android/inputmethod/latin/settings/DebugSettings.java
index c4c1234fc..5fa15f418 100644
--- a/java/src/com/android/inputmethod/latin/settings/DebugSettings.java
+++ b/java/src/com/android/inputmethod/latin/settings/DebugSettings.java
@@ -76,7 +76,6 @@ public final class DebugSettings extends PreferenceFragment
final CheckBoxPreference checkbox = (CheckBoxPreference)usabilityStudyPref;
checkbox.setChecked(prefs.getBoolean(PREF_USABILITY_STUDY_MODE,
LatinImeLogger.getUsabilityStudyMode(prefs)));
- checkbox.setSummary(R.string.settings_warning_researcher_mode);
}
final Preference statisticsLoggingPref = findPreference(PREF_STATISTICS_LOGGING);
if (statisticsLoggingPref instanceof CheckBoxPreference) {
diff --git a/java/src/com/android/inputmethod/latin/settings/SettingsFragment.java b/java/src/com/android/inputmethod/latin/settings/SettingsFragment.java
index 302ae4390..af46aad96 100644
--- a/java/src/com/android/inputmethod/latin/settings/SettingsFragment.java
+++ b/java/src/com/android/inputmethod/latin/settings/SettingsFragment.java
@@ -41,7 +41,6 @@ import com.android.inputmethod.keyboard.KeyboardTheme;
import com.android.inputmethod.latin.AudioAndHapticFeedbackManager;
import com.android.inputmethod.latin.R;
import com.android.inputmethod.latin.SubtypeSwitcher;
-import com.android.inputmethod.latin.define.ProductionFlag;
import com.android.inputmethod.latin.setup.LauncherIconVisibilityManager;
import com.android.inputmethod.latin.userdictionary.UserDictionaryList;
import com.android.inputmethod.latin.userdictionary.UserDictionarySettings;
@@ -152,10 +151,6 @@ public final class SettingsFragment extends InputMethodSettingsFragment
miscSettings.removePreference(aboutSettings);
}
}
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- // The about screen contains items that may be confusing in development-only versions.
- miscSettings.removePreference(aboutSettings);
- }
final boolean showVoiceKeyOption = res.getBoolean(
R.bool.config_enable_show_voice_key_option);
diff --git a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java
index c400f66c8..4a5a7f004 100644
--- a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java
+++ b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java
@@ -47,11 +47,9 @@ import com.android.inputmethod.latin.LatinImeLogger;
import com.android.inputmethod.latin.R;
import com.android.inputmethod.latin.SuggestedWords;
import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo;
-import com.android.inputmethod.latin.define.ProductionFlag;
import com.android.inputmethod.latin.settings.Settings;
import com.android.inputmethod.latin.suggestions.MoreSuggestionsView.MoreSuggestionsListener;
import com.android.inputmethod.latin.utils.ImportantNoticeUtils;
-import com.android.inputmethod.research.ResearchLogger;
import java.util.ArrayList;
@@ -226,9 +224,6 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
mSuggestedWords = suggestedWords;
mSuggestionsCountInStrip = mLayoutHelper.layoutAndReturnSuggestionCountInStrip(
mSuggestedWords, mSuggestionsStrip, this);
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.suggestionStripView_setSuggestions(mSuggestedWords);
- }
mStripVisibilityGroup.showSuggestionsStrip(isVoiceKeyEnabled());
}
diff --git a/java/src/com/android/inputmethod/latin/utils/FragmentUtils.java b/java/src/com/android/inputmethod/latin/utils/FragmentUtils.java
index 149fbb31a..e300bd1d3 100644
--- a/java/src/com/android/inputmethod/latin/utils/FragmentUtils.java
+++ b/java/src/com/android/inputmethod/latin/utils/FragmentUtils.java
@@ -26,7 +26,6 @@ import com.android.inputmethod.latin.userdictionary.UserDictionaryAddWordFragmen
import com.android.inputmethod.latin.userdictionary.UserDictionaryList;
import com.android.inputmethod.latin.userdictionary.UserDictionaryLocalePicker;
import com.android.inputmethod.latin.userdictionary.UserDictionarySettings;
-import com.android.inputmethod.research.FeedbackFragment;
import java.util.HashSet;
@@ -43,7 +42,6 @@ public class FragmentUtils {
sLatinImeFragments.add(UserDictionaryList.class.getName());
sLatinImeFragments.add(UserDictionaryLocalePicker.class.getName());
sLatinImeFragments.add(UserDictionarySettings.class.getName());
- sLatinImeFragments.add(FeedbackFragment.class.getName());
}
public static boolean isValidFragment(String fragmentName) {
diff --git a/java/src/com/android/inputmethod/latin/utils/UsabilityStudyLogUtils.java b/java/src/com/android/inputmethod/latin/utils/UsabilityStudyLogUtils.java
index 06826dac0..fac932dba 100644
--- a/java/src/com/android/inputmethod/latin/utils/UsabilityStudyLogUtils.java
+++ b/java/src/com/android/inputmethod/latin/utils/UsabilityStudyLogUtils.java
@@ -43,7 +43,6 @@ import java.util.Date;
import java.util.Locale;
public final class UsabilityStudyLogUtils {
- // TODO: remove code duplication with ResearchLog class
private static final String USABILITY_TAG = UsabilityStudyLogUtils.class.getSimpleName();
private static final String FILENAME = "log.txt";
private final Handler mLoggingHandler;
@@ -190,7 +189,7 @@ public final class UsabilityStudyLogUtils {
return sb.toString();
}
- public void emailResearcherLogsAll() {
+ public void emailUsabilityStudyLogsAll() {
mLoggingHandler.post(new Runnable() {
@Override
public void run() {
@@ -210,7 +209,7 @@ public final class UsabilityStudyLogUtils {
}
mWriter.flush();
final String destPath = Environment.getExternalStorageDirectory()
- + "/research-" + currentDateTimeString + ".log";
+ + "/usability-" + currentDateTimeString + ".log";
final File destFile = new File(destPath);
try {
final FileInputStream srcStream = new FileInputStream(mFile);
@@ -241,7 +240,7 @@ public final class UsabilityStudyLogUtils {
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://" + destPath));
intent.putExtra(Intent.EXTRA_SUBJECT,
- "[Research Logs] " + currentDateTimeString);
+ "[Usability Study Logs] " + currentDateTimeString);
mIms.startActivity(intent);
}
});
diff --git a/java/src/com/android/inputmethod/research/BootBroadcastReceiver.java b/java/src/com/android/inputmethod/research/BootBroadcastReceiver.java
deleted file mode 100644
index 4f86526a7..000000000
--- a/java/src/com/android/inputmethod/research/BootBroadcastReceiver.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source 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.inputmethod.research;
-
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-
-/**
- * Arrange for the uploading service to be run on regular intervals.
- */
-public final class BootBroadcastReceiver extends BroadcastReceiver {
- @Override
- public void onReceive(final Context context, final Intent intent) {
- if (intent.getAction().equals(Intent.ACTION_BOOT_COMPLETED)) {
- UploaderService.cancelAndRescheduleUploadingService(context,
- true /* needsRescheduling */);
- }
- }
-}
diff --git a/java/src/com/android/inputmethod/research/FeedbackActivity.java b/java/src/com/android/inputmethod/research/FeedbackActivity.java
deleted file mode 100644
index 520b88d2f..000000000
--- a/java/src/com/android/inputmethod/research/FeedbackActivity.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source 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.inputmethod.research;
-
-import android.app.Activity;
-import android.os.Bundle;
-
-import com.android.inputmethod.latin.R;
-
-public class FeedbackActivity extends Activity {
- @Override
- protected void onCreate(final Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.research_feedback_activity);
- final FeedbackLayout layout = (FeedbackLayout) findViewById(R.id.research_feedback_layout);
- layout.setActivity(this);
- }
-
- @Override
- public void onBackPressed() {
- ResearchLogger.getInstance().onLeavingSendFeedbackDialog();
- super.onBackPressed();
- }
-}
diff --git a/java/src/com/android/inputmethod/research/FeedbackFragment.java b/java/src/com/android/inputmethod/research/FeedbackFragment.java
deleted file mode 100644
index 75fbbf1ba..000000000
--- a/java/src/com/android/inputmethod/research/FeedbackFragment.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source 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.inputmethod.research;
-
-import android.app.Fragment;
-import android.os.Bundle;
-import android.text.Editable;
-import android.text.TextUtils;
-import android.util.Log;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.View.OnClickListener;
-import android.view.ViewGroup;
-import android.widget.Button;
-import android.widget.CheckBox;
-import android.widget.EditText;
-import android.widget.Toast;
-
-import com.android.inputmethod.latin.R;
-
-public class FeedbackFragment extends Fragment implements OnClickListener {
- private static final String TAG = FeedbackFragment.class.getSimpleName();
-
- public static final String KEY_FEEDBACK_STRING = "FeedbackString";
- public static final String KEY_INCLUDE_ACCOUNT_NAME = "IncludeAccountName";
- public static final String KEY_HAS_USER_RECORDING = "HasRecording";
-
- private EditText mEditText;
- private CheckBox mIncludingAccountNameCheckBox;
- private CheckBox mIncludingUserRecordingCheckBox;
- private Button mSendButton;
- private Button mCancelButton;
-
- @Override
- public View onCreateView(LayoutInflater inflater, ViewGroup container,
- Bundle savedInstanceState) {
- final View view = inflater.inflate(R.layout.research_feedback_fragment_layout, container,
- false);
- mEditText = (EditText) view.findViewById(R.id.research_feedback_contents);
- mEditText.requestFocus();
- mIncludingAccountNameCheckBox = (CheckBox) view.findViewById(
- R.id.research_feedback_include_account_name);
- mIncludingUserRecordingCheckBox = (CheckBox) view.findViewById(
- R.id.research_feedback_include_recording_checkbox);
- mIncludingUserRecordingCheckBox.setOnClickListener(this);
-
- mSendButton = (Button) view.findViewById(R.id.research_feedback_send_button);
- mSendButton.setOnClickListener(this);
- mCancelButton = (Button) view.findViewById(R.id.research_feedback_cancel_button);
- mCancelButton.setOnClickListener(this);
-
- if (savedInstanceState != null) {
- restoreState(savedInstanceState);
- } else {
- final Bundle bundle = getActivity().getIntent().getExtras();
- if (bundle != null) {
- restoreState(bundle);
- }
- }
- return view;
- }
-
- @Override
- public void onClick(final View view) {
- final ResearchLogger researchLogger = ResearchLogger.getInstance();
- if (view == mIncludingUserRecordingCheckBox) {
- if (mIncludingUserRecordingCheckBox.isChecked()) {
- final Bundle bundle = new Bundle();
- onSaveInstanceState(bundle);
-
- // Let the user make a recording
- getActivity().finish();
-
- researchLogger.setFeedbackDialogBundle(bundle);
- researchLogger.onLeavingSendFeedbackDialog();
- researchLogger.startRecording();
- }
- } else if (view == mSendButton) {
- final Editable editable = mEditText.getText();
- final String feedbackContents = editable.toString();
- if (TextUtils.isEmpty(feedbackContents)) {
- Toast.makeText(getActivity(),
- R.string.research_feedback_empty_feedback_error_message,
- Toast.LENGTH_LONG).show();
- } else {
- final boolean isIncludingAccountName = mIncludingAccountNameCheckBox.isChecked();
- researchLogger.sendFeedback(feedbackContents, false /* isIncludingHistory */,
- isIncludingAccountName, mIncludingUserRecordingCheckBox.isChecked());
- getActivity().finish();
- researchLogger.setFeedbackDialogBundle(null);
- researchLogger.onLeavingSendFeedbackDialog();
- }
- } else if (view == mCancelButton) {
- Log.d(TAG, "Finishing");
- getActivity().finish();
- researchLogger.setFeedbackDialogBundle(null);
- researchLogger.onLeavingSendFeedbackDialog();
- } else {
- Log.e(TAG, "Unknown view passed to FeedbackFragment.onClick()");
- }
- }
-
- @Override
- public void onSaveInstanceState(final Bundle bundle) {
- final String savedFeedbackString = mEditText.getText().toString();
-
- bundle.putString(KEY_FEEDBACK_STRING, savedFeedbackString);
- bundle.putBoolean(KEY_INCLUDE_ACCOUNT_NAME, mIncludingAccountNameCheckBox.isChecked());
- bundle.putBoolean(KEY_HAS_USER_RECORDING, mIncludingUserRecordingCheckBox.isChecked());
- }
-
- private void restoreState(final Bundle bundle) {
- mEditText.setText(bundle.getString(KEY_FEEDBACK_STRING));
- mIncludingAccountNameCheckBox.setChecked(bundle.getBoolean(KEY_INCLUDE_ACCOUNT_NAME));
- mIncludingUserRecordingCheckBox.setChecked(bundle.getBoolean(KEY_HAS_USER_RECORDING));
- }
-}
diff --git a/java/src/com/android/inputmethod/research/FeedbackLayout.java b/java/src/com/android/inputmethod/research/FeedbackLayout.java
deleted file mode 100644
index d283d14b2..000000000
--- a/java/src/com/android/inputmethod/research/FeedbackLayout.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source 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.inputmethod.research;
-
-import android.app.Activity;
-import android.content.Context;
-import android.util.AttributeSet;
-import android.view.KeyEvent;
-import android.widget.LinearLayout;
-
-public class FeedbackLayout extends LinearLayout {
- private Activity mActivity;
-
- public FeedbackLayout(Context context) {
- super(context);
- }
-
- public FeedbackLayout(Context context, AttributeSet attrs) {
- super(context, attrs);
- }
-
- public FeedbackLayout(Context context, AttributeSet attrs, int defstyle) {
- super(context, attrs, defstyle);
- }
-
- public void setActivity(Activity activity) {
- mActivity = activity;
- }
-
- @Override
- public boolean dispatchKeyEventPreIme(KeyEvent event) {
- if (event.getKeyCode() == KeyEvent.KEYCODE_BACK) {
- KeyEvent.DispatcherState state = getKeyDispatcherState();
- if (state != null) {
- if (event.getAction() == KeyEvent.ACTION_DOWN
- && event.getRepeatCount() == 0) {
- state.startTracking(event, this);
- return true;
- } else if (event.getAction() == KeyEvent.ACTION_UP
- && !event.isCanceled() && state.isTracking(event)) {
- mActivity.onBackPressed();
- return true;
- }
- }
- }
- return super.dispatchKeyEventPreIme(event);
- }
-}
diff --git a/java/src/com/android/inputmethod/research/FeedbackLog.java b/java/src/com/android/inputmethod/research/FeedbackLog.java
deleted file mode 100644
index 5af194c32..000000000
--- a/java/src/com/android/inputmethod/research/FeedbackLog.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source 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.inputmethod.research;
-
-import android.content.Context;
-
-import java.io.File;
-
-public class FeedbackLog extends ResearchLog {
- public FeedbackLog(final File outputFile, final Context context) {
- super(outputFile, context);
- }
-
- @Override
- public boolean isFeedbackLog() {
- return true;
- }
-}
diff --git a/java/src/com/android/inputmethod/research/FixedLogBuffer.java b/java/src/com/android/inputmethod/research/FixedLogBuffer.java
deleted file mode 100644
index 210015643..000000000
--- a/java/src/com/android/inputmethod/research/FixedLogBuffer.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source 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.inputmethod.research;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-
-/**
- * A buffer that holds a fixed number of LogUnits.
- *
- * LogUnits are added in and shifted out in temporal order. Only a subset of the LogUnits are
- * actual words; the other LogUnits do not count toward the word limit. Once the buffer reaches
- * capacity, adding another LogUnit that is a word evicts the oldest LogUnits out one at a time to
- * stay under the capacity limit.
- *
- * This variant of a LogBuffer has a limited memory footprint because of its limited size. This
- * makes it useful, for example, for recording a window of the user's most recent actions in case
- * they want to report an observed error that they do not know how to reproduce.
- */
-public class FixedLogBuffer extends LogBuffer {
- /* package for test */ int mWordCapacity;
- // The number of members of mLogUnits that are actual words.
- private int mNumActualWords;
-
- /**
- * Create a new LogBuffer that can hold a fixed number of LogUnits that are words (and
- * unlimited number of non-word LogUnits), and that outputs its result to a researchLog.
- *
- * @param wordCapacity maximum number of words
- */
- public FixedLogBuffer(final int wordCapacity) {
- super();
- if (wordCapacity <= 0) {
- throw new IllegalArgumentException("wordCapacity must be 1 or greater.");
- }
- mWordCapacity = wordCapacity;
- mNumActualWords = 0;
- }
-
- /**
- * Adds a new LogUnit to the front of the LIFO queue, evicting existing LogUnit's
- * (oldest first) if word capacity is reached.
- */
- @Override
- public void shiftIn(final LogUnit newLogUnit) {
- if (!newLogUnit.hasOneOrMoreWords()) {
- // This LogUnit doesn't contain any word, so it doesn't count toward the word-limit.
- super.shiftIn(newLogUnit);
- return;
- }
- final int numWordsIncoming = newLogUnit.getNumWords();
- if (mNumActualWords >= mWordCapacity) {
- // Give subclass a chance to handle the buffer full condition by shifting out logUnits.
- // TODO: Tell onBufferFull() how much space it needs to make to avoid forced eviction.
- onBufferFull();
- // If still full, evict.
- if (mNumActualWords >= mWordCapacity) {
- shiftOutWords(numWordsIncoming);
- }
- }
- super.shiftIn(newLogUnit);
- mNumActualWords += numWordsIncoming;
- }
-
- @Override
- public LogUnit unshiftIn() {
- final LogUnit logUnit = super.unshiftIn();
- if (logUnit != null && logUnit.hasOneOrMoreWords()) {
- mNumActualWords -= logUnit.getNumWords();
- }
- return logUnit;
- }
-
- public int getNumWords() {
- return mNumActualWords;
- }
-
- /**
- * Removes all LogUnits from the buffer without calling onShiftOut().
- */
- @Override
- public void clear() {
- super.clear();
- mNumActualWords = 0;
- }
-
- /**
- * Called when the buffer has just shifted in one more word than its maximum, and its about to
- * shift out LogUnits to bring it back down to the maximum.
- *
- * Base class does nothing; subclasses may override if they want to record non-privacy sensitive
- * events that fall off the end.
- */
- protected void onBufferFull() {
- }
-
- @Override
- public LogUnit shiftOut() {
- final LogUnit logUnit = super.shiftOut();
- if (logUnit != null && logUnit.hasOneOrMoreWords()) {
- mNumActualWords -= logUnit.getNumWords();
- }
- return logUnit;
- }
-
- /**
- * Remove LogUnits from the front of the LogBuffer until {@code numWords} have been removed.
- *
- * If there are less than {@code numWords} in the buffer, shifts out all {@code LogUnit}s.
- *
- * @param numWords the minimum number of words in {@link LogUnit}s to shift out
- * @return the number of actual words LogUnit}s shifted out
- */
- protected int shiftOutWords(final int numWords) {
- int numWordsShiftedOut = 0;
- do {
- final LogUnit logUnit = shiftOut();
- if (logUnit == null) break;
- numWordsShiftedOut += logUnit.getNumWords();
- } while (numWordsShiftedOut < numWords);
- return numWordsShiftedOut;
- }
-
- public void shiftOutAll() {
- final LinkedList logUnits = getLogUnits();
- while (!logUnits.isEmpty()) {
- shiftOut();
- }
- mNumActualWords = 0;
- }
-
- /**
- * Returns a list of {@link LogUnit}s at the front of the buffer that have words associated with
- * them.
- *
- * There will be no more than {@code n} words in the returned list. So if 2 words are
- * requested, and the first LogUnit has 3 words, it is not returned. If 2 words are requested,
- * and the first LogUnit has only 1 word, and the next LogUnit 2 words, only the first LogUnit
- * is returned. If the first LogUnit has no words associated with it, and the second LogUnit
- * has three words, then only the first LogUnit (which has no associated words) is returned. If
- * there are not enough LogUnits in the buffer to meet the word requirement, then all LogUnits
- * will be returned.
- *
- * @param n The maximum number of {@link LogUnit}s with words to return.
- * @return The list of the {@link LogUnit}s containing the first n words
- */
- public ArrayList peekAtFirstNWords(int n) {
- final LinkedList logUnits = getLogUnits();
- // Allocate space for n*2 logUnits. There will be at least n, one for each word, and
- // there may be additional for punctuation, between-word commands, etc. This should be
- // enough that reallocation won't be necessary.
- final ArrayList resultList = new ArrayList<>(n * 2);
- for (final LogUnit logUnit : logUnits) {
- n -= logUnit.getNumWords();
- if (n < 0) break;
- resultList.add(logUnit);
- }
- return resultList;
- }
-}
diff --git a/java/src/com/android/inputmethod/research/JsonUtils.java b/java/src/com/android/inputmethod/research/JsonUtils.java
deleted file mode 100644
index 63c08e8bb..000000000
--- a/java/src/com/android/inputmethod/research/JsonUtils.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source 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.inputmethod.research;
-
-import android.content.SharedPreferences;
-import android.util.JsonWriter;
-import android.view.MotionEvent;
-import android.view.inputmethod.CompletionInfo;
-
-import com.android.inputmethod.keyboard.Key;
-import com.android.inputmethod.latin.SuggestedWords;
-import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo;
-
-import java.io.IOException;
-import java.util.Map;
-
-/**
- * Routines for mapping classes and variables to JSON representations for logging.
- */
-/* package */ class JsonUtils {
- private JsonUtils() {
- // This utility class is not publicly instantiable.
- }
-
- /* package */ static void writeJson(final CompletionInfo[] ci, final JsonWriter jsonWriter)
- throws IOException {
- jsonWriter.beginArray();
- for (int j = 0; j < ci.length; j++) {
- jsonWriter.value(ci[j].toString());
- }
- jsonWriter.endArray();
- }
-
- /* package */ static void writeJson(final SharedPreferences prefs, final JsonWriter jsonWriter)
- throws IOException {
- jsonWriter.beginObject();
- for (Map.Entry entry : prefs.getAll().entrySet()) {
- jsonWriter.name(entry.getKey());
- final Object innerValue = entry.getValue();
- if (innerValue == null) {
- jsonWriter.nullValue();
- } else if (innerValue instanceof Boolean) {
- jsonWriter.value((Boolean) innerValue);
- } else if (innerValue instanceof Number) {
- jsonWriter.value((Number) innerValue);
- } else {
- jsonWriter.value(innerValue.toString());
- }
- }
- jsonWriter.endObject();
- }
-
- /* package */ static void writeJson(final Key[] keys, final JsonWriter jsonWriter)
- throws IOException {
- jsonWriter.beginArray();
- for (Key key : keys) {
- writeJson(key, jsonWriter);
- }
- jsonWriter.endArray();
- }
-
- private static void writeJson(final Key key, final JsonWriter jsonWriter) throws IOException {
- jsonWriter.beginObject();
- jsonWriter.name("code").value(key.getCode());
- jsonWriter.name("altCode").value(key.getAltCode());
- jsonWriter.name("x").value(key.getX());
- jsonWriter.name("y").value(key.getY());
- jsonWriter.name("w").value(key.getWidth());
- jsonWriter.name("h").value(key.getHeight());
- jsonWriter.endObject();
- }
-
- /* package */ static void writeJson(final SuggestedWords words, final JsonWriter jsonWriter)
- throws IOException {
- jsonWriter.beginObject();
- jsonWriter.name("typedWordValid").value(words.mTypedWordValid);
- jsonWriter.name("willAutoCorrect")
- .value(words.mWillAutoCorrect);
- jsonWriter.name("isPunctuationSuggestions")
- .value(words.isPunctuationSuggestions());
- jsonWriter.name("isObsoleteSuggestions").value(words.mIsObsoleteSuggestions);
- jsonWriter.name("isPrediction").value(words.mIsPrediction);
- jsonWriter.name("suggestedWords");
- jsonWriter.beginArray();
- final int size = words.size();
- for (int j = 0; j < size; j++) {
- final SuggestedWordInfo wordInfo = words.getInfo(j);
- jsonWriter.beginObject();
- jsonWriter.name("word").value(wordInfo.toString());
- jsonWriter.name("score").value(wordInfo.mScore);
- jsonWriter.name("kind").value(wordInfo.getKind());
- jsonWriter.name("sourceDict").value(wordInfo.mSourceDict.mDictType);
- jsonWriter.endObject();
- }
- jsonWriter.endArray();
- jsonWriter.endObject();
- }
-
- /* package */ static void writeJson(final MotionEvent me, final JsonWriter jsonWriter)
- throws IOException {
- jsonWriter.beginObject();
- jsonWriter.name("pointerIds");
- jsonWriter.beginArray();
- final int pointerCount = me.getPointerCount();
- for (int index = 0; index < pointerCount; index++) {
- jsonWriter.value(me.getPointerId(index));
- }
- jsonWriter.endArray();
-
- jsonWriter.name("xyt");
- jsonWriter.beginArray();
- final int historicalSize = me.getHistorySize();
- for (int index = 0; index < historicalSize; index++) {
- jsonWriter.beginObject();
- jsonWriter.name("t");
- jsonWriter.value(me.getHistoricalEventTime(index));
- jsonWriter.name("d");
- jsonWriter.beginArray();
- for (int pointerIndex = 0; pointerIndex < pointerCount; pointerIndex++) {
- jsonWriter.beginObject();
- jsonWriter.name("x");
- jsonWriter.value(me.getHistoricalX(pointerIndex, index));
- jsonWriter.name("y");
- jsonWriter.value(me.getHistoricalY(pointerIndex, index));
- jsonWriter.endObject();
- }
- jsonWriter.endArray();
- jsonWriter.endObject();
- }
- jsonWriter.beginObject();
- jsonWriter.name("t");
- jsonWriter.value(me.getEventTime());
- jsonWriter.name("d");
- jsonWriter.beginArray();
- for (int pointerIndex = 0; pointerIndex < pointerCount; pointerIndex++) {
- jsonWriter.beginObject();
- jsonWriter.name("x");
- jsonWriter.value(me.getX(pointerIndex));
- jsonWriter.name("y");
- jsonWriter.value(me.getY(pointerIndex));
- jsonWriter.endObject();
- }
- jsonWriter.endArray();
- jsonWriter.endObject();
- jsonWriter.endArray();
- jsonWriter.endObject();
- }
-}
diff --git a/java/src/com/android/inputmethod/research/LogBuffer.java b/java/src/com/android/inputmethod/research/LogBuffer.java
deleted file mode 100644
index 0d9c357da..000000000
--- a/java/src/com/android/inputmethod/research/LogBuffer.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source 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.inputmethod.research;
-
-import java.util.LinkedList;
-
-/**
- * Maintain a FIFO queue of LogUnits.
- *
- * This class provides an unbounded queue. This is useful when the user is aware that their actions
- * are being recorded, such as when they are trying to reproduce a bug. In this case, there should
- * not be artificial restrictions on how many events that can be saved.
- */
-public class LogBuffer {
- // TODO: Gracefully handle situations in which this LogBuffer is consuming too much memory.
- // This may happen, for example, if the user has forgotten that data is being logged.
- private final LinkedList mLogUnits;
-
- public LogBuffer() {
- mLogUnits = new LinkedList<>();
- }
-
- protected LinkedList getLogUnits() {
- return mLogUnits;
- }
-
- public void clear() {
- mLogUnits.clear();
- }
-
- public void shiftIn(final LogUnit logUnit) {
- mLogUnits.add(logUnit);
- }
-
- public LogUnit unshiftIn() {
- if (mLogUnits.isEmpty()) {
- return null;
- }
- return mLogUnits.removeLast();
- }
-
- public LogUnit peekLastLogUnit() {
- if (mLogUnits.isEmpty()) {
- return null;
- }
- return mLogUnits.peekLast();
- }
-
- public boolean isEmpty() {
- return mLogUnits.isEmpty();
- }
-
- public LogUnit shiftOut() {
- if (isEmpty()) {
- return null;
- }
- return mLogUnits.removeFirst();
- }
-}
diff --git a/java/src/com/android/inputmethod/research/LogStatement.java b/java/src/com/android/inputmethod/research/LogStatement.java
deleted file mode 100644
index 06b918af5..000000000
--- a/java/src/com/android/inputmethod/research/LogStatement.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source 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.inputmethod.research;
-
-import android.content.SharedPreferences;
-import android.util.JsonWriter;
-import android.util.Log;
-import android.view.MotionEvent;
-import android.view.inputmethod.CompletionInfo;
-
-import com.android.inputmethod.keyboard.Key;
-import com.android.inputmethod.latin.SuggestedWords;
-import com.android.inputmethod.latin.define.ProductionFlag;
-
-import java.io.IOException;
-
-/**
- * A template for typed information stored in the logs.
- *
- * A LogStatement contains a name, keys, and flags about whether the {@code Object[] values}
- * associated with the {@code String[] keys} are likely to reveal information about the user. The
- * actual values are stored separately.
- */
-public class LogStatement {
- private static final String TAG = LogStatement.class.getSimpleName();
- private static final boolean DEBUG = false
- && ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS_DEBUG;
-
- // Constants for particular statements
- public static final String TYPE_POINTER_TRACKER_CALL_LISTENER_ON_CODE_INPUT =
- "PointerTrackerCallListenerOnCodeInput";
- public static final String KEY_CODE = "code";
- public static final String VALUE_RESEARCH = "research";
- public static final String TYPE_MAIN_KEYBOARD_VIEW_ON_LONG_PRESS =
- "MainKeyboardViewOnLongPress";
- public static final String ACTION = "action";
- public static final String VALUE_DOWN = "DOWN";
- public static final String TYPE_MOTION_EVENT = "MotionEvent";
- public static final String KEY_IS_LOGGING_RELATED = "isLoggingRelated";
-
- // Keys for internal key/value pairs
- private static final String CURRENT_TIME_KEY = "_ct";
- private static final String UPTIME_KEY = "_ut";
- private static final String EVENT_TYPE_KEY = "_ty";
-
- // Name specifying the LogStatement type.
- private final String mType;
-
- // mIsPotentiallyPrivate indicates that event contains potentially private information. If
- // the word that this event is a part of is determined to be privacy-sensitive, then this
- // event should not be included in the output log. The system waits to output until the
- // containing word is known.
- private final boolean mIsPotentiallyPrivate;
-
- // mIsPotentiallyRevealing indicates that this statement may disclose details about other
- // words typed in other LogUnits. This can happen if the user is not inserting spaces, and
- // data from Suggestions and/or Composing text reveals the entire "megaword". For example,
- // say the user is typing "for the win", and the system wants to record the bigram "the
- // win". If the user types "forthe", omitting the space, the system will give "for the" as
- // a suggestion. If the user accepts the autocorrection, the suggestion for "for the" is
- // included in the log for the word "the", disclosing that the previous word had been "for".
- // For now, we simply do not include this data when logging part of a "megaword".
- private final boolean mIsPotentiallyRevealing;
-
- // mKeys stores the names that are the attributes in the output json objects
- private final String[] mKeys;
- private static final String[] NULL_KEYS = new String[0];
-
- LogStatement(final String name, final boolean isPotentiallyPrivate,
- final boolean isPotentiallyRevealing, final String... keys) {
- mType = name;
- mIsPotentiallyPrivate = isPotentiallyPrivate;
- mIsPotentiallyRevealing = isPotentiallyRevealing;
- mKeys = (keys == null) ? NULL_KEYS : keys;
- }
-
- public String getType() {
- return mType;
- }
-
- public boolean isPotentiallyPrivate() {
- return mIsPotentiallyPrivate;
- }
-
- public boolean isPotentiallyRevealing() {
- return mIsPotentiallyRevealing;
- }
-
- public String[] getKeys() {
- return mKeys;
- }
-
- /**
- * Utility function to test whether a key-value pair exists in a LogStatement.
- *
- * A LogStatement is really just a template -- it does not contain the values, only the
- * keys. So the values must be passed in as an argument.
- *
- * @param queryKey the String that is tested by {@code String.equals()} to the keys in the
- * LogStatement
- * @param queryValue an Object that must be {@code Object.equals()} to the key's corresponding
- * value in the {@code values} array
- * @param values the values corresponding to mKeys
- *
- * @returns {@true} if {@code queryKey} exists in the keys for this LogStatement, and {@code
- * queryValue} matches the corresponding value in {@code values}
- *
- * @throws IllegalArgumentException if {@code values.length} is not equal to keys().length()
- */
- public boolean containsKeyValuePair(final String queryKey, final Object queryValue,
- final Object[] values) {
- if (mKeys.length != values.length) {
- throw new IllegalArgumentException("Mismatched number of keys and values.");
- }
- final int length = mKeys.length;
- for (int i = 0; i < length; i++) {
- if (mKeys[i].equals(queryKey) && values[i].equals(queryValue)) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Utility function to set a value in a LogStatement.
- *
- * A LogStatement is really just a template -- it does not contain the values, only the
- * keys. So the values must be passed in as an argument.
- *
- * @param queryKey the String that is tested by {@code String.equals()} to the keys in the
- * LogStatement
- * @param values the array of values corresponding to mKeys
- * @param newValue the replacement value to go into the {@code values} array
- *
- * @returns {@true} if the key exists and the value was successfully set, {@false} otherwise
- *
- * @throws IllegalArgumentException if {@code values.length} is not equal to keys().length()
- */
- public boolean setValue(final String queryKey, final Object[] values, final Object newValue) {
- if (mKeys.length != values.length) {
- throw new IllegalArgumentException("Mismatched number of keys and values.");
- }
- final int length = mKeys.length;
- for (int i = 0; i < length; i++) {
- if (mKeys[i].equals(queryKey)) {
- values[i] = newValue;
- return true;
- }
- }
- return false;
- }
-
- /**
- * Write the contents out through jsonWriter.
- *
- * The JsonWriter class must have already had {@code JsonWriter.beginArray} called on it.
- *
- * Note that this method is not thread safe for the same jsonWriter. Callers must ensure
- * thread safety.
- */
- public boolean outputToLocked(final JsonWriter jsonWriter, final Long time,
- final Object... values) {
- if (DEBUG) {
- if (mKeys.length != values.length) {
- Log.d(TAG, "Key and Value list sizes do not match. " + mType);
- }
- }
- try {
- jsonWriter.beginObject();
- jsonWriter.name(CURRENT_TIME_KEY).value(System.currentTimeMillis());
- jsonWriter.name(UPTIME_KEY).value(time);
- jsonWriter.name(EVENT_TYPE_KEY).value(mType);
- final int length = values.length;
- for (int i = 0; i < length; i++) {
- jsonWriter.name(mKeys[i]);
- final Object value = values[i];
- if (value instanceof CharSequence) {
- jsonWriter.value(value.toString());
- } else if (value instanceof Number) {
- jsonWriter.value((Number) value);
- } else if (value instanceof Boolean) {
- jsonWriter.value((Boolean) value);
- } else if (value instanceof CompletionInfo[]) {
- JsonUtils.writeJson((CompletionInfo[]) value, jsonWriter);
- } else if (value instanceof SharedPreferences) {
- JsonUtils.writeJson((SharedPreferences) value, jsonWriter);
- } else if (value instanceof Key[]) {
- JsonUtils.writeJson((Key[]) value, jsonWriter);
- } else if (value instanceof SuggestedWords) {
- JsonUtils.writeJson((SuggestedWords) value, jsonWriter);
- } else if (value instanceof MotionEvent) {
- JsonUtils.writeJson((MotionEvent) value, jsonWriter);
- } else if (value == null) {
- jsonWriter.nullValue();
- } else {
- if (DEBUG) {
- Log.w(TAG, "Unrecognized type to be logged: "
- + (value == null ? "" : value.getClass().getName()));
- }
- jsonWriter.nullValue();
- }
- }
- jsonWriter.endObject();
- } catch (IOException e) {
- e.printStackTrace();
- Log.w(TAG, "Error in JsonWriter; skipping LogStatement");
- return false;
- }
- return true;
- }
-}
diff --git a/java/src/com/android/inputmethod/research/LogUnit.java b/java/src/com/android/inputmethod/research/LogUnit.java
deleted file mode 100644
index 1750751a7..000000000
--- a/java/src/com/android/inputmethod/research/LogUnit.java
+++ /dev/null
@@ -1,496 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source 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.inputmethod.research;
-
-import android.os.SystemClock;
-import android.text.TextUtils;
-import android.util.JsonWriter;
-import android.util.Log;
-
-import com.android.inputmethod.latin.SuggestedWords;
-import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo;
-import com.android.inputmethod.latin.define.ProductionFlag;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.regex.Pattern;
-
-/**
- * A group of log statements related to each other.
- *
- * A LogUnit is collection of LogStatements, each of which is generated by at a particular point
- * in the code. (There is no LogStatement class; the data is stored across the instance variables
- * here.) A single LogUnit's statements can correspond to all the calls made while in the same
- * composing region, or all the calls between committing the last composing region, and the first
- * character of the next composing region.
- *
- * Individual statements in a log may be marked as potentially private. If so, then they are only
- * published to a ResearchLog if the ResearchLogger determines that publishing the entire LogUnit
- * will not violate the user's privacy. Checks for this may include whether other LogUnits have
- * been published recently, or whether the LogUnit contains numbers, etc.
- */
-public class LogUnit {
- private static final String TAG = LogUnit.class.getSimpleName();
- private static final boolean DEBUG = false
- && ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS_DEBUG;
-
- private static final Pattern WHITESPACE_PATTERN = Pattern.compile("\\s+");
- private static final String[] EMPTY_STRING_ARRAY = new String[0];
-
- private final ArrayList mLogStatementList;
- private final ArrayList