如何在Android应用程序中获取CPU调控器?

时间:2016-09-29 19:47:41

标签: java android performance cpu processor

我正在创建一个应用程序,其行为会有所不同,具体取决于CPU调控器的设置(例如Performance,powersave等)。但是,我不确定如何在应用程序本身中获取其当前设置。有谁知道在java类中访问它的命令是什么?

(要在手机上查看,请转到Settings->Performance->Profile以及Settings->Performance->Processor->CPU Governor

1 个答案:

答案 0 :(得分:0)

因此,信息存储在nil中。如果您在文件中阅读,那么您将获得这种类型的州长。您也可以通过提取文件1. Check if the user has defined an inflection for the noun, and , if so, accept that... if the word matches a user-defined noun, return the user-specified plural form 2. Handle words that do not inflect in the plural (such as fish, travois, chassis, nationalities ending in -ese etc. - see Tables A.2 and A.3)... if suffix(-fish) or suffix(-ois) or suffix(-sheep) or suffix(-deer) or suffix(-pox) or suffix(-[A-Z].*ese) or suffix(-itis) or category(-,-), return the original noun 3. Handle pronouns in the nominative, accusative, and dative (see Tables A.5), as well as prepositional phrases... if the word is a pronoun, return the specified plural of the pronoun if the word is of the form: "<preposition> <pronoun>", return "<preposition> <specified plural of pronoun>" 4. Handle standard irregular plurals (mongooses, oxen, etc. - see table A.1)... if the word has an irregular plural, return the specified plural 5. Handle irregular inflections for common suffixes (synopses, mice and men, etc.)... if suffix(-man), return inflection(-man,-men) if suffix(-[lm]ouse), return inflection(-ouse,-ice) if suffix(-tooth), return inflection(-tooth,-teeth) if suffix(-goose), return inflection(-goose,-geese) if suffix(-foot), return inflection(-foot,-feet) if suffix(-zoon), return inflection(-zoon,-zoa) if suffix(-[csx]is), return inflection(-is,-es) 6. Handle fully assimilated classical inflections (vertebrae, codices, etc. - see tables A.10, A.14, A.19 and A.20, and tables A.11, A.15 and A.21 if in "classical mode)... if category(-ex,-ices), return inflection(-ex,-ices) if category(-um,-a), return inflection(-um,-a) if category(-on,-a), return inflection(-on,-a) if category(-a,-ae), return inflection(-a,-ae) 7. Handle classical variants of modern inflections (stigmata, soprani, etc. - see tables A.11 to A.13, A.15, A.16, A.18, A.21 to A.25)... if in classical mode, if suffix(-trix), return inflection(-trix,-trices) if suffix(-eau), return inflection(-eau,-eaux) if suffix(-ieu), return inflection(-ieu,-ieux) if suffix(-..[iay]nx), return inflection(-nx,-nges) if category(-en,-ina), return inflection(-en,-ina) if category(-a,-ata), return inflection(-a,-ata) if category(-is,-ides), return inflection(-is,-ides) if category(-us,-i), return inflection(-us,-i) if category(-us,-us), return the original noun if category(-o,-i), return inflection(-o,-i) if category(-,-i), return inflection(-,-i) if category(-,-im), return inflection(-,-im) 8. The suffixes -ch, -sh, and -ss all take -es in the plural (churches, classes, etc)... if suffix(-[cs]h), return inflection(-h,-hes) if suffix(-ss), return inflection(-ss,-sses) 9. Certain words ending in -f or -fe take -ves in the plural (lives, wolves, etc)... if suffix(-[aeo]lf) or suffix(-[^d]eaf) or suffix(-arf), return inflection(-f,-ves) if suffix(-[nlw]ife), return inflection(-fe,-ves) 10. Words ending in -y take -ys if preceded by a vowel (storeys, stays, etc.) or when a proper noun (Marys, Tonys, etc.), but -ies if preceded by a consonant (stories, skies, etc.)... if suffix(-[aeiou]y), return inflection(-y,-ys) if suffix(-[A-Z].*y), return inflection(-y,-ys) if suffix(-y), return inflection(-y,-ies) 11. Some words ending in -o take -os (lassos, solos, etc. - see tables A.17 and A.18); the rest take -oes (potatoes, dominoes, etc.) However, words in which the -o is preceded by a vowel always take -os (folios, bamboos)... if category(-o,-os) or suffix(-[aeiou]o), return inflection(-o,-os) if suffix(-o), return inflection(-o,-oes) 12. Handle plurals of compound words (Postmasters General, Major Generals, mothers-in-law, etc) by recursively applying the entire algorithm to the underlying noun. See Table A.26 for the military suffix -general, which inflects to -generals... if category(-general,-generals), return inflection(-l,-ls) if the word is of the form: "<word> general", return "<plural of word> general" if the word is of the form: "<word> <preposition> <words>", return "<plural of word> <preposition> <words>" 13. Otherwise, assume that the plural just adds -s (cats, programmes, trees, etc.)... otherwise, return inflection(-,-s) 来获取更多的cpu信息,但如果您这样做,则不会包含调控器。

/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor