am 8ed9bcca: am 91886a31: am baec6ce1: Revert reset to ub-latinimegoogle-fava-release

* commit '8ed9bccaf2f670fd34689771d37c4e064da25b57': (240 commits)
  Don't prompt before downloading.
  Add some more logging. Why not.
  Load metadata.json from resources on DB reset.
  Small optimization to eliminate a >0 check in RichInputConnection.
  Extend laggy connection timeout for initial load.
  Fix breakage in tests.
  LatinIME portion of StatsUtil change.
  Workaround for preserving responsiveness on a slow InputConnection.
  Do not decorate committed spans.
  Do not force downloads on package replace.
  Fix the previous downloads logic to not missing any downloads.
  Detection and logging of slow input connections.
  Clear/remove all the scheduled downloads in Download Manager
  Disable download notifications.
  Cleanup before fixing getTextAfterCursor().
  Do not restrict downloads to WiFi networks.
  Import translations. DO NOT MERGE
  Revert "Remove "Personal dictionary" link from settings."
  Import translations. DO NOT MERGE
  Import translations. DO NOT MERGE
  ...
main
Baligh Uddin 2015-07-03 16:47:23 +00:00 committed by Android Git Automerger
commit 37d33d3da1
19 changed files with 298 additions and 434 deletions

View File

@ -23,8 +23,6 @@ import java.io.FilenameFilter;
* A simple class to help with removing directories recursively. * A simple class to help with removing directories recursively.
*/ */
public class FileUtils { public class FileUtils {
private static final String TAG = "FileUtils";
public static boolean deleteRecursively(final File path) { public static boolean deleteRecursively(final File path) {
if (path.isDirectory()) { if (path.isDirectory()) {
final File[] files = path.listFiles(); final File[] files = path.listFiles();
@ -53,9 +51,4 @@ public class FileUtils {
} }
return hasDeletedAllFiles; return hasDeletedAllFiles;
} }
public static boolean renameTo(final File fromFile, final File toFile) {
toFile.delete();
return fromFile.renameTo(toFile);
}
} }

View File

@ -43,7 +43,7 @@
<string name="clear_sync_data_confirmation" msgid="2811931135574727678">"મેઘમાંથી તમારો સમન્વયિત ડેટા કાઢી નાખવામાં આવશે. શું તમે ખરેખર આ કરવા માંગો છો?"</string> <string name="clear_sync_data_confirmation" msgid="2811931135574727678">"મેઘમાંથી તમારો સમન્વયિત ડેટા કાઢી નાખવામાં આવશે. શું તમે ખરેખર આ કરવા માંગો છો?"</string>
<string name="clear_sync_data_ok" msgid="613104067705915132">"કાઢી નાખો"</string> <string name="clear_sync_data_ok" msgid="613104067705915132">"કાઢી નાખો"</string>
<string name="cloud_sync_cancel" msgid="5877481252150919037">"રદ કરો"</string> <string name="cloud_sync_cancel" msgid="5877481252150919037">"રદ કરો"</string>
<string name="cloud_sync_opt_in_text" msgid="9176039655776298248">"તમારો વ્યક્તિગત શબ્દકોશનો Google સર્વર્સ પર બેક અપ લેવાશે અને સમન્વયિત કરવામાં આવશે. અમારા ઉત્પાદનોને બહેતર બનાવવામાં સહાય માટે શબ્દ આવૃત્તિની આંકડાકીય માહિતી ભેગી કરવામાં આવી શકે છે. બધી માહિતીનો સંગ્રહ અને ઉપયોગ "<a href="https://www.google.com/policies/privacy">"Google ની ગોપનીયતા નીતિ"</a>"ની સાથે સસંગત હશે."</string> <string name="cloud_sync_opt_in_text" msgid="9176039655776298248">"તમારો વ્યક્તિગત શબ્દકોશનો Google સર્વર્સ પર બેક અપ લેવાશે અને સમન્વયિત કરવામાં આવશે. અમારા ઉત્પાદનોને બહેતર બનાવવામાં સહાય માટે શબ્દ આવૃત્તિની આંકડાકીય માહિતી ભેગી કરવામાં આવી શકે છે. બધી માહિતીનો સંગ્રહ અને ઉપયોગ "<a href="https://www.google.com/policies/privacy">"Google ની ગોપનીયતા નીતિ"</a>"ની સાથે સસંગત હશે."</string>
<string name="add_account_to_enable_sync" msgid="7836932571852055265">"કૃપા કરીને આ સુવિધા સક્ષમ કરવા માટે આ ઉપકરણ પર Google એકાઉન્ટ ઉમેરો"</string> <string name="add_account_to_enable_sync" msgid="7836932571852055265">"કૃપા કરીને આ સુવિધા સક્ષમ કરવા માટે આ ઉપકરણ પર Google એકાઉન્ટ ઉમેરો"</string>
<string name="cloud_sync_summary_disabled_work_profile" msgid="1381770407303129164">"વ્યવસાય એકાઉન્ટ્સ માટે Google Apps સાથેના ઉપકરણો માટે સમન્વયન ઉપલબ્ધ નથી"</string> <string name="cloud_sync_summary_disabled_work_profile" msgid="1381770407303129164">"વ્યવસાય એકાઉન્ટ્સ માટે Google Apps સાથેના ઉપકરણો માટે સમન્વયન ઉપલબ્ધ નથી"</string>
<string name="include_other_imes_in_language_switch_list" msgid="4533689960308565519">"અન્ય ઇનપુટ પદ્ધતિઓ પર સ્વિચ કરો"</string> <string name="include_other_imes_in_language_switch_list" msgid="4533689960308565519">"અન્ય ઇનપુટ પદ્ધતિઓ પર સ્વિચ કરો"</string>

View File

@ -92,7 +92,7 @@
<string name="spoken_emoji_26BE" msgid="8959760533076498209">"បាល់បោះ"</string> <string name="spoken_emoji_26BE" msgid="8959760533076498209">"បាល់បោះ"</string>
<string name="spoken_emoji_26C4" msgid="3045791757044255626">"អ្នកលេង​ព្រិល​ដោយ​គ្មាន​ព្រិល"</string> <string name="spoken_emoji_26C4" msgid="3045791757044255626">"អ្នកលេង​ព្រិល​ដោយ​គ្មាន​ព្រិល"</string>
<string name="spoken_emoji_26C5" msgid="5580129409712578639">"ព្រះអាទិត្យ​នៅ​​ក្រោយ​ពពក"</string> <string name="spoken_emoji_26C5" msgid="5580129409712578639">"ព្រះអាទិត្យ​នៅ​​ក្រោយ​ពពក"</string>
<string name="spoken_emoji_26CE" msgid="8963656417276062998">"សញ្ញាអាព្យូឈូស"</string> <string name="spoken_emoji_26CE" msgid="8963656417276062998">"សញ្ញា (⛎)"</string>
<string name="spoken_emoji_26D4" msgid="2231451988209604130">"ហាមចូល"</string> <string name="spoken_emoji_26D4" msgid="2231451988209604130">"ហាមចូល"</string>
<string name="spoken_emoji_26EA" msgid="7513319636103804907">"វិហារ​សាសនា"</string> <string name="spoken_emoji_26EA" msgid="7513319636103804907">"វិហារ​សាសនា"</string>
<string name="spoken_emoji_26F2" msgid="7134115206158891037">"បាញ់​ទឹក"</string> <string name="spoken_emoji_26F2" msgid="7134115206158891037">"បាញ់​ទឹក"</string>
@ -114,7 +114,7 @@
<string name="spoken_emoji_2728" msgid="5650330815808691881">"បញ្ចេញ​ពន្លឺ"</string> <string name="spoken_emoji_2728" msgid="5650330815808691881">"បញ្ចេញ​ពន្លឺ"</string>
<string name="spoken_emoji_2733" msgid="8915809595141157327">"ផ្កាយ​ប្រាំ​បី​ជ្រុង"</string> <string name="spoken_emoji_2733" msgid="8915809595141157327">"ផ្កាយ​ប្រាំ​បី​ជ្រុង"</string>
<string name="spoken_emoji_2734" msgid="4846583547980754332">"ផ្កាយ​ប្រាំ​បី​ជ្រុង​ដិត"</string> <string name="spoken_emoji_2734" msgid="4846583547980754332">"ផ្កាយ​ប្រាំ​បី​ជ្រុង​ដិត"</string>
<string name="spoken_emoji_2744" msgid="4350636647760161042">"ផ្កាព្រិល"</string> <string name="spoken_emoji_2744" msgid="4350636647760161042">"សញ្ញា (❄)"</string>
<string name="spoken_emoji_2747" msgid="3718282973916474455">"បញ្ចេញ​ពន្លឺ"</string> <string name="spoken_emoji_2747" msgid="3718282973916474455">"បញ្ចេញ​ពន្លឺ"</string>
<string name="spoken_emoji_274C" msgid="2752145886733295314">"សញ្ញា​​ខ្វែង"</string> <string name="spoken_emoji_274C" msgid="2752145886733295314">"សញ្ញា​​ខ្វែង"</string>
<string name="spoken_emoji_274E" msgid="4262918689871098338">"សញ្ញា​ខ្វែង​ក្នុង​ប្រអប់"</string> <string name="spoken_emoji_274E" msgid="4262918689871098338">"សញ្ញា​ខ្វែង​ក្នុង​ប្រអប់"</string>
@ -139,11 +139,11 @@
<string name="spoken_emoji_2B50" msgid="3850845519526950524">"​ផ្កាយ​​មធ្យម​ពណ៌ស"</string> <string name="spoken_emoji_2B50" msgid="3850845519526950524">"​ផ្កាយ​​មធ្យម​ពណ៌ស"</string>
<string name="spoken_emoji_2B55" msgid="9137882158811541824">"រង្វង់​ធំ​​ដិត"</string> <string name="spoken_emoji_2B55" msgid="9137882158811541824">"រង្វង់​ធំ​​ដិត"</string>
<string name="spoken_emoji_3030" msgid="4609172241893565639">"សញ្ញា​​រលក​ដិត"</string> <string name="spoken_emoji_3030" msgid="4609172241893565639">"សញ្ញា​​រលក​ដិត"</string>
<string name="spoken_emoji_303D" msgid="2545833934975907505">"សញ្ញាចាប់ផ្តើមចម្រៀង"</string> <string name="spoken_emoji_303D" msgid="2545833934975907505">"សញ្ញា (〽)"</string>
<string name="spoken_emoji_3297" msgid="928912923628973800">"សញ្ញាអបអរសាទរមូល"</string> <string name="spoken_emoji_3297" msgid="928912923628973800">"សញ្ញា (㊗)"</string>
<string name="spoken_emoji_3299" msgid="3930347573693668426">"សញ្ញាសម្ងាត់មូល"</string> <string name="spoken_emoji_3299" msgid="3930347573693668426">"សញ្ញា (㊙)"</string>
<string name="spoken_emoji_1F004" msgid="1705216181345894600">"សញ្ញានាគក្រហមម៉ាចុង"</string> <string name="spoken_emoji_1F004" msgid="1705216181345894600">"សញ្ញា (🀄)"</string>
<string name="spoken_emoji_1F0CF" msgid="7601493592085987866">"រូបតុក្កតាបៀពណ៌ខ្មៅ"</string> <string name="spoken_emoji_1F0CF" msgid="7601493592085987866">"សញ្ញា (🃏)"</string>
<string name="spoken_emoji_1F170" msgid="3817698686602826773">"ឈាម​ប្រភេទ A"</string> <string name="spoken_emoji_1F170" msgid="3817698686602826773">"ឈាម​ប្រភេទ A"</string>
<string name="spoken_emoji_1F171" msgid="3684218589626650242">"ឈាម​ប្រភេទ B"</string> <string name="spoken_emoji_1F171" msgid="3684218589626650242">"ឈាម​ប្រភេទ B"</string>
<string name="spoken_emoji_1F17E" msgid="2978809190364779029">"ឈាម​ប្រភេទ O"</string> <string name="spoken_emoji_1F17E" msgid="2978809190364779029">"ឈាម​ប្រភេទ O"</string>
@ -159,21 +159,21 @@
<string name="spoken_emoji_1F198" msgid="7020298909426960622">"ប្រអប់ SOS"</string> <string name="spoken_emoji_1F198" msgid="7020298909426960622">"ប្រអប់ SOS"</string>
<string name="spoken_emoji_1F199" msgid="5971252667136235630">"ប្រអប់ up!"</string> <string name="spoken_emoji_1F199" msgid="5971252667136235630">"ប្រអប់ up!"</string>
<string name="spoken_emoji_1F19A" msgid="4557270135899843959">"ប្រអប់ vs"</string> <string name="spoken_emoji_1F19A" msgid="4557270135899843959">"ប្រអប់ vs"</string>
<string name="spoken_emoji_1F201" msgid="7000490044681139002">"សញ្ញានៅទីនេះកាតាកាណាជ្រុង"</string> <string name="spoken_emoji_1F201" msgid="7000490044681139002">"សញ្ញា (🈁)"</string>
<string name="spoken_emoji_1F202" msgid="8560906958695043947">"សញ្ញាសេវាកម្មកាតាកាណាជ្រុង"</string> <string name="spoken_emoji_1F202" msgid="8560906958695043947">"សញ្ញា (🈂)"</string>
<string name="spoken_emoji_1F21A" msgid="1496435317324514033">"សញ្ញាឥតគិតថ្លៃជ្រុង"</string> <string name="spoken_emoji_1F21A" msgid="1496435317324514033">"សញ្ញា (🈚)"</string>
<string name="spoken_emoji_1F22F" msgid="609797148862445402">"សញ្ញាកន្លែងកក់រួចជ្រុង"</string> <string name="spoken_emoji_1F22F" msgid="609797148862445402">"សញ្ញា (🈯)"</string>
<string name="spoken_emoji_1F232" msgid="8125716331632035820">"សញ្ញាហាមឃាត់ជ្រុង"</string> <string name="spoken_emoji_1F232" msgid="8125716331632035820">"សញ្ញា (🈲)"</string>
<string name="spoken_emoji_1F233" msgid="8749401090457355028">"សញ្ញាកន្លែងទំនេរជ្រុង"</string> <string name="spoken_emoji_1F233" msgid="8749401090457355028">"សញ្ញា (🈳)"</string>
<string name="spoken_emoji_1F234" msgid="3546951604285970768">"សញ្ញាព្រមទទួលជ្រុង"</string> <string name="spoken_emoji_1F234" msgid="3546951604285970768">"សញ្ញា (🈴)"</string>
<string name="spoken_emoji_1F235" msgid="5320186982841793711">"សញ្ញាជួលពេញជ្រុង"</string> <string name="spoken_emoji_1F235" msgid="5320186982841793711">"សញ្ញា (🈵)"</string>
<string name="spoken_emoji_1F236" msgid="879755752069393034">"សញ្ញាមានផ្តល់ជូនជ្រុង"</string> <string name="spoken_emoji_1F236" msgid="879755752069393034">"សញ្ញា (🈶)"</string>
<string name="spoken_emoji_1F237" msgid="6741807001205851437">"សញ្ញាប្រចាំខែជ្រុង"</string> <string name="spoken_emoji_1F237" msgid="6741807001205851437">"សញ្ញា (🈷)"</string>
<string name="spoken_emoji_1F238" msgid="5504414186438196912">"សញ្ញាកម្មវិធីជ្រុង"</string> <string name="spoken_emoji_1F238" msgid="5504414186438196912">"សញ្ញា (🈸)"</string>
<string name="spoken_emoji_1F239" msgid="1634067311597618959">"សញ្ញាបញ្ចុះតម្លៃជ្រុង"</string> <string name="spoken_emoji_1F239" msgid="1634067311597618959">"សញ្ញា (🈹)"</string>
<string name="spoken_emoji_1F23A" msgid="3107862957630169536">"សញ្ញាដំណើរការអាជីវកម្មជ្រុង"</string> <string name="spoken_emoji_1F23A" msgid="3107862957630169536">"សញ្ញា (🈺)"</string>
<string name="spoken_emoji_1F250" msgid="6586943922806727907">"សញ្ញាអត្ថប្រយោជន៍មូល"</string> <string name="spoken_emoji_1F250" msgid="6586943922806727907">"សញ្ញា (🉐)"</string>
<string name="spoken_emoji_1F251" msgid="9099032855993346948">"សញ្ញាយល់ព្រមមូល"</string> <string name="spoken_emoji_1F251" msgid="9099032855993346948">"សញ្ញា (🉑)"</string>
<string name="spoken_emoji_1F300" msgid="4720098285295840383">"ស៊ីក្លូន"</string> <string name="spoken_emoji_1F300" msgid="4720098285295840383">"ស៊ីក្លូន"</string>
<string name="spoken_emoji_1F301" msgid="3601962477653752974">"អ័ភ្រ"</string> <string name="spoken_emoji_1F301" msgid="3601962477653752974">"អ័ភ្រ"</string>
<string name="spoken_emoji_1F302" msgid="3404357123421753593">"ឆត្រ​បិទ"</string> <string name="spoken_emoji_1F302" msgid="3404357123421753593">"ឆត្រ​បិទ"</string>

View File

@ -26,183 +26,183 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android" <resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="spoken_accented_letter_00AA" msgid="4374325261868451570">"សញ្ញាលេខលំដាប់បញ្ជាក់ភេទស្រី"</string> <string name="spoken_accented_letter_00AA" msgid="4374325261868451570">"សញ្ញា ª"</string>
<string name="spoken_accented_letter_00B5" msgid="9031387673828823891">"សញ្ញាម៉ុយ"</string> <string name="spoken_accented_letter_00B5" msgid="9031387673828823891">"សញ្ញា µ"</string>
<string name="spoken_accented_letter_00BA" msgid="5045198452071207437">"សញ្ញាលេខលំដាប់ភេទបញ្ជាក់ប្រុស"</string> <string name="spoken_accented_letter_00BA" msgid="5045198452071207437">"សញ្ញា º"</string>
<string name="spoken_accented_letter_00DF" msgid="2260098367028134281">"S ស្រួច"</string> <string name="spoken_accented_letter_00DF" msgid="2260098367028134281">"សញ្ញា ß"</string>
<string name="spoken_accented_letter_00E0" msgid="2234515772182387086">"A បន្តក់បញ្ឆិតឆ្វេង"</string> <string name="spoken_accented_letter_00E0" msgid="2234515772182387086">"សញ្ញា à"</string>
<string name="spoken_accented_letter_00E1" msgid="7780174500802535063">"A បន្តក់បញ្ឆិតស្តាំ"</string> <string name="spoken_accented_letter_00E1" msgid="7780174500802535063">"សញ្ញា á"</string>
<string name="spoken_accented_letter_00E2" msgid="7054108480488102631">"A សក់ព្រួញ"</string> <string name="spoken_accented_letter_00E2" msgid="7054108480488102631">"សញ្ញា â"</string>
<string name="spoken_accented_letter_00E3" msgid="8252569677935693343">"A សក់ទឹករលក"</string> <string name="spoken_accented_letter_00E3" msgid="8252569677935693343">"សញ្ញា ã"</string>
<string name="spoken_accented_letter_00E4" msgid="6610118430986969466">"A សក់ចុចពីរ"</string> <string name="spoken_accented_letter_00E4" msgid="6610118430986969466">"សញ្ញា ä"</string>
<string name="spoken_accented_letter_00E5" msgid="7630449270070348394">"A រង្វង់ពីលើ"</string> <string name="spoken_accented_letter_00E5" msgid="7630449270070348394">"សញ្ញា å"</string>
<string name="spoken_accented_letter_00E6" msgid="701838036007000032">"សញ្ញា A និង E ជាប់គ្នា"</string> <string name="spoken_accented_letter_00E6" msgid="701838036007000032">"សញ្ញា æ"</string>
<string name="spoken_accented_letter_00E7" msgid="2991289211702135310">"C ស៊ីឌីឡា"</string> <string name="spoken_accented_letter_00E7" msgid="2991289211702135310">"សញ្ញា ç"</string>
<string name="spoken_accented_letter_00E8" msgid="2080035251848179782">"E បន្តក់បញ្ឆិតឆ្វេង"</string> <string name="spoken_accented_letter_00E8" msgid="2080035251848179782">"សញ្ញា è"</string>
<string name="spoken_accented_letter_00E9" msgid="2708473976407506968">"E បន្តក់បញ្ឆិតស្តាំ"</string> <string name="spoken_accented_letter_00E9" msgid="2708473976407506968">"សញ្ញា é"</string>
<string name="spoken_accented_letter_00EA" msgid="1898848081635119449">"E សក់ព្រួញ"</string> <string name="spoken_accented_letter_00EA" msgid="1898848081635119449">"សញ្ញា ê"</string>
<string name="spoken_accented_letter_00EB" msgid="8318942663983499634">"E សក់ចុចពីរ"</string> <string name="spoken_accented_letter_00EB" msgid="8318942663983499634">"សញ្ញា ë"</string>
<string name="spoken_accented_letter_00EC" msgid="7643810590358306098">"I បន្តក់បញ្ឆិតឆ្វេង"</string> <string name="spoken_accented_letter_00EC" msgid="7643810590358306098">"សញ្ញា ì"</string>
<string name="spoken_accented_letter_00ED" msgid="8288035355103120759">"I បន្តក់បញ្ឆិតស្តាំ"</string> <string name="spoken_accented_letter_00ED" msgid="8288035355103120759">"សញ្ញា í"</string>
<string name="spoken_accented_letter_00EE" msgid="1137417730211688894">"I សក់ព្រួញ"</string> <string name="spoken_accented_letter_00EE" msgid="1137417730211688894">"សញ្ញា î"</string>
<string name="spoken_accented_letter_00EF" msgid="8993714322731956785">"I សក់ចុចពីរ"</string> <string name="spoken_accented_letter_00EF" msgid="8993714322731956785">"សញ្ញា ï"</string>
<string name="spoken_accented_letter_00F0" msgid="3427567511221967857">"សញ្ញាអ៊េដ"</string> <string name="spoken_accented_letter_00F0" msgid="3427567511221967857">"សញ្ញា ð"</string>
<string name="spoken_accented_letter_00F1" msgid="6983294908255378605">"N សក់ទឹករលក"</string> <string name="spoken_accented_letter_00F1" msgid="6983294908255378605">"សញ្ញា ñ"</string>
<string name="spoken_accented_letter_00F2" msgid="2623804069332183695">"O បន្តក់បញ្ឆិតឆ្វេង"</string> <string name="spoken_accented_letter_00F2" msgid="2623804069332183695">"សញ្ញា ò"</string>
<string name="spoken_accented_letter_00F3" msgid="8945987631729216917">"O បន្តក់បញ្ឆិតស្តាំ"</string> <string name="spoken_accented_letter_00F3" msgid="8945987631729216917">"សញ្ញា ó"</string>
<string name="spoken_accented_letter_00F4" msgid="2415494299699717276">"O សក់ព្រួញ"</string> <string name="spoken_accented_letter_00F4" msgid="2415494299699717276">"សញ្ញា ô"</string>
<string name="spoken_accented_letter_00F5" msgid="7320512716652765243">"O សក់ទឹករលក"</string> <string name="spoken_accented_letter_00F5" msgid="7320512716652765243">"សញ្ញា õ"</string>
<string name="spoken_accented_letter_00F6" msgid="9101179351242478555">"O សក់ចុចពីរ"</string> <string name="spoken_accented_letter_00F6" msgid="9101179351242478555">"សញ្ញា ö"</string>
<string name="spoken_accented_letter_00F8" msgid="1488324280918884122">"O ឆូត"</string> <string name="spoken_accented_letter_00F8" msgid="1488324280918884122">"សញ្ញា ø"</string>
<string name="spoken_accented_letter_00F9" msgid="2823570256527173278">"U បន្តក់បញ្ឆិតឆ្វេង"</string> <string name="spoken_accented_letter_00F9" msgid="2823570256527173278">"សញ្ញា ù"</string>
<string name="spoken_accented_letter_00FA" msgid="6883092085077298608">"U បន្តក់បញ្ឆិតស្តាំ"</string> <string name="spoken_accented_letter_00FA" msgid="6883092085077298608">"សញ្ញា ú"</string>
<string name="spoken_accented_letter_00FB" msgid="4948239400399514418">"U សក់ព្រួញ"</string> <string name="spoken_accented_letter_00FB" msgid="4948239400399514418">"សញ្ញា û"</string>
<string name="spoken_accented_letter_00FC" msgid="2496066211694000442">"U សក់ចុចពីរ"</string> <string name="spoken_accented_letter_00FC" msgid="2496066211694000442">"សញ្ញា ü"</string>
<string name="spoken_accented_letter_00FD" msgid="2400529610834233890">"Y បន្តក់បញ្ឆិតស្តាំ"</string> <string name="spoken_accented_letter_00FD" msgid="2400529610834233890">"សញ្ញា ý"</string>
<string name="spoken_accented_letter_00FE" msgid="8788160115017853040">"សញ្ញាសន"</string> <string name="spoken_accented_letter_00FE" msgid="8788160115017853040">"សញ្ញា þ"</string>
<string name="spoken_accented_letter_00FF" msgid="5225610161025124830">"Y សក់ចុចពីរ"</string> <string name="spoken_accented_letter_00FF" msgid="5225610161025124830">"សញ្ញា ÿ"</string>
<string name="spoken_accented_letter_0101" msgid="5573209280917268157">"A សក់ឆូត"</string> <string name="spoken_accented_letter_0101" msgid="5573209280917268157">"សញ្ញា ā"</string>
<string name="spoken_accented_letter_0103" msgid="2469151120095164730">"A សក់អក្សរយូ"</string> <string name="spoken_accented_letter_0103" msgid="2469151120095164730">"សញ្ញា ă"</string>
<string name="spoken_accented_letter_0105" msgid="8312689789855786427">"A ជើងកណ្តៀវ"</string> <string name="spoken_accented_letter_0105" msgid="8312689789855786427">"សញ្ញា ą"</string>
<string name="spoken_accented_letter_0107" msgid="5708507895287798642">"C បន្តក់បញ្ឆិតស្តាំ"</string> <string name="spoken_accented_letter_0107" msgid="5708507895287798642">"សញ្ញា ć"</string>
<string name="spoken_accented_letter_0109" msgid="7008112603489583335">"C សក់ព្រួញ"</string> <string name="spoken_accented_letter_0109" msgid="7008112603489583335">"សញ្ញា ĉ"</string>
<string name="spoken_accented_letter_010B" msgid="5641359473019753216">"C ចុចពីលើ"</string> <string name="spoken_accented_letter_010B" msgid="5641359473019753216">"សញ្ញា ċ"</string>
<string name="spoken_accented_letter_010D" msgid="1048661826408437168">"C សក់អក្សរវី"</string> <string name="spoken_accented_letter_010D" msgid="1048661826408437168">"សញ្ញា č"</string>
<string name="spoken_accented_letter_010F" msgid="603374318657992205">"D មានវណ្ណយុត្តិ"</string> <string name="spoken_accented_letter_010F" msgid="603374318657992205">"សញ្ញា ď"</string>
<string name="spoken_accented_letter_0111" msgid="5517997642285938260">"D ឆូត"</string> <string name="spoken_accented_letter_0111" msgid="5517997642285938260">"សញ្ញា đ"</string>
<string name="spoken_accented_letter_0113" msgid="2326009009311798997">"E សក់ឆូត"</string> <string name="spoken_accented_letter_0113" msgid="2326009009311798997">"សញ្ញា ē"</string>
<string name="spoken_accented_letter_0115" msgid="3964545407091037747">"E សក់អក្សរយូ"</string> <string name="spoken_accented_letter_0115" msgid="3964545407091037747">"សញ្ញា ĕ"</string>
<string name="spoken_accented_letter_0117" msgid="8799753183781089777">"E ចុចពីលើ"</string> <string name="spoken_accented_letter_0117" msgid="8799753183781089777">"សញ្ញា ė"</string>
<string name="spoken_accented_letter_0119" msgid="3772451226935709136">"E ជើងកណ្តៀវ"</string> <string name="spoken_accented_letter_0119" msgid="3772451226935709136">"សញ្ញា ę"</string>
<string name="spoken_accented_letter_011B" msgid="7663481332351461288">"E សក់អក្សរវី"</string> <string name="spoken_accented_letter_011B" msgid="7663481332351461288">"សញ្ញា ě"</string>
<string name="spoken_accented_letter_011D" msgid="1181326600595482369">"G សក់ព្រួញ"</string> <string name="spoken_accented_letter_011D" msgid="1181326600595482369">"សញ្ញា ĝ"</string>
<string name="spoken_accented_letter_011F" msgid="6843415389823096647">"G សក់អក្សរយូ"</string> <string name="spoken_accented_letter_011F" msgid="6843415389823096647">"សញ្ញា ğ"</string>
<string name="spoken_accented_letter_0121" msgid="6205288708713306903">"G ចុចពីលើ"</string> <string name="spoken_accented_letter_0121" msgid="6205288708713306903">"សញ្ញា ġ"</string>
<string name="spoken_accented_letter_0123" msgid="2394277128105386261">"G ស៊ីឌីឡា"</string> <string name="spoken_accented_letter_0123" msgid="2394277128105386261">"សញ្ញា ģ"</string>
<string name="spoken_accented_letter_0125" msgid="6575866461277751345">"H សក់ព្រួញ"</string> <string name="spoken_accented_letter_0125" msgid="6575866461277751345">"សញ្ញា ĥ"</string>
<string name="spoken_accented_letter_0127" msgid="1316971762214091641">"H ឆូត"</string> <string name="spoken_accented_letter_0127" msgid="1316971762214091641">"សញ្ញា ħ"</string>
<string name="spoken_accented_letter_0129" msgid="7824912405885325754">"I សក់ទឹករលក"</string> <string name="spoken_accented_letter_0129" msgid="7824912405885325754">"សញ្ញា ĩ"</string>
<string name="spoken_accented_letter_012B" msgid="6772690258769905270">"I សក់ឆូត"</string> <string name="spoken_accented_letter_012B" msgid="6772690258769905270">"សញ្ញា ī"</string>
<string name="spoken_accented_letter_012D" msgid="2933871131556503448">"I សក់អក្សរយូ"</string> <string name="spoken_accented_letter_012D" msgid="2933871131556503448">"សញ្ញា ĭ"</string>
<string name="spoken_accented_letter_012F" msgid="1340511254985181663">"I ជើងកណ្តៀវ"</string> <string name="spoken_accented_letter_012F" msgid="1340511254985181663">"សញ្ញា į"</string>
<string name="spoken_accented_letter_0131" msgid="5635600720566083969">"I អត់ចុចពីលើ"</string> <string name="spoken_accented_letter_0131" msgid="5635600720566083969">"សញ្ញា ı"</string>
<string name="spoken_accented_letter_0133" msgid="7593704176516791941">"សញ្ញា IJ"</string> <string name="spoken_accented_letter_0133" msgid="7593704176516791941">"សញ្ញា ij"</string>
<string name="spoken_accented_letter_0135" msgid="4521109674238248436">"J សក់ព្រួញ"</string> <string name="spoken_accented_letter_0135" msgid="4521109674238248436">"សញ្ញា ĵ"</string>
<string name="spoken_accented_letter_0137" msgid="5886444641003852175">"K ស៊ីឌីឡា"</string> <string name="spoken_accented_letter_0137" msgid="5886444641003852175">"សញ្ញា ķ"</string>
<string name="spoken_accented_letter_0138" msgid="4200294389170924853">"អក្សរក្រា"</string> <string name="spoken_accented_letter_0138" msgid="4200294389170924853">"សញ្ញា ĸ"</string>
<string name="spoken_accented_letter_013A" msgid="3558015385412543517">"L បន្តក់បញ្ឆិតស្តាំ"</string> <string name="spoken_accented_letter_013A" msgid="3558015385412543517">"សញ្ញា ĺ"</string>
<string name="spoken_accented_letter_013C" msgid="1853639924813858734">"L ស៊ីឌីឡា"</string> <string name="spoken_accented_letter_013C" msgid="1853639924813858734">"សញ្ញា ļ"</string>
<string name="spoken_accented_letter_013E" msgid="7489345561739421886">"L មានវណ្ណយុត្តិ"</string> <string name="spoken_accented_letter_013E" msgid="7489345561739421886">"សញ្ញា ľ"</string>
<string name="spoken_accented_letter_0140" msgid="7946718707268270589">"L ចុចកណ្តាល"</string> <string name="spoken_accented_letter_0140" msgid="7946718707268270589">"សញ្ញា ŀ"</string>
<string name="spoken_accented_letter_0142" msgid="752931798111122240">"L ឆូត"</string> <string name="spoken_accented_letter_0142" msgid="752931798111122240">"សញ្ញា ł"</string>
<string name="spoken_accented_letter_0144" msgid="201843550323875352">"N បន្តក់បញ្ឆិតស្តាំ"</string> <string name="spoken_accented_letter_0144" msgid="201843550323875352">"សញ្ញា ń"</string>
<string name="spoken_accented_letter_0146" msgid="3403847152606051818">"N ស៊ីឌីឡា"</string> <string name="spoken_accented_letter_0146" msgid="3403847152606051818">"សញ្ញា ņ"</string>
<string name="spoken_accented_letter_0148" msgid="9215300786722209338">"N សក់អក្សរវី"</string> <string name="spoken_accented_letter_0148" msgid="9215300786722209338">"សញ្ញា ň"</string>
<string name="spoken_accented_letter_0149" msgid="3191850286630154063">"N មានសញ្ញាវណ្ណយុត្តិនៅខាងមុខ"</string> <string name="spoken_accented_letter_0149" msgid="3191850286630154063">"សញ្ញា ʼn"</string>
<string name="spoken_accented_letter_014B" msgid="8503022408522837410">"សញ្ញាអ៊ីង"</string> <string name="spoken_accented_letter_014B" msgid="8503022408522837410">"សញ្ញា ŋ"</string>
<string name="spoken_accented_letter_014D" msgid="4452323602550610641">"O សក់ឆូត"</string> <string name="spoken_accented_letter_014D" msgid="4452323602550610641">"សញ្ញា ō"</string>
<string name="spoken_accented_letter_014F" msgid="2795957717094385336">"O សក់អក្សរយូ"</string> <string name="spoken_accented_letter_014F" msgid="2795957717094385336">"សញ្ញា ŏ"</string>
<string name="spoken_accented_letter_0151" msgid="8013704745216410244">"O បន្តក់បញ្ឆិតស្តាំទ្វេ"</string> <string name="spoken_accented_letter_0151" msgid="8013704745216410244">"សញ្ញា ő"</string>
<string name="spoken_accented_letter_0153" msgid="8410582495993285221">"សញ្ញា O និង E ជាប់គ្នា"</string> <string name="spoken_accented_letter_0153" msgid="8410582495993285221">"សញ្ញា œ"</string>
<string name="spoken_accented_letter_0155" msgid="7601517174689798560">"R បន្តក់បញ្ឆិតស្តាំ"</string> <string name="spoken_accented_letter_0155" msgid="7601517174689798560">"សញ្ញា ŕ"</string>
<string name="spoken_accented_letter_0157" msgid="9071455715455643810">"R ស៊ីឌីឡា"</string> <string name="spoken_accented_letter_0157" msgid="9071455715455643810">"សញ្ញា ŗ"</string>
<string name="spoken_accented_letter_0159" msgid="7726911392381543439">"R សក់អក្សរវី"</string> <string name="spoken_accented_letter_0159" msgid="7726911392381543439">"សញ្ញា ř"</string>
<string name="spoken_accented_letter_015B" msgid="1854129531164494117">"S បន្តក់បញ្ឆិតស្តាំ"</string> <string name="spoken_accented_letter_015B" msgid="1854129531164494117">"សញ្ញា ś"</string>
<string name="spoken_accented_letter_015D" msgid="4743571603550582530">"S សក់ព្រួញ"</string> <string name="spoken_accented_letter_015D" msgid="4743571603550582530">"សញ្ញា ŝ"</string>
<string name="spoken_accented_letter_015F" msgid="1519945638631588761">"S ស៊ីឌីឡា"</string> <string name="spoken_accented_letter_015F" msgid="1519945638631588761">"សញ្ញា ş"</string>
<string name="spoken_accented_letter_0161" msgid="7493478552029144246">"S សក់អក្សរវី"</string> <string name="spoken_accented_letter_0161" msgid="7493478552029144246">"សញ្ញា š"</string>
<string name="spoken_accented_letter_0163" msgid="9103547637928833069">"T ស៊ីឌីឡា"</string> <string name="spoken_accented_letter_0163" msgid="9103547637928833069">"សញ្ញា ţ"</string>
<string name="spoken_accented_letter_0165" msgid="7306159398214872062">"T មានវណ្ណយុត្តិ"</string> <string name="spoken_accented_letter_0165" msgid="7306159398214872062">"សញ្ញា ť"</string>
<string name="spoken_accented_letter_0167" msgid="5578767705098672443">"T ឆូត"</string> <string name="spoken_accented_letter_0167" msgid="5578767705098672443">"សញ្ញា ŧ"</string>
<string name="spoken_accented_letter_0169" msgid="413046581387735371">"U សក់ទឹករលក"</string> <string name="spoken_accented_letter_0169" msgid="413046581387735371">"សញ្ញា ũ"</string>
<string name="spoken_accented_letter_016B" msgid="3209778874978859441">"U សក់ឆូត"</string> <string name="spoken_accented_letter_016B" msgid="3209778874978859441">"សញ្ញា ū"</string>
<string name="spoken_accented_letter_016D" msgid="2983326533258602840">"U សក់អក្សរយូ"</string> <string name="spoken_accented_letter_016D" msgid="2983326533258602840">"សញ្ញា ŭ"</string>
<string name="spoken_accented_letter_016F" msgid="4416532499516387231">"U រង្វង់ពីលើ"</string> <string name="spoken_accented_letter_016F" msgid="4416532499516387231">"សញ្ញា ů"</string>
<string name="spoken_accented_letter_0171" msgid="3435171971353200807">"U បន្តក់បញ្ឆិតស្តាំទ្វេ"</string> <string name="spoken_accented_letter_0171" msgid="3435171971353200807">"សញ្ញា ű"</string>
<string name="spoken_accented_letter_0173" msgid="4494154432483553480">"U ជើងកណ្តៀវ"</string> <string name="spoken_accented_letter_0173" msgid="4494154432483553480">"សញ្ញា ų"</string>
<string name="spoken_accented_letter_0175" msgid="2154545579611918513">"W សក់ព្រួញ"</string> <string name="spoken_accented_letter_0175" msgid="2154545579611918513">"សញ្ញា ŵ"</string>
<string name="spoken_accented_letter_0177" msgid="4034463827306904781">"Y សក់ព្រួញ"</string> <string name="spoken_accented_letter_0177" msgid="4034463827306904781">"សញ្ញា ŷ"</string>
<string name="spoken_accented_letter_017A" msgid="3368292232292925369">"Z បន្តក់បញ្ឆិតស្តាំ"</string> <string name="spoken_accented_letter_017A" msgid="3368292232292925369">"សញ្ញា ź"</string>
<string name="spoken_accented_letter_017C" msgid="2834484584505860430">"Z ចុចពីលើ"</string> <string name="spoken_accented_letter_017C" msgid="2834484584505860430">"សញ្ញា ż"</string>
<string name="spoken_accented_letter_017E" msgid="1209240442434887098">"Z សក់អក្សរវី"</string> <string name="spoken_accented_letter_017E" msgid="1209240442434887098">"សញ្ញា ž"</string>
<string name="spoken_accented_letter_017F" msgid="317501463253362415">"S វែង"</string> <string name="spoken_accented_letter_017F" msgid="317501463253362415">"សញ្ញា ſ"</string>
<string name="spoken_accented_letter_01A1" msgid="630186564859044196">"O មានស្នែង"</string> <string name="spoken_accented_letter_01A1" msgid="630186564859044196">"សញ្ញា ơ"</string>
<string name="spoken_accented_letter_01B0" msgid="8544012177684640443">"U មានស្នែង"</string> <string name="spoken_accented_letter_01B0" msgid="8544012177684640443">"សញ្ញា ư"</string>
<string name="spoken_accented_letter_0219" msgid="1960371842020076066">"S មានក្បៀសខាងក្រោម"</string> <string name="spoken_accented_letter_0219" msgid="1960371842020076066">"សញ្ញា ș"</string>
<string name="spoken_accented_letter_021B" msgid="1398418662032919032">"T មានក្បៀសខាងក្រោម"</string> <string name="spoken_accented_letter_021B" msgid="1398418662032919032">"សញ្ញា ț"</string>
<string name="spoken_accented_letter_0259" msgid="2464085263158415898">"អក្សរអ៊ីបញ្ច្រាស"</string> <string name="spoken_accented_letter_0259" msgid="2464085263158415898">"សញ្ញា ə"</string>
<string name="spoken_accented_letter_1EA1" msgid="688124877202887630">"A ចុចខាងក្រោម"</string> <string name="spoken_accented_letter_1EA1" msgid="688124877202887630">"សញ្ញា ạ"</string>
<string name="spoken_accented_letter_1EA3" msgid="327960130366386256">"A ទំពក់ពីលើ"</string> <string name="spoken_accented_letter_1EA3" msgid="327960130366386256">"សញ្ញា ả"</string>
<string name="spoken_accented_letter_1EA5" msgid="637406363453769610">"A សក់ព្រួញ និងបន្តក់បញ្ឆិតស្តាំ"</string> <string name="spoken_accented_letter_1EA5" msgid="637406363453769610">"សញ្ញា ấ"</string>
<string name="spoken_accented_letter_1EA7" msgid="1419591804181615409">"A សក់ព្រួញ និងបន្តក់បញ្ឆិតឆ្វេង"</string> <string name="spoken_accented_letter_1EA7" msgid="1419591804181615409">"សញ្ញា ầ"</string>
<string name="spoken_accented_letter_1EA9" msgid="6068887382734896756">"A សក់ព្រួញ និងទំពក់ពីលើ"</string> <string name="spoken_accented_letter_1EA9" msgid="6068887382734896756">"សញ្ញា ẩ"</string>
<string name="spoken_accented_letter_1EAB" msgid="7236523151662538333">"A សក់ព្រួញ និងទឹករលក"</string> <string name="spoken_accented_letter_1EAB" msgid="7236523151662538333">"សញ្ញា ẫ"</string>
<string name="spoken_accented_letter_1EAD" msgid="2363364864106332076">"A សក់ព្រួញ និងចុចខាងក្រោម"</string> <string name="spoken_accented_letter_1EAD" msgid="2363364864106332076">"សញ្ញា ậ"</string>
<string name="spoken_accented_letter_1EAF" msgid="1576329511464272935">"A សក់អក្សរយូ និងបន្តក់បញ្ឆិតស្តាំ"</string> <string name="spoken_accented_letter_1EAF" msgid="1576329511464272935">"សញ្ញា ắ"</string>
<string name="spoken_accented_letter_1EB1" msgid="4634735072816076592">"A សក់អក្សរយូ និងបន្តប់បញ្ឆិតឆ្វេង"</string> <string name="spoken_accented_letter_1EB1" msgid="4634735072816076592">"សញ្ញា ằ"</string>
<string name="spoken_accented_letter_1EB3" msgid="2325245849038771534">"A សក់អក្សរយូរ និងទំពក់ពីលើ"</string> <string name="spoken_accented_letter_1EB3" msgid="2325245849038771534">"សញ្ញា ẳ"</string>
<string name="spoken_accented_letter_1EB5" msgid="3720427596242746295">"A សក់អក្សរយូរ និងទឹករលក"</string> <string name="spoken_accented_letter_1EB5" msgid="3720427596242746295">"សញ្ញា ẵ"</string>
<string name="spoken_accented_letter_1EB7" msgid="700415535653646695">"A សក់អក្សរយូ និងចុចខាងក្រោម"</string> <string name="spoken_accented_letter_1EB7" msgid="700415535653646695">"សញ្ញា ặ"</string>
<string name="spoken_accented_letter_1EB9" msgid="3901338692305890487">"E ចុចពីក្រោម"</string> <string name="spoken_accented_letter_1EB9" msgid="3901338692305890487">"សញ្ញា ẹ"</string>
<string name="spoken_accented_letter_1EBB" msgid="4028688699415417302">"E ទំពក់ពីលើ"</string> <string name="spoken_accented_letter_1EBB" msgid="4028688699415417302">"សញ្ញា ẻ"</string>
<string name="spoken_accented_letter_1EBD" msgid="181253633045931897">"E សក់ទឹករលក"</string> <string name="spoken_accented_letter_1EBD" msgid="181253633045931897">"សញ្ញា ẽ"</string>
<string name="spoken_accented_letter_1EBF" msgid="3309618845007944963">"E សក់ព្រួញ និងបន្តក់បញ្ឆិតស្តាំ"</string> <string name="spoken_accented_letter_1EBF" msgid="3309618845007944963">"សញ្ញា ế"</string>
<string name="spoken_accented_letter_1EC1" msgid="8139046749226332542">"E សក់ព្រួញ និងបន្តក់បញ្ឆិតឆ្វេង"</string> <string name="spoken_accented_letter_1EC1" msgid="8139046749226332542">"សញ្ញា ề"</string>
<string name="spoken_accented_letter_1EC3" msgid="3239674223053133383">"E សក់ព្រួញ និងទំពក់ពីលើ"</string> <string name="spoken_accented_letter_1EC3" msgid="3239674223053133383">"សញ្ញា ể"</string>
<string name="spoken_accented_letter_1EC5" msgid="2216559244705714587">"E សក់ព្រួញ និងទឹករលក"</string> <string name="spoken_accented_letter_1EC5" msgid="2216559244705714587">"សញ្ញា ễ"</string>
<string name="spoken_accented_letter_1EC7" msgid="9012731468253986792">"E សក់ព្រួញ និងចុចខាងក្រោម"</string> <string name="spoken_accented_letter_1EC7" msgid="9012731468253986792">"សញ្ញា ệ"</string>
<string name="spoken_accented_letter_1EC9" msgid="2901917620195717034">"I ទំពក់ពីលើ"</string> <string name="spoken_accented_letter_1EC9" msgid="2901917620195717034">"សញ្ញា ỉ"</string>
<string name="spoken_accented_letter_1ECB" msgid="5470387489820034621">"I ចុចខាងក្រោម"</string> <string name="spoken_accented_letter_1ECB" msgid="5470387489820034621">"សញ្ញា ị"</string>
<string name="spoken_accented_letter_1ECD" msgid="1340122876914839806">"O ចុចខាងក្រោម"</string> <string name="spoken_accented_letter_1ECD" msgid="1340122876914839806">"សញ្ញា ọ"</string>
<string name="spoken_accented_letter_1ECF" msgid="2326921263882559755">"O ទំពក់ពីលើ"</string> <string name="spoken_accented_letter_1ECF" msgid="2326921263882559755">"សញ្ញា ỏ"</string>
<string name="spoken_accented_letter_1ED1" msgid="2885683296042774958">"O សក់ព្រួញ និងបន្តក់បញ្ឆិតស្តាំ"</string> <string name="spoken_accented_letter_1ED1" msgid="2885683296042774958">"សញ្ញា ố"</string>
<string name="spoken_accented_letter_1ED3" msgid="6857664926477376178">"O សក់ព្រួញ និងបន្តក់បញ្ឆិតឆ្វេង"</string> <string name="spoken_accented_letter_1ED3" msgid="6857664926477376178">"សញ្ញា ồ"</string>
<string name="spoken_accented_letter_1ED5" msgid="2015209467290624062">"O សក់ព្រួញ និងទំពក់ពីលើ"</string> <string name="spoken_accented_letter_1ED5" msgid="2015209467290624062">"សញ្ញា ổ"</string>
<string name="spoken_accented_letter_1ED7" msgid="7924481354960306389">"O សក់ព្រួញ និងទឹករលក"</string> <string name="spoken_accented_letter_1ED7" msgid="7924481354960306389">"សញ្ញា ỗ"</string>
<string name="spoken_accented_letter_1ED9" msgid="7023315590332365554">"O សក់ព្រួញ និងចុចខាងក្រោម"</string> <string name="spoken_accented_letter_1ED9" msgid="7023315590332365554">"សញ្ញា ộ"</string>
<string name="spoken_accented_letter_1EDB" msgid="2379438944917634496">"O មានស្នែង និងបន្តក់បញ្ឆិតស្តាំ"</string> <string name="spoken_accented_letter_1EDB" msgid="2379438944917634496">"សញ្ញា ớ"</string>
<string name="spoken_accented_letter_1EDD" msgid="8107077534204404085">"O មានស្នែង និងបន្តក់បញ្ឆិតឆ្វេង"</string> <string name="spoken_accented_letter_1EDD" msgid="8107077534204404085">"សញ្ញា ờ"</string>
<string name="spoken_accented_letter_1EDF" msgid="1846880105528347966">"O មានស្នែង និងទំពក់ពីលើ"</string> <string name="spoken_accented_letter_1EDF" msgid="1846880105528347966">"សញ្ញា ở"</string>
<string name="spoken_accented_letter_1EE1" msgid="1520037313389776718">"O មានស្នែង និងសក់ទឹករលក"</string> <string name="spoken_accented_letter_1EE1" msgid="1520037313389776718">"សញ្ញា ỡ"</string>
<string name="spoken_accented_letter_1EE3" msgid="907964027171008963">"O មានស្នែង និងចុចខាងក្រោម"</string> <string name="spoken_accented_letter_1EE3" msgid="907964027171008963">"សញ្ញា ợ"</string>
<string name="spoken_accented_letter_1EE5" msgid="1522024630360038700">"U ចុចខាងក្រោម"</string> <string name="spoken_accented_letter_1EE5" msgid="1522024630360038700">"សញ្ញា ụ"</string>
<string name="spoken_accented_letter_1EE7" msgid="7815412228302952637">"U ទំពក់ពីលើ"</string> <string name="spoken_accented_letter_1EE7" msgid="7815412228302952637">"សញ្ញា ủ"</string>
<string name="spoken_accented_letter_1EE9" msgid="4219119671251485651">"U មានស្នែង និងបន្តក់បញ្ឆិតស្តាំ"</string> <string name="spoken_accented_letter_1EE9" msgid="4219119671251485651">"សញ្ញា ứ"</string>
<string name="spoken_accented_letter_1EEB" msgid="4086009841269002231">"U មានស្នែង និងបន្តក់បញ្ឆិតឆ្វេង"</string> <string name="spoken_accented_letter_1EEB" msgid="4086009841269002231">"សញ្ញា ừ"</string>
<string name="spoken_accented_letter_1EED" msgid="3528151733528719847">"U មានស្នែង និងទំពក់ពីលើ"</string> <string name="spoken_accented_letter_1EED" msgid="3528151733528719847">"សញ្ញា ử"</string>
<string name="spoken_accented_letter_1EEF" msgid="3508548229409072119">"U មានស្នែង និងសក់ទឹករលក"</string> <string name="spoken_accented_letter_1EEF" msgid="3508548229409072119">"សញ្ញា ữ"</string>
<string name="spoken_accented_letter_1EF1" msgid="1912816350401931115">"U មានស្នែង និងចុចខាងក្រោម"</string> <string name="spoken_accented_letter_1EF1" msgid="1912816350401931115">"សញ្ញា ự"</string>
<string name="spoken_accented_letter_1EF3" msgid="7211760439435946494">"Y បន្តក់បញ្ឆិតឆ្វេង"</string> <string name="spoken_accented_letter_1EF3" msgid="7211760439435946494">"សញ្ញា ỳ"</string>
<string name="spoken_accented_letter_1EF5" msgid="8998864482764007384">"Y ចុចខាងក្រោម"</string> <string name="spoken_accented_letter_1EF5" msgid="8998864482764007384">"សញ្ញា ỵ"</string>
<string name="spoken_accented_letter_1EF7" msgid="922043627252869200">"Y ទំពក់ពីលើ"</string> <string name="spoken_accented_letter_1EF7" msgid="922043627252869200">"សញ្ញា ỷ"</string>
<string name="spoken_accented_letter_1EF9" msgid="6213977100552260366">"Y សក់ទឹករលក"</string> <string name="spoken_accented_letter_1EF9" msgid="6213977100552260366">"សញ្ញា ỹ"</string>
<string name="spoken_symbol_00A1" msgid="4281758332905123408">"សញ្ញាឧទានបញ្ច្រាស"</string> <string name="spoken_symbol_00A1" msgid="4281758332905123408">"សញ្ញា ¡"</string>
<string name="spoken_symbol_00AB" msgid="4093069643313064892">"សញ្ញាសម្រង់ទ្វេចង្អុលមកឆ្វេង"</string> <string name="spoken_symbol_00AB" msgid="4093069643313064892">"សញ្ញា «"</string>
<string name="spoken_symbol_00B7" msgid="2447718728927874920">"ចំណុចកណ្តាល"</string> <string name="spoken_symbol_00B7" msgid="2447718728927874920">"សញ្ញា ·"</string>
<string name="spoken_symbol_00B9" msgid="8026257165451461231">"ស្វ័យគុណមួយ"</string> <string name="spoken_symbol_00B9" msgid="8026257165451461231">"សញ្ញា ¹"</string>
<string name="spoken_symbol_00BB" msgid="1102740075655373928">"សញ្ញាសម្រង់ទ្វេចង្អុលមកស្តាំ"</string> <string name="spoken_symbol_00BB" msgid="1102740075655373928">"សញ្ញា »"</string>
<string name="spoken_symbol_00BF" msgid="6233794752573788098">"សញ្ញាសួរបញ្ច្រាស"</string> <string name="spoken_symbol_00BF" msgid="6233794752573788098">"សញ្ញា ¿"</string>
<string name="spoken_symbol_2018" msgid="4886476295598930225">"សញ្ញាសម្រង់ទោលខាងឆ្វេង"</string> <string name="spoken_symbol_2018" msgid="4886476295598930225">"សញ្ញា "</string>
<string name="spoken_symbol_2019" msgid="8892530161598134083">"សញ្ញាសម្រង់ទោលខាងស្តាំ"</string> <string name="spoken_symbol_2019" msgid="8892530161598134083">"សញ្ញា "</string>
<string name="spoken_symbol_201A" msgid="2072987157683446644">"សញ្ញាសម្រង់ខាងក្រោមទោល"</string> <string name="spoken_symbol_201A" msgid="2072987157683446644">"សញ្ញា "</string>
<string name="spoken_symbol_201C" msgid="4588048378803665427">"សញ្ញាសម្រង់ទ្វេខាងឆ្វេង"</string> <string name="spoken_symbol_201C" msgid="4588048378803665427">"សញ្ញា"</string>
<string name="spoken_symbol_201D" msgid="1642776849495925895">"សញ្ញាសម្រង់ទ្វេខាងស្តាំ"</string> <string name="spoken_symbol_201D" msgid="1642776849495925895">"សញ្ញា"</string>
<string name="spoken_symbol_2020" msgid="9084628638189344431">"ឈើឆ្កាង"</string> <string name="spoken_symbol_2020" msgid="9084628638189344431">"សញ្ញា †"</string>
<string name="spoken_symbol_2021" msgid="5081396468559426475">"ឈើឆ្កាងទ្វេ"</string> <string name="spoken_symbol_2021" msgid="5081396468559426475">"សញ្ញា ‡"</string>
<string name="spoken_symbol_2030" msgid="9068837172419431755">"សញ្ញាក្នុងមួយម៉ាយ៍"</string> <string name="spoken_symbol_2030" msgid="9068837172419431755">"សញ្ញា"</string>
<string name="spoken_symbol_2032" msgid="3014506329156664396">"បន្តក់រង្វាស់"</string> <string name="spoken_symbol_2032" msgid="3014506329156664396">"សញ្ញា "</string>
<string name="spoken_symbol_2033" msgid="1251022699713475088">"បន្តក់រង្វាស់ទ្វេ"</string> <string name="spoken_symbol_2033" msgid="1251022699713475088">"សញ្ញា ″"</string>
<string name="spoken_symbol_2039" msgid="6989616457213775957">"សញ្ញាសម្រង់ទោលចង្អុលមកឆ្វេង"</string> <string name="spoken_symbol_2039" msgid="6989616457213775957">"សញ្ញា "</string>
<string name="spoken_symbol_203A" msgid="31245095449823701">"សញ្ញាសម្រង់ទោលចង្អុលមកស្តាំ"</string> <string name="spoken_symbol_203A" msgid="31245095449823701">"សញ្ញា "</string>
<string name="spoken_symbol_2074" msgid="2116717717093306894">"ស្វ័យគុណបួន"</string> <string name="spoken_symbol_2074" msgid="2116717717093306894">"សញ្ញា ⁴"</string>
<string name="spoken_symbol_207F" msgid="1706731172134246659">"ស្វ័យគុណ n"</string> <string name="spoken_symbol_207F" msgid="1706731172134246659">"សញ្ញា ⁿ"</string>
<string name="spoken_symbol_20B1" msgid="2159994270622444689">"សញ្ញាប៉េសូ"</string> <string name="spoken_symbol_20B1" msgid="2159994270622444689">"សញ្ញា"</string>
<string name="spoken_symbol_2105" msgid="7289404939366976829">"សញ្ញា Care of"</string> <string name="spoken_symbol_2105" msgid="7289404939366976829">"សញ្ញា "</string>
<string name="spoken_symbol_2192" msgid="827804523596125414">"ព្រួញទៅស្តាំ"</string> <string name="spoken_symbol_2192" msgid="827804523596125414">"សញ្ញា →"</string>
<string name="spoken_symbol_2193" msgid="2659541693445985717">"ព្រួញចុះក្រោម"</string> <string name="spoken_symbol_2193" msgid="2659541693445985717">"សញ្ញា ↓"</string>
<string name="spoken_symbol_2205" msgid="4457188084269117343">"សំណុំទទេ"</string> <string name="spoken_symbol_2205" msgid="4457188084269117343">"សញ្ញា ∅"</string>
<string name="spoken_symbol_2206" msgid="4856786565708380687">"បន្ថែម"</string> <string name="spoken_symbol_2206" msgid="4856786565708380687">"សញ្ញា ∆"</string>
<string name="spoken_symbol_2264" msgid="5092061257745123554">"តូចជាង ឬស្មើ"</string> <string name="spoken_symbol_2264" msgid="5092061257745123554">"សញ្ញា ≤"</string>
<string name="spoken_symbol_2265" msgid="1907966479878036357">"ធំជាង ឬស្មើ"</string> <string name="spoken_symbol_2265" msgid="1907966479878036357">"សញ្ញា ≥"</string>
<string name="spoken_symbol_2605" msgid="5202920479405857753">"ផ្កាយខ្មៅ"</string> <string name="spoken_symbol_2605" msgid="5202920479405857753">"សញ្ញា ★"</string>
</resources> </resources>

View File

@ -43,7 +43,7 @@
<string name="spoken_description_emoji" msgid="7990051553008088470">"សញ្ញា​អារម្មណ៍"</string> <string name="spoken_description_emoji" msgid="7990051553008088470">"សញ្ញា​អារម្មណ៍"</string>
<string name="spoken_description_return" msgid="3183692287397645708">"Return"</string> <string name="spoken_description_return" msgid="3183692287397645708">"Return"</string>
<string name="spoken_description_search" msgid="5099937658231911288">"ស្វែងរក"</string> <string name="spoken_description_search" msgid="5099937658231911288">"ស្វែងរក"</string>
<string name="spoken_description_dot" msgid="5644176501632325560">"ចំណុច"</string> <string name="spoken_description_dot" msgid="5644176501632325560">"សញ្ញា(.)"</string>
<string name="spoken_description_language_switch" msgid="6818666779313544553">"ប្ដូរ​​ភាសា"</string> <string name="spoken_description_language_switch" msgid="6818666779313544553">"ប្ដូរ​​ភាសា"</string>
<string name="spoken_description_action_next" msgid="431761808119616962">"បន្ទាប់"</string> <string name="spoken_description_action_next" msgid="431761808119616962">"បន្ទាប់"</string>
<string name="spoken_description_action_previous" msgid="2919072174697865110">"មុន"</string> <string name="spoken_description_action_previous" msgid="2919072174697865110">"មុន"</string>
@ -73,8 +73,8 @@
<string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"និមិត្តសញ្ញា"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"និមិត្តសញ្ញា"</string>
<string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"សញ្ញា​អារម្មណ៍"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"សញ្ញា​អារម្មណ៍"</string>
<string name="spoken_description_upper_case" msgid="4904835255229433916">"អក្សរ​ធំ <xliff:g id="LOWER_LETTER">%s</xliff:g>"</string> <string name="spoken_description_upper_case" msgid="4904835255229433916">"អក្សរ​ធំ <xliff:g id="LOWER_LETTER">%s</xliff:g>"</string>
<string name="spoken_letter_0049" msgid="4743162182646977944">"I ធំ"</string> <string name="spoken_letter_0049" msgid="4743162182646977944">"សញ្ញា I"</string>
<string name="spoken_letter_0130" msgid="4766619646231612274">"I ធំមានចំណុចពីលើ"</string> <string name="spoken_letter_0130" msgid="4766619646231612274">"សញ្ញា İ"</string>
<string name="spoken_symbol_unknown" msgid="717298227061173706">"មិន​ស្គាល់​និមិត្តសញ្ញា"</string> <string name="spoken_symbol_unknown" msgid="717298227061173706">"មិន​ស្គាល់​និមិត្តសញ្ញា"</string>
<string name="spoken_emoji_unknown" msgid="5981009928135394306">"មិន​ស្គាល់​សញ្ញា​អារម្មណ៍"</string> <string name="spoken_emoji_unknown" msgid="5981009928135394306">"មិន​ស្គាល់​សញ្ញា​អារម្មណ៍"</string>
<string name="spoken_emoticon_3A_2D_21_20" msgid="2410905667389534573">"មុខ​អផ្សុក"</string> <string name="spoken_emoticon_3A_2D_21_20" msgid="2410905667389534573">"មុខ​អផ្សុក"</string>

View File

@ -43,9 +43,9 @@
<string name="clear_sync_data_confirmation" msgid="2811931135574727678">"Të dhënat e tua të sinkronizuara do të fshihen nga reja kompjuterike. Je i sigurt?"</string> <string name="clear_sync_data_confirmation" msgid="2811931135574727678">"Të dhënat e tua të sinkronizuara do të fshihen nga reja kompjuterike. Je i sigurt?"</string>
<string name="clear_sync_data_ok" msgid="613104067705915132">"Fshi"</string> <string name="clear_sync_data_ok" msgid="613104067705915132">"Fshi"</string>
<string name="cloud_sync_cancel" msgid="5877481252150919037">"Anulo"</string> <string name="cloud_sync_cancel" msgid="5877481252150919037">"Anulo"</string>
<string name="cloud_sync_opt_in_text" msgid="9176039655776298248">"Fjalori yt personal do të sinkronizohet dhe do të rezervohet në serverët e Google. Informacionet statistikore të frekuencës së fjalëve mund të mblidhen për të ndihmuar në përmirësimin e produkteve tona. Mbledhja dhe përdorimi i të gjitha informacioneve do të jetë në përputhje me "<a href="https://www.google.com/policies/privacy">"\"Politikën e privatësisë së Google\""</a>"."</string> <string name="cloud_sync_opt_in_text" msgid="9176039655776298248">"Fjalori yt personal do të sinkronizohet dhe do të rezervohet në serverët e Google. Informacionet statistikore të frekuencës së fjalëve mund të mblidhen për të ndihmuar në përmirësimin e produkteve tona. Mbledhja dhe përdorimi i të gjitha informacioneve do të jetë në përputhje me "<a href="https://www.google.com/policies/privacy">"Politikën e privatësisë së Google"</a>"."</string>
<string name="add_account_to_enable_sync" msgid="7836932571852055265">"Shto një llogari të Google në këtë pajisje për të aktivizuar këtë funksion"</string> <string name="add_account_to_enable_sync" msgid="7836932571852055265">"Shto një llogari të Google në këtë pajisje për të aktivizuar këtë funksion"</string>
<string name="cloud_sync_summary_disabled_work_profile" msgid="1381770407303129164">"Sinkronizimi nuk mundësohet për pajisjet me llogari të \"Aplikacioneve të Google për biznesin\""</string> <string name="cloud_sync_summary_disabled_work_profile" msgid="1381770407303129164">"Sinkronizimi është i papërdorshëm për pajisjet me llogari të \"Aplikacioneve të Google për biznesin\""</string>
<string name="include_other_imes_in_language_switch_list" msgid="4533689960308565519">"Kalo në metoda të tjera hyrjeje"</string> <string name="include_other_imes_in_language_switch_list" msgid="4533689960308565519">"Kalo në metoda të tjera hyrjeje"</string>
<string name="include_other_imes_in_language_switch_list_summary" msgid="840637129103317635">"Tasti i ndryshimit të gjuhës mbulon edhe metoda të tjera hyrjeje"</string> <string name="include_other_imes_in_language_switch_list_summary" msgid="840637129103317635">"Tasti i ndryshimit të gjuhës mbulon edhe metoda të tjera hyrjeje"</string>
<string name="show_language_switch_key" msgid="5915478828318774384">"Tasti i ndryshimit të gjuhës"</string> <string name="show_language_switch_key" msgid="5915478828318774384">"Tasti i ndryshimit të gjuhës"</string>

View File

@ -26,9 +26,7 @@ import android.text.TextUtils;
import android.util.Log; import android.util.Log;
import com.android.inputmethod.compat.DownloadManagerCompatUtils; import com.android.inputmethod.compat.DownloadManagerCompatUtils;
import com.android.inputmethod.latin.BinaryDictionaryFileDumper;
import com.android.inputmethod.latin.R; import com.android.inputmethod.latin.R;
import com.android.inputmethod.latin.common.LocaleUtils;
import com.android.inputmethod.latin.utils.ApplicationUtils; import com.android.inputmethod.latin.utils.ApplicationUtils;
import com.android.inputmethod.latin.utils.DebugLogUtils; import com.android.inputmethod.latin.utils.DebugLogUtils;
@ -212,17 +210,9 @@ public final class ActionBatch {
+ " for an InstallAfterDownload action. Bailing out."); + " for an InstallAfterDownload action. Bailing out.");
return; return;
} }
DebugLogUtils.l("Setting word list as installed"); DebugLogUtils.l("Setting word list as installed");
final SQLiteDatabase db = MetadataDbHelper.getDb(context, mClientId); final SQLiteDatabase db = MetadataDbHelper.getDb(context, mClientId);
MetadataDbHelper.markEntryAsFinishedDownloadingAndInstalled(db, mWordListValues); MetadataDbHelper.markEntryAsFinishedDownloadingAndInstalled(db, mWordListValues);
// Install the downloaded file by un-compressing and moving it to the staging
// directory. Ideally, we should do this before updating the DB, but the
// installDictToStagingFromContentProvider() relies on the db being updated.
final String localeString = mWordListValues.getAsString(MetadataDbHelper.LOCALE_COLUMN);
BinaryDictionaryFileDumper.installDictToStagingFromContentProvider(
LocaleUtils.constructLocaleFromString(localeString), context, false);
} }
} }

View File

@ -592,8 +592,6 @@ public final class UpdateHandler {
* Warn Android Keyboard that the state of dictionaries changed and it should refresh its data. * Warn Android Keyboard that the state of dictionaries changed and it should refresh its data.
*/ */
private static void signalNewDictionaryState(final Context context) { private static void signalNewDictionaryState(final Context context) {
// TODO: Also provide the locale of the updated dictionary so that the LatinIme
// does not have to reset if it is a different locale.
final Intent newDictBroadcast = final Intent newDictBroadcast =
new Intent(DictionaryPackConstants.NEW_DICTIONARY_INTENT_ACTION); new Intent(DictionaryPackConstants.NEW_DICTIONARY_INTENT_ACTION);
context.sendBroadcast(newDictBroadcast); context.sendBroadcast(newDictBroadcast);

View File

@ -29,7 +29,6 @@ import android.util.Log;
import com.android.inputmethod.dictionarypack.DictionaryPackConstants; import com.android.inputmethod.dictionarypack.DictionaryPackConstants;
import com.android.inputmethod.dictionarypack.MD5Calculator; import com.android.inputmethod.dictionarypack.MD5Calculator;
import com.android.inputmethod.latin.common.FileUtils;
import com.android.inputmethod.latin.define.DecoderSpecificConstants; import com.android.inputmethod.latin.define.DecoderSpecificConstants;
import com.android.inputmethod.latin.utils.DictionaryInfoUtils; import com.android.inputmethod.latin.utils.DictionaryInfoUtils;
import com.android.inputmethod.latin.utils.DictionaryInfoUtils.DictionaryInfo; import com.android.inputmethod.latin.utils.DictionaryInfoUtils.DictionaryInfo;
@ -221,11 +220,11 @@ public final class BinaryDictionaryFileDumper {
} }
/** /**
* Stages a word list the id of which is passed as an argument. This will write the file * Caches a word list the id of which is passed as an argument. This will write the file
* to the cache file name designated by its id and locale, overwriting it if already present * to the cache file name designated by its id and locale, overwriting it if already present
* and creating it (and its containing directory) if necessary. * and creating it (and its containing directory) if necessary.
*/ */
private static void installWordListToStaging(final String wordlistId, final String locale, private static void cacheWordList(final String wordlistId, final String locale,
final String rawChecksum, final ContentProviderClient providerClient, final String rawChecksum, final ContentProviderClient providerClient,
final Context context) { final Context context) {
final int COMPRESSED_CRYPTED_COMPRESSED = 0; final int COMPRESSED_CRYPTED_COMPRESSED = 0;
@ -247,7 +246,7 @@ public final class BinaryDictionaryFileDumper {
return; return;
} }
final String finalFileName = final String finalFileName =
DictionaryInfoUtils.getStagingFileName(wordlistId, locale, context); DictionaryInfoUtils.getCacheFileName(wordlistId, locale, context);
String tempFileName; String tempFileName;
try { try {
tempFileName = BinaryDictionaryGetter.getTempFileName(wordlistId, context); tempFileName = BinaryDictionaryGetter.getTempFileName(wordlistId, context);
@ -321,21 +320,23 @@ public final class BinaryDictionaryFileDumper {
} }
} }
// move the output file to the final staging file.
final File finalFile = new File(finalFileName); final File finalFile = new File(finalFileName);
FileUtils.renameTo(outputFile, finalFile); finalFile.delete();
if (!outputFile.renameTo(finalFile)) {
throw new IOException("Can't move the file to its final name");
}
wordListUriBuilder.appendQueryParameter(QUERY_PARAMETER_DELETE_RESULT, wordListUriBuilder.appendQueryParameter(QUERY_PARAMETER_DELETE_RESULT,
QUERY_PARAMETER_SUCCESS); QUERY_PARAMETER_SUCCESS);
if (0 >= providerClient.delete(wordListUriBuilder.build(), null, null)) { if (0 >= providerClient.delete(wordListUriBuilder.build(), null, null)) {
Log.e(TAG, "Could not have the dictionary pack delete a word list"); Log.e(TAG, "Could not have the dictionary pack delete a word list");
} }
Log.d(TAG, "Successfully copied file for wordlist ID " + wordlistId); BinaryDictionaryGetter.removeFilesWithIdExcept(context, wordlistId, finalFile);
Log.e(TAG, "Successfully copied file for wordlist ID " + wordlistId);
// Success! Close files (through the finally{} clause) and return. // Success! Close files (through the finally{} clause) and return.
return; return;
} catch (Exception e) { } catch (Exception e) {
if (DEBUG) { if (DEBUG) {
Log.e(TAG, "Can't open word list in mode " + mode, e); Log.i(TAG, "Can't open word list in mode " + mode, e);
} }
if (null != outputFile) { if (null != outputFile) {
// This may or may not fail. The file may not have been created if the // This may or may not fail. The file may not have been created if the
@ -402,7 +403,7 @@ public final class BinaryDictionaryFileDumper {
} }
/** /**
* Queries a content provider for word list data for some locale and stage the returned files * Queries a content provider for word list data for some locale and cache the returned files
* *
* This will query a content provider for word list data for a given locale, and copy the * This will query a content provider for word list data for a given locale, and copy the
* files locally so that they can be mmap'ed. This may overwrite previously cached word lists * files locally so that they can be mmap'ed. This may overwrite previously cached word lists
@ -410,7 +411,7 @@ public final class BinaryDictionaryFileDumper {
* @throw FileNotFoundException if the provider returns non-existent data. * @throw FileNotFoundException if the provider returns non-existent data.
* @throw IOException if the provider-returned data could not be read. * @throw IOException if the provider-returned data could not be read.
*/ */
public static void installDictToStagingFromContentProvider(final Locale locale, public static void cacheWordListsFromContentProvider(final Locale locale,
final Context context, final boolean hasDefaultWordList) { final Context context, final boolean hasDefaultWordList) {
final ContentProviderClient providerClient; final ContentProviderClient providerClient;
try { try {
@ -428,27 +429,13 @@ public final class BinaryDictionaryFileDumper {
final List<WordListInfo> idList = getWordListWordListInfos(locale, context, final List<WordListInfo> idList = getWordListWordListInfos(locale, context,
hasDefaultWordList); hasDefaultWordList);
for (WordListInfo id : idList) { for (WordListInfo id : idList) {
installWordListToStaging(id.mId, id.mLocale, id.mRawChecksum, providerClient, cacheWordList(id.mId, id.mLocale, id.mRawChecksum, providerClient, context);
context);
} }
} finally { } finally {
providerClient.release(); providerClient.release();
} }
} }
/**
* Downloads the dictionary if it was never requested/used.
*
* @param locale locale to download
* @param context the context for resources and providers.
* @param hasDefaultWordList whether the default wordlist exists in the resources.
*/
public static void downloadDictIfNeverRequested(final Locale locale,
final Context context, final boolean hasDefaultWordList) {
Log.d("inamul_tag", "BinaryDictionaryFileDumper.downloadDictIfNeverRequested()");
getWordListWordListInfos(locale, context, hasDefaultWordList);
}
/** /**
* Copies the data in an input stream to a target file if the magic number matches. * Copies the data in an input stream to a target file if the magic number matches.
* *

View File

@ -195,6 +195,39 @@ final public class BinaryDictionaryGetter {
return result; return result;
} }
/**
* Remove all files with the passed id, except the passed file.
*
* If a dictionary with a given ID has a metadata change that causes it to change
* path, we need to remove the old version. The only way to do this is to check all
* installed files for a matching ID in a different directory.
*/
public static void removeFilesWithIdExcept(final Context context, final String id,
final File fileToKeep) {
try {
final File canonicalFileToKeep = fileToKeep.getCanonicalFile();
final File[] directoryList = DictionaryInfoUtils.getCachedDirectoryList(context);
if (null == directoryList) return;
for (File directory : directoryList) {
// There is one directory per locale. See #getCachedDirectoryList
if (!directory.isDirectory()) continue;
final File[] wordLists = directory.listFiles();
if (null == wordLists) continue;
for (File wordList : wordLists) {
final String fileId =
DictionaryInfoUtils.getWordListIdFromFileName(wordList.getName());
if (fileId.equals(id)) {
if (!canonicalFileToKeep.equals(wordList.getCanonicalFile())) {
wordList.delete();
}
}
}
}
} catch (java.io.IOException e) {
Log.e(TAG, "IOException trying to cleanup files", e);
}
}
// ## HACK ## we prevent usage of a dictionary before version 18. The reason for this is, since // ## HACK ## we prevent usage of a dictionary before version 18. The reason for this is, since
// those do not include whitelist entries, the new code with an old version of the dictionary // those do not include whitelist entries, the new code with an old version of the dictionary
// would lose whitelist functionality. // would lose whitelist functionality.
@ -241,18 +274,12 @@ final public class BinaryDictionaryGetter {
*/ */
public static ArrayList<AssetFileAddress> getDictionaryFiles(final Locale locale, public static ArrayList<AssetFileAddress> getDictionaryFiles(final Locale locale,
final Context context, boolean notifyDictionaryPackForUpdates) { final Context context, boolean notifyDictionaryPackForUpdates) {
if (notifyDictionaryPackForUpdates) {
final boolean hasDefaultWordList = DictionaryInfoUtils.isDictionaryAvailable(
context, locale);
// It makes sure that the first time keyboard comes up and the dictionaries are reset,
// the DB is populated with the appropriate values for each locale. Helps in downloading
// the dictionaries when the user enables and switches new languages before the
// DictionaryService runs.
BinaryDictionaryFileDumper.downloadDictIfNeverRequested(
locale, context, hasDefaultWordList);
// Move a staging files to the cache ddirectories if any. final boolean hasDefaultWordList = DictionaryInfoUtils.isDictionaryAvailable(
DictionaryInfoUtils.moveStagingFilesIfExists(context); context, locale);
if (notifyDictionaryPackForUpdates) {
BinaryDictionaryFileDumper.cacheWordListsFromContentProvider(locale, context,
hasDefaultWordList);
} }
final File[] cachedWordLists = getCachedWordLists(locale.toString(), context); final File[] cachedWordLists = getCachedWordLists(locale.toString(), context);
final String mainDictId = DictionaryInfoUtils.getMainDictId(locale); final String mainDictId = DictionaryInfoUtils.getMainDictId(locale);

View File

@ -17,7 +17,6 @@
package com.android.inputmethod.latin; package com.android.inputmethod.latin;
import android.content.Context; import android.content.Context;
import android.util.LruCache;
import com.android.inputmethod.annotations.UsedForTesting; import com.android.inputmethod.annotations.UsedForTesting;
import com.android.inputmethod.keyboard.Keyboard; import com.android.inputmethod.keyboard.Keyboard;
@ -55,18 +54,6 @@ public interface DictionaryFacilitator {
Dictionary.TYPE_USER_HISTORY, Dictionary.TYPE_USER_HISTORY,
Dictionary.TYPE_USER}; Dictionary.TYPE_USER};
/**
* The facilitator will put words into the cache whenever it decodes them.
* @param cache
*/
void setValidSpellingWordReadCache(final LruCache<String, Boolean> cache);
/**
* The facilitator will get words from the cache whenever it needs to check their spelling.
* @param cache
*/
void setValidSpellingWordWriteCache(final LruCache<String, Boolean> cache);
/** /**
* Returns whether this facilitator is exactly for this locale. * Returns whether this facilitator is exactly for this locale.
* *
@ -101,16 +88,12 @@ public interface DictionaryFacilitator {
* *
* WARNING: The service methods that call start/finish are very spammy. * WARNING: The service methods that call start/finish are very spammy.
*/ */
void onFinishInput(Context context); void onFinishInput();
boolean isActive(); boolean isActive();
Locale getLocale(); Locale getLocale();
boolean usesContacts();
String getAccount();
void resetDictionaries( void resetDictionaries(
final Context context, final Context context,
final Locale newLocale, final Locale newLocale,
@ -166,7 +149,7 @@ public interface DictionaryFacilitator {
boolean isValidSuggestionWord(final String word); boolean isValidSuggestionWord(final String word);
boolean clearUserHistoryDictionary(final Context context); void clearUserHistoryDictionary(final Context context);
String dump(final Context context); String dump(final Context context);

View File

@ -19,7 +19,6 @@ package com.android.inputmethod.latin;
import android.content.Context; import android.content.Context;
import android.text.TextUtils; import android.text.TextUtils;
import android.util.Log; import android.util.Log;
import android.util.LruCache;
import com.android.inputmethod.annotations.UsedForTesting; import com.android.inputmethod.annotations.UsedForTesting;
import com.android.inputmethod.keyboard.Keyboard; import com.android.inputmethod.keyboard.Keyboard;
@ -83,19 +82,6 @@ public class DictionaryFacilitatorImpl implements DictionaryFacilitator {
private static final Class<?>[] DICT_FACTORY_METHOD_ARG_TYPES = private static final Class<?>[] DICT_FACTORY_METHOD_ARG_TYPES =
new Class[] { Context.class, Locale.class, File.class, String.class, String.class }; new Class[] { Context.class, Locale.class, File.class, String.class, String.class };
private LruCache<String, Boolean> mValidSpellingWordReadCache;
private LruCache<String, Boolean> mValidSpellingWordWriteCache;
@Override
public void setValidSpellingWordReadCache(final LruCache<String, Boolean> cache) {
mValidSpellingWordReadCache = cache;
}
@Override
public void setValidSpellingWordWriteCache(final LruCache<String, Boolean> cache) {
mValidSpellingWordWriteCache = cache;
}
@Override @Override
public boolean isForLocale(final Locale locale) { public boolean isForLocale(final Locale locale) {
return locale != null && locale.equals(mDictionaryGroup.mLocale); return locale != null && locale.equals(mDictionaryGroup.mLocale);
@ -221,7 +207,7 @@ public class DictionaryFacilitatorImpl implements DictionaryFacilitator {
} }
@Override @Override
public void onFinishInput(Context context) { public void onFinishInput() {
} }
@Override @Override
@ -234,16 +220,6 @@ public class DictionaryFacilitatorImpl implements DictionaryFacilitator {
return mDictionaryGroup.mLocale; return mDictionaryGroup.mLocale;
} }
@Override
public boolean usesContacts() {
return mDictionaryGroup.getSubDict(Dictionary.TYPE_CONTACTS) != null;
}
@Override
public String getAccount() {
return null;
}
@Nullable @Nullable
private static ExpandableBinaryDictionary getSubDict(final String dictType, private static ExpandableBinaryDictionary getSubDict(final String dictType,
final Context context, final Locale locale, final File dictFile, final Context context, final Locale locale, final File dictFile,
@ -365,10 +341,6 @@ public class DictionaryFacilitatorImpl implements DictionaryFacilitator {
dictionarySetToCleanup.closeDict(dictType); dictionarySetToCleanup.closeDict(dictType);
} }
} }
if (mValidSpellingWordWriteCache != null) {
mValidSpellingWordWriteCache.evictAll();
}
} }
private void asyncReloadUninitializedMainDictionaries(final Context context, private void asyncReloadUninitializedMainDictionaries(final Context context,
@ -492,10 +464,6 @@ public class DictionaryFacilitatorImpl implements DictionaryFacilitator {
public void addToUserHistory(final String suggestion, final boolean wasAutoCapitalized, public void addToUserHistory(final String suggestion, final boolean wasAutoCapitalized,
@Nonnull final NgramContext ngramContext, final long timeStampInSeconds, @Nonnull final NgramContext ngramContext, final long timeStampInSeconds,
final boolean blockPotentiallyOffensive) { final boolean blockPotentiallyOffensive) {
// Update the spelling cache before learning. Words that are not yet added to user history
// and appear in no other language model are not considered valid.
putWordIntoValidSpellingWordCache("addToUserHistory", suggestion);
final String[] words = suggestion.split(Constants.WORD_SEPARATOR); final String[] words = suggestion.split(Constants.WORD_SEPARATOR);
NgramContext ngramContextForCurrentWord = ngramContext; NgramContext ngramContextForCurrentWord = ngramContext;
for (int i = 0; i < words.length; i++) { for (int i = 0; i < words.length; i++) {
@ -509,12 +477,6 @@ public class DictionaryFacilitatorImpl implements DictionaryFacilitator {
} }
} }
private void putWordIntoValidSpellingWordCache(final String caller, final String word) {
final String spellingWord = word.toLowerCase(getLocale());
final boolean isValid = isValidSpellingWord(spellingWord);
mValidSpellingWordWriteCache.put(spellingWord, isValid);
}
private void addWordToUserHistory(final DictionaryGroup dictionaryGroup, private void addWordToUserHistory(final DictionaryGroup dictionaryGroup,
final NgramContext ngramContext, final String word, final boolean wasAutoCapitalized, final NgramContext ngramContext, final String word, final boolean wasAutoCapitalized,
final int timeStampInSeconds, final boolean blockPotentiallyOffensive) { final int timeStampInSeconds, final boolean blockPotentiallyOffensive) {
@ -581,10 +543,6 @@ public class DictionaryFacilitatorImpl implements DictionaryFacilitator {
if (eventType != Constants.EVENT_BACKSPACE) { if (eventType != Constants.EVENT_BACKSPACE) {
removeWord(Dictionary.TYPE_USER_HISTORY, word); removeWord(Dictionary.TYPE_USER_HISTORY, word);
} }
// Update the spelling cache after unlearning. Words that are removed from user history
// and appear in no other language model are not considered valid.
putWordIntoValidSpellingWordCache("unlearnFromUserHistory", word.toLowerCase());
} }
// TODO: Revise the way to fusion suggestion results. // TODO: Revise the way to fusion suggestion results.
@ -619,14 +577,6 @@ public class DictionaryFacilitatorImpl implements DictionaryFacilitator {
} }
public boolean isValidSpellingWord(final String word) { public boolean isValidSpellingWord(final String word) {
if (mValidSpellingWordReadCache != null) {
final String spellingWord = word.toLowerCase(getLocale());
final Boolean cachedValue = mValidSpellingWordReadCache.get(spellingWord);
if (cachedValue != null) {
return cachedValue;
}
}
return isValidWord(word, ALL_DICTIONARY_TYPES); return isValidWord(word, ALL_DICTIONARY_TYPES);
} }
@ -670,18 +620,16 @@ public class DictionaryFacilitatorImpl implements DictionaryFacilitator {
return maxFreq; return maxFreq;
} }
private boolean clearSubDictionary(final String dictName) { private void clearSubDictionary(final String dictName) {
final ExpandableBinaryDictionary dictionary = mDictionaryGroup.getSubDict(dictName); final ExpandableBinaryDictionary dictionary = mDictionaryGroup.getSubDict(dictName);
if (dictionary == null) { if (dictionary != null) {
return false; dictionary.clear();
} }
dictionary.clear();
return true;
} }
@Override @Override
public boolean clearUserHistoryDictionary(final Context context) { public void clearUserHistoryDictionary(final Context context) {
return clearSubDictionary(Dictionary.TYPE_USER_HISTORY); clearSubDictionary(Dictionary.TYPE_USER_HISTORY);
} }
@Override @Override

View File

@ -972,7 +972,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
void onFinishInputInternal() { void onFinishInputInternal() {
super.onFinishInput(); super.onFinishInput();
mDictionaryFacilitator.onFinishInput(this); mDictionaryFacilitator.onFinishInput();
final MainKeyboardView mainKeyboardView = mKeyboardSwitcher.getMainKeyboardView(); final MainKeyboardView mainKeyboardView = mKeyboardSwitcher.getMainKeyboardView();
if (mainKeyboardView != null) { if (mainKeyboardView != null) {
mainKeyboardView.closing(); mainKeyboardView.closing();

View File

@ -29,14 +29,13 @@ import android.util.Log;
import android.view.inputmethod.InputMethodManager; import android.view.inputmethod.InputMethodManager;
import android.view.inputmethod.InputMethodSubtype; import android.view.inputmethod.InputMethodSubtype;
import com.android.inputmethod.dictionarypack.CommonPreferences;
import com.android.inputmethod.dictionarypack.DictionaryPackConstants; import com.android.inputmethod.dictionarypack.DictionaryPackConstants;
import com.android.inputmethod.keyboard.KeyboardLayoutSet; import com.android.inputmethod.keyboard.KeyboardLayoutSet;
import com.android.inputmethod.latin.settings.Settings; import com.android.inputmethod.latin.settings.Settings;
import com.android.inputmethod.latin.setup.SetupActivity; import com.android.inputmethod.latin.setup.SetupActivity;
import com.android.inputmethod.latin.utils.UncachedInputMethodManagerUtils; import com.android.inputmethod.latin.utils.UncachedInputMethodManagerUtils;
import java.util.Locale;
/** /**
* This class detects the {@link Intent#ACTION_MY_PACKAGE_REPLACED} broadcast intent when this IME * This class detects the {@link Intent#ACTION_MY_PACKAGE_REPLACED} broadcast intent when this IME
* package has been replaced by a newer version of the same package. This class also detects * package has been replaced by a newer version of the same package. This class also detects
@ -77,22 +76,6 @@ public final class SystemBroadcastReceiver extends BroadcastReceiver {
richImm.setAdditionalInputMethodSubtypes(additionalSubtypes); richImm.setAdditionalInputMethodSubtypes(additionalSubtypes);
toggleAppIcon(context); toggleAppIcon(context);
downloadLatestDictionaries(context); downloadLatestDictionaries(context);
// TODO: This is only for dogfood builds. Remove this from the final release.
DictionaryFacilitator keyboardFacilitator =
DictionaryFacilitatorProvider.getDictionaryFacilitator(false);
boolean historyCleared = keyboardFacilitator.clearUserHistoryDictionary(context);
Locale keyboardLocale = keyboardFacilitator.getLocale();
if (historyCleared && keyboardLocale != null) {
keyboardFacilitator.resetDictionaries(
context,
keyboardLocale,
keyboardFacilitator.usesContacts(),
true /* history */,
true /* force */,
keyboardFacilitator.getAccount(),
"" /* prefix */,
null /* listener */);
}
} else if (Intent.ACTION_BOOT_COMPLETED.equals(intentAction)) { } else if (Intent.ACTION_BOOT_COMPLETED.equals(intentAction)) {
Log.i(TAG, "Boot has been completed"); Log.i(TAG, "Boot has been completed");
toggleAppIcon(context); toggleAppIcon(context);
@ -126,7 +109,7 @@ public final class SystemBroadcastReceiver extends BroadcastReceiver {
context.sendBroadcast(updateIntent); context.sendBroadcast(updateIntent);
} }
public static void toggleAppIcon(final Context context) { private static void toggleAppIcon(final Context context) {
final int appInfoFlags = context.getApplicationInfo().flags; final int appInfoFlags = context.getApplicationInfo().flags;
final boolean isSystemApp = (appInfoFlags & ApplicationInfo.FLAG_SYSTEM) > 0; final boolean isSystemApp = (appInfoFlags & ApplicationInfo.FLAG_SYSTEM) > 0;
if (Log.isLoggable(TAG, Log.INFO)) { if (Log.isLoggable(TAG, Log.INFO)) {

View File

@ -398,8 +398,9 @@ public final class InputLogic {
if (!TextUtils.isEmpty(mWordBeingCorrectedByCursor)) { if (!TextUtils.isEmpty(mWordBeingCorrectedByCursor)) {
final int timeStampInSeconds = (int)TimeUnit.MILLISECONDS.toSeconds( final int timeStampInSeconds = (int)TimeUnit.MILLISECONDS.toSeconds(
System.currentTimeMillis()); System.currentTimeMillis());
performAdditionToUserHistoryDictionary(settingsValues, mWordBeingCorrectedByCursor, mDictionaryFacilitator.addToUserHistory(mWordBeingCorrectedByCursor, false,
NgramContext.EMPTY_PREV_WORDS_INFO); NgramContext.EMPTY_PREV_WORDS_INFO, timeStampInSeconds,
settingsValues.mBlockPotentiallyOffensive);
} }
} else { } else {
// resetEntireInputState calls resetCachesUponCursorMove, but forcing the // resetEntireInputState calls resetCachesUponCursorMove, but forcing the

View File

@ -26,7 +26,6 @@ import android.preference.Preference;
import com.android.inputmethod.latin.AudioAndHapticFeedbackManager; import com.android.inputmethod.latin.AudioAndHapticFeedbackManager;
import com.android.inputmethod.latin.R; import com.android.inputmethod.latin.R;
import com.android.inputmethod.latin.SystemBroadcastReceiver;
import com.android.inputmethod.latin.define.ProductionFlags; import com.android.inputmethod.latin.define.ProductionFlags;
/** /**
@ -107,8 +106,6 @@ public final class AdvancedSettingsFragment extends SubScreenFragment {
if (key.equals(Settings.PREF_POPUP_ON)) { if (key.equals(Settings.PREF_POPUP_ON)) {
setPreferenceEnabled(Settings.PREF_KEY_PREVIEW_POPUP_DISMISS_DELAY, setPreferenceEnabled(Settings.PREF_KEY_PREVIEW_POPUP_DISMISS_DELAY,
Settings.readKeyPreviewPopupEnabled(prefs, res)); Settings.readKeyPreviewPopupEnabled(prefs, res));
} else if (key.equals(Settings.PREF_SHOW_SETUP_WIZARD_ICON)) {
SystemBroadcastReceiver.toggleAppIcon(getActivity());
} }
updateListPreferenceSummaryToCurrentValue(Settings.PREF_KEY_PREVIEW_POPUP_DISMISS_DELAY); updateListPreferenceSummaryToCurrentValue(Settings.PREF_KEY_PREVIEW_POPUP_DISMISS_DELAY);
refreshEnablingsOfKeypressSoundAndVibrationSettings(); refreshEnablingsOfKeypressSoundAndVibrationSettings();

View File

@ -84,7 +84,8 @@ public final class AndroidSpellCheckerSession extends AndroidWordLevelSpellCheck
if (TextUtils.isEmpty(splitText)) { if (TextUtils.isEmpty(splitText)) {
continue; continue;
} }
if (mSuggestionsCache.getSuggestionsFromCache(splitText.toString()) == null) { if (mSuggestionsCache.getSuggestionsFromCache(splitText.toString(), ngramContext)
== null) {
continue; continue;
} }
final int newLength = splitText.length(); final int newLength = splitText.length();

View File

@ -71,26 +71,30 @@ public abstract class AndroidWordLevelSpellCheckerSession extends Session {
} }
protected static final class SuggestionsCache { protected static final class SuggestionsCache {
private static final char CHAR_DELIMITER = '\uFFFC';
private static final int MAX_CACHE_SIZE = 50; private static final int MAX_CACHE_SIZE = 50;
private final LruCache<String, SuggestionsParams> mUnigramSuggestionsInfoCache = private final LruCache<String, SuggestionsParams> mUnigramSuggestionsInfoCache =
new LruCache<>(MAX_CACHE_SIZE); new LruCache<>(MAX_CACHE_SIZE);
private static String generateKey(final String query) { private static String generateKey(final String query, final NgramContext ngramContext) {
return query + ""; if (TextUtils.isEmpty(query) || !ngramContext.isValid()) {
return query;
}
return query + CHAR_DELIMITER + ngramContext;
} }
public SuggestionsParams getSuggestionsFromCache(final String query) { public SuggestionsParams getSuggestionsFromCache(String query,
return mUnigramSuggestionsInfoCache.get(query); final NgramContext ngramContext) {
return mUnigramSuggestionsInfoCache.get(generateKey(query, ngramContext));
} }
public void putSuggestionsToCache( public void putSuggestionsToCache(final String query, final NgramContext ngramContext,
final String query, final String[] suggestions, final int flags) { final String[] suggestions, final int flags) {
if (suggestions == null || TextUtils.isEmpty(query)) { if (suggestions == null || TextUtils.isEmpty(query)) {
return; return;
} }
mUnigramSuggestionsInfoCache.put( mUnigramSuggestionsInfoCache.put(
generateKey(query), generateKey(query, ngramContext), new SuggestionsParams(suggestions, flags));
new SuggestionsParams(suggestions, flags));
} }
public void clearCache() { public void clearCache() {
@ -228,7 +232,16 @@ public abstract class AndroidWordLevelSpellCheckerSession extends Session {
AndroidSpellCheckerService.SINGLE_QUOTE). AndroidSpellCheckerService.SINGLE_QUOTE).
replaceAll("^" + quotesRegexp, ""). replaceAll("^" + quotesRegexp, "").
replaceAll(quotesRegexp + "$", ""); replaceAll(quotesRegexp + "$", "");
final SuggestionsParams cachedSuggestionsParams =
mSuggestionsCache.getSuggestionsFromCache(text, ngramContext);
if (cachedSuggestionsParams != null) {
Log.d(TAG, "onGetSuggestionsInternal() : Cache hit for [" + text + "]");
return new SuggestionsInfo(
cachedSuggestionsParams.mFlags, cachedSuggestionsParams.mSuggestions);
}
// If spell checking is impossible, return early.
if (!mService.hasMainDictionaryForLocale(mLocale)) { if (!mService.hasMainDictionaryForLocale(mLocale)) {
return AndroidSpellCheckerService.getNotInDictEmptySuggestions( return AndroidSpellCheckerService.getNotInDictEmptySuggestions(
false /* reportAsTypo */); false /* reportAsTypo */);
@ -316,7 +329,8 @@ public abstract class AndroidWordLevelSpellCheckerSession extends Session {
.getValueOf_RESULT_ATTR_HAS_RECOMMENDED_SUGGESTIONS() .getValueOf_RESULT_ATTR_HAS_RECOMMENDED_SUGGESTIONS()
: 0); : 0);
final SuggestionsInfo retval = new SuggestionsInfo(flags, result.mSuggestions); final SuggestionsInfo retval = new SuggestionsInfo(flags, result.mSuggestions);
mSuggestionsCache.putSuggestionsToCache(text, result.mSuggestions, flags); mSuggestionsCache.putSuggestionsToCache(text, ngramContext, result.mSuggestions,
flags);
return retval; return retval;
} catch (RuntimeException e) { } catch (RuntimeException e) {
// Don't kill the keyboard if there is a bug in the spell checker // Don't kill the keyboard if there is a bug in the spell checker

View File

@ -30,7 +30,6 @@ import com.android.inputmethod.latin.AssetFileAddress;
import com.android.inputmethod.latin.BinaryDictionaryGetter; import com.android.inputmethod.latin.BinaryDictionaryGetter;
import com.android.inputmethod.latin.R; import com.android.inputmethod.latin.R;
import com.android.inputmethod.latin.RichInputMethodManager; import com.android.inputmethod.latin.RichInputMethodManager;
import com.android.inputmethod.latin.common.FileUtils;
import com.android.inputmethod.latin.common.LocaleUtils; import com.android.inputmethod.latin.common.LocaleUtils;
import com.android.inputmethod.latin.define.DecoderSpecificConstants; import com.android.inputmethod.latin.define.DecoderSpecificConstants;
import com.android.inputmethod.latin.makedict.DictionaryHeader; import com.android.inputmethod.latin.makedict.DictionaryHeader;
@ -153,13 +152,6 @@ public class DictionaryInfoUtils {
return context.getFilesDir() + File.separator + "dicts"; return context.getFilesDir() + File.separator + "dicts";
} }
/**
* Helper method to get the top level cache directory.
*/
public static String getWordListStagingDirectory(final Context context) {
return context.getFilesDir() + File.separator + "staging";
}
/** /**
* Helper method to get the top level temp directory. * Helper method to get the top level temp directory.
*/ */
@ -196,10 +188,6 @@ public class DictionaryInfoUtils {
return new File(DictionaryInfoUtils.getWordListCacheDirectory(context)).listFiles(); return new File(DictionaryInfoUtils.getWordListCacheDirectory(context)).listFiles();
} }
public static File[] getStagingDirectoryList(final Context context) {
return new File(DictionaryInfoUtils.getWordListStagingDirectory(context)).listFiles();
}
@Nullable @Nullable
public static File[] getUnusedDictionaryList(final Context context) { public static File[] getUnusedDictionaryList(final Context context) {
return context.getFilesDir().listFiles(new FilenameFilter() { return context.getFilesDir().listFiles(new FilenameFilter() {
@ -233,7 +221,7 @@ public class DictionaryInfoUtils {
/** /**
* Find out the cache directory associated with a specific locale. * Find out the cache directory associated with a specific locale.
*/ */
public static String getCacheDirectoryForLocale(final String locale, final Context context) { private static String getCacheDirectoryForLocale(final String locale, final Context context) {
final String relativeDirectoryName = replaceFileNameDangerousCharacters(locale); final String relativeDirectoryName = replaceFileNameDangerousCharacters(locale);
final String absoluteDirectoryName = getWordListCacheDirectory(context) + File.separator final String absoluteDirectoryName = getWordListCacheDirectory(context) + File.separator
+ relativeDirectoryName; + relativeDirectoryName;
@ -266,52 +254,6 @@ public class DictionaryInfoUtils {
return getCacheDirectoryForLocale(locale, context) + File.separator + fileName; return getCacheDirectoryForLocale(locale, context) + File.separator + fileName;
} }
public static String getStagingFileName(String id, String locale, Context context) {
final String stagingDirectory = getWordListStagingDirectory(context);
// create the directory if it does not exist.
final File directory = new File(stagingDirectory);
if (!directory.exists()) {
if (!directory.mkdirs()) {
Log.e(TAG, "Could not create the staging directory.");
}
}
// e.g. id="main:en_in", locale ="en_IN"
final String fileName = replaceFileNameDangerousCharacters(
locale + TEMP_DICT_FILE_SUB + id);
return stagingDirectory + File.separator + fileName;
}
public static void moveStagingFilesIfExists(Context context) {
final File[] stagingFiles = DictionaryInfoUtils.getStagingDirectoryList(context);
if (stagingFiles != null && stagingFiles.length > 0) {
for (final File stagingFile : stagingFiles) {
final String fileName = stagingFile.getName();
final int index = fileName.indexOf(TEMP_DICT_FILE_SUB);
if (index == -1) {
// This should never happen.
Log.e(TAG, "Staging file does not have ___ substring.");
continue;
}
final String[] localeAndFileId = fileName.split(TEMP_DICT_FILE_SUB);
if (localeAndFileId.length != 2) {
Log.e(TAG, String.format("malformed staging file %s. Deleting.",
stagingFile.getAbsoluteFile()));
stagingFile.delete();
continue;
}
final String locale = localeAndFileId[0];
// already escaped while moving to staging.
final String fileId = localeAndFileId[1];
final String cacheDirectoryForLocale = getCacheDirectoryForLocale(locale, context);
final String cacheFilename = cacheDirectoryForLocale + File.separator + fileId;
final File cacheFile = new File(cacheFilename);
// move the staging file to cache file.
FileUtils.renameTo(stagingFile, cacheFile);
}
}
}
public static boolean isMainWordListId(final String id) { public static boolean isMainWordListId(final String id) {
final String[] idArray = id.split(BinaryDictionaryGetter.ID_CATEGORY_SEPARATOR); final String[] idArray = id.split(BinaryDictionaryGetter.ID_CATEGORY_SEPARATOR);
// An id is supposed to be in format category:locale, so splitting on the separator // An id is supposed to be in format category:locale, so splitting on the separator