diff options
103 files changed, 7784 insertions, 1402 deletions
diff --git a/api/current.xml b/api/current.xml index af6d2cd..001f6cd 100644 --- a/api/current.xml +++ b/api/current.xml @@ -1828,7 +1828,7 @@ type="int" transient="false" volatile="false" - value="16843513" + value="16843501" static="true" final="true" deprecated="not deprecated" @@ -1839,7 +1839,7 @@ type="int" transient="false" volatile="false" - value="16843482" + value="16843470" static="true" final="true" deprecated="not deprecated" @@ -1850,7 +1850,7 @@ type="int" transient="false" volatile="false" - value="16843522" + value="16843510" static="true" final="true" deprecated="not deprecated" @@ -1861,7 +1861,7 @@ type="int" transient="false" volatile="false" - value="16843521" + value="16843509" static="true" final="true" deprecated="not deprecated" @@ -1872,7 +1872,7 @@ type="int" transient="false" volatile="false" - value="16843523" + value="16843511" static="true" final="true" deprecated="not deprecated" @@ -1883,7 +1883,7 @@ type="int" transient="false" volatile="false" - value="16843492" + value="16843480" static="true" final="true" deprecated="not deprecated" @@ -1894,7 +1894,7 @@ type="int" transient="false" volatile="false" - value="16843491" + value="16843479" static="true" final="true" deprecated="not deprecated" @@ -1905,7 +1905,7 @@ type="int" transient="false" volatile="false" - value="16843529" + value="16843517" static="true" final="true" deprecated="not deprecated" @@ -1916,7 +1916,7 @@ type="int" transient="false" volatile="false" - value="16843495" + value="16843483" static="true" final="true" deprecated="not deprecated" @@ -1927,7 +1927,7 @@ type="int" transient="false" volatile="false" - value="16843525" + value="16843513" static="true" final="true" deprecated="not deprecated" @@ -1938,7 +1938,7 @@ type="int" transient="false" volatile="false" - value="16843496" + value="16843484" static="true" final="true" deprecated="not deprecated" @@ -1949,7 +1949,7 @@ type="int" transient="false" volatile="false" - value="16843552" + value="16843540" static="true" final="true" deprecated="not deprecated" @@ -1960,7 +1960,7 @@ type="int" transient="false" volatile="false" - value="16843551" + value="16843539" static="true" final="true" deprecated="not deprecated" @@ -1971,7 +1971,7 @@ type="int" transient="false" volatile="false" - value="16843553" + value="16843541" static="true" final="true" deprecated="not deprecated" @@ -1982,7 +1982,7 @@ type="int" transient="false" volatile="false" - value="16843524" + value="16843512" static="true" final="true" deprecated="not deprecated" @@ -1993,7 +1993,7 @@ type="int" transient="false" volatile="false" - value="16843530" + value="16843518" static="true" final="true" deprecated="not deprecated" @@ -2004,7 +2004,7 @@ type="int" transient="false" volatile="false" - value="16843531" + value="16843519" static="true" final="true" deprecated="not deprecated" @@ -2055,17 +2055,6 @@ visibility="public" > </field> -<field name="adapter" - type="int" - transient="false" - volatile="false" - value="16843468" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> <field name="addStatesFromChildren" type="int" transient="false" @@ -2103,7 +2092,7 @@ type="int" transient="false" volatile="false" - value="16843543" + value="16843531" static="true" final="true" deprecated="not deprecated" @@ -2114,7 +2103,7 @@ type="int" transient="false" volatile="false" - value="16843480" + value="16843468" static="true" final="true" deprecated="not deprecated" @@ -2147,7 +2136,7 @@ type="int" transient="false" volatile="false" - value="16843584" + value="16843572" static="true" final="true" deprecated="not deprecated" @@ -2180,7 +2169,7 @@ type="int" transient="false" volatile="false" - value="16843565" + value="16843553" static="true" final="true" deprecated="not deprecated" @@ -2235,7 +2224,7 @@ type="int" transient="false" volatile="false" - value="16843489" + value="16843477" static="true" final="true" deprecated="not deprecated" @@ -2246,7 +2235,7 @@ type="int" transient="false" volatile="false" - value="16843520" + value="16843508" static="true" final="true" deprecated="not deprecated" @@ -2312,7 +2301,7 @@ type="int" transient="false" volatile="false" - value="16843560" + value="16843548" static="true" final="true" deprecated="not deprecated" @@ -2352,17 +2341,6 @@ visibility="public" > </field> -<field name="as" - type="int" - transient="false" - volatile="false" - value="16843474" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> <field name="author" type="int" transient="false" @@ -2389,7 +2367,7 @@ type="int" transient="false" volatile="false" - value="16843549" + value="16843537" static="true" final="true" deprecated="not deprecated" @@ -2499,7 +2477,7 @@ type="int" transient="false" volatile="false" - value="16843562" + value="16843550" static="true" final="true" deprecated="not deprecated" @@ -2543,7 +2521,7 @@ type="int" transient="false" volatile="false" - value="16843577" + value="16843565" static="true" final="true" deprecated="not deprecated" @@ -2631,7 +2609,7 @@ type="int" transient="false" volatile="false" - value="16843538" + value="16843526" static="true" final="true" deprecated="not deprecated" @@ -2642,7 +2620,7 @@ type="int" transient="false" volatile="false" - value="16843537" + value="16843525" static="true" final="true" deprecated="not deprecated" @@ -2675,7 +2653,7 @@ type="int" transient="false" volatile="false" - value="16843581" + value="16843569" static="true" final="true" deprecated="not deprecated" @@ -2686,7 +2664,7 @@ type="int" transient="false" volatile="false" - value="16843580" + value="16843568" static="true" final="true" deprecated="not deprecated" @@ -2752,7 +2730,7 @@ type="int" transient="false" volatile="false" - value="16843610" + value="16843598" static="true" final="true" deprecated="not deprecated" @@ -3111,17 +3089,6 @@ visibility="public" > </field> -<field name="column" - type="int" - transient="false" - volatile="false" - value="16843477" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> <field name="columnDelay" type="int" transient="false" @@ -3269,7 +3236,7 @@ type="int" transient="false" volatile="false" - value="16843486" + value="16843474" static="true" final="true" deprecated="not deprecated" @@ -3280,7 +3247,7 @@ type="int" transient="false" volatile="false" - value="16843593" + value="16843581" static="true" final="true" deprecated="not deprecated" @@ -3335,7 +3302,7 @@ type="int" transient="false" volatile="false" - value="16843607" + value="16843595" static="true" final="true" deprecated="not deprecated" @@ -3441,6 +3408,17 @@ visibility="public" > </field> +<field name="detailsElementBackground" + type="int" + transient="false" + volatile="false" + value="16843600" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +</field> <field name="dial" type="int" transient="false" @@ -3500,7 +3478,7 @@ type="int" transient="false" volatile="false" - value="16843542" + value="16843530" static="true" final="true" deprecated="not deprecated" @@ -3577,7 +3555,7 @@ type="int" transient="false" volatile="false" - value="16843484" + value="16843472" static="true" final="true" deprecated="not deprecated" @@ -3621,7 +3599,7 @@ type="int" transient="false" volatile="false" - value="16843578" + value="16843566" static="true" final="true" deprecated="not deprecated" @@ -3632,7 +3610,7 @@ type="int" transient="false" volatile="false" - value="16843576" + value="16843564" static="true" final="true" deprecated="not deprecated" @@ -3643,7 +3621,7 @@ type="int" transient="false" volatile="false" - value="16843544" + value="16843532" static="true" final="true" deprecated="not deprecated" @@ -3819,7 +3797,7 @@ type="int" transient="false" volatile="false" - value="16843490" + value="16843478" static="true" final="true" deprecated="not deprecated" @@ -3870,6 +3848,28 @@ visibility="public" > </field> +<field name="editTextBackground" + type="int" + transient="false" + volatile="false" + value="16843604" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +</field> +<field name="editTextColor" + type="int" + transient="false" + volatile="false" + value="16843603" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +</field> <field name="editTextPreferenceStyle" type="int" transient="false" @@ -3973,7 +3973,7 @@ type="int" transient="false" volatile="false" - value="16843546" + value="16843534" static="true" final="true" deprecated="not deprecated" @@ -4028,7 +4028,7 @@ type="int" transient="false" volatile="false" - value="16843547" + value="16843535" static="true" final="true" deprecated="not deprecated" @@ -4226,7 +4226,7 @@ type="int" transient="false" volatile="false" - value="16843587" + value="16843575" static="true" final="true" deprecated="not deprecated" @@ -4248,7 +4248,7 @@ type="int" transient="false" volatile="false" - value="16843592" + value="16843580" static="true" final="true" deprecated="not deprecated" @@ -4259,7 +4259,7 @@ type="int" transient="false" volatile="false" - value="16843589" + value="16843577" static="true" final="true" deprecated="not deprecated" @@ -4270,7 +4270,7 @@ type="int" transient="false" volatile="false" - value="16843590" + value="16843578" static="true" final="true" deprecated="not deprecated" @@ -4281,7 +4281,7 @@ type="int" transient="false" volatile="false" - value="16843588" + value="16843576" static="true" final="true" deprecated="not deprecated" @@ -4292,7 +4292,7 @@ type="int" transient="false" volatile="false" - value="16843591" + value="16843579" static="true" final="true" deprecated="not deprecated" @@ -4391,7 +4391,7 @@ type="int" transient="false" volatile="false" - value="16843595" + value="16843583" static="true" final="true" deprecated="not deprecated" @@ -4446,7 +4446,7 @@ type="int" transient="false" volatile="false" - value="16843601" + value="16843589" static="true" final="true" deprecated="not deprecated" @@ -4501,7 +4501,7 @@ type="int" transient="false" volatile="false" - value="16843503" + value="16843491" static="true" final="true" deprecated="not deprecated" @@ -4512,7 +4512,7 @@ type="int" transient="false" volatile="false" - value="16843507" + value="16843495" static="true" final="true" deprecated="not deprecated" @@ -4523,7 +4523,7 @@ type="int" transient="false" volatile="false" - value="16843508" + value="16843496" static="true" final="true" deprecated="not deprecated" @@ -4534,7 +4534,7 @@ type="int" transient="false" volatile="false" - value="16843509" + value="16843497" static="true" final="true" deprecated="not deprecated" @@ -4545,7 +4545,7 @@ type="int" transient="false" volatile="false" - value="16843510" + value="16843498" static="true" final="true" deprecated="not deprecated" @@ -4556,7 +4556,7 @@ type="int" transient="false" volatile="false" - value="16843505" + value="16843493" static="true" final="true" deprecated="not deprecated" @@ -4567,7 +4567,7 @@ type="int" transient="false" volatile="false" - value="16843506" + value="16843494" static="true" final="true" deprecated="not deprecated" @@ -4578,7 +4578,7 @@ type="int" transient="false" volatile="false" - value="16843511" + value="16843499" static="true" final="true" deprecated="not deprecated" @@ -4589,7 +4589,7 @@ type="int" transient="false" volatile="false" - value="16843512" + value="16843500" static="true" final="true" deprecated="not deprecated" @@ -4607,17 +4607,6 @@ visibility="public" > </field> -<field name="from" - type="int" - transient="false" - volatile="false" - value="16843472" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> <field name="fromAlpha" type="int" transient="false" @@ -4640,17 +4629,6 @@ visibility="public" > </field> -<field name="fromValue" - type="int" - transient="false" - volatile="false" - value="16843475" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> <field name="fromXDelta" type="int" transient="false" @@ -4941,7 +4919,7 @@ type="int" transient="false" volatile="false" - value="16843487" + value="16843475" static="true" final="true" deprecated="not deprecated" @@ -5007,7 +4985,7 @@ type="int" transient="false" volatile="false" - value="16843545" + value="16843533" static="true" final="true" deprecated="not deprecated" @@ -5018,7 +4996,7 @@ type="int" transient="false" volatile="false" - value="16843563" + value="16843551" static="true" final="true" deprecated="not deprecated" @@ -5047,6 +5025,17 @@ visibility="public" > </field> +<field name="horizontalScrollViewStyle" + type="int" + transient="false" + volatile="false" + value="16843605" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +</field> <field name="horizontalSpacing" type="int" transient="false" @@ -5095,7 +5084,7 @@ type="int" transient="false" volatile="false" - value="16843528" + value="16843516" static="true" final="true" deprecated="not deprecated" @@ -5216,7 +5205,7 @@ type="int" transient="false" volatile="false" - value="16843516" + value="16843504" static="true" final="true" deprecated="not deprecated" @@ -5227,7 +5216,7 @@ type="int" transient="false" volatile="false" - value="16843514" + value="16843502" static="true" final="true" deprecated="not deprecated" @@ -5238,7 +5227,7 @@ type="int" transient="false" volatile="false" - value="16843515" + value="16843503" static="true" final="true" deprecated="not deprecated" @@ -5348,7 +5337,7 @@ type="int" transient="false" volatile="false" - value="16843558" + value="16843546" static="true" final="true" deprecated="not deprecated" @@ -5524,7 +5513,7 @@ type="int" transient="false" volatile="false" - value="16843585" + value="16843573" static="true" final="true" deprecated="not deprecated" @@ -5623,7 +5612,7 @@ type="int" transient="false" volatile="false" - value="16843579" + value="16843567" static="true" final="true" deprecated="not deprecated" @@ -6294,7 +6283,7 @@ type="int" transient="false" volatile="false" - value="16843518" + value="16843506" static="true" final="true" deprecated="not deprecated" @@ -6338,7 +6327,7 @@ type="int" transient="false" volatile="false" - value="16843539" + value="16843527" static="true" final="true" deprecated="not deprecated" @@ -6349,7 +6338,7 @@ type="int" transient="false" volatile="false" - value="16843533" + value="16843521" static="true" final="true" deprecated="not deprecated" @@ -6437,7 +6426,7 @@ type="int" transient="false" volatile="false" - value="16843541" + value="16843529" static="true" final="true" deprecated="not deprecated" @@ -6492,7 +6481,7 @@ type="int" transient="false" volatile="false" - value="16843598" + value="16843586" static="true" final="true" deprecated="not deprecated" @@ -6613,7 +6602,7 @@ type="int" transient="false" volatile="false" - value="16843488" + value="16843476" static="true" final="true" deprecated="not deprecated" @@ -6646,7 +6635,7 @@ type="int" transient="false" volatile="false" - value="16843597" + value="16843585" static="true" final="true" deprecated="not deprecated" @@ -6767,7 +6756,7 @@ type="int" transient="false" volatile="false" - value="16843483" + value="16843471" static="true" final="true" deprecated="not deprecated" @@ -6800,7 +6789,7 @@ type="int" transient="false" volatile="false" - value="16843594" + value="16843582" static="true" final="true" deprecated="not deprecated" @@ -6932,7 +6921,7 @@ type="int" transient="false" volatile="false" - value="16843564" + value="16843552" static="true" final="true" deprecated="not deprecated" @@ -6965,7 +6954,7 @@ type="int" transient="false" volatile="false" - value="16843502" + value="16843490" static="true" final="true" deprecated="not deprecated" @@ -7328,7 +7317,7 @@ type="int" transient="false" volatile="false" - value="16843534" + value="16843522" static="true" final="true" deprecated="not deprecated" @@ -7427,7 +7416,7 @@ type="int" transient="false" volatile="false" - value="16843494" + value="16843482" static="true" final="true" deprecated="not deprecated" @@ -7482,7 +7471,7 @@ type="int" transient="false" volatile="false" - value="16843559" + value="16843547" static="true" final="true" deprecated="not deprecated" @@ -7603,7 +7592,7 @@ type="int" transient="false" volatile="false" - value="16843501" + value="16843489" static="true" final="true" deprecated="not deprecated" @@ -7955,7 +7944,7 @@ type="int" transient="false" volatile="false" - value="16843572" + value="16843560" static="true" final="true" deprecated="not deprecated" @@ -7966,7 +7955,7 @@ type="int" transient="false" volatile="false" - value="16843573" + value="16843561" static="true" final="true" deprecated="not deprecated" @@ -7977,7 +7966,7 @@ type="int" transient="false" volatile="false" - value="16843574" + value="16843562" static="true" final="true" deprecated="not deprecated" @@ -8076,7 +8065,7 @@ type="int" transient="false" volatile="false" - value="16843570" + value="16843558" static="true" final="true" deprecated="not deprecated" @@ -8087,7 +8076,7 @@ type="int" transient="false" volatile="false" - value="16843571" + value="16843559" static="true" final="true" deprecated="not deprecated" @@ -8439,7 +8428,7 @@ type="int" transient="false" volatile="false" - value="16843582" + value="16843570" static="true" final="true" deprecated="not deprecated" @@ -8472,7 +8461,7 @@ type="int" transient="false" volatile="false" - value="16843548" + value="16843536" static="true" final="true" deprecated="not deprecated" @@ -8483,7 +8472,7 @@ type="int" transient="false" volatile="false" - value="16843605" + value="16843593" static="true" final="true" deprecated="not deprecated" @@ -8494,18 +8483,7 @@ type="int" transient="false" volatile="false" - value="16843600" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="selection" - type="int" - transient="false" - volatile="false" - value="16843469" + value="16843588" static="true" final="true" deprecated="not deprecated" @@ -8626,7 +8604,7 @@ type="int" transient="false" volatile="false" - value="16843493" + value="16843481" static="true" final="true" deprecated="not deprecated" @@ -8648,7 +8626,7 @@ type="int" transient="false" volatile="false" - value="16843575" + value="16843563" static="true" final="true" deprecated="not deprecated" @@ -8670,7 +8648,7 @@ type="int" transient="false" volatile="false" - value="16843596" + value="16843584" static="true" final="true" deprecated="not deprecated" @@ -8681,7 +8659,7 @@ type="int" transient="false" volatile="false" - value="16843599" + value="16843587" static="true" final="true" deprecated="not deprecated" @@ -8747,18 +8725,7 @@ type="int" transient="false" volatile="false" - value="16843608" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="sortOrder" - type="int" - transient="false" - volatile="false" - value="16843470" + value="16843596" static="true" final="true" deprecated="not deprecated" @@ -8813,7 +8780,7 @@ type="int" transient="false" volatile="false" - value="16843519" + value="16843507" static="true" final="true" deprecated="not deprecated" @@ -8835,7 +8802,7 @@ type="int" transient="false" volatile="false" - value="16843609" + value="16843597" static="true" final="true" deprecated="not deprecated" @@ -8846,7 +8813,7 @@ type="int" transient="false" volatile="false" - value="16843517" + value="16843505" static="true" final="true" deprecated="not deprecated" @@ -8945,7 +8912,7 @@ type="int" transient="false" volatile="false" - value="16843561" + value="16843549" static="true" final="true" deprecated="not deprecated" @@ -8956,7 +8923,7 @@ type="int" transient="false" volatile="false" - value="16843532" + value="16843520" static="true" final="true" deprecated="not deprecated" @@ -9088,7 +9055,7 @@ type="int" transient="false" volatile="false" - value="16843611" + value="16843599" static="true" final="true" deprecated="not deprecated" @@ -9143,7 +9110,7 @@ type="int" transient="false" volatile="false" - value="16843583" + value="16843571" static="true" final="true" deprecated="not deprecated" @@ -9198,7 +9165,7 @@ type="int" transient="false" volatile="false" - value="16843485" + value="16843473" static="true" final="true" deprecated="not deprecated" @@ -9209,7 +9176,7 @@ type="int" transient="false" volatile="false" - value="16843527" + value="16843515" static="true" final="true" deprecated="not deprecated" @@ -9594,7 +9561,7 @@ type="int" transient="false" volatile="false" - value="16843535" + value="16843523" static="true" final="true" deprecated="not deprecated" @@ -9671,7 +9638,7 @@ type="int" transient="false" volatile="false" - value="16843536" + value="16843524" static="true" final="true" deprecated="not deprecated" @@ -9715,7 +9682,7 @@ type="int" transient="false" volatile="false" - value="16843540" + value="16843528" static="true" final="true" deprecated="not deprecated" @@ -9733,6 +9700,17 @@ visibility="public" > </field> +<field name="textColorHighlightInverse" + type="int" + transient="false" + volatile="false" + value="16843601" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +</field> <field name="textColorHint" type="int" transient="false" @@ -9766,6 +9744,17 @@ visibility="public" > </field> +<field name="textColorLinkInverse" + type="int" + transient="false" + volatile="false" + value="16843602" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +</field> <field name="textColorPrimary" type="int" transient="false" @@ -9902,7 +9891,7 @@ type="int" transient="false" volatile="false" - value="16843555" + value="16843543" static="true" final="true" deprecated="not deprecated" @@ -9913,7 +9902,7 @@ type="int" transient="false" volatile="false" - value="16843554" + value="16843542" static="true" final="true" deprecated="not deprecated" @@ -9935,7 +9924,7 @@ type="int" transient="false" volatile="false" - value="16843556" + value="16843544" static="true" final="true" deprecated="not deprecated" @@ -10166,18 +10155,7 @@ type="int" transient="false" volatile="false" - value="16843526" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="to" - type="int" - transient="false" - volatile="false" - value="16843473" + value="16843514" static="true" final="true" deprecated="not deprecated" @@ -10206,17 +10184,6 @@ visibility="public" > </field> -<field name="toValue" - type="int" - transient="false" - volatile="false" - value="16843476" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> <field name="toXDelta" type="int" transient="false" @@ -10342,7 +10309,7 @@ type="int" transient="false" volatile="false" - value="16843566" + value="16843554" static="true" final="true" deprecated="not deprecated" @@ -10353,7 +10320,7 @@ type="int" transient="false" volatile="false" - value="16843567" + value="16843555" static="true" final="true" deprecated="not deprecated" @@ -10364,7 +10331,7 @@ type="int" transient="false" volatile="false" - value="16843568" + value="16843556" static="true" final="true" deprecated="not deprecated" @@ -10375,7 +10342,7 @@ type="int" transient="false" volatile="false" - value="16843569" + value="16843557" static="true" final="true" deprecated="not deprecated" @@ -10419,7 +10386,7 @@ type="int" transient="false" volatile="false" - value="16843602" + value="16843590" static="true" final="true" deprecated="not deprecated" @@ -10448,22 +10415,11 @@ visibility="public" > </field> -<field name="uri" - type="int" - transient="false" - volatile="false" - value="16843471" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> <field name="useIntrinsicSizeAsMinimum" type="int" transient="false" volatile="false" - value="16843550" + value="16843538" static="true" final="true" deprecated="not deprecated" @@ -10507,7 +10463,7 @@ type="int" transient="false" volatile="false" - value="16843498" + value="16843486" static="true" final="true" deprecated="not deprecated" @@ -10518,7 +10474,7 @@ type="int" transient="false" volatile="false" - value="16843499" + value="16843487" static="true" final="true" deprecated="not deprecated" @@ -10529,7 +10485,7 @@ type="int" transient="false" volatile="false" - value="16843500" + value="16843488" static="true" final="true" deprecated="not deprecated" @@ -10606,7 +10562,7 @@ type="int" transient="false" volatile="false" - value="16843586" + value="16843574" static="true" final="true" deprecated="not deprecated" @@ -10826,7 +10782,7 @@ type="int" transient="false" volatile="false" - value="16843606" + value="16843594" static="true" final="true" deprecated="not deprecated" @@ -10837,7 +10793,7 @@ type="int" transient="false" volatile="false" - value="16843603" + value="16843591" static="true" final="true" deprecated="not deprecated" @@ -10848,7 +10804,7 @@ type="int" transient="false" volatile="false" - value="16843604" + value="16843592" static="true" final="true" deprecated="not deprecated" @@ -10892,7 +10848,7 @@ type="int" transient="false" volatile="false" - value="16843481" + value="16843469" static="true" final="true" deprecated="not deprecated" @@ -10903,7 +10859,7 @@ type="int" transient="false" volatile="false" - value="16843504" + value="16843492" static="true" final="true" deprecated="not deprecated" @@ -10914,7 +10870,7 @@ type="int" transient="false" volatile="false" - value="16843497" + value="16843485" static="true" final="true" deprecated="not deprecated" @@ -10969,7 +10925,7 @@ type="int" transient="false" volatile="false" - value="16843557" + value="16843545" static="true" final="true" deprecated="not deprecated" @@ -11141,28 +11097,6 @@ visibility="public" > </field> -<field name="withClass" - type="int" - transient="false" - volatile="false" - value="16843479" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="withExpression" - type="int" - transient="false" - volatile="false" - value="16843478" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> <field name="writePermission" type="int" transient="false" @@ -70875,6 +70809,23 @@ <parameter name="db" type="android.database.sqlite.SQLiteDatabase"> </parameter> </method> +<method name="onDowngrade" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="db" type="android.database.sqlite.SQLiteDatabase"> +</parameter> +<parameter name="oldVersion" type="int"> +</parameter> +<parameter name="newVersion" type="int"> +</parameter> +</method> <method name="onOpen" return="void" abstract="false" @@ -139080,7 +139031,7 @@ synchronized="false" static="true" final="false" - deprecated="not deprecated" + deprecated="deprecated" visibility="public" > </method> @@ -139091,7 +139042,7 @@ synchronized="false" static="true" final="false" - deprecated="not deprecated" + deprecated="deprecated" visibility="public" > </method> @@ -139102,7 +139053,7 @@ synchronized="false" static="true" final="false" - deprecated="not deprecated" + deprecated="deprecated" visibility="public" > </method> @@ -139113,7 +139064,7 @@ synchronized="false" static="true" final="false" - deprecated="not deprecated" + deprecated="deprecated" visibility="public" > </method> @@ -139236,7 +139187,7 @@ synchronized="false" static="true" final="false" - deprecated="not deprecated" + deprecated="deprecated" visibility="public" > </method> @@ -139247,7 +139198,7 @@ synchronized="false" static="true" final="false" - deprecated="not deprecated" + deprecated="deprecated" visibility="public" > </method> @@ -139348,7 +139299,7 @@ synchronized="false" static="true" final="false" - deprecated="not deprecated" + deprecated="deprecated" visibility="public" > </method> @@ -139359,7 +139310,7 @@ synchronized="false" static="true" final="false" - deprecated="not deprecated" + deprecated="deprecated" visibility="public" > </method> @@ -139370,7 +139321,7 @@ synchronized="false" static="true" final="false" - deprecated="not deprecated" + deprecated="deprecated" visibility="public" > </method> @@ -139381,7 +139332,7 @@ synchronized="false" static="true" final="false" - deprecated="not deprecated" + deprecated="deprecated" visibility="public" > </method> @@ -139447,7 +139398,7 @@ synchronized="false" static="true" final="false" - deprecated="not deprecated" + deprecated="deprecated" visibility="public" > </method> @@ -139458,7 +139409,7 @@ synchronized="false" static="true" final="false" - deprecated="not deprecated" + deprecated="deprecated" visibility="public" > </method> @@ -165570,6 +165521,5616 @@ </field> </class> </package> +<package name="android.renderscript" +> +<class name="Allocation" + extends="android.renderscript.BaseObj" + abstract="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<method name="copyFrom" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="d" type="android.renderscript.BaseObj[]"> +</parameter> +</method> +<method name="copyFrom" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="d" type="int[]"> +</parameter> +</method> +<method name="copyFrom" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="d" type="short[]"> +</parameter> +</method> +<method name="copyFrom" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="d" type="byte[]"> +</parameter> +</method> +<method name="copyFrom" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="d" type="float[]"> +</parameter> +</method> +<method name="copyFrom" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="b" type="android.graphics.Bitmap"> +</parameter> +</method> +<method name="copyTo" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="b" type="android.graphics.Bitmap"> +</parameter> +</method> +<method name="createCubemapFromBitmap" + return="android.renderscript.Allocation" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +<parameter name="b" type="android.graphics.Bitmap"> +</parameter> +<parameter name="mips" type="android.renderscript.Allocation.MipmapControl"> +</parameter> +<parameter name="layout" type="android.renderscript.Allocation.CubemapLayout"> +</parameter> +<parameter name="usage" type="int"> +</parameter> +</method> +<method name="createCubemapFromBitmap" + return="android.renderscript.Allocation" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +<parameter name="b" type="android.graphics.Bitmap"> +</parameter> +<parameter name="layout" type="android.renderscript.Allocation.CubemapLayout"> +</parameter> +</method> +<method name="createFromBitmap" + return="android.renderscript.Allocation" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +<parameter name="b" type="android.graphics.Bitmap"> +</parameter> +<parameter name="mips" type="android.renderscript.Allocation.MipmapControl"> +</parameter> +<parameter name="usage" type="int"> +</parameter> +</method> +<method name="createFromBitmap" + return="android.renderscript.Allocation" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +<parameter name="b" type="android.graphics.Bitmap"> +</parameter> +</method> +<method name="createFromBitmapResource" + return="android.renderscript.Allocation" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +<parameter name="res" type="android.content.res.Resources"> +</parameter> +<parameter name="id" type="int"> +</parameter> +<parameter name="mips" type="android.renderscript.Allocation.MipmapControl"> +</parameter> +<parameter name="usage" type="int"> +</parameter> +</method> +<method name="createFromBitmapResource" + return="android.renderscript.Allocation" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +<parameter name="res" type="android.content.res.Resources"> +</parameter> +<parameter name="id" type="int"> +</parameter> +</method> +<method name="createFromString" + return="android.renderscript.Allocation" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +<parameter name="str" type="java.lang.String"> +</parameter> +<parameter name="usage" type="int"> +</parameter> +</method> +<method name="createSized" + return="android.renderscript.Allocation" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +<parameter name="e" type="android.renderscript.Element"> +</parameter> +<parameter name="count" type="int"> +</parameter> +<parameter name="usage" type="int"> +</parameter> +</method> +<method name="createSized" + return="android.renderscript.Allocation" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +<parameter name="e" type="android.renderscript.Element"> +</parameter> +<parameter name="count" type="int"> +</parameter> +</method> +<method name="createTyped" + return="android.renderscript.Allocation" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +<parameter name="type" type="android.renderscript.Type"> +</parameter> +<parameter name="mc" type="android.renderscript.Allocation.MipmapControl"> +</parameter> +<parameter name="usage" type="int"> +</parameter> +</method> +<method name="createTyped" + return="android.renderscript.Allocation" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +<parameter name="type" type="android.renderscript.Type"> +</parameter> +<parameter name="usage" type="int"> +</parameter> +</method> +<method name="createTyped" + return="android.renderscript.Allocation" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +<parameter name="type" type="android.renderscript.Type"> +</parameter> +</method> +<method name="getType" + return="android.renderscript.Type" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<method name="readData" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="d" type="int[]"> +</parameter> +</method> +<method name="readData" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="d" type="float[]"> +</parameter> +</method> +<method name="resize" + return="void" + abstract="false" + native="false" + synchronized="true" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="dimX" type="int"> +</parameter> +</method> +<method name="subData" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="xoff" type="int"> +</parameter> +<parameter name="fp" type="android.renderscript.FieldPacker"> +</parameter> +</method> +<method name="subData1D" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="off" type="int"> +</parameter> +<parameter name="count" type="int"> +</parameter> +<parameter name="d" type="int[]"> +</parameter> +</method> +<method name="subData1D" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="off" type="int"> +</parameter> +<parameter name="count" type="int"> +</parameter> +<parameter name="d" type="short[]"> +</parameter> +</method> +<method name="subData1D" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="off" type="int"> +</parameter> +<parameter name="count" type="int"> +</parameter> +<parameter name="d" type="byte[]"> +</parameter> +</method> +<method name="subData1D" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="off" type="int"> +</parameter> +<parameter name="count" type="int"> +</parameter> +<parameter name="d" type="float[]"> +</parameter> +</method> +<method name="subData2D" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="xoff" type="int"> +</parameter> +<parameter name="yoff" type="int"> +</parameter> +<parameter name="w" type="int"> +</parameter> +<parameter name="h" type="int"> +</parameter> +<parameter name="d" type="int[]"> +</parameter> +</method> +<method name="subData2D" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="xoff" type="int"> +</parameter> +<parameter name="yoff" type="int"> +</parameter> +<parameter name="w" type="int"> +</parameter> +<parameter name="h" type="int"> +</parameter> +<parameter name="d" type="float[]"> +</parameter> +</method> +<method name="subElementData" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="xoff" type="int"> +</parameter> +<parameter name="component_number" type="int"> +</parameter> +<parameter name="fp" type="android.renderscript.FieldPacker"> +</parameter> +</method> +<method name="syncAll" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="srcLocation" type="int"> +</parameter> +</method> +<field name="USAGE_GRAPHICS_CONSTANTS" + type="int" + transient="false" + volatile="false" + value="8" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +</field> +<field name="USAGE_GRAPHICS_TEXTURE" + type="int" + transient="false" + volatile="false" + value="2" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +</field> +<field name="USAGE_GRAPHICS_VERTEX" + type="int" + transient="false" + volatile="false" + value="4" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +</field> +<field name="USAGE_SCRIPT" + type="int" + transient="false" + volatile="false" + value="1" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +</field> +</class> +<class name="Allocation.CubemapLayout" + extends="java.lang.Enum" + abstract="false" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +<method name="valueOf" + return="android.renderscript.Allocation.CubemapLayout" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="name" type="java.lang.String"> +</parameter> +</method> +<method name="values" + return="android.renderscript.Allocation.CubemapLayout[]" + abstract="false" + native="false" + synchronized="false" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +</method> +</class> +<class name="Allocation.MipmapControl" + extends="java.lang.Enum" + abstract="false" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +<method name="valueOf" + return="android.renderscript.Allocation.MipmapControl" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="name" type="java.lang.String"> +</parameter> +</method> +<method name="values" + return="android.renderscript.Allocation.MipmapControl[]" + abstract="false" + native="false" + synchronized="false" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +</method> +</class> +<class name="BaseObj" + extends="java.lang.Object" + abstract="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="" +> +<method name="destroy" + return="void" + abstract="false" + native="false" + synchronized="true" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<method name="setName" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="name" type="java.lang.String"> +</parameter> +</method> +</class> +<class name="Byte2" + extends="java.lang.Object" + abstract="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<constructor name="Byte2" + type="android.renderscript.Byte2" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</constructor> +<field name="x" + type="byte" + transient="false" + volatile="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</field> +<field name="y" + type="byte" + transient="false" + volatile="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</field> +</class> +<class name="Byte3" + extends="java.lang.Object" + abstract="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<constructor name="Byte3" + type="android.renderscript.Byte3" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</constructor> +<field name="x" + type="byte" + transient="false" + volatile="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</field> +<field name="y" + type="byte" + transient="false" + volatile="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</field> +<field name="z" + type="byte" + transient="false" + volatile="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</field> +</class> +<class name="Byte4" + extends="java.lang.Object" + abstract="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<constructor name="Byte4" + type="android.renderscript.Byte4" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</constructor> +<field name="w" + type="byte" + transient="false" + volatile="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</field> +<field name="x" + type="byte" + transient="false" + volatile="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</field> +<field name="y" + type="byte" + transient="false" + volatile="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</field> +<field name="z" + type="byte" + transient="false" + volatile="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</field> +</class> +<class name="Element" + extends="android.renderscript.BaseObj" + abstract="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<method name="ALLOCATION" + return="android.renderscript.Element" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="A_8" + return="android.renderscript.Element" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="BOOLEAN" + return="android.renderscript.Element" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="ELEMENT" + return="android.renderscript.Element" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="F32" + return="android.renderscript.Element" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="F32_2" + return="android.renderscript.Element" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="F32_3" + return="android.renderscript.Element" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="F32_4" + return="android.renderscript.Element" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="F64" + return="android.renderscript.Element" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="I16" + return="android.renderscript.Element" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="I32" + return="android.renderscript.Element" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="I64" + return="android.renderscript.Element" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="I8" + return="android.renderscript.Element" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="MATRIX4X4" + return="android.renderscript.Element" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="MATRIX_2X2" + return="android.renderscript.Element" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="MATRIX_3X3" + return="android.renderscript.Element" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="MATRIX_4X4" + return="android.renderscript.Element" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="MESH" + return="android.renderscript.Element" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="PROGRAM_FRAGMENT" + return="android.renderscript.Element" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="PROGRAM_RASTER" + return="android.renderscript.Element" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="PROGRAM_STORE" + return="android.renderscript.Element" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="PROGRAM_VERTEX" + return="android.renderscript.Element" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="RGBA_4444" + return="android.renderscript.Element" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="RGBA_5551" + return="android.renderscript.Element" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="RGBA_8888" + return="android.renderscript.Element" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="RGB_565" + return="android.renderscript.Element" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="RGB_888" + return="android.renderscript.Element" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="SAMPLER" + return="android.renderscript.Element" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="SCRIPT" + return="android.renderscript.Element" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="TYPE" + return="android.renderscript.Element" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="U16" + return="android.renderscript.Element" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="U32" + return="android.renderscript.Element" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="U64" + return="android.renderscript.Element" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="U8" + return="android.renderscript.Element" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="U8_4" + return="android.renderscript.Element" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="createPixel" + return="android.renderscript.Element" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +<parameter name="dt" type="android.renderscript.Element.DataType"> +</parameter> +<parameter name="dk" type="android.renderscript.Element.DataKind"> +</parameter> +</method> +<method name="createVector" + return="android.renderscript.Element" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +<parameter name="dt" type="android.renderscript.Element.DataType"> +</parameter> +<parameter name="size" type="int"> +</parameter> +</method> +<method name="isComplex" + return="boolean" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +</class> +<class name="Element.Builder" + extends="java.lang.Object" + abstract="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<constructor name="Element.Builder" + type="android.renderscript.Element.Builder" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</constructor> +<method name="add" + return="android.renderscript.Element.Builder" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="element" type="android.renderscript.Element"> +</parameter> +<parameter name="name" type="java.lang.String"> +</parameter> +<parameter name="arraySize" type="int"> +</parameter> +</method> +<method name="add" + return="android.renderscript.Element.Builder" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="element" type="android.renderscript.Element"> +</parameter> +<parameter name="name" type="java.lang.String"> +</parameter> +</method> +<method name="create" + return="android.renderscript.Element" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +</class> +<class name="Element.DataKind" + extends="java.lang.Enum" + abstract="false" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +<method name="valueOf" + return="android.renderscript.Element.DataKind" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="name" type="java.lang.String"> +</parameter> +</method> +<method name="values" + return="android.renderscript.Element.DataKind[]" + abstract="false" + native="false" + synchronized="false" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +</method> +</class> +<class name="Element.DataType" + extends="java.lang.Enum" + abstract="false" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +<method name="valueOf" + return="android.renderscript.Element.DataType" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="name" type="java.lang.String"> +</parameter> +</method> +<method name="values" + return="android.renderscript.Element.DataType[]" + abstract="false" + native="false" + synchronized="false" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +</method> +</class> +<class name="FieldPacker" + extends="java.lang.Object" + abstract="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<constructor name="FieldPacker" + type="android.renderscript.FieldPacker" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="len" type="int"> +</parameter> +</constructor> +<method name="addBoolean" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="v" type="boolean"> +</parameter> +</method> +<method name="addF32" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="v" type="float"> +</parameter> +</method> +<method name="addF32" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="v" type="android.renderscript.Float2"> +</parameter> +</method> +<method name="addF32" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="v" type="android.renderscript.Float3"> +</parameter> +</method> +<method name="addF32" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="v" type="android.renderscript.Float4"> +</parameter> +</method> +<method name="addF64" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="v" type="double"> +</parameter> +</method> +<method name="addI16" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="v" type="short"> +</parameter> +</method> +<method name="addI16" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="v" type="android.renderscript.Short2"> +</parameter> +</method> +<method name="addI16" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="v" type="android.renderscript.Short3"> +</parameter> +</method> +<method name="addI16" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="v" type="android.renderscript.Short4"> +</parameter> +</method> +<method name="addI32" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="v" type="int"> +</parameter> +</method> +<method name="addI32" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="v" type="android.renderscript.Int2"> +</parameter> +</method> +<method name="addI32" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="v" type="android.renderscript.Int3"> +</parameter> +</method> +<method name="addI32" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="v" type="android.renderscript.Int4"> +</parameter> +</method> +<method name="addI64" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="v" type="long"> +</parameter> +</method> +<method name="addI8" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="v" type="byte"> +</parameter> +</method> +<method name="addI8" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="v" type="android.renderscript.Byte2"> +</parameter> +</method> +<method name="addI8" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="v" type="android.renderscript.Byte3"> +</parameter> +</method> +<method name="addI8" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="v" type="android.renderscript.Byte4"> +</parameter> +</method> +<method name="addMatrix" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="v" type="android.renderscript.Matrix4f"> +</parameter> +</method> +<method name="addMatrix" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="v" type="android.renderscript.Matrix3f"> +</parameter> +</method> +<method name="addMatrix" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="v" type="android.renderscript.Matrix2f"> +</parameter> +</method> +<method name="addObj" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="obj" type="android.renderscript.BaseObj"> +</parameter> +</method> +<method name="addU16" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="v" type="int"> +</parameter> +</method> +<method name="addU16" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="v" type="android.renderscript.Int2"> +</parameter> +</method> +<method name="addU16" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="v" type="android.renderscript.Int3"> +</parameter> +</method> +<method name="addU16" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="v" type="android.renderscript.Int4"> +</parameter> +</method> +<method name="addU32" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="v" type="long"> +</parameter> +</method> +<method name="addU32" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="v" type="android.renderscript.Int2"> +</parameter> +</method> +<method name="addU32" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="v" type="android.renderscript.Int3"> +</parameter> +</method> +<method name="addU32" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="v" type="android.renderscript.Int4"> +</parameter> +</method> +<method name="addU64" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="v" type="long"> +</parameter> +</method> +<method name="addU8" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="v" type="short"> +</parameter> +</method> +<method name="addU8" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="v" type="android.renderscript.Short2"> +</parameter> +</method> +<method name="addU8" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="v" type="android.renderscript.Short3"> +</parameter> +</method> +<method name="addU8" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="v" type="android.renderscript.Short4"> +</parameter> +</method> +<method name="align" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="v" type="int"> +</parameter> +</method> +<method name="getData" + return="byte[]" + abstract="false" + native="false" + synchronized="false" + static="false" + final="true" + deprecated="not deprecated" + visibility="public" +> +</method> +<method name="reset" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<method name="reset" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="i" type="int"> +</parameter> +</method> +<method name="skip" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="i" type="int"> +</parameter> +</method> +</class> +<class name="Float2" + extends="java.lang.Object" + abstract="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<constructor name="Float2" + type="android.renderscript.Float2" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</constructor> +<constructor name="Float2" + type="android.renderscript.Float2" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="initX" type="float"> +</parameter> +<parameter name="initY" type="float"> +</parameter> +</constructor> +<field name="x" + type="float" + transient="false" + volatile="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</field> +<field name="y" + type="float" + transient="false" + volatile="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</field> +</class> +<class name="Float3" + extends="java.lang.Object" + abstract="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<constructor name="Float3" + type="android.renderscript.Float3" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</constructor> +<constructor name="Float3" + type="android.renderscript.Float3" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="initX" type="float"> +</parameter> +<parameter name="initY" type="float"> +</parameter> +<parameter name="initZ" type="float"> +</parameter> +</constructor> +<field name="x" + type="float" + transient="false" + volatile="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</field> +<field name="y" + type="float" + transient="false" + volatile="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</field> +<field name="z" + type="float" + transient="false" + volatile="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</field> +</class> +<class name="Float4" + extends="java.lang.Object" + abstract="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<constructor name="Float4" + type="android.renderscript.Float4" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</constructor> +<constructor name="Float4" + type="android.renderscript.Float4" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="initX" type="float"> +</parameter> +<parameter name="initY" type="float"> +</parameter> +<parameter name="initZ" type="float"> +</parameter> +<parameter name="initW" type="float"> +</parameter> +</constructor> +<field name="w" + type="float" + transient="false" + volatile="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</field> +<field name="x" + type="float" + transient="false" + volatile="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</field> +<field name="y" + type="float" + transient="false" + volatile="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</field> +<field name="z" + type="float" + transient="false" + volatile="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</field> +</class> +<class name="Int2" + extends="java.lang.Object" + abstract="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<constructor name="Int2" + type="android.renderscript.Int2" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</constructor> +<field name="x" + type="int" + transient="false" + volatile="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</field> +<field name="y" + type="int" + transient="false" + volatile="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</field> +</class> +<class name="Int3" + extends="java.lang.Object" + abstract="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<constructor name="Int3" + type="android.renderscript.Int3" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</constructor> +<field name="x" + type="int" + transient="false" + volatile="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</field> +<field name="y" + type="int" + transient="false" + volatile="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</field> +<field name="z" + type="int" + transient="false" + volatile="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</field> +</class> +<class name="Int4" + extends="java.lang.Object" + abstract="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<constructor name="Int4" + type="android.renderscript.Int4" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</constructor> +<field name="w" + type="int" + transient="false" + volatile="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</field> +<field name="x" + type="int" + transient="false" + volatile="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</field> +<field name="y" + type="int" + transient="false" + volatile="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</field> +<field name="z" + type="int" + transient="false" + volatile="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</field> +</class> +<class name="Matrix2f" + extends="java.lang.Object" + abstract="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<constructor name="Matrix2f" + type="android.renderscript.Matrix2f" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</constructor> +<constructor name="Matrix2f" + type="android.renderscript.Matrix2f" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="dataArray" type="float[]"> +</parameter> +</constructor> +<method name="get" + return="float" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="i" type="int"> +</parameter> +<parameter name="j" type="int"> +</parameter> +</method> +<method name="getArray" + return="float[]" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<method name="load" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="src" type="android.renderscript.Matrix2f"> +</parameter> +</method> +<method name="loadIdentity" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<method name="loadMultiply" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="lhs" type="android.renderscript.Matrix2f"> +</parameter> +<parameter name="rhs" type="android.renderscript.Matrix2f"> +</parameter> +</method> +<method name="loadRotate" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rot" type="float"> +</parameter> +</method> +<method name="loadScale" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="x" type="float"> +</parameter> +<parameter name="y" type="float"> +</parameter> +</method> +<method name="multiply" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rhs" type="android.renderscript.Matrix2f"> +</parameter> +</method> +<method name="rotate" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rot" type="float"> +</parameter> +</method> +<method name="scale" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="x" type="float"> +</parameter> +<parameter name="y" type="float"> +</parameter> +</method> +<method name="set" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="i" type="int"> +</parameter> +<parameter name="j" type="int"> +</parameter> +<parameter name="v" type="float"> +</parameter> +</method> +<method name="transpose" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +</class> +<class name="Matrix3f" + extends="java.lang.Object" + abstract="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<constructor name="Matrix3f" + type="android.renderscript.Matrix3f" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</constructor> +<constructor name="Matrix3f" + type="android.renderscript.Matrix3f" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="dataArray" type="float[]"> +</parameter> +</constructor> +<method name="get" + return="float" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="i" type="int"> +</parameter> +<parameter name="j" type="int"> +</parameter> +</method> +<method name="getArray" + return="float[]" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<method name="load" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="src" type="android.renderscript.Matrix3f"> +</parameter> +</method> +<method name="loadIdentity" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<method name="loadMultiply" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="lhs" type="android.renderscript.Matrix3f"> +</parameter> +<parameter name="rhs" type="android.renderscript.Matrix3f"> +</parameter> +</method> +<method name="loadRotate" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rot" type="float"> +</parameter> +<parameter name="x" type="float"> +</parameter> +<parameter name="y" type="float"> +</parameter> +<parameter name="z" type="float"> +</parameter> +</method> +<method name="loadRotate" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rot" type="float"> +</parameter> +</method> +<method name="loadScale" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="x" type="float"> +</parameter> +<parameter name="y" type="float"> +</parameter> +</method> +<method name="loadScale" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="x" type="float"> +</parameter> +<parameter name="y" type="float"> +</parameter> +<parameter name="z" type="float"> +</parameter> +</method> +<method name="loadTranslate" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="x" type="float"> +</parameter> +<parameter name="y" type="float"> +</parameter> +</method> +<method name="multiply" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rhs" type="android.renderscript.Matrix3f"> +</parameter> +</method> +<method name="rotate" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rot" type="float"> +</parameter> +<parameter name="x" type="float"> +</parameter> +<parameter name="y" type="float"> +</parameter> +<parameter name="z" type="float"> +</parameter> +</method> +<method name="rotate" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rot" type="float"> +</parameter> +</method> +<method name="scale" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="x" type="float"> +</parameter> +<parameter name="y" type="float"> +</parameter> +</method> +<method name="scale" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="x" type="float"> +</parameter> +<parameter name="y" type="float"> +</parameter> +<parameter name="z" type="float"> +</parameter> +</method> +<method name="set" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="i" type="int"> +</parameter> +<parameter name="j" type="int"> +</parameter> +<parameter name="v" type="float"> +</parameter> +</method> +<method name="translate" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="x" type="float"> +</parameter> +<parameter name="y" type="float"> +</parameter> +</method> +<method name="transpose" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +</class> +<class name="Matrix4f" + extends="java.lang.Object" + abstract="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<constructor name="Matrix4f" + type="android.renderscript.Matrix4f" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</constructor> +<constructor name="Matrix4f" + type="android.renderscript.Matrix4f" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="dataArray" type="float[]"> +</parameter> +</constructor> +<method name="get" + return="float" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="i" type="int"> +</parameter> +<parameter name="j" type="int"> +</parameter> +</method> +<method name="getArray" + return="float[]" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<method name="inverse" + return="boolean" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<method name="inverseTranspose" + return="boolean" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<method name="load" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="src" type="android.renderscript.Matrix4f"> +</parameter> +</method> +<method name="loadFrustum" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="l" type="float"> +</parameter> +<parameter name="r" type="float"> +</parameter> +<parameter name="b" type="float"> +</parameter> +<parameter name="t" type="float"> +</parameter> +<parameter name="n" type="float"> +</parameter> +<parameter name="f" type="float"> +</parameter> +</method> +<method name="loadIdentity" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<method name="loadMultiply" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="lhs" type="android.renderscript.Matrix4f"> +</parameter> +<parameter name="rhs" type="android.renderscript.Matrix4f"> +</parameter> +</method> +<method name="loadOrtho" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="l" type="float"> +</parameter> +<parameter name="r" type="float"> +</parameter> +<parameter name="b" type="float"> +</parameter> +<parameter name="t" type="float"> +</parameter> +<parameter name="n" type="float"> +</parameter> +<parameter name="f" type="float"> +</parameter> +</method> +<method name="loadOrthoWindow" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="w" type="int"> +</parameter> +<parameter name="h" type="int"> +</parameter> +</method> +<method name="loadPerspective" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="fovy" type="float"> +</parameter> +<parameter name="aspect" type="float"> +</parameter> +<parameter name="near" type="float"> +</parameter> +<parameter name="far" type="float"> +</parameter> +</method> +<method name="loadProjectionNormalized" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="w" type="int"> +</parameter> +<parameter name="h" type="int"> +</parameter> +</method> +<method name="loadRotate" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rot" type="float"> +</parameter> +<parameter name="x" type="float"> +</parameter> +<parameter name="y" type="float"> +</parameter> +<parameter name="z" type="float"> +</parameter> +</method> +<method name="loadScale" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="x" type="float"> +</parameter> +<parameter name="y" type="float"> +</parameter> +<parameter name="z" type="float"> +</parameter> +</method> +<method name="loadTranslate" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="x" type="float"> +</parameter> +<parameter name="y" type="float"> +</parameter> +<parameter name="z" type="float"> +</parameter> +</method> +<method name="multiply" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rhs" type="android.renderscript.Matrix4f"> +</parameter> +</method> +<method name="rotate" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rot" type="float"> +</parameter> +<parameter name="x" type="float"> +</parameter> +<parameter name="y" type="float"> +</parameter> +<parameter name="z" type="float"> +</parameter> +</method> +<method name="scale" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="x" type="float"> +</parameter> +<parameter name="y" type="float"> +</parameter> +<parameter name="z" type="float"> +</parameter> +</method> +<method name="set" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="i" type="int"> +</parameter> +<parameter name="j" type="int"> +</parameter> +<parameter name="v" type="float"> +</parameter> +</method> +<method name="translate" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="x" type="float"> +</parameter> +<parameter name="y" type="float"> +</parameter> +<parameter name="z" type="float"> +</parameter> +</method> +<method name="transpose" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +</class> +<class name="Program" + extends="android.renderscript.BaseObj" + abstract="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<method name="bindConstants" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="a" type="android.renderscript.Allocation"> +</parameter> +<parameter name="slot" type="int"> +</parameter> +</method> +<method name="bindSampler" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="vs" type="android.renderscript.Sampler"> +</parameter> +<parameter name="slot" type="int"> +</parameter> +<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException"> +</exception> +</method> +<method name="bindTexture" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="va" type="android.renderscript.Allocation"> +</parameter> +<parameter name="slot" type="int"> +</parameter> +<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException"> +</exception> +</method> +<field name="MAX_CONSTANT" + type="int" + transient="false" + volatile="false" + value="8" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +</field> +<field name="MAX_INPUT" + type="int" + transient="false" + volatile="false" + value="8" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +</field> +<field name="MAX_OUTPUT" + type="int" + transient="false" + volatile="false" + value="8" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +</field> +<field name="MAX_TEXTURE" + type="int" + transient="false" + volatile="false" + value="8" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +</field> +</class> +<class name="Program.BaseProgramBuilder" + extends="java.lang.Object" + abstract="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<constructor name="Program.BaseProgramBuilder" + type="android.renderscript.Program.BaseProgramBuilder" + static="false" + final="false" + deprecated="not deprecated" + visibility="protected" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</constructor> +<method name="addConstant" + return="android.renderscript.Program.BaseProgramBuilder" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="t" type="android.renderscript.Type"> +</parameter> +<exception name="IllegalStateException" type="java.lang.IllegalStateException"> +</exception> +</method> +<method name="addTexture" + return="android.renderscript.Program.BaseProgramBuilder" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="texType" type="android.renderscript.Program.TextureType"> +</parameter> +<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException"> +</exception> +</method> +<method name="getCurrentConstantIndex" + return="int" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<method name="getCurrentTextureIndex" + return="int" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<method name="initProgram" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="protected" +> +<parameter name="p" type="android.renderscript.Program"> +</parameter> +</method> +<method name="setShader" + return="android.renderscript.Program.BaseProgramBuilder" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="s" type="java.lang.String"> +</parameter> +</method> +<method name="setShader" + return="android.renderscript.Program.BaseProgramBuilder" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="resources" type="android.content.res.Resources"> +</parameter> +<parameter name="resourceID" type="int"> +</parameter> +</method> +</class> +<class name="Program.TextureType" + extends="java.lang.Enum" + abstract="false" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +<method name="valueOf" + return="android.renderscript.Program.TextureType" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="name" type="java.lang.String"> +</parameter> +</method> +<method name="values" + return="android.renderscript.Program.TextureType[]" + abstract="false" + native="false" + synchronized="false" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +</method> +</class> +<class name="ProgramFragment" + extends="android.renderscript.Program" + abstract="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</class> +<class name="ProgramFragment.Builder" + extends="android.renderscript.Program.BaseProgramBuilder" + abstract="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<constructor name="ProgramFragment.Builder" + type="android.renderscript.ProgramFragment.Builder" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</constructor> +<method name="create" + return="android.renderscript.ProgramFragment" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +</class> +<class name="ProgramFragmentFixedFunction" + extends="android.renderscript.ProgramFragment" + abstract="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</class> +<class name="ProgramFragmentFixedFunction.Builder" + extends="java.lang.Object" + abstract="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<constructor name="ProgramFragmentFixedFunction.Builder" + type="android.renderscript.ProgramFragmentFixedFunction.Builder" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</constructor> +<method name="create" + return="android.renderscript.ProgramFragmentFixedFunction" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<method name="setPointSpriteTexCoordinateReplacement" + return="android.renderscript.ProgramFragmentFixedFunction.Builder" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="enable" type="boolean"> +</parameter> +</method> +<method name="setTexture" + return="android.renderscript.ProgramFragmentFixedFunction.Builder" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="env" type="android.renderscript.ProgramFragmentFixedFunction.Builder.EnvMode"> +</parameter> +<parameter name="fmt" type="android.renderscript.ProgramFragmentFixedFunction.Builder.Format"> +</parameter> +<parameter name="slot" type="int"> +</parameter> +<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException"> +</exception> +</method> +<method name="setVaryingColor" + return="android.renderscript.ProgramFragmentFixedFunction.Builder" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="enable" type="boolean"> +</parameter> +</method> +<field name="MAX_TEXTURE" + type="int" + transient="false" + volatile="false" + value="2" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +</field> +</class> +<class name="ProgramFragmentFixedFunction.Builder.EnvMode" + extends="java.lang.Enum" + abstract="false" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +<method name="valueOf" + return="android.renderscript.ProgramFragmentFixedFunction.Builder.EnvMode" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="name" type="java.lang.String"> +</parameter> +</method> +<method name="values" + return="android.renderscript.ProgramFragmentFixedFunction.Builder.EnvMode[]" + abstract="false" + native="false" + synchronized="false" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +</method> +</class> +<class name="ProgramFragmentFixedFunction.Builder.Format" + extends="java.lang.Enum" + abstract="false" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +<method name="valueOf" + return="android.renderscript.ProgramFragmentFixedFunction.Builder.Format" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="name" type="java.lang.String"> +</parameter> +</method> +<method name="values" + return="android.renderscript.ProgramFragmentFixedFunction.Builder.Format[]" + abstract="false" + native="false" + synchronized="false" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +</method> +</class> +<class name="ProgramRaster" + extends="android.renderscript.BaseObj" + abstract="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<method name="CULL_BACK" + return="android.renderscript.ProgramRaster" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="CULL_FRONT" + return="android.renderscript.ProgramRaster" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="CULL_NONE" + return="android.renderscript.ProgramRaster" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +</class> +<class name="ProgramRaster.Builder" + extends="java.lang.Object" + abstract="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<constructor name="ProgramRaster.Builder" + type="android.renderscript.ProgramRaster.Builder" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</constructor> +<method name="create" + return="android.renderscript.ProgramRaster" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<method name="setCullMode" + return="android.renderscript.ProgramRaster.Builder" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="m" type="android.renderscript.ProgramRaster.CullMode"> +</parameter> +</method> +<method name="setPointSpriteEnabled" + return="android.renderscript.ProgramRaster.Builder" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="enable" type="boolean"> +</parameter> +</method> +</class> +<class name="ProgramRaster.CullMode" + extends="java.lang.Enum" + abstract="false" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +<method name="valueOf" + return="android.renderscript.ProgramRaster.CullMode" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="name" type="java.lang.String"> +</parameter> +</method> +<method name="values" + return="android.renderscript.ProgramRaster.CullMode[]" + abstract="false" + native="false" + synchronized="false" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +</method> +</class> +<class name="ProgramStore" + extends="android.renderscript.BaseObj" + abstract="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<method name="BLEND_ALPHA_DEPTH_NONE" + return="android.renderscript.ProgramStore" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="BLEND_ALPHA_DEPTH_TEST" + return="android.renderscript.ProgramStore" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="BLEND_NONE_DEPTH_NONE" + return="android.renderscript.ProgramStore" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="BLEND_NONE_DEPTH_TEST" + return="android.renderscript.ProgramStore" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +</class> +<class name="ProgramStore.BlendDstFunc" + extends="java.lang.Enum" + abstract="false" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +<method name="valueOf" + return="android.renderscript.ProgramStore.BlendDstFunc" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="name" type="java.lang.String"> +</parameter> +</method> +<method name="values" + return="android.renderscript.ProgramStore.BlendDstFunc[]" + abstract="false" + native="false" + synchronized="false" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +</method> +</class> +<class name="ProgramStore.BlendSrcFunc" + extends="java.lang.Enum" + abstract="false" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +<method name="valueOf" + return="android.renderscript.ProgramStore.BlendSrcFunc" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="name" type="java.lang.String"> +</parameter> +</method> +<method name="values" + return="android.renderscript.ProgramStore.BlendSrcFunc[]" + abstract="false" + native="false" + synchronized="false" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +</method> +</class> +<class name="ProgramStore.Builder" + extends="java.lang.Object" + abstract="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<constructor name="ProgramStore.Builder" + type="android.renderscript.ProgramStore.Builder" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</constructor> +<method name="create" + return="android.renderscript.ProgramStore" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<method name="setBlendFunc" + return="android.renderscript.ProgramStore.Builder" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="src" type="android.renderscript.ProgramStore.BlendSrcFunc"> +</parameter> +<parameter name="dst" type="android.renderscript.ProgramStore.BlendDstFunc"> +</parameter> +</method> +<method name="setColorMaskEnabled" + return="android.renderscript.ProgramStore.Builder" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="r" type="boolean"> +</parameter> +<parameter name="g" type="boolean"> +</parameter> +<parameter name="b" type="boolean"> +</parameter> +<parameter name="a" type="boolean"> +</parameter> +</method> +<method name="setDepthFunc" + return="android.renderscript.ProgramStore.Builder" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="func" type="android.renderscript.ProgramStore.DepthFunc"> +</parameter> +</method> +<method name="setDepthMaskEnabled" + return="android.renderscript.ProgramStore.Builder" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="enable" type="boolean"> +</parameter> +</method> +<method name="setDitherEnabled" + return="android.renderscript.ProgramStore.Builder" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="enable" type="boolean"> +</parameter> +</method> +</class> +<class name="ProgramStore.DepthFunc" + extends="java.lang.Enum" + abstract="false" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +<method name="valueOf" + return="android.renderscript.ProgramStore.DepthFunc" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="name" type="java.lang.String"> +</parameter> +</method> +<method name="values" + return="android.renderscript.ProgramStore.DepthFunc[]" + abstract="false" + native="false" + synchronized="false" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +</method> +</class> +<class name="ProgramVertex" + extends="android.renderscript.Program" + abstract="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</class> +<class name="ProgramVertex.Builder" + extends="android.renderscript.Program.BaseProgramBuilder" + abstract="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<constructor name="ProgramVertex.Builder" + type="android.renderscript.ProgramVertex.Builder" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</constructor> +<method name="addInput" + return="android.renderscript.ProgramVertex.Builder" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="e" type="android.renderscript.Element"> +</parameter> +<exception name="IllegalStateException" type="java.lang.IllegalStateException"> +</exception> +</method> +<method name="create" + return="android.renderscript.ProgramVertex" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +</class> +<class name="ProgramVertexFixedFunction" + extends="android.renderscript.ProgramVertex" + abstract="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<method name="bindConstants" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="va" type="android.renderscript.ProgramVertexFixedFunction.Constants"> +</parameter> +</method> +</class> +<class name="ProgramVertexFixedFunction.Builder" + extends="java.lang.Object" + abstract="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<constructor name="ProgramVertexFixedFunction.Builder" + type="android.renderscript.ProgramVertexFixedFunction.Builder" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</constructor> +<method name="create" + return="android.renderscript.ProgramVertexFixedFunction" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<method name="setTextureMatrixEnable" + return="android.renderscript.ProgramVertexFixedFunction.Builder" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="enable" type="boolean"> +</parameter> +</method> +</class> +<class name="ProgramVertexFixedFunction.Constants" + extends="java.lang.Object" + abstract="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<constructor name="ProgramVertexFixedFunction.Constants" + type="android.renderscript.ProgramVertexFixedFunction.Constants" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</constructor> +<method name="destroy" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<method name="setModelview" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="m" type="android.renderscript.Matrix4f"> +</parameter> +</method> +<method name="setProjection" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="m" type="android.renderscript.Matrix4f"> +</parameter> +</method> +<method name="setTexture" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="m" type="android.renderscript.Matrix4f"> +</parameter> +</method> +</class> +<class name="RenderScript" + extends="java.lang.Object" + abstract="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<method name="contextDump" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<method name="create" + return="android.renderscript.RenderScript" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="ctx" type="android.content.Context"> +</parameter> +</method> +<method name="destroy" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<method name="finish" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<method name="getApplicationContext" + return="android.content.Context" + abstract="false" + native="false" + synchronized="false" + static="false" + final="true" + deprecated="not deprecated" + visibility="public" +> +</method> +<method name="getErrorHandler" + return="android.renderscript.RenderScript.RSErrorHandler" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<method name="getMessageHandler" + return="android.renderscript.RenderScript.RSMessageHandler" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<method name="setErrorHandler" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="msg" type="android.renderscript.RenderScript.RSErrorHandler"> +</parameter> +</method> +<method name="setMessageHandler" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="msg" type="android.renderscript.RenderScript.RSMessageHandler"> +</parameter> +</method> +<method name="setPriority" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="p" type="android.renderscript.RenderScript.Priority"> +</parameter> +</method> +</class> +<class name="RenderScript.Priority" + extends="java.lang.Enum" + abstract="false" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +<method name="valueOf" + return="android.renderscript.RenderScript.Priority" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="name" type="java.lang.String"> +</parameter> +</method> +<method name="values" + return="android.renderscript.RenderScript.Priority[]" + abstract="false" + native="false" + synchronized="false" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +</method> +</class> +<class name="RenderScript.RSErrorHandler" + extends="java.lang.Object" + abstract="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<implements name="java.lang.Runnable"> +</implements> +<constructor name="RenderScript.RSErrorHandler" + type="android.renderscript.RenderScript.RSErrorHandler" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</constructor> +<method name="run" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<field name="mErrorMessage" + type="java.lang.String" + transient="false" + volatile="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="protected" +> +</field> +<field name="mErrorNum" + type="int" + transient="false" + volatile="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="protected" +> +</field> +</class> +<class name="RenderScript.RSMessageHandler" + extends="java.lang.Object" + abstract="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<implements name="java.lang.Runnable"> +</implements> +<constructor name="RenderScript.RSMessageHandler" + type="android.renderscript.RenderScript.RSMessageHandler" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</constructor> +<method name="run" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<field name="mData" + type="int[]" + transient="false" + volatile="false" + value="null" + static="false" + final="false" + deprecated="not deprecated" + visibility="protected" +> +</field> +<field name="mID" + type="int" + transient="false" + volatile="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="protected" +> +</field> +<field name="mLength" + type="int" + transient="false" + volatile="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="protected" +> +</field> +</class> +<class name="RenderScriptGL" + extends="android.renderscript.RenderScript" + abstract="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<constructor name="RenderScriptGL" + type="android.renderscript.RenderScriptGL" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="ctx" type="android.content.Context"> +</parameter> +<parameter name="sc" type="android.renderscript.RenderScriptGL.SurfaceConfig"> +</parameter> +</constructor> +<method name="bindProgramFragment" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="p" type="android.renderscript.ProgramFragment"> +</parameter> +</method> +<method name="bindProgramRaster" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="p" type="android.renderscript.ProgramRaster"> +</parameter> +</method> +<method name="bindProgramStore" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="p" type="android.renderscript.ProgramStore"> +</parameter> +</method> +<method name="bindProgramVertex" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="p" type="android.renderscript.ProgramVertex"> +</parameter> +</method> +<method name="bindRootScript" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="s" type="android.renderscript.Script"> +</parameter> +</method> +<method name="getHeight" + return="int" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<method name="getWidth" + return="int" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<method name="pause" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<method name="resume" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<method name="setSurface" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="sur" type="android.view.SurfaceHolder"> +</parameter> +<parameter name="w" type="int"> +</parameter> +<parameter name="h" type="int"> +</parameter> +</method> +</class> +<class name="RenderScriptGL.SurfaceConfig" + extends="java.lang.Object" + abstract="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<constructor name="RenderScriptGL.SurfaceConfig" + type="android.renderscript.RenderScriptGL.SurfaceConfig" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</constructor> +<constructor name="RenderScriptGL.SurfaceConfig" + type="android.renderscript.RenderScriptGL.SurfaceConfig" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="sc" type="android.renderscript.RenderScriptGL.SurfaceConfig"> +</parameter> +</constructor> +<method name="setAlpha" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="minimum" type="int"> +</parameter> +<parameter name="preferred" type="int"> +</parameter> +</method> +<method name="setColor" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="minimum" type="int"> +</parameter> +<parameter name="preferred" type="int"> +</parameter> +</method> +<method name="setDepth" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="minimum" type="int"> +</parameter> +<parameter name="preferred" type="int"> +</parameter> +</method> +<method name="setSamples" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="minimum" type="int"> +</parameter> +<parameter name="preferred" type="int"> +</parameter> +<parameter name="Q" type="float"> +</parameter> +</method> +</class> +<class name="Sampler" + extends="android.renderscript.BaseObj" + abstract="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<method name="CLAMP_LINEAR" + return="android.renderscript.Sampler" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="CLAMP_LINEAR_MIP_LINEAR" + return="android.renderscript.Sampler" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="CLAMP_NEAREST" + return="android.renderscript.Sampler" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="WRAP_LINEAR" + return="android.renderscript.Sampler" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="WRAP_LINEAR_MIP_LINEAR" + return="android.renderscript.Sampler" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +<method name="WRAP_NEAREST" + return="android.renderscript.Sampler" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</method> +</class> +<class name="Sampler.Builder" + extends="java.lang.Object" + abstract="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<constructor name="Sampler.Builder" + type="android.renderscript.Sampler.Builder" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</constructor> +<method name="create" + return="android.renderscript.Sampler" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<method name="setAnisotropy" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="v" type="float"> +</parameter> +</method> +<method name="setMagnification" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="v" type="android.renderscript.Sampler.Value"> +</parameter> +</method> +<method name="setMinification" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="v" type="android.renderscript.Sampler.Value"> +</parameter> +</method> +<method name="setWrapS" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="v" type="android.renderscript.Sampler.Value"> +</parameter> +</method> +<method name="setWrapT" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="v" type="android.renderscript.Sampler.Value"> +</parameter> +</method> +</class> +<class name="Sampler.Value" + extends="java.lang.Enum" + abstract="false" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +<method name="valueOf" + return="android.renderscript.Sampler.Value" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="name" type="java.lang.String"> +</parameter> +</method> +<method name="values" + return="android.renderscript.Sampler.Value[]" + abstract="false" + native="false" + synchronized="false" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +</method> +</class> +<class name="Script" + extends="android.renderscript.BaseObj" + abstract="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<method name="bindAllocation" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="va" type="android.renderscript.Allocation"> +</parameter> +<parameter name="slot" type="int"> +</parameter> +</method> +<method name="invoke" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="protected" +> +<parameter name="slot" type="int"> +</parameter> +</method> +<method name="invoke" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="protected" +> +<parameter name="slot" type="int"> +</parameter> +<parameter name="v" type="android.renderscript.FieldPacker"> +</parameter> +</method> +<method name="setTimeZone" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="timeZone" type="java.lang.String"> +</parameter> +</method> +<method name="setVar" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="index" type="int"> +</parameter> +<parameter name="v" type="float"> +</parameter> +</method> +<method name="setVar" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="index" type="int"> +</parameter> +<parameter name="v" type="double"> +</parameter> +</method> +<method name="setVar" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="index" type="int"> +</parameter> +<parameter name="v" type="int"> +</parameter> +</method> +<method name="setVar" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="index" type="int"> +</parameter> +<parameter name="v" type="long"> +</parameter> +</method> +<method name="setVar" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="index" type="int"> +</parameter> +<parameter name="v" type="boolean"> +</parameter> +</method> +<method name="setVar" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="index" type="int"> +</parameter> +<parameter name="o" type="android.renderscript.BaseObj"> +</parameter> +</method> +<method name="setVar" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="index" type="int"> +</parameter> +<parameter name="v" type="android.renderscript.FieldPacker"> +</parameter> +</method> +<field name="MAX_SLOT" + type="int" + transient="false" + volatile="false" + value="16" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +</field> +</class> +<class name="Script.Builder" + extends="java.lang.Object" + abstract="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +</class> +<class name="Script.FieldBase" + extends="java.lang.Object" + abstract="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<constructor name="Script.FieldBase" + type="android.renderscript.Script.FieldBase" + static="false" + final="false" + deprecated="not deprecated" + visibility="protected" +> +</constructor> +<method name="getAllocation" + return="android.renderscript.Allocation" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<method name="getElement" + return="android.renderscript.Element" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<method name="getType" + return="android.renderscript.Type" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<method name="init" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="protected" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +<parameter name="dimx" type="int"> +</parameter> +</method> +<method name="init" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="protected" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +<parameter name="dimx" type="int"> +</parameter> +<parameter name="usages" type="int"> +</parameter> +</method> +<method name="updateAllocation" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<field name="mAllocation" + type="android.renderscript.Allocation" + transient="false" + volatile="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="protected" +> +</field> +<field name="mElement" + type="android.renderscript.Element" + transient="false" + volatile="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="protected" +> +</field> +</class> +<class name="Script.Invokable" + extends="java.lang.Object" + abstract="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<method name="execute" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +</class> +<class name="ScriptC" + extends="android.renderscript.Script" + abstract="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<constructor name="ScriptC" + type="android.renderscript.ScriptC" + static="false" + final="false" + deprecated="not deprecated" + visibility="protected" +> +<parameter name="id" type="int"> +</parameter> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +</constructor> +<constructor name="ScriptC" + type="android.renderscript.ScriptC" + static="false" + final="false" + deprecated="not deprecated" + visibility="protected" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +<parameter name="resources" type="android.content.res.Resources"> +</parameter> +<parameter name="resourceID" type="int"> +</parameter> +</constructor> +</class> +<class name="Short2" + extends="java.lang.Object" + abstract="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<constructor name="Short2" + type="android.renderscript.Short2" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</constructor> +<field name="x" + type="short" + transient="false" + volatile="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</field> +<field name="y" + type="short" + transient="false" + volatile="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</field> +</class> +<class name="Short3" + extends="java.lang.Object" + abstract="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<constructor name="Short3" + type="android.renderscript.Short3" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</constructor> +<field name="x" + type="short" + transient="false" + volatile="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</field> +<field name="y" + type="short" + transient="false" + volatile="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</field> +<field name="z" + type="short" + transient="false" + volatile="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</field> +</class> +<class name="Short4" + extends="java.lang.Object" + abstract="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<constructor name="Short4" + type="android.renderscript.Short4" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</constructor> +<field name="w" + type="short" + transient="false" + volatile="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</field> +<field name="x" + type="short" + transient="false" + volatile="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</field> +<field name="y" + type="short" + transient="false" + volatile="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</field> +<field name="z" + type="short" + transient="false" + volatile="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</field> +</class> +<class name="Type" + extends="android.renderscript.BaseObj" + abstract="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<method name="getCount" + return="int" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<method name="getElement" + return="android.renderscript.Element" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<method name="getX" + return="int" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<method name="getY" + return="int" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<method name="getZ" + return="int" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<method name="hasFaces" + return="boolean" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<method name="hasMipmaps" + return="boolean" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +</class> +<class name="Type.Builder" + extends="java.lang.Object" + abstract="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<constructor name="Type.Builder" + type="android.renderscript.Type.Builder" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="rs" type="android.renderscript.RenderScript"> +</parameter> +<parameter name="e" type="android.renderscript.Element"> +</parameter> +</constructor> +<method name="create" + return="android.renderscript.Type" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<method name="setFaces" + return="android.renderscript.Type.Builder" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="value" type="boolean"> +</parameter> +</method> +<method name="setMipmaps" + return="android.renderscript.Type.Builder" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="value" type="boolean"> +</parameter> +</method> +<method name="setX" + return="android.renderscript.Type.Builder" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="value" type="int"> +</parameter> +</method> +<method name="setY" + return="android.renderscript.Type.Builder" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="value" type="int"> +</parameter> +</method> +</class> +<class name="Type.CubemapFace" + extends="java.lang.Enum" + abstract="false" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +<method name="valueOf" + return="android.renderscript.Type.CubemapFace" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="name" type="java.lang.String"> +</parameter> +</method> +<method name="values" + return="android.renderscript.Type.CubemapFace[]" + abstract="false" + native="false" + synchronized="false" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +</method> +</class> +</package> <package name="android.sax" > <class name="Element" @@ -232619,195 +238180,6 @@ > </method> </class> -<class name="Adapters" - extends="java.lang.Object" - abstract="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<constructor name="Adapters" - type="android.widget.Adapters" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</constructor> -<method name="loadAdapter" - return="android.widget.BaseAdapter" - abstract="false" - native="false" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="context" type="android.content.Context"> -</parameter> -<parameter name="id" type="int"> -</parameter> -<parameter name="parameters" type="java.lang.Object..."> -</parameter> -</method> -<method name="loadCursorAdapter" - return="android.widget.CursorAdapter" - abstract="false" - native="false" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="context" type="android.content.Context"> -</parameter> -<parameter name="id" type="int"> -</parameter> -<parameter name="uri" type="java.lang.String"> -</parameter> -<parameter name="parameters" type="java.lang.Object..."> -</parameter> -</method> -<method name="loadCursorAdapter" - return="android.widget.CursorAdapter" - abstract="false" - native="false" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="context" type="android.content.Context"> -</parameter> -<parameter name="id" type="int"> -</parameter> -<parameter name="cursor" type="android.database.Cursor"> -</parameter> -<parameter name="parameters" type="java.lang.Object..."> -</parameter> -</method> -</class> -<class name="Adapters.CursorBinder" - extends="java.lang.Object" - abstract="true" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<constructor name="Adapters.CursorBinder" - type="android.widget.Adapters.CursorBinder" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="context" type="android.content.Context"> -</parameter> -<parameter name="transformation" type="android.widget.Adapters.CursorTransformation"> -</parameter> -</constructor> -<method name="bind" - return="boolean" - abstract="true" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="view" type="android.view.View"> -</parameter> -<parameter name="cursor" type="android.database.Cursor"> -</parameter> -<parameter name="columnIndex" type="int"> -</parameter> -</method> -<field name="mContext" - type="android.content.Context" - transient="false" - volatile="false" - static="false" - final="true" - deprecated="not deprecated" - visibility="protected" -> -</field> -<field name="mTransformation" - type="android.widget.Adapters.CursorTransformation" - transient="false" - volatile="false" - static="false" - final="true" - deprecated="not deprecated" - visibility="protected" -> -</field> -</class> -<class name="Adapters.CursorTransformation" - extends="java.lang.Object" - abstract="true" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<constructor name="Adapters.CursorTransformation" - type="android.widget.Adapters.CursorTransformation" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="context" type="android.content.Context"> -</parameter> -</constructor> -<method name="transform" - return="java.lang.String" - abstract="true" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="cursor" type="android.database.Cursor"> -</parameter> -<parameter name="columnIndex" type="int"> -</parameter> -</method> -<method name="transformToResource" - return="int" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="cursor" type="android.database.Cursor"> -</parameter> -<parameter name="columnIndex" type="int"> -</parameter> -</method> -<field name="mContext" - type="android.content.Context" - transient="false" - volatile="false" - static="false" - final="true" - deprecated="not deprecated" - visibility="protected" -> -</field> -</class> <class name="AlphabetIndexer" extends="android.database.DataSetObserver" abstract="false" @@ -252121,7 +257493,7 @@ deprecated="not deprecated" visibility="public" > -<parameter name="t" type="T"> +<parameter name="arg0" type="T"> </parameter> </method> </interface> @@ -256580,7 +261952,7 @@ return="void" abstract="false" native="false" - synchronized="true" + synchronized="false" static="false" final="false" deprecated="not deprecated" @@ -256595,7 +261967,7 @@ return="void" abstract="false" native="false" - synchronized="true" + synchronized="false" static="false" final="false" deprecated="not deprecated" @@ -256729,7 +262101,7 @@ return="java.beans.PropertyChangeListener[]" abstract="false" native="false" - synchronized="true" + synchronized="false" static="false" final="false" deprecated="not deprecated" @@ -256742,7 +262114,7 @@ return="java.beans.PropertyChangeListener[]" abstract="false" native="false" - synchronized="true" + synchronized="false" static="false" final="false" deprecated="not deprecated" @@ -256753,7 +262125,7 @@ return="boolean" abstract="false" native="false" - synchronized="true" + synchronized="false" static="false" final="false" deprecated="not deprecated" @@ -256766,7 +262138,7 @@ return="void" abstract="false" native="false" - synchronized="true" + synchronized="false" static="false" final="false" deprecated="not deprecated" @@ -256781,7 +262153,7 @@ return="void" abstract="false" native="false" - synchronized="true" + synchronized="false" static="false" final="false" deprecated="not deprecated" diff --git a/cmds/system_server/library/Android.mk b/cmds/system_server/library/Android.mk index 457cbd4..e8afce3 100644 --- a/cmds/system_server/library/Android.mk +++ b/cmds/system_server/library/Android.mk @@ -21,6 +21,7 @@ LOCAL_SHARED_LIBRARIES := \ libaudioflinger \ libcameraservice \ libmediaplayerservice \ + libinput \ libutils \ libbinder \ libcutils diff --git a/core/java/android/app/Fragment.java b/core/java/android/app/Fragment.java index 3141423..316e513 100644 --- a/core/java/android/app/Fragment.java +++ b/core/java/android/app/Fragment.java @@ -225,12 +225,11 @@ final class FragmentState implements Parcelable { * {@sample development/samples/ApiDemos/src/com/example/android/apis/app/FragmentLayout.java * main} * - * <p>The titles fragment, showing a list of titles, is very simple, relying + * <p>The titles fragment, showing a list of titles, is fairly simple, relying * on {@link ListFragment} for most of its work. Note the implementation of - * clicking an item, which can either update - * the content of the details fragment or start a new activity show the - * details depending on whether the current activity's layout can show the - * details.</p> + * clicking an item: depending on the current activity's layout, it can either + * create and display a new fragment to show the details in-place (more about + * this later), or start a new activity show the details.</p> * * {@sample development/samples/ApiDemos/src/com/example/android/apis/app/FragmentLayout.java * titles} @@ -243,7 +242,7 @@ final class FragmentState implements Parcelable { * details} * * <p>In this case when the user clicks on a title, there is no details - * fragment in the current activity, so the title title fragment's click code will + * container in the current activity, so the title title fragment's click code will * launch a new activity to display the details fragment:</p> * * {@sample development/samples/ApiDemos/src/com/example/android/apis/app/FragmentLayout.java @@ -255,22 +254,25 @@ final class FragmentState implements Parcelable { * * {@sample development/samples/ApiDemos/res/layout-land/fragment_layout.xml layout} * - * <p>Note how the prior code will adjust to this alternative UI flow: the - * titles fragment will now show its text inside of its activity, and the - * details activity will finish of it finds itself running in a configuration - * where the details can be shown inline. + * <p>Note how the prior code will adjust to this alternative UI flow: the titles + * fragment will now embed the details fragment inside of this activity, and the + * details activity will finish itself if it is running in a configuration + * where the details can be shown in-place. * * <p>When a configuration change causes the activity hosting these fragments * to restart, its new instance may use a different layout that doesn't * include the same fragments as the previous layout. In this case all of * the previous fragments will still be instantiated and running in the new - * instance; however, any that are no longer associated with a <fragment> - * tag in the view hierarchy will not have their content view created and will - * return false from {@link #isInLayout}. + * instance. However, any that are no longer associated with a <fragment> + * tag in the view hierarchy will not have their content view created + * and will return false from {@link #isInLayout}. (The code here also shows + * how you can determine if a fragment placed in a container is no longer + * running in a layout with that container and avoid creating its view hierarchy + * in that case.) * * <p>The attributes of the <fragment> tag are used to control the - * LayoutParams provider when attaching the fragment's view to the parent - * container. They can alse be parsed by the fragment in {@link #onInflate} + * LayoutParams provided when attaching the fragment's view to the parent + * container. They can also be parsed by the fragment in {@link #onInflate} * as parameters. * * <p>The fragment being instantiated must have some kind of unique identifier diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java index a196792..7b7cb37 100644 --- a/core/java/android/app/Notification.java +++ b/core/java/android/app/Notification.java @@ -752,7 +752,7 @@ public class Notification implements Parcelable } public Builder setAutoCancel(boolean autoCancel) { - setFlag(FLAG_ONLY_ALERT_ONCE, autoCancel); + setFlag(FLAG_AUTO_CANCEL, autoCancel); return this; } @@ -783,8 +783,13 @@ public class Notification implements Parcelable if (mContentInfo != null) { contentView.setTextViewText(R.id.info, mContentInfo); } else if (mNumber > 0) { - NumberFormat f = NumberFormat.getIntegerInstance(); - contentView.setTextViewText(R.id.info, f.format(mNumber)); + if (mNumber > 100) { + contentView.setTextViewText(R.id.info, mContext.getString( + R.string.status_bar_notification_info_overflow)); + } else { + NumberFormat f = NumberFormat.getIntegerInstance(); + contentView.setTextViewText(R.id.info, f.format(mNumber)); + } contentView.setFloat(R.id.info, "setTextSize", mContext.getResources().getDimensionPixelSize( R.dimen.status_bar_content_number_size)); diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java index 9cfe2db..ad74707 100644 --- a/core/java/android/content/pm/PackageParser.java +++ b/core/java/android/content/pm/PackageParser.java @@ -1508,18 +1508,12 @@ public class PackageParser { ai.nonLocalizedLabel = v.coerceToString(); } - int defaultTheme = 0; - if (owner.applicationInfo.targetSdkVersion >= android.os.Build.VERSION_CODES.HONEYCOMB) { - // As of honeycomb, the default application theme is holographic. - defaultTheme = android.R.style.Theme_Holo; - } - ai.icon = sa.getResourceId( com.android.internal.R.styleable.AndroidManifestApplication_icon, 0); ai.logo = sa.getResourceId( com.android.internal.R.styleable.AndroidManifestApplication_logo, 0); ai.theme = sa.getResourceId( - com.android.internal.R.styleable.AndroidManifestApplication_theme, defaultTheme); + com.android.internal.R.styleable.AndroidManifestApplication_theme, 0); ai.descriptionRes = sa.getResourceId( com.android.internal.R.styleable.AndroidManifestApplication_description, 0); diff --git a/core/java/android/database/sqlite/SQLiteDatabase.java b/core/java/android/database/sqlite/SQLiteDatabase.java index 6f59dc9..d8bc266 100644 --- a/core/java/android/database/sqlite/SQLiteDatabase.java +++ b/core/java/android/database/sqlite/SQLiteDatabase.java @@ -991,8 +991,10 @@ public class SQLiteDatabase extends SQLiteClosable { } return db; } catch (SQLiteDatabaseCorruptException e) { - db.mErrorHandler.onCorruption(db); - return SQLiteDatabase.openDatabase(path, factory, flags, errorHandler); + return handleCorruptedDatabase(db, path, factory, flags, errorHandler); + } catch (SQLiteCantOpenDatabaseException e) { + Log.e(TAG, "database file can't be opened. possibly due to database corruption."); + return handleCorruptedDatabase(db, path, factory, flags, errorHandler); } catch (SQLiteException e) { Log.e(TAG, "Failed to open the database. closing it.", e); db.close(); @@ -1000,6 +1002,12 @@ public class SQLiteDatabase extends SQLiteClosable { } } + private static SQLiteDatabase handleCorruptedDatabase(SQLiteDatabase db, String path, + CursorFactory factory, int flags, DatabaseErrorHandler errorHandler) { + db.mErrorHandler.onCorruption(db); + return SQLiteDatabase.openDatabase(path, factory, flags, errorHandler); + } + /** * Equivalent to openDatabase(file.getPath(), factory, CREATE_IF_NECESSARY). */ diff --git a/core/java/android/database/sqlite/SQLiteOpenHelper.java b/core/java/android/database/sqlite/SQLiteOpenHelper.java index ccf8d68..e2befca 100644 --- a/core/java/android/database/sqlite/SQLiteOpenHelper.java +++ b/core/java/android/database/sqlite/SQLiteOpenHelper.java @@ -38,10 +38,7 @@ import android.util.Log; * in the <em>samples/</em> directory of the SDK.</p> * * <p class="note"><strong>Note:</strong> this class assumes - * monotonically increasing version numbers for upgrades. Also, there - * is no concept of a database downgrade; installing a new version of - * your app which uses a lower version number than a - * previously-installed version will result in undefined behavior.</p> + * monotonically increasing version numbers for upgrades.</p> */ public abstract class SQLiteOpenHelper { private static final String TAG = SQLiteOpenHelper.class.getSimpleName(); @@ -65,7 +62,8 @@ public abstract class SQLiteOpenHelper { * @param name of the database file, or null for an in-memory database * @param factory to use for creating cursor objects, or null for the default * @param version number of the database (starting at 1); if the database is older, - * {@link #onUpgrade} will be used to upgrade the database + * {@link #onUpgrade} will be used to upgrade the database; if the database is + * newer, {@link #onDowngrade} will be used to downgrade the database */ public SQLiteOpenHelper(Context context, String name, CursorFactory factory, int version) { this(context, name, factory, version, new DefaultDatabaseErrorHandler()); @@ -152,10 +150,6 @@ public abstract class SQLiteOpenHelper { } int version = db.getVersion(); - if (version > mNewVersion) { - throw new IllegalStateException("Database " + mName + - " cannot be downgraded. instead, please uninstall new version first."); - } if (version != mNewVersion) { db.beginTransaction(); try { @@ -163,10 +157,10 @@ public abstract class SQLiteOpenHelper { onCreate(db); } else { if (version > mNewVersion) { - Log.wtf(TAG, "Can't downgrade read-only database from version " + - version + " to " + mNewVersion + ": " + db.getPath()); + onDowngrade(db, version, mNewVersion); + } else { + onUpgrade(db, version, mNewVersion); } - onUpgrade(db, version, mNewVersion); } db.setVersion(mNewVersion); db.setTransactionSuccessful(); @@ -291,6 +285,22 @@ public abstract class SQLiteOpenHelper { public abstract void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion); /** + * Called when the database needs to be downgraded. This is stricly similar to + * onUpgrade() method, but is called whenever current version is newer than requested one. + * However, this method is not abstract, so it is not mandatory for a customer to + * implement it. If not overridden, default implementation will reject downgrade and + * throws SQLiteException + * + * @param db The database. + * @param oldVersion The old database version. + * @param newVersion The new database version. + */ + public void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) { + throw new SQLiteException("Can't downgrade database from version " + + oldVersion + " to " + newVersion); + } + + /** * Called when the database has been opened. The implementation * should check {@link SQLiteDatabase#isReadOnly} before updating the * database. diff --git a/core/java/android/nfc/technology/IsoDep.java b/core/java/android/nfc/technology/IsoDep.java index 52a453f..32a7542 100644 --- a/core/java/android/nfc/technology/IsoDep.java +++ b/core/java/android/nfc/technology/IsoDep.java @@ -39,18 +39,18 @@ import java.io.IOException; */ public final class IsoDep extends BasicTagTechnology { /** @hide */ - public static final String EXTRA_ATTRIB = "attrib"; + public static final String EXTRA_HI_LAYER_RESP = "hiresp"; /** @hide */ public static final String EXTRA_HIST_BYTES = "histbytes"; - private byte[] mAttrib = null; + private byte[] mHiLayerResponse = null; private byte[] mHistBytes = null; public IsoDep(NfcAdapter adapter, Tag tag, Bundle extras) throws RemoteException { super(adapter, tag, TagTechnology.ISO_DEP); if (extras != null) { - mAttrib = extras.getByteArray(EXTRA_ATTRIB); + mHiLayerResponse = extras.getByteArray(EXTRA_HI_LAYER_RESP); mHistBytes = extras.getByteArray(EXTRA_HIST_BYTES); } } @@ -63,5 +63,5 @@ public final class IsoDep extends BasicTagTechnology { /** * 3B only */ - public byte[] getAttrib() { return mAttrib; } + public byte[] getHiLayerResponse() { return mHiLayerResponse; } } diff --git a/core/java/android/nfc/technology/NfcB.java b/core/java/android/nfc/technology/NfcB.java index de528f8..267c94d 100644 --- a/core/java/android/nfc/technology/NfcB.java +++ b/core/java/android/nfc/technology/NfcB.java @@ -37,20 +37,34 @@ import android.os.RemoteException; */ public final class NfcB extends BasicTagTechnology { /** @hide */ - public static final String EXTRA_ATQB = "atqb"; + public static final String EXTRA_APPDATA = "appdata"; + /** @hide */ + public static final String EXTRA_PROTINFO = "protinfo"; - private byte[] mAtqb; + private byte[] mAppData; + private byte[] mProtInfo; public NfcB(NfcAdapter adapter, Tag tag, Bundle extras) throws RemoteException { super(adapter, tag, TagTechnology.NFC_B); - mAtqb = extras.getByteArray(EXTRA_ATQB); + mAppData = extras.getByteArray(EXTRA_APPDATA); + mProtInfo = extras.getByteArray(EXTRA_PROTINFO); + } + + /** + * Returns the Application Data bytes from the ATQB/SENSB_RES + * bytes discovered at tag discovery. + */ + public byte[] getApplicationData() { + return mAppData; } /** - * Returns the ATQB/SENSB_RES bytes discovered at tag discovery. + * Returns the Protocol Info bytes from the ATQB/SENSB_RES + * bytes discovered at tag discovery. */ - public byte[] getAtqb() { - return mAtqb; + public byte[] getProtocolInfo() { + return mProtInfo; } + } diff --git a/core/java/android/os/Debug.java b/core/java/android/os/Debug.java index 8d9867e..40d9cff 100644 --- a/core/java/android/os/Debug.java +++ b/core/java/android/os/Debug.java @@ -559,18 +559,55 @@ href="{@docRoot}guide/developing/tools/traceview.html">Traceview: A Graphical Lo /* cumulative elapsed time for class initialization, in usec */ return VMDebug.getAllocCount(VMDebug.KIND_GLOBAL_CLASS_INIT_TIME); } + + /** + * Returns the global count of external allocation requests. Now + * that external allocation tracking no longer exists this method + * always returns 0. + * + * @deprecated This method is now obsolete. + */ + @Deprecated public static int getGlobalExternalAllocCount() { - return VMDebug.getAllocCount(VMDebug.KIND_GLOBAL_EXT_ALLOCATED_OBJECTS); + return 0; } + + /** + * Returns the global count of bytes externally allocated. Now + * that external allocation tracking no longer exists this method + * always returns 0. + * + * @deprecated This method is now obsolete. + */ + @Deprecated public static int getGlobalExternalAllocSize() { - return VMDebug.getAllocCount(VMDebug.KIND_GLOBAL_EXT_ALLOCATED_BYTES); + return 0; } + + /** + * Returns the global count of freed external allocation requests. + * Now that external allocation tracking no longer exists this + * method always returns 0. + * + * @deprecated This method is now obsolete. + */ + @Deprecated public static int getGlobalExternalFreedCount() { - return VMDebug.getAllocCount(VMDebug.KIND_GLOBAL_EXT_FREED_OBJECTS); + return 0; } + + /** + * Returns the global count of freed bytes from external + * allocation requests. Now that external allocation tracking no + * longer exists this method always returns 0. + * + * @deprecated This method is now obsolete. + */ + @Deprecated public static int getGlobalExternalFreedSize() { - return VMDebug.getAllocCount(VMDebug.KIND_GLOBAL_EXT_FREED_BYTES); + return 0; } + public static int getGlobalGcInvocationCount() { return VMDebug.getAllocCount(VMDebug.KIND_GLOBAL_GC_INVOCATIONS); } @@ -580,12 +617,31 @@ href="{@docRoot}guide/developing/tools/traceview.html">Traceview: A Graphical Lo public static int getThreadAllocSize() { return VMDebug.getAllocCount(VMDebug.KIND_THREAD_ALLOCATED_BYTES); } + + /** + * Returns the count of external allocation requests made by the + * current thread. Now that external allocation tracking no + * longer exists this method always returns 0. + * + * @deprecated This method is now obsolete. + */ + @Deprecated public static int getThreadExternalAllocCount() { - return VMDebug.getAllocCount(VMDebug.KIND_THREAD_EXT_ALLOCATED_OBJECTS); + return 0; } + + /** + * Returns the global count of bytes externally allocated. Now + * that external allocation tracking no longer exists this method + * always returns 0. + * + * @deprecated This method is now obsolete. + */ + @Deprecated public static int getThreadExternalAllocSize() { - return VMDebug.getAllocCount(VMDebug.KIND_THREAD_EXT_ALLOCATED_BYTES); + return 0; } + public static int getThreadGcInvocationCount() { return VMDebug.getAllocCount(VMDebug.KIND_THREAD_GC_INVOCATIONS); } @@ -608,18 +664,47 @@ href="{@docRoot}guide/developing/tools/traceview.html">Traceview: A Graphical Lo public static void resetGlobalClassInitTime() { VMDebug.resetAllocCount(VMDebug.KIND_GLOBAL_CLASS_INIT_TIME); } - public static void resetGlobalExternalAllocCount() { - VMDebug.resetAllocCount(VMDebug.KIND_GLOBAL_EXT_ALLOCATED_OBJECTS); - } - public static void resetGlobalExternalAllocSize() { - VMDebug.resetAllocCount(VMDebug.KIND_GLOBAL_EXT_ALLOCATED_BYTES); - } - public static void resetGlobalExternalFreedCount() { - VMDebug.resetAllocCount(VMDebug.KIND_GLOBAL_EXT_FREED_OBJECTS); - } - public static void resetGlobalExternalFreedSize() { - VMDebug.resetAllocCount(VMDebug.KIND_GLOBAL_EXT_FREED_BYTES); - } + + /** + * Resets the global count of external allocation requests. Now + * that external allocation tracking has been removed this method + * has no effect. + * + * @deprecated This method is now obsolete. + */ + @Deprecated + public static void resetGlobalExternalAllocCount() {} + + /** + * Resets the global count of bytes externally allocated. Now + * that external allocation tracking has been removed this method + * has no effect. + * + * @deprecated This method is now obsolete. + */ + @Deprecated + public static void resetGlobalExternalAllocSize() {} + + /** + * Resets the global count of freed external allocations. Now + * that external allocation tracking has been removed this method + * has no effect. + * + * @deprecated This method is now obsolete. + */ + @Deprecated + public static void resetGlobalExternalFreedCount() {} + + /** + * Resets the global count counter of freed bytes from external + * allocations. Now that external allocation tracking has been + * removed this method has no effect. + * + * @deprecated This method is now obsolete. + */ + @Deprecated + public static void resetGlobalExternalFreedSize() {} + public static void resetGlobalGcInvocationCount() { VMDebug.resetAllocCount(VMDebug.KIND_GLOBAL_GC_INVOCATIONS); } @@ -629,12 +714,27 @@ href="{@docRoot}guide/developing/tools/traceview.html">Traceview: A Graphical Lo public static void resetThreadAllocSize() { VMDebug.resetAllocCount(VMDebug.KIND_THREAD_ALLOCATED_BYTES); } - public static void resetThreadExternalAllocCount() { - VMDebug.resetAllocCount(VMDebug.KIND_THREAD_EXT_ALLOCATED_OBJECTS); - } - public static void resetThreadExternalAllocSize() { - VMDebug.resetAllocCount(VMDebug.KIND_THREAD_EXT_ALLOCATED_BYTES); - } + + /** + * Resets the count of external allocation requests made by the + * current thread. Now that external allocation tracking has been + * removed this method has no effect. + * + * @deprecated This method is now obsolete. + */ + @Deprecated + public static void resetThreadExternalAllocCount() {} + + /** + * Resets the count of bytes externally allocated by the current + * thread. Now that external allocation tracking has been removed + * this method has no effect. + * + * @deprecated This method is now obsolete. + */ + @Deprecated + public static void resetThreadExternalAllocSize() {} + public static void resetThreadGcInvocationCount() { VMDebug.resetAllocCount(VMDebug.KIND_THREAD_GC_INVOCATIONS); } diff --git a/core/java/android/text/ClipboardManager.java b/core/java/android/text/ClipboardManager.java index 0b239cf..d030910 100644 --- a/core/java/android/text/ClipboardManager.java +++ b/core/java/android/text/ClipboardManager.java @@ -17,7 +17,7 @@ package android.text; /** - * @deprecated Old text-only interace to the clipboard. See + * @deprecated Old text-only interface to the clipboard. See * {@link android.content.ClipboardManager} for the modern API. */ @Deprecated diff --git a/core/java/android/text/StaticLayout.java b/core/java/android/text/StaticLayout.java index d8d6320..43dce53 100644 --- a/core/java/android/text/StaticLayout.java +++ b/core/java/android/text/StaticLayout.java @@ -387,7 +387,7 @@ public class StaticLayout extends Layout // Act like it fit even though it didn't. fitwidth = w; - fit = j + 1; + here = fit = j + 1; if (fmtop < fittop) fittop = fmtop; diff --git a/core/java/android/text/method/LinkMovementMethod.java b/core/java/android/text/method/LinkMovementMethod.java index 80c8169..9e73371 100644 --- a/core/java/android/text/method/LinkMovementMethod.java +++ b/core/java/android/text/method/LinkMovementMethod.java @@ -16,10 +16,13 @@ package android.text.method; +import android.text.Layout; +import android.text.NoCopySpan; +import android.text.Selection; +import android.text.Spannable; +import android.text.style.ClickableSpan; import android.view.KeyEvent; import android.view.MotionEvent; -import android.text.*; -import android.text.style.*; import android.view.View; import android.widget.TextView; diff --git a/core/java/android/view/ContextThemeWrapper.java b/core/java/android/view/ContextThemeWrapper.java index 2045a98..ae938e7 100644 --- a/core/java/android/view/ContextThemeWrapper.java +++ b/core/java/android/view/ContextThemeWrapper.java @@ -19,6 +19,7 @@ package android.view; import android.content.Context; import android.content.ContextWrapper; import android.content.res.Resources; +import android.os.Build; /** * A ContextWrapper that allows you to modify the theme from what is in the @@ -56,7 +57,10 @@ public class ContextThemeWrapper extends ContextWrapper { } if (mThemeResource == 0) { - mThemeResource = com.android.internal.R.style.Theme; + mThemeResource = (getApplicationInfo().targetSdkVersion + >= Build.VERSION_CODES.HONEYCOMB) + ? com.android.internal.R.style.Theme_Holo + : com.android.internal.R.style.Theme; } initializeTheme(); diff --git a/core/java/android/view/ViewRoot.java b/core/java/android/view/ViewRoot.java index 5d81702..9b897eb 100644 --- a/core/java/android/view/ViewRoot.java +++ b/core/java/android/view/ViewRoot.java @@ -1104,7 +1104,7 @@ public final class ViewRoot extends Handler implements ViewParent, } } - if (hwInitialized || (windowShouldResize && + if (hwInitialized || ((windowShouldResize || params != null) && mAttachInfo.mHardwareRenderer != null && mAttachInfo.mHardwareRenderer.isEnabled())) { mAttachInfo.mHardwareRenderer.setup(mWidth, mHeight); diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index d247d72..8bfcf50 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -3846,6 +3846,13 @@ public class WebView extends AbsoluteLayout public boolean selectText() { int x = viewToContentX((int) mLastTouchX + mScrollX); int y = viewToContentY((int) mLastTouchY + mScrollY); + return selectText(x, y); + } + + /** + * Select the word at the indicated content coordinates. + */ + boolean selectText(int x, int y) { if (!setUpSelect()) { return false; } @@ -4808,12 +4815,16 @@ public class WebView extends AbsoluteLayout /** * Select all of the text in this WebView. + * + * @hide pending API council approval. */ - void selectAll() { + public void selectAll() { if (0 == mNativeClass) return; // client isn't initialized if (inFullScreenMode()) return; - if (!mSelectingText && !setUpSelect()) { - return; + if (!mSelectingText) { + // retrieve a point somewhere within the text + Point select = nativeSelectableText(); + if (!selectText(select.x, select.y)) return; } nativeSelectAll(); mDrawSelectionPointer = false; @@ -4842,8 +4853,10 @@ public class WebView extends AbsoluteLayout /** * Copy the selection to the clipboard + * + * @hide pending API council approval. */ - boolean copySelection() { + public boolean copySelection() { boolean copiedSomething = false; String selection = getSelection(); if (selection != "") { @@ -8049,6 +8062,7 @@ public class WebView extends AbsoluteLayout private native void nativeRecordButtons(boolean focused, boolean pressed, boolean invalidate); private native void nativeResetSelection(); + private native Point nativeSelectableText(); private native void nativeSelectAll(); private native void nativeSelectBestAt(Rect rect); private native int nativeSelectionX(); diff --git a/core/java/android/webkit/WebViewCore.java b/core/java/android/webkit/WebViewCore.java index 45927f9..43ec378 100644 --- a/core/java/android/webkit/WebViewCore.java +++ b/core/java/android/webkit/WebViewCore.java @@ -2577,10 +2577,7 @@ final class WebViewCore { .sendToTarget(); } - // called by JNI. PluginWidget functions for creating an embedded View for - // the surface drawing model. - private ViewManager.ChildView addSurface(View pluginView, int x, int y, - int width, int height) { + private ViewManager.ChildView createSurface(View pluginView) { if (mWebView == null) { return null; } @@ -2598,6 +2595,14 @@ final class WebViewCore { ViewManager.ChildView view = mWebView.mViewManager.createView(); view.mView = pluginView; + return view; + } + + // called by JNI. PluginWidget functions for creating an embedded View for + // the surface drawing model. + private ViewManager.ChildView addSurface(View pluginView, int x, int y, + int width, int height) { + ViewManager.ChildView view = createSurface(pluginView); view.attachView(x, y, width, height); return view; } diff --git a/core/java/android/widget/Adapters.java b/core/java/android/widget/Adapters.java index a71d4ab..3849aa4 100644 --- a/core/java/android/widget/Adapters.java +++ b/core/java/android/widget/Adapters.java @@ -39,6 +39,8 @@ import java.util.ArrayList; import java.util.HashMap; /** + * @hide -- not sure if we really want this in the framework. + * * <p>This class can be used to load {@link android.widget.Adapter adapters} defined in * XML resources. XML-defined adapters can be used to easily create adapters in your * own application or to pass adapters to other processes.</p> @@ -239,18 +241,18 @@ import java.util.HashMap; * @see android.widget.Adapter * @see android.content.ContentProvider * - * @attr ref android.R.styleable#CursorAdapter_layout - * @attr ref android.R.styleable#CursorAdapter_selection - * @attr ref android.R.styleable#CursorAdapter_sortOrder - * @attr ref android.R.styleable#CursorAdapter_uri - * @attr ref android.R.styleable#CursorAdapter_BindItem_as - * @attr ref android.R.styleable#CursorAdapter_BindItem_from - * @attr ref android.R.styleable#CursorAdapter_BindItem_to - * @attr ref android.R.styleable#CursorAdapter_MapItem_fromValue - * @attr ref android.R.styleable#CursorAdapter_MapItem_toValue - * @attr ref android.R.styleable#CursorAdapter_SelectItem_column - * @attr ref android.R.styleable#CursorAdapter_TransformItem_withClass - * @attr ref android.R.styleable#CursorAdapter_TransformItem_withExpression + * attr ref android.R.styleable#CursorAdapter_layout + * attr ref android.R.styleable#CursorAdapter_selection + * attr ref android.R.styleable#CursorAdapter_sortOrder + * attr ref android.R.styleable#CursorAdapter_uri + * attr ref android.R.styleable#CursorAdapter_BindItem_as + * attr ref android.R.styleable#CursorAdapter_BindItem_from + * attr ref android.R.styleable#CursorAdapter_BindItem_to + * attr ref android.R.styleable#CursorAdapter_MapItem_fromValue + * attr ref android.R.styleable#CursorAdapter_MapItem_toValue + * attr ref android.R.styleable#CursorAdapter_SelectItem_column + * attr ref android.R.styleable#CursorAdapter_TransformItem_withClass + * attr ref android.R.styleable#CursorAdapter_TransformItem_withExpression */ @SuppressWarnings({"JavadocReference"}) public class Adapters { @@ -614,12 +616,12 @@ public class Adapters { throws IOException, XmlPullParserException { Resources resources = mResources; - TypedArray a = resources.obtainAttributes(mAttrs, android.R.styleable.CursorAdapter); + TypedArray a = resources.obtainAttributes(mAttrs, com.android.internal.R.styleable.CursorAdapter); - String uri = a.getString(android.R.styleable.CursorAdapter_uri); - String selection = a.getString(android.R.styleable.CursorAdapter_selection); - String sortOrder = a.getString(android.R.styleable.CursorAdapter_sortOrder); - int layout = a.getResourceId(android.R.styleable.CursorAdapter_layout, 0); + String uri = a.getString(com.android.internal.R.styleable.CursorAdapter_uri); + String selection = a.getString(com.android.internal.R.styleable.CursorAdapter_selection); + String sortOrder = a.getString(com.android.internal.R.styleable.CursorAdapter_sortOrder); + int layout = a.getResourceId(com.android.internal.R.styleable.CursorAdapter_layout, 0); if (layout == 0) { throw new IllegalArgumentException("The layout specified in " + resources.getResourceEntryName(mId) + " does not exist"); @@ -670,9 +672,9 @@ public class Adapters { private void parseSelectTag() { TypedArray a = mResources.obtainAttributes(mAttrs, - android.R.styleable.CursorAdapter_SelectItem); + com.android.internal.R.styleable.CursorAdapter_SelectItem); - String fromName = a.getString(android.R.styleable.CursorAdapter_SelectItem_column); + String fromName = a.getString(com.android.internal.R.styleable.CursorAdapter_SelectItem_column); if (fromName == null) { throw new IllegalArgumentException("A select item in " + mResources.getResourceEntryName(mId) + @@ -688,21 +690,21 @@ public class Adapters { private void parseBindTag() throws IOException, XmlPullParserException { Resources resources = mResources; TypedArray a = resources.obtainAttributes(mAttrs, - android.R.styleable.CursorAdapter_BindItem); + com.android.internal.R.styleable.CursorAdapter_BindItem); - String fromName = a.getString(android.R.styleable.CursorAdapter_BindItem_from); + String fromName = a.getString(com.android.internal.R.styleable.CursorAdapter_BindItem_from); if (fromName == null) { throw new IllegalArgumentException("A bind item in " + resources.getResourceEntryName(mId) + " does not have a 'from' attribute"); } - int toName = a.getResourceId(android.R.styleable.CursorAdapter_BindItem_to, 0); + int toName = a.getResourceId(com.android.internal.R.styleable.CursorAdapter_BindItem_to, 0); if (toName == 0) { throw new IllegalArgumentException("A bind item in " + resources.getResourceEntryName(mId) + " does not have a 'to' attribute"); } - String asType = a.getString(android.R.styleable.CursorAdapter_BindItem_as); + String asType = a.getString(com.android.internal.R.styleable.CursorAdapter_BindItem_as); if (asType == null) { throw new IllegalArgumentException("A bind item in " + resources.getResourceEntryName(mId) + " does not have an 'as' attribute"); @@ -796,9 +798,9 @@ public class Adapters { Resources resources = mResources; TypedArray a = resources.obtainAttributes(mAttrs, - android.R.styleable.CursorAdapter_MapItem); + com.android.internal.R.styleable.CursorAdapter_MapItem); - String from = a.getString(android.R.styleable.CursorAdapter_MapItem_fromValue); + String from = a.getString(com.android.internal.R.styleable.CursorAdapter_MapItem_fromValue); if (from == null) { throw new IllegalArgumentException("A map item in " + resources.getResourceEntryName(mId) + @@ -806,7 +808,7 @@ public class Adapters { } if (!drawable) { - String to = a.getString(android.R.styleable.CursorAdapter_MapItem_toValue); + String to = a.getString(com.android.internal.R.styleable.CursorAdapter_MapItem_toValue); if (to == null) { throw new IllegalArgumentException("A map item in " + resources.getResourceEntryName(mId) + @@ -814,7 +816,7 @@ public class Adapters { } transformation.addStringMapping(from, to); } else { - int to = a.getResourceId(android.R.styleable.CursorAdapter_MapItem_toValue, 0); + int to = a.getResourceId(com.android.internal.R.styleable.CursorAdapter_MapItem_toValue, 0); if (to == 0) { throw new IllegalArgumentException("A map item in " + resources.getResourceEntryName(mId) + @@ -830,12 +832,12 @@ public class Adapters { Resources resources = mResources; CursorTransformation transformation = null; TypedArray a = resources.obtainAttributes(mAttrs, - android.R.styleable.CursorAdapter_TransformItem); + com.android.internal.R.styleable.CursorAdapter_TransformItem); - String className = a.getString(android.R.styleable.CursorAdapter_TransformItem_withClass); + String className = a.getString(com.android.internal.R.styleable.CursorAdapter_TransformItem_withClass); if (className == null) { String expression = a.getString( - android.R.styleable.CursorAdapter_TransformItem_withExpression); + com.android.internal.R.styleable.CursorAdapter_TransformItem_withExpression); transformation = createExpressionTransformation(expression); } else if (!mContext.isRestricted()) { try { diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index ae4b193..76d4835 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -7639,6 +7639,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener type == Character.LOWERCASE_LETTER || type == Character.TITLECASE_LETTER || type == Character.MODIFIER_LETTER || + type == Character.OTHER_LETTER || // Should handle asian characters type == Character.DECIMAL_DIGIT_NUMBER); } @@ -7647,15 +7648,15 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener * * @param offset An offset in the text. * @return The offsets for the start and end of the word located at <code>offset</code>. - * The two ints offsets are packed in a long, with the starting offset shifted by 32 bits. - * Returns a negative value if no valid word was found. + * The two ints offsets are packed in a long using {@link #packRangeInLong(int, int)}. + * Returns -1 if no valid word was found. */ private long getWordLimitsAt(int offset) { int klass = mInputType & InputType.TYPE_MASK_CLASS; int variation = mInputType & InputType.TYPE_MASK_VARIATION; // Text selection is not permitted in password fields - if (isPasswordInputType(mInputType) || isVisiblePasswordInputType(mInputType)) { + if (hasPasswordTransformationMethod()) { return -1; } @@ -7739,17 +7740,16 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener } if (hasPasswordTransformationMethod()) { - // selectCurrentWord is not available on a password field and would return an - // arbitrary 10-charater selection around pressed position. Select all instead. + // Always select all on a password field. // Cut/copy menu entries are not available for passwords, but being able to select all // is however useful to delete or paste to replace the entire content. selectAll(); return; } - long lastTouchOffset = getLastTouchOffsets(); - final int minOffset = extractRangeStartFromLong(lastTouchOffset); - final int maxOffset = extractRangeEndFromLong(lastTouchOffset); + long lastTouchOffsets = getLastTouchOffsets(); + final int minOffset = extractRangeStartFromLong(lastTouchOffsets); + final int maxOffset = extractRangeEndFromLong(lastTouchOffsets); int selectionStart, selectionEnd; @@ -7979,43 +7979,48 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener /** * Prepare text so that there are not zero or two spaces at beginning and end of region defined * by [min, max] when replacing this region by paste. - * Note that if there was two spaces (or more) at that position before, they are kept. We just + * Note that if there were two spaces (or more) at that position before, they are kept. We just * make sure we do not add an extra one from the paste content. */ private long prepareSpacesAroundPaste(int min, int max, CharSequence paste) { - // Paste adds/removes spaces before or after insertion as needed. - if (paste.length() > 0 && Character.isSpaceChar(paste.charAt(0))) { - if (min > 0 && Character.isSpaceChar(mTransformed.charAt(min - 1))) { - // Two spaces at beginning of paste: remove one - final int originalLength = mText.length(); - ((Editable) mText).delete(min - 1, min); - // Due to filters, there is no guarantee that exactly one character was - // removed. Count instead. - final int delta = mText.length() - originalLength; - min += delta; - max += delta; - } - } else { - if (min > 0 && !Character.isSpaceChar(mTransformed.charAt(min - 1))) { - // No space at beginning of paste: add one - final int originalLength = mText.length(); - ((Editable) mText).replace(min, min, " "); - // Taking possible filters into account as above. - final int delta = mText.length() - originalLength; - min += delta; - max += delta; + if (paste.length() > 0) { + if (min > 0) { + final char charBefore = mTransformed.charAt(min - 1); + final char charAfter = paste.charAt(0); + + if (Character.isSpaceChar(charBefore) && Character.isSpaceChar(charAfter)) { + // Two spaces at beginning of paste: remove one + final int originalLength = mText.length(); + ((Editable) mText).delete(min - 1, min); + // Due to filters, there is no guarantee that exactly one character was + // removed: count instead. + final int delta = mText.length() - originalLength; + min += delta; + max += delta; + } else if (!Character.isSpaceChar(charBefore) && charBefore != '\n' && + !Character.isSpaceChar(charAfter) && charAfter != '\n') { + // No space at beginning of paste: add one + final int originalLength = mText.length(); + ((Editable) mText).replace(min, min, " "); + // Taking possible filters into account as above. + final int delta = mText.length() - originalLength; + min += delta; + max += delta; + } } - } - if (paste.length() > 0 && Character.isSpaceChar(paste.charAt(paste.length() - 1))) { - if (max < mText.length() && Character.isSpaceChar(mTransformed.charAt(max))) { - // Two spaces at end of paste: remove one - ((Editable) mText).delete(max, max + 1); - } - } else { - if (max < mText.length() && !Character.isSpaceChar(mTransformed.charAt(max))) { - // No space at end of paste: add one - ((Editable) mText).replace(max, max, " "); + if (max < mText.length()) { + final char charBefore = paste.charAt(paste.length() - 1); + final char charAfter = mTransformed.charAt(max); + + if (Character.isSpaceChar(charBefore) && Character.isSpaceChar(charAfter)) { + // Two spaces at end of paste: remove one + ((Editable) mText).delete(max, max + 1); + } else if (!Character.isSpaceChar(charBefore) && charBefore != '\n' && + !Character.isSpaceChar(charAfter) && charAfter != '\n') { + // No space at end of paste: add one + ((Editable) mText).replace(max, max, " "); + } } } diff --git a/core/jni/android/graphics/Shader.cpp b/core/jni/android/graphics/Shader.cpp index 4be1321..3efc41d 100644 --- a/core/jni/android/graphics/Shader.cpp +++ b/core/jni/android/graphics/Shader.cpp @@ -64,11 +64,6 @@ static void Shader_destructor(JNIEnv* env, jobject o, SkShader* shader, SkiaShad #endif } -static bool Shader_getLocalMatrix(JNIEnv* env, jobject, const SkShader* shader, SkMatrix* matrix) -{ - return shader ? shader->getLocalMatrix(matrix) : false; -} - static void Shader_setLocalMatrix(JNIEnv* env, jobject o, SkShader* shader, SkiaShader* skiaShader, const SkMatrix* matrix) { @@ -471,7 +466,6 @@ static JNINativeMethod gColorMethods[] = { static JNINativeMethod gShaderMethods[] = { { "nativeDestructor", "(II)V", (void*)Shader_destructor }, - { "nativeGetLocalMatrix", "(II)Z", (void*)Shader_getLocalMatrix }, { "nativeSetLocalMatrix", "(III)V", (void*)Shader_setLocalMatrix } }; diff --git a/core/res/res/drawable-mdpi/pointericon_default.xml b/core/res/res/drawable-mdpi/pointericon_default.xml new file mode 100644 index 0000000..b1357b6 --- /dev/null +++ b/core/res/res/drawable-mdpi/pointericon_default.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<pointer-icon xmlns:android="http://schemas.android.com/apk/res/android" + android:bitmap="@drawable/pointericon_default_bitmap" + android:hotSpotX="2" + android:hotSpotY="2" /> diff --git a/core/res/res/drawable-mdpi/pointericon_default_bitmap.png b/core/res/res/drawable-mdpi/pointericon_default_bitmap.png Binary files differnew file mode 100644 index 0000000..7e073a3 --- /dev/null +++ b/core/res/res/drawable-mdpi/pointericon_default_bitmap.png diff --git a/core/res/res/layout/preference_list_content.xml b/core/res/res/layout/preference_list_content.xml index a5f87d3..5d034a5 100644 --- a/core/res/res/layout/preference_list_content.xml +++ b/core/res/res/layout/preference_list_content.xml @@ -65,7 +65,7 @@ android:layout_marginRight="@dimen/preference_screen_side_margin" android:layout_marginTop="16dp" android:layout_marginBottom="16dp" - android:background="?attr/preferencePanelBackground" + android:background="?attr/detailsElementBackground" android:orientation="vertical" android:visibility="gone" > diff --git a/core/res/res/values-xlarge/styles.xml b/core/res/res/values-xlarge/styles.xml index 489e530..ed05cb1 100644 --- a/core/res/res/values-xlarge/styles.xml +++ b/core/res/res/values-xlarge/styles.xml @@ -40,7 +40,7 @@ <item name="android:layout_marginRight">@dimen/preference_screen_side_margin</item> <item name="android:layout_marginTop">48dip</item> <item name="android:layout_marginBottom">48dip</item> - <item name="android:background">?attr/preferencePanelBackground</item> + <item name="android:background">?attr/detailsElementBackground</item> </style> </resources> diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml index 588b33b..2d798c9 100755 --- a/core/res/res/values/attrs.xml +++ b/core/res/res/values/attrs.xml @@ -98,9 +98,9 @@ <!-- Text color for urls in search suggestions, used by things like global search and the browser. @hide --> <attr name="textColorSearchUrl" format="reference|color" /> - <!-- Color of highlighted text, when used in a light theme. @hide --> + <!-- Color of highlighted text, when used in a light theme. --> <attr name="textColorHighlightInverse" format="reference|color" /> - <!-- Color of link text (URLs), when used in a light theme. @hide --> + <!-- Color of link text (URLs), when used in a light theme. --> <attr name="textColorLinkInverse" format="reference|color" /> <!-- Color of list item text in alert dialogs. --> @@ -371,6 +371,17 @@ <attr name="alertDialogButtonGroupStyle" format="reference" /> <attr name="alertDialogCenterButtons" format="boolean" /> + <!-- ============== --> + <!-- Image elements --> + <!-- ============== --> + <eat-comment /> + + <!-- Background that can be used behind parts of a UI that provide + details on data the user is selecting. For example, this is + the background element of PreferenceActivity's embedded + preference fragment. --> + <attr name="detailsElementBackground" format="reference" /> + <!-- ============ --> <!-- Panel styles --> <!-- ============ --> @@ -598,8 +609,6 @@ <attr name="ringtonePreferenceStyle" format="reference" /> <!-- The preference layout that has the child/tabbed effect. --> <attr name="preferenceLayoutChild" format="reference" /> - <!-- Preference panel background --> - <attr name="preferencePanelBackground" format="reference" /> <!-- Preference panel style --> <attr name="preferencePanelStyle" format="reference" /> @@ -2022,7 +2031,8 @@ will use only the number of items in the adapter and the number of items visible on screen to determine the scrollbar's properties. --> <attr name="smoothScrollbar" format="boolean" /> - <!-- A reference to an XML description of the adapter to attach to the list. --> + <!-- A reference to an XML description of the adapter to attach to the list. + XXX Should remove? --> <attr name="adapter" format="reference" /> <!-- Defines the choice behavior for the view. By default, lists do not have any choice behavior. By setting the choiceMode to singleChoice, the list @@ -4555,7 +4565,8 @@ <!-- =============================== --> <eat-comment /> - <!-- Adapter used to bind cursors. --> + <!-- Adapter used to bind cursors. + @hide XXX should remove? --> <declare-styleable name="CursorAdapter"> <!-- URI to get the cursor from. Optional. --> <attr name="uri" format="string" /> @@ -4567,7 +4578,8 @@ <attr name="layout" /> </declare-styleable> - <!-- Attributes used in bind items for XML cursor adapters. --> + <!-- Attributes used in bind items for XML cursor adapters. + @hide XXX should remove? --> <declare-styleable name="CursorAdapter_BindItem"> <!-- The name of the column to bind from. Mandatory. --> <attr name="from" format="string" /> @@ -4589,13 +4601,15 @@ <attr name="as" format="string" /> </declare-styleable> - <!-- Attributes used in select items for XML cursor adapters. --> + <!-- Attributes used in select items for XML cursor adapters. + @hide XXX should remove? --> <declare-styleable name="CursorAdapter_SelectItem"> <!-- The name of the column to select. Mandatory. --> <attr name="column" format="string" /> </declare-styleable> - <!-- Attributes used to map values to new values in XML cursor adapters' bind items. --> + <!-- Attributes used to map values to new values in XML cursor adapters' bind items. + @hide XXX should remove? --> <declare-styleable name="CursorAdapter_MapItem"> <!-- The original value from the column. Mandatory. --> <attr name="fromValue" format="string" /> @@ -4603,7 +4617,8 @@ <attr name="toValue" format="string" /> </declare-styleable> - <!-- Attributes used to map values to new values in XML cursor adapters' bind items. --> + <!-- Attributes used to map values to new values in XML cursor adapters' bind items. + @hide XXX should remove? --> <declare-styleable name="CursorAdapter_TransformItem"> <!-- The transformation expression. Mandatory if "withClass" is not specified. --> <attr name="withExpression" format="string" /> @@ -4708,4 +4723,13 @@ <!-- Minimum space between the switch and caption text --> <attr name="switchPadding" format="dimension" /> </declare-styleable> + + <declare-styleable name="PointerIcon"> + <!-- Drawable to use as the icon bitmap. --> + <attr name="bitmap" format="reference" /> + <!-- X coordinate of the icon hot spot. --> + <attr name="hotSpotX" format="float" /> + <!-- Y coordinate of the icon hot spot. --> + <attr name="hotSpotY" format="float" /> + </declare-styleable> </resources> diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml index 76a9d3b..06d1e82 100644 --- a/core/res/res/values/public.xml +++ b/core/res/res/values/public.xml @@ -1231,7 +1231,7 @@ <public type="attr" name="expandableListViewWhiteStyle" id="0x010102b6" /> <!-- =============================================================== - Resources proposed for Froyo. + Resources added in version 8 of the platform (Froyo / 2.2) =============================================================== --> <eat-comment /> <public type="attr" name="installLocation" id="0x010102b7" /> @@ -1247,7 +1247,7 @@ <public type="anim" name="cycle_interpolator" id="0x010a000c" /> <!-- =============================================================== - Resources introduced in Gingerbread. + Resources added in version 9 of the platform (Gingerbread / 2.3) =============================================================== --> <eat-comment /> <public type="attr" name="logo" id="0x010102be" /> @@ -1282,18 +1282,6 @@ Resources proposed for Honeycomb. =============================================================== --> <eat-comment /> - <public type="attr" name="adapter" /> - <public type="attr" name="selection" /> - <public type="attr" name="sortOrder" /> - <public type="attr" name="uri" /> - <public type="attr" name="from" /> - <public type="attr" name="to" /> - <public type="attr" name="as" /> - <public type="attr" name="fromValue" /> - <public type="attr" name="toValue" /> - <public type="attr" name="column" /> - <public type="attr" name="withExpression" /> - <public type="attr" name="withClass" /> <public type="attr" name="allContactsName" /> <public type="attr" name="windowActionBar" /> <public type="attr" name="actionBarStyle" /> @@ -1426,6 +1414,12 @@ <public type="attr" name="spinnersShown" /> <public type="attr" name="calendarViewShown" /> <public type="attr" name="state_multiline" /> + <public type="attr" name="detailsElementBackground" /> + <public type="attr" name="textColorHighlightInverse" /> + <public type="attr" name="textColorLinkInverse" /> + <public type="attr" name="editTextColor" /> + <public type="attr" name="editTextBackground" /> + <public type="attr" name="horizontalScrollViewStyle" /> <public type="anim" name="animator_fade_in" /> <public type="anim" name="animator_fade_out" /> diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml index 3902734..8ebaeaa 100755 --- a/core/res/res/values/strings.xml +++ b/core/res/res/values/strings.xml @@ -337,6 +337,11 @@ <!-- status message in phone options dialog for when airplane mode is off --> <string name="global_actions_airplane_mode_off_status">Airplane mode is OFF</string> + <!-- Text to use when the number in a notification info is too large (> 100). Most likely does not need + to be translated. We do this so, for example, if the user has tens of thousands of unread + emails, the whole notification isn't taken over by the number. [CHAR LIMIT=5] --> + <string name="status_bar_notification_info_overflow">100+</string> + <!-- Displayed to the user to tell them that they have started up the phone in "safe mode" --> <string name="safeMode">Safe mode</string> diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml index 439d551..2dacbab 100644 --- a/core/res/res/values/themes.xml +++ b/core/res/res/values/themes.xml @@ -234,7 +234,7 @@ <item name="ringtonePreferenceStyle">@android:style/Preference.RingtonePreference</item> <item name="preferenceLayoutChild">@android:layout/preference_child</item> <item name="preferencePanelStyle">@style/PreferencePanel</item> - <item name="preferencePanelBackground">@android:drawable/panel_bg_holo_dark</item> + <item name="detailsElementBackground">@android:drawable/panel_bg_holo_dark</item> <!-- Search widget styles --> <item name="searchWidgetCorpusItemBackground">@android:color/search_widget_corpus_item_background</item> @@ -894,7 +894,7 @@ <item name="editTextPreferenceStyle">@android:style/Preference.DialogPreference.EditTextPreference</item> <item name="ringtonePreferenceStyle">@android:style/Preference.RingtonePreference</item> <item name="preferenceLayoutChild">@android:layout/preference_child</item> - <item name="preferencePanelBackground">@android:drawable/panel_bg_holo_dark</item> + <item name="detailsElementBackground">@android:drawable/panel_bg_holo_dark</item> <!-- Search widget styles --> <item name="searchWidgetCorpusItemBackground">@android:color/search_widget_corpus_item_background</item> @@ -1150,7 +1150,7 @@ <item name="editTextPreferenceStyle">@android:style/Preference.DialogPreference.EditTextPreference</item> <item name="ringtonePreferenceStyle">@android:style/Preference.RingtonePreference</item> <item name="preferenceLayoutChild">@android:layout/preference_child</item> - <item name="preferencePanelBackground">@android:drawable/panel_bg_holo_light</item> + <item name="detailsElementBackground">@android:drawable/panel_bg_holo_light</item> <!-- Search widget styles --> <item name="searchWidgetCorpusItemBackground">@android:color/search_widget_corpus_item_background</item> diff --git a/core/tests/coretests/src/android/widget/TextViewWordLimitsTest.java b/core/tests/coretests/src/android/widget/TextViewWordLimitsTest.java new file mode 100644 index 0000000..fbc9e1f --- /dev/null +++ b/core/tests/coretests/src/android/widget/TextViewWordLimitsTest.java @@ -0,0 +1,276 @@ +/* + * Copyright (C) 2010 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +package android.widget; + +import android.test.AndroidTestCase; +import android.test.suitebuilder.annotation.LargeTest; +import android.text.InputType; +import android.text.Selection; +import android.text.Spannable; +import android.text.SpannableString; + +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; + +/** + * TextViewPatchTest tests {@link TextView}'s definition of word. Finds and + * verifies word limits to be in strings containing different kinds of + * characters. + */ +public class TextViewWordLimitsTest extends AndroidTestCase { + + TextView mTv = null; + Method mGetWordLimits, mSelectCurrentWord; + Field mContextMenuTriggeredByKey, mSelectionControllerEnabled; + + + /** + * Sets up common fields used in all test cases. + * @throws NoSuchFieldException + * @throws SecurityException + */ + @Override + protected void setUp() throws NoSuchMethodException, SecurityException, NoSuchFieldException { + mTv = new TextView(getContext()); + mTv.setInputType(InputType.TYPE_CLASS_TEXT); + + mGetWordLimits = mTv.getClass().getDeclaredMethod("getWordLimitsAt", + new Class[] {int.class}); + mGetWordLimits.setAccessible(true); + + mSelectCurrentWord = mTv.getClass().getDeclaredMethod("selectCurrentWord", new Class[] {}); + mSelectCurrentWord.setAccessible(true); + + mContextMenuTriggeredByKey = mTv.getClass().getDeclaredField("mContextMenuTriggeredByKey"); + mContextMenuTriggeredByKey.setAccessible(true); + mSelectionControllerEnabled = mTv.getClass().getDeclaredField("mSelectionControllerEnabled"); + mSelectionControllerEnabled.setAccessible(true); + } + + /** + * Calculate and verify word limits. Depends on the TextView implementation. + * Uses a private method and internal data representation. + * + * @param text Text to select a word from + * @param pos Position to expand word around + * @param correctStart Correct start position for the word + * @param correctEnd Correct end position for the word + * @throws InvocationTargetException + * @throws IllegalAccessException + * @throws IllegalArgumentException + * @throws InvocationTargetException + * @throws IllegalAccessException + */ + private void verifyWordLimits(String text, int pos, int correctStart, int correctEnd) + throws IllegalArgumentException, IllegalAccessException, InvocationTargetException { + mTv.setText(text, TextView.BufferType.SPANNABLE); + + long limits = (Long)mGetWordLimits.invoke(mTv, new Object[] {new Integer(pos)}); + int actualStart = (int)(limits >>> 32); + int actualEnd = (int)(limits & 0x00000000FFFFFFFFL); + assertEquals(correctStart, actualStart); + assertEquals(correctEnd, actualEnd); + } + + + private void verifySelectCurrentWord(Spannable text, int selectionStart, int selectionEnd, int correctStart, + int correctEnd) throws InvocationTargetException, IllegalAccessException { + mTv.setText(text, TextView.BufferType.SPANNABLE); + + Selection.setSelection((Spannable)mTv.getText(), selectionStart, selectionEnd); + mContextMenuTriggeredByKey.setBoolean(mTv, true); + mSelectionControllerEnabled.setBoolean(mTv, true); + mSelectCurrentWord.invoke(mTv); + + assertEquals(correctStart, mTv.getSelectionStart()); + assertEquals(correctEnd, mTv.getSelectionEnd()); + } + + + /** + * Corner cases for string length. + */ + @LargeTest + public void testLengths() throws Exception { + final String ONE_TWO = "one two"; + final String EMPTY = ""; + final String TOOLONG = "ThisWordIsTooLongToBeDefinedAsAWordInTheSenseUsedInTextView"; + + // Select first word + verifyWordLimits(ONE_TWO, 0, 0, 3); + verifyWordLimits(ONE_TWO, 3, 0, 3); + + // Select last word + verifyWordLimits(ONE_TWO, 4, 4, 7); + verifyWordLimits(ONE_TWO, 7, 4, 7); + + // Empty string + verifyWordLimits(EMPTY, 0, -1, -1); + + // Too long word + verifyWordLimits(TOOLONG, 0, -1, -1); + } + + /** + * Unicode classes included. + */ + @LargeTest + public void testIncludedClasses() throws Exception { + final String LOWER = "njlj"; + final String UPPER = "NJLJ"; + final String TITLECASE = "\u01C8\u01CB\u01F2"; // Lj Nj Dz + final String OTHER = "\u3042\u3044\u3046"; // Hiragana AIU + final String MODIFIER = "\u02C6\u02CA\u02CB"; // Circumflex Acute Grave + + // Each string contains a single valid word + verifyWordLimits(LOWER, 1, 0, 4); + verifyWordLimits(UPPER, 1, 0, 4); + verifyWordLimits(TITLECASE, 1, 0, 3); + verifyWordLimits(OTHER, 1, 0, 3); + verifyWordLimits(MODIFIER, 1, 0, 3); + } + + /** + * Unicode classes included if combined with a letter. + */ + @LargeTest + public void testPartlyIncluded() throws Exception { + final String NUMBER = "123"; + final String NUMBER_LOWER = "1st"; + final String APOSTROPHE = "''"; + final String APOSTROPHE_LOWER = "'Android's'"; + + // Pure decimal number is ignored + verifyWordLimits(NUMBER, 1, -1, -1); + + // Number with letter is valid + verifyWordLimits(NUMBER_LOWER, 1, 0, 3); + + // Stand apostrophes are ignore + verifyWordLimits(APOSTROPHE, 1, -1, -1); + + // Apostrophes are accepted if they are a part of a word + verifyWordLimits(APOSTROPHE_LOWER, 1, 0, 11); + } + + /** + * Unicode classes included if combined with a letter. + */ + @LargeTest + public void testFinalSeparator() throws Exception { + final String PUNCTUATION = "abc, def."; + + // Starting from the comma + verifyWordLimits(PUNCTUATION, 3, 0, 3); + verifyWordLimits(PUNCTUATION, 4, 0, 4); + + // Starting from the final period + verifyWordLimits(PUNCTUATION, 8, 5, 8); + verifyWordLimits(PUNCTUATION, 9, 5, 9); + } + + /** + * Unicode classes other than listed in testIncludedClasses and + * testPartlyIncluded act as word separators. + */ + @LargeTest + public void testNotIncluded() throws Exception { + // Selection of character classes excluded + final String MARK_NONSPACING = "a\u030A"; // a Combining ring above + final String PUNCTUATION_OPEN_CLOSE = "(c)"; // Parenthesis + final String PUNCTUATION_DASH = "non-fiction"; // Hyphen + final String PUNCTUATION_OTHER = "b&b"; // Ampersand + final String SYMBOL_OTHER = "Android\u00AE"; // Registered + final String SEPARATOR_SPACE = "one two"; // Space + + // "a" + verifyWordLimits(MARK_NONSPACING, 1, 0, 1); + + // "c" + verifyWordLimits(PUNCTUATION_OPEN_CLOSE, 1, 1, 2); + + // "non-" + verifyWordLimits(PUNCTUATION_DASH, 3, 0, 3); + verifyWordLimits(PUNCTUATION_DASH, 4, 4, 11); + + // "b" + verifyWordLimits(PUNCTUATION_OTHER, 0, 0, 1); + verifyWordLimits(PUNCTUATION_OTHER, 1, 0, 1); + verifyWordLimits(PUNCTUATION_OTHER, 2, 0, 3); // & is considered a punctuation sign. + verifyWordLimits(PUNCTUATION_OTHER, 3, 2, 3); + + // "Android" + verifyWordLimits(SYMBOL_OTHER, 7, 0, 7); + verifyWordLimits(SYMBOL_OTHER, 8, -1, -1); + + // "one" + verifyWordLimits(SEPARATOR_SPACE, 1, 0, 3); + } + + /** + * Surrogate characters are treated as their code points. + */ + @LargeTest + public void testSurrogate() throws Exception { + final String SURROGATE_LETTER = "\uD800\uDC00\uD800\uDC01\uD800\uDC02"; // Linear B AEI + final String SURROGATE_SYMBOL = "\uD83D\uDE01\uD83D\uDE02\uD83D\uDE03"; // Three smileys + + // Letter Other is included even when coded as surrogate pairs + verifyWordLimits(SURROGATE_LETTER, 1, -1, -1); + verifyWordLimits(SURROGATE_LETTER, 2, -1, -1); + + // Not included classes are ignored even when coded as surrogate pairs + verifyWordLimits(SURROGATE_SYMBOL, 1, -1, -1); + verifyWordLimits(SURROGATE_SYMBOL, 2, -1, -1); + } + + /** + * Selection is used if present and valid word. + */ + @LargeTest + public void testSelectCurrentWord() throws Exception { + SpannableString textLower = new SpannableString("first second"); + SpannableString textOther = new SpannableString("\u3042\3044\3046"); // Hiragana AIU + SpannableString textDash = new SpannableString("non-fiction"); // Hyphen + SpannableString textPunctOther = new SpannableString("b&b"); // Ampersand + SpannableString textSymbolOther = new SpannableString("Android\u00AE"); // Registered + + // Valid selection - Letter, Lower + verifySelectCurrentWord(textLower, 2, 5, 0, 5); + + // Adding the space spreads to the second word + verifySelectCurrentWord(textLower, 2, 6, 0, 12); + + // Valid selection -- Letter, Other + verifySelectCurrentWord(textOther, 1, 2, 0, 5); + + // Zero-width selection is interpreted as a cursor and the selection is ignored + verifySelectCurrentWord(textLower, 2, 2, 0, 5); + + // Hyphen is part of selection + verifySelectCurrentWord(textDash, 2, 5, 0, 11); + + // Ampersand part of selection or not + verifySelectCurrentWord(textPunctOther, 1, 2, 0, 3); + verifySelectCurrentWord(textPunctOther, 1, 3, 0, 3); + + // (R) part of the selection + verifySelectCurrentWord(textSymbolOther, 2, 7, 0, 7); + verifySelectCurrentWord(textSymbolOther, 2, 8, 0, 8); + } +} diff --git a/graphics/java/android/graphics/Shader.java b/graphics/java/android/graphics/Shader.java index 0400b5c..3acf1ea 100644 --- a/graphics/java/android/graphics/Shader.java +++ b/graphics/java/android/graphics/Shader.java @@ -34,6 +34,8 @@ public class Shader { */ public int native_shader; + private Matrix mLocalMatrix; + public enum TileMode { /** * replicate the edge color if the shader draws outside of its @@ -62,7 +64,11 @@ public class Shader { * @return true if the shader has a non-identity local matrix */ public boolean getLocalMatrix(Matrix localM) { - return nativeGetLocalMatrix(native_instance, localM.native_instance); + if (mLocalMatrix != null) { + localM.set(mLocalMatrix); + return true; + } + return false; } /** @@ -71,6 +77,7 @@ public class Shader { * @param localM The shader's new local matrix, or null to specify identity */ public void setLocalMatrix(Matrix localM) { + mLocalMatrix = localM; nativeSetLocalMatrix(native_instance, native_shader, localM == null ? 0 : localM.native_instance); } @@ -84,8 +91,6 @@ public class Shader { } private static native void nativeDestructor(int native_shader, int native_skiaShader); - private static native boolean nativeGetLocalMatrix(int native_shader, - int matrix_instance); private static native void nativeSetLocalMatrix(int native_shader, int native_skiaShader, int matrix_instance); } diff --git a/graphics/java/android/renderscript/Allocation.java b/graphics/java/android/renderscript/Allocation.java index 311326a..a4ce947 100644 --- a/graphics/java/android/renderscript/Allocation.java +++ b/graphics/java/android/renderscript/Allocation.java @@ -27,7 +27,19 @@ import android.util.Log; import android.util.TypedValue; /** - * @hide + * Memory allocation class for renderscript. An allocation combines a Type with + * memory to provide storage for user data and objects. + * + * Allocations may exist in one or more memory spaces. Currently those are + * Script: accessable by RS scripts. + * Graphics Texture: accessable as a graphics texture. + * Graphics Vertex: accessable as graphical vertex data. + * Graphics Constants: Accessable as constants in user shaders + * + * By default java side updates are always applied to the script accessable + * memory. If this is not present they are then applied to the various HW + * memory types. A syncAll call is necessary after the script data is update to + * keep the other memory spaces in sync. * **/ public class Allocation extends BaseObj { diff --git a/graphics/java/android/renderscript/BaseObj.java b/graphics/java/android/renderscript/BaseObj.java index 05f1bec..669beac 100644 --- a/graphics/java/android/renderscript/BaseObj.java +++ b/graphics/java/android/renderscript/BaseObj.java @@ -19,8 +19,6 @@ package android.renderscript; import android.util.Log; /** - * @hide - * * BaseObj is the base class for interfacing with native renderscript objects. * It primarly contains code for tracking the native object ID and forcably * disconecting the object from the native allocation for early cleanup. diff --git a/graphics/java/android/renderscript/Byte2.java b/graphics/java/android/renderscript/Byte2.java index 95cf88c..6d2994d 100644 --- a/graphics/java/android/renderscript/Byte2.java +++ b/graphics/java/android/renderscript/Byte2.java @@ -21,7 +21,7 @@ import android.util.Log; /** - * @hide + * Class for exposing the rs byte2 type back to java applications. * **/ public class Byte2 { diff --git a/graphics/java/android/renderscript/Byte3.java b/graphics/java/android/renderscript/Byte3.java index a6c0ca9..dd73914 100644 --- a/graphics/java/android/renderscript/Byte3.java +++ b/graphics/java/android/renderscript/Byte3.java @@ -21,7 +21,7 @@ import android.util.Log; /** - * @hide + * Class for exposing the rs byte3 type back to java applications. * **/ public class Byte3 { diff --git a/graphics/java/android/renderscript/Byte4.java b/graphics/java/android/renderscript/Byte4.java index a5bfc61..ebea589 100644 --- a/graphics/java/android/renderscript/Byte4.java +++ b/graphics/java/android/renderscript/Byte4.java @@ -21,7 +21,7 @@ import android.util.Log; /** - * @hide + * Class for exposing the rs byte4 type back to java applications. * **/ public class Byte4 { diff --git a/graphics/java/android/renderscript/Dimension.java b/graphics/java/android/renderscript/Dimension.java deleted file mode 100644 index f29057d..0000000 --- a/graphics/java/android/renderscript/Dimension.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2008 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package android.renderscript; - -/** - * @hide - **/ -public enum Dimension { - X (0), - Y (1), - Z (2), - LOD (3), - FACE (4), - ARRAY_0 (100); - - int mID; - Dimension(int id) { - mID = id; - } -} - diff --git a/graphics/java/android/renderscript/Element.java b/graphics/java/android/renderscript/Element.java index 7616316..e07fdfb 100644 --- a/graphics/java/android/renderscript/Element.java +++ b/graphics/java/android/renderscript/Element.java @@ -20,8 +20,6 @@ import java.lang.reflect.Field; import android.util.Log; /** - * @hide - * * Element is the basic data type of RenderScript. An element can be of 2 * forms. Basic elements contain a single component of data. This can be of * any of the legal RS types. Examples of basic element types. diff --git a/graphics/java/android/renderscript/FieldPacker.java b/graphics/java/android/renderscript/FieldPacker.java index 2a585fd..2fb3d95 100644 --- a/graphics/java/android/renderscript/FieldPacker.java +++ b/graphics/java/android/renderscript/FieldPacker.java @@ -18,7 +18,8 @@ package android.renderscript; /** - * @hide + * Utility class for packing arguments and structures from java objects to rs + * objects. * **/ public class FieldPacker { diff --git a/graphics/java/android/renderscript/Float2.java b/graphics/java/android/renderscript/Float2.java index 889bf7b..0a099f1 100644 --- a/graphics/java/android/renderscript/Float2.java +++ b/graphics/java/android/renderscript/Float2.java @@ -21,7 +21,7 @@ import android.util.Log; /** - * @hide + * Class for exposing the rs float2 type back to java applications. * **/ public class Float2 { diff --git a/graphics/java/android/renderscript/Float3.java b/graphics/java/android/renderscript/Float3.java index ebe140d..2ffa326 100644 --- a/graphics/java/android/renderscript/Float3.java +++ b/graphics/java/android/renderscript/Float3.java @@ -21,7 +21,7 @@ import android.util.Log; /** - * @hide + * Class for exposing the rs float3 type back to java applications. * **/ public class Float3 { diff --git a/graphics/java/android/renderscript/Float4.java b/graphics/java/android/renderscript/Float4.java index 847732f..19d91dc 100644 --- a/graphics/java/android/renderscript/Float4.java +++ b/graphics/java/android/renderscript/Float4.java @@ -21,7 +21,7 @@ import android.util.Log; /** - * @hide + * Class for exposing the rs float4 type back to java applications. * **/ public class Float4 { diff --git a/graphics/java/android/renderscript/Int2.java b/graphics/java/android/renderscript/Int2.java index 56e2fe9..8eceb71 100644 --- a/graphics/java/android/renderscript/Int2.java +++ b/graphics/java/android/renderscript/Int2.java @@ -21,7 +21,7 @@ import android.util.Log; /** - * @hide + * Class for exposing the rs int2 type back to java applications. * **/ public class Int2 { diff --git a/graphics/java/android/renderscript/Int3.java b/graphics/java/android/renderscript/Int3.java index 1b27509..bbd296e 100644 --- a/graphics/java/android/renderscript/Int3.java +++ b/graphics/java/android/renderscript/Int3.java @@ -21,7 +21,7 @@ import android.util.Log; /** - * @hide + * Class for exposing the rs int3 type back to java applications. * **/ public class Int3 { diff --git a/graphics/java/android/renderscript/Int4.java b/graphics/java/android/renderscript/Int4.java index 3d6f3f5..c3ae112c 100644 --- a/graphics/java/android/renderscript/Int4.java +++ b/graphics/java/android/renderscript/Int4.java @@ -21,7 +21,7 @@ import android.util.Log; /** - * @hide + * Class for exposing the rs int4 type back to java applications. * **/ public class Int4 { diff --git a/graphics/java/android/renderscript/Matrix2f.java b/graphics/java/android/renderscript/Matrix2f.java index 6aa7d1b..2fffe8c 100644 --- a/graphics/java/android/renderscript/Matrix2f.java +++ b/graphics/java/android/renderscript/Matrix2f.java @@ -21,7 +21,7 @@ import android.util.Log; /** - * @hide + * Class for exposing the rs_matrix2x2 type back to java applications. * **/ public class Matrix2f { diff --git a/graphics/java/android/renderscript/Matrix3f.java b/graphics/java/android/renderscript/Matrix3f.java index 2d227a5..e4c5e00 100644 --- a/graphics/java/android/renderscript/Matrix3f.java +++ b/graphics/java/android/renderscript/Matrix3f.java @@ -21,7 +21,7 @@ import android.util.Log; /** - * @hide + * Class for exposing the rs_matrix3x3 type back to java applications. * **/ public class Matrix3f { diff --git a/graphics/java/android/renderscript/Matrix4f.java b/graphics/java/android/renderscript/Matrix4f.java index 144a9a3..ec07cd5 100644 --- a/graphics/java/android/renderscript/Matrix4f.java +++ b/graphics/java/android/renderscript/Matrix4f.java @@ -21,7 +21,7 @@ import android.util.Log; /** - * @hide + * Class for exposing the rs_matrix4x4 type back to java applications. * **/ public class Matrix4f { diff --git a/graphics/java/android/renderscript/Program.java b/graphics/java/android/renderscript/Program.java index a9eaec3..b07ae7d 100644 --- a/graphics/java/android/renderscript/Program.java +++ b/graphics/java/android/renderscript/Program.java @@ -27,7 +27,6 @@ import android.util.Log; /** - * @hide * **/ public class Program extends BaseObj { diff --git a/graphics/java/android/renderscript/ProgramFragment.java b/graphics/java/android/renderscript/ProgramFragment.java index 59d4967..7f12661 100644 --- a/graphics/java/android/renderscript/ProgramFragment.java +++ b/graphics/java/android/renderscript/ProgramFragment.java @@ -22,7 +22,6 @@ import android.util.Log; /** - * @hide * **/ public class ProgramFragment extends Program { diff --git a/graphics/java/android/renderscript/ProgramFragmentFixedFunction.java b/graphics/java/android/renderscript/ProgramFragmentFixedFunction.java index d011219..f0040c6 100644 --- a/graphics/java/android/renderscript/ProgramFragmentFixedFunction.java +++ b/graphics/java/android/renderscript/ProgramFragmentFixedFunction.java @@ -22,7 +22,6 @@ import android.util.Log; /** - * @hide * **/ public class ProgramFragmentFixedFunction extends ProgramFragment { diff --git a/graphics/java/android/renderscript/ProgramRaster.java b/graphics/java/android/renderscript/ProgramRaster.java index 3bdd71d..71c527d 100644 --- a/graphics/java/android/renderscript/ProgramRaster.java +++ b/graphics/java/android/renderscript/ProgramRaster.java @@ -22,7 +22,6 @@ import android.util.Log; /** - * @hide * **/ public class ProgramRaster extends BaseObj { diff --git a/graphics/java/android/renderscript/ProgramStore.java b/graphics/java/android/renderscript/ProgramStore.java index 2d2b162..0e2227e 100644 --- a/graphics/java/android/renderscript/ProgramStore.java +++ b/graphics/java/android/renderscript/ProgramStore.java @@ -22,7 +22,6 @@ import android.util.Log; /** - * @hide * **/ public class ProgramStore extends BaseObj { diff --git a/graphics/java/android/renderscript/ProgramVertex.java b/graphics/java/android/renderscript/ProgramVertex.java index 954ac9a..13800ff 100644 --- a/graphics/java/android/renderscript/ProgramVertex.java +++ b/graphics/java/android/renderscript/ProgramVertex.java @@ -23,7 +23,6 @@ import android.util.Log; /** - * @hide * **/ public class ProgramVertex extends Program { diff --git a/graphics/java/android/renderscript/ProgramVertexFixedFunction.java b/graphics/java/android/renderscript/ProgramVertexFixedFunction.java index 2240dd7..1b69efe 100644 --- a/graphics/java/android/renderscript/ProgramVertexFixedFunction.java +++ b/graphics/java/android/renderscript/ProgramVertexFixedFunction.java @@ -23,7 +23,6 @@ import android.util.Log; /** - * @hide * **/ public class ProgramVertexFixedFunction extends ProgramVertex { diff --git a/graphics/java/android/renderscript/RenderScript.java b/graphics/java/android/renderscript/RenderScript.java index f11b1ab..6a52810 100644 --- a/graphics/java/android/renderscript/RenderScript.java +++ b/graphics/java/android/renderscript/RenderScript.java @@ -27,8 +27,6 @@ import android.view.Surface; /** - * @hide - * * RenderScript base master class. An instance of this class creates native * worker threads for processing commands from this object. This base class * does not provide any extended capabilities beyond simple data processing. diff --git a/graphics/java/android/renderscript/RenderScriptGL.java b/graphics/java/android/renderscript/RenderScriptGL.java index 5adb682..58cc739 100644 --- a/graphics/java/android/renderscript/RenderScriptGL.java +++ b/graphics/java/android/renderscript/RenderScriptGL.java @@ -29,8 +29,6 @@ import android.view.SurfaceHolder; import android.view.SurfaceView; /** - * @hide - * * The Graphics derivitive of RenderScript. Extends the basic context to add a * root script which is the display window for graphical output. When the * system needs to update the display the currently bound root script will be @@ -152,19 +150,6 @@ public class RenderScriptGL extends RenderScript { }; SurfaceConfig mSurfaceConfig; -/* - // Keep? - public void configureSurface(SurfaceHolder sh) { - if (mSurfaceConfig.mAlphaMin > 1) { - sh.setFormat(PixelFormat.RGBA_8888); - } else { - sh.setFormat(PixelFormat.RGBX_8888); - } - } - - public void checkSurface(SurfaceHolder sh) { - } -*/ /** * Construct a new RenderScriptGL context. diff --git a/graphics/java/android/renderscript/Sampler.java b/graphics/java/android/renderscript/Sampler.java index 6faa206..57a9889 100644 --- a/graphics/java/android/renderscript/Sampler.java +++ b/graphics/java/android/renderscript/Sampler.java @@ -29,8 +29,6 @@ import android.graphics.Bitmap; import android.graphics.BitmapFactory; /** - * @hide - * * Sampler object which defines how data is extracted from textures. Samplers * are attached to Program objects (currently only fragment) when those objects * need to access texture data. diff --git a/graphics/java/android/renderscript/Script.java b/graphics/java/android/renderscript/Script.java index aaf5475..ddf41cb 100644 --- a/graphics/java/android/renderscript/Script.java +++ b/graphics/java/android/renderscript/Script.java @@ -17,7 +17,7 @@ package android.renderscript; /** - * @hide + * **/ public class Script extends BaseObj { public static final int MAX_SLOT = 16; diff --git a/graphics/java/android/renderscript/ScriptC.java b/graphics/java/android/renderscript/ScriptC.java index c1e4358..984edd3 100644 --- a/graphics/java/android/renderscript/ScriptC.java +++ b/graphics/java/android/renderscript/ScriptC.java @@ -30,7 +30,7 @@ import java.lang.reflect.Field; import java.lang.reflect.Modifier; /** - * @hide + * **/ public class ScriptC extends Script { private static final String TAG = "ScriptC"; diff --git a/graphics/java/android/renderscript/Short2.java b/graphics/java/android/renderscript/Short2.java index 426801f..82d897e 100644 --- a/graphics/java/android/renderscript/Short2.java +++ b/graphics/java/android/renderscript/Short2.java @@ -21,7 +21,7 @@ import android.util.Log; /** - * @hide + * Class for exposing the rs short2 type back to java applications. * **/ public class Short2 { diff --git a/graphics/java/android/renderscript/Short3.java b/graphics/java/android/renderscript/Short3.java index 7b9c305..00da574 100644 --- a/graphics/java/android/renderscript/Short3.java +++ b/graphics/java/android/renderscript/Short3.java @@ -21,7 +21,7 @@ import android.util.Log; /** - * @hide + * Class for exposing the rs short3 type back to java applications. * **/ public class Short3 { diff --git a/graphics/java/android/renderscript/Short4.java b/graphics/java/android/renderscript/Short4.java index 9a474e2..450258d 100644 --- a/graphics/java/android/renderscript/Short4.java +++ b/graphics/java/android/renderscript/Short4.java @@ -21,7 +21,7 @@ import android.util.Log; /** - * @hide + * Class for exposing the rs short4 type back to java applications. * **/ public class Short4 { diff --git a/graphics/java/android/renderscript/Type.java b/graphics/java/android/renderscript/Type.java index d98842a..bec76d0 100644 --- a/graphics/java/android/renderscript/Type.java +++ b/graphics/java/android/renderscript/Type.java @@ -21,8 +21,6 @@ import java.lang.reflect.Field; import android.util.Log; /** - * @hide - * * Type is an allocation template. It consists of an Element and one or more * dimensions. It describes only the layout of memory but does not allocate and * storage for the data thus described. @@ -216,7 +214,6 @@ public class Type extends BaseObj { * Add a dimension to the Type. * * - * @param d * @param value */ public Builder setX(int value) { diff --git a/include/media/mediaplayer.h b/include/media/mediaplayer.h index 88b0c3e..178f0db 100644 --- a/include/media/mediaplayer.h +++ b/include/media/mediaplayer.h @@ -36,6 +36,7 @@ enum media_event_type { MEDIA_BUFFERING_UPDATE = 3, MEDIA_SEEK_COMPLETE = 4, MEDIA_SET_VIDEO_SIZE = 5, + MEDIA_RESET_COMPLETE = 6, // not visible on java side MEDIA_ERROR = 100, MEDIA_INFO = 200, }; diff --git a/include/ui/DisplayInfo.h b/include/ui/DisplayInfo.h index c419efe..edd28a6 100644 --- a/include/ui/DisplayInfo.h +++ b/include/ui/DisplayInfo.h @@ -37,6 +37,15 @@ struct DisplayInfo { float ydpi; }; +/* Display orientations as defined in Surface.java and ISurfaceComposer.h. */ +enum { + DISPLAY_ORIENTATION_0 = 0, + DISPLAY_ORIENTATION_90 = 1, + DISPLAY_ORIENTATION_180 = 2, + DISPLAY_ORIENTATION_270 = 3 +}; + + }; // namespace android #endif // ANDROID_COMPOSER_DISPLAY_INFO_H diff --git a/libs/camera/Camera.cpp b/libs/camera/Camera.cpp index 450971d..ab626ad 100644 --- a/libs/camera/Camera.cpp +++ b/libs/camera/Camera.cpp @@ -80,8 +80,9 @@ sp<Camera> Camera::create(const sp<ICamera>& camera) c->mStatus = NO_ERROR; c->mCamera = camera; camera->asBinder()->linkToDeath(c); + return c; } - return c; + return 0; } void Camera::init() diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp index 22c73fe..c437d72 100644 --- a/libs/rs/rsContext.cpp +++ b/libs/rs/rsContext.cpp @@ -535,6 +535,7 @@ void Context::destroyWorkerThreadResources() { mStateFragment.deinit(this); mStateFragmentStore.deinit(this); mStateFont.deinit(this); + mShaderCache.cleanupAll(); } ObjectBase::zeroAllUserRef(this); LOGV("destroyWorkerThreadResources 2"); diff --git a/libs/rs/rsShaderCache.cpp b/libs/rs/rsShaderCache.cpp index 45384c9..b958021 100644 --- a/libs/rs/rsShaderCache.cpp +++ b/libs/rs/rsShaderCache.cpp @@ -32,10 +32,7 @@ ShaderCache::ShaderCache() { } ShaderCache::~ShaderCache() { - for (uint32_t ct=0; ct < mEntries.size(); ct++) { - glDeleteProgram(mEntries[ct]->program); - free(mEntries[ct]); - } + cleanupAll(); } void ShaderCache::updateUniformArrayData(Context *rsc, Program *prog, uint32_t linkedID, @@ -251,5 +248,10 @@ void ShaderCache::cleanupFragment(uint32_t id) { } void ShaderCache::cleanupAll() { + for (uint32_t ct=0; ct < mEntries.size(); ct++) { + glDeleteProgram(mEntries[ct]->program); + free(mEntries[ct]); + } + mEntries.clear(); } diff --git a/libs/ui/Android.mk b/libs/ui/Android.mk index 4ba8b5b..0d55f08 100644 --- a/libs/ui/Android.mk +++ b/libs/ui/Android.mk @@ -43,16 +43,12 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES:= \ $(commonSources) \ EGLUtils.cpp \ - EventHub.cpp \ EventRecurrence.cpp \ FramebufferNativeWindow.cpp \ GraphicBuffer.cpp \ GraphicBufferAllocator.cpp \ GraphicBufferMapper.cpp \ GraphicLog.cpp \ - InputDispatcher.cpp \ - InputManager.cpp \ - InputReader.cpp \ InputTransport.cpp \ PixelFormat.cpp \ Rect.cpp \ diff --git a/libs/ui/tests/Android.mk b/libs/ui/tests/Android.mk index aa017b9..580d73c 100644 --- a/libs/ui/tests/Android.mk +++ b/libs/ui/tests/Android.mk @@ -7,8 +7,6 @@ ifneq ($(TARGET_SIMULATOR),true) # Build the unit tests. test_src_files := \ InputChannel_test.cpp \ - InputReader_test.cpp \ - InputDispatcher_test.cpp \ InputPublisherAndConsumer_test.cpp shared_libraries := \ diff --git a/media/java/android/media/MediaMetadataRetriever.java b/media/java/android/media/MediaMetadataRetriever.java index a3c3f09..6209dc0 100644 --- a/media/java/android/media/MediaMetadataRetriever.java +++ b/media/java/android/media/MediaMetadataRetriever.java @@ -42,6 +42,8 @@ public class MediaMetadataRetriever @SuppressWarnings("unused") private int mNativeContext; + private static final int EMBEDDED_PICTURE_TYPE_ANY = 0xFFFF; + public MediaMetadataRetriever() { native_setup(); } @@ -272,7 +274,11 @@ public class MediaMetadataRetriever * * @return null if no such graphic is found. */ - public native byte[] extractAlbumArt(); + public byte[] getEmbeddedPicture() { + return getEmbeddedPicture(EMBEDDED_PICTURE_TYPE_ANY); + } + + private native byte[] getEmbeddedPicture(int pictureType); /** * Call it when one is done with the object. This method releases the memory diff --git a/media/jni/android_media_MediaMetadataRetriever.cpp b/media/jni/android_media_MediaMetadataRetriever.cpp index 4ccdd9a..05623ec 100644 --- a/media/jni/android_media_MediaMetadataRetriever.cpp +++ b/media/jni/android_media_MediaMetadataRetriever.cpp @@ -289,21 +289,26 @@ static jobject android_media_MediaMetadataRetriever_getFrameAtTime(JNIEnv *env, return jBitmap; } -static jbyteArray android_media_MediaMetadataRetriever_extractAlbumArt(JNIEnv *env, jobject thiz) +static jbyteArray android_media_MediaMetadataRetriever_getEmbeddedPicture( + JNIEnv *env, jobject thiz, jint pictureType) { - LOGV("extractAlbumArt"); + LOGV("getEmbeddedPicture: %d", pictureType); MediaMetadataRetriever* retriever = getRetriever(env, thiz); if (retriever == 0) { jniThrowException(env, "java/lang/IllegalStateException", "No retriever available"); return NULL; } MediaAlbumArt* mediaAlbumArt = NULL; + + // FIXME: + // Use pictureType to retrieve the intended embedded picture and also change + // the method name to getEmbeddedPicture(). sp<IMemory> albumArtMemory = retriever->extractAlbumArt(); if (albumArtMemory != 0) { // cast the shared structure to a MediaAlbumArt object mediaAlbumArt = static_cast<MediaAlbumArt *>(albumArtMemory->pointer()); } if (mediaAlbumArt == NULL) { - LOGE("extractAlbumArt: Call to extractAlbumArt failed."); + LOGE("getEmbeddedPicture: Call to getEmbeddedPicture failed."); return NULL; } @@ -311,7 +316,7 @@ static jbyteArray android_media_MediaMetadataRetriever_extractAlbumArt(JNIEnv *e char* data = (char*) mediaAlbumArt + sizeof(MediaAlbumArt); jbyteArray array = env->NewByteArray(len); if (!array) { // OutOfMemoryError exception has already been thrown. - LOGE("extractAlbumArt: OutOfMemoryError is thrown."); + LOGE("getEmbeddedPicture: OutOfMemoryError is thrown."); } else { jbyte* bytes = env->GetByteArrayElements(array, NULL); if (bytes != NULL) { @@ -445,7 +450,7 @@ static JNINativeMethod nativeMethods[] = { {"setMode", "(I)V", (void *)android_media_MediaMetadataRetriever_setMode}, {"_getFrameAtTime", "(JI)Landroid/graphics/Bitmap;", (void *)android_media_MediaMetadataRetriever_getFrameAtTime}, {"extractMetadata", "(I)Ljava/lang/String;", (void *)android_media_MediaMetadataRetriever_extractMetadata}, - {"extractAlbumArt", "()[B", (void *)android_media_MediaMetadataRetriever_extractAlbumArt}, + {"getEmbeddedPicture", "(I)[B", (void *)android_media_MediaMetadataRetriever_getEmbeddedPicture}, {"release", "()V", (void *)android_media_MediaMetadataRetriever_release}, {"native_finalize", "()V", (void *)android_media_MediaMetadataRetriever_native_finalize}, {"native_setup", "()V", (void *)android_media_MediaMetadataRetriever_native_setup}, diff --git a/media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp b/media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp index c656e69..29e4971 100644 --- a/media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp +++ b/media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp @@ -87,7 +87,7 @@ bool NuPlayer::HTTPLiveSource::feedMoreTSData() { break; } else if (n < 0) { LOGI("input data EOS reached."); - mTSParser->signalEOS(ERROR_END_OF_STREAM); + mTSParser->signalEOS(n); mEOS = true; break; } else { diff --git a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp index 24efa35..9a8cff3 100644 --- a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp +++ b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp @@ -45,8 +45,11 @@ NuPlayer::NuPlayer() : mAudioEOS(false), mVideoEOS(false), mScanSourcesPending(false), + mScanSourcesGeneration(0), mFlushingAudio(NONE), - mFlushingVideo(NONE) { + mFlushingVideo(NONE), + mResetInProgress(false), + mResetPostponed(false) { } NuPlayer::~NuPlayer() { @@ -87,18 +90,22 @@ void NuPlayer::start() { (new AMessage(kWhatStart, id()))->post(); } +void NuPlayer::resetAsync() { + (new AMessage(kWhatReset, id()))->post(); +} + // static -bool NuPlayer::IsFlushingState(FlushStatus state, bool *formatChange) { +bool NuPlayer::IsFlushingState(FlushStatus state, bool *needShutdown) { switch (state) { case FLUSHING_DECODER: - if (formatChange != NULL) { - *formatChange = false; + if (needShutdown != NULL) { + *needShutdown = false; } return true; - case FLUSHING_DECODER_FORMATCHANGE: - if (formatChange != NULL) { - *formatChange = true; + case FLUSHING_DECODER_SHUTDOWN: + if (needShutdown != NULL) { + *needShutdown = true; } return true; @@ -111,7 +118,7 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { switch (msg->what()) { case kWhatSetDataSource: { - LOGI("kWhatSetDataSource"); + LOGV("kWhatSetDataSource"); CHECK(mSource == NULL); @@ -124,7 +131,7 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { case kWhatSetVideoSurface: { - LOGI("kWhatSetVideoSurface"); + LOGV("kWhatSetVideoSurface"); sp<RefBase> obj; CHECK(msg->findObject("surface", &obj)); @@ -135,7 +142,7 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { case kWhatSetAudioSink: { - LOGI("kWhatSetAudioSink"); + LOGV("kWhatSetAudioSink"); sp<RefBase> obj; CHECK(msg->findObject("sink", &obj)); @@ -146,6 +153,9 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { case kWhatStart: { + mAudioEOS = false; + mVideoEOS = false; + mSource->start(); mRenderer = new Renderer( @@ -154,13 +164,19 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { looper()->registerHandler(mRenderer); - (new AMessage(kWhatScanSources, id()))->post(); - mScanSourcesPending = true; + postScanSources(); break; } case kWhatScanSources: { + int32_t generation; + CHECK(msg->findInt32("generation", &generation)); + if (generation != mScanSourcesGeneration) { + // Drop obsolete msg. + break; + } + mScanSourcesPending = false; instantiateDecoder(false, &mVideoDecoder); @@ -170,6 +186,11 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { } if (!mSource->feedMoreTSData()) { + if (mAudioDecoder == NULL && mVideoDecoder == NULL) { + // We're not currently decoding anything (no audio or + // video tracks found) and we just ran out of input data. + notifyListener(MEDIA_PLAYBACK_COMPLETE, 0, 0); + } break; } @@ -203,20 +224,20 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { } else if (what == ACodec::kWhatEOS) { mRenderer->queueEOS(audio, ERROR_END_OF_STREAM); } else if (what == ACodec::kWhatFlushCompleted) { - bool formatChange; + bool needShutdown; if (audio) { - CHECK(IsFlushingState(mFlushingAudio, &formatChange)); + CHECK(IsFlushingState(mFlushingAudio, &needShutdown)); mFlushingAudio = FLUSHED; } else { - CHECK(IsFlushingState(mFlushingVideo, &formatChange)); + CHECK(IsFlushingState(mFlushingVideo, &needShutdown)); mFlushingVideo = FLUSHED; } - LOGI("decoder %s flush completed", audio ? "audio" : "video"); + LOGV("decoder %s flush completed", audio ? "audio" : "video"); - if (formatChange) { - LOGI("initiating %s decoder shutdown", + if (needShutdown) { + LOGV("initiating %s decoder shutdown", audio ? "audio" : "video"); (audio ? mAudioDecoder : mVideoDecoder)->initiateShutdown(); @@ -238,7 +259,7 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { int32_t sampleRate; CHECK(codecRequest->findInt32("sample-rate", &sampleRate)); - LOGI("Audio output format changed to %d Hz, %d channels", + LOGV("Audio output format changed to %d Hz, %d channels", sampleRate, numChannels); mAudioSink->close(); @@ -247,7 +268,7 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { mRenderer->signalAudioSinkChanged(); } else if (what == ACodec::kWhatShutdownCompleted) { - LOGI("%s shutdown completed", audio ? "audio" : "video"); + LOGV("%s shutdown completed", audio ? "audio" : "video"); if (audio) { mAudioDecoder.clear(); @@ -285,7 +306,7 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { mVideoEOS = true; } - LOGI("reached %s EOS", audio ? "audio" : "video"); + LOGV("reached %s EOS", audio ? "audio" : "video"); if ((mAudioEOS || mAudioDecoder == NULL) && (mVideoEOS || mVideoDecoder == NULL)) { @@ -297,7 +318,7 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { int32_t audio; CHECK(msg->findInt32("audio", &audio)); - LOGI("renderer %s flush completed.", audio ? "audio" : "video"); + LOGV("renderer %s flush completed.", audio ? "audio" : "video"); } break; } @@ -307,6 +328,37 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { break; } + case kWhatReset: + { + LOGV("kWhatReset"); + + if (mFlushingAudio != NONE || mFlushingVideo != NONE) { + // We're currently flushing, postpone the reset until that's + // completed. + + LOGV("postponing reset"); + + mResetPostponed = true; + break; + } + + if (mAudioDecoder == NULL && mVideoDecoder == NULL) { + finishReset(); + break; + } + + if (mAudioDecoder != NULL) { + flushDecoder(true /* audio */, true /* needShutdown */); + } + + if (mVideoDecoder != NULL) { + flushDecoder(false /* audio */, true /* needShutdown */); + } + + mResetInProgress = true; + break; + } + default: TRESPASS(); break; @@ -322,7 +374,7 @@ void NuPlayer::finishFlushIfPossible() { return; } - LOGI("both audio and video are flushed now."); + LOGV("both audio and video are flushed now."); mRenderer->signalTimeDiscontinuity(); @@ -343,10 +395,39 @@ void NuPlayer::finishFlushIfPossible() { mFlushingAudio = NONE; mFlushingVideo = NONE; - if (scanSourcesAgain && !mScanSourcesPending) { - mScanSourcesPending = true; - (new AMessage(kWhatScanSources, id()))->post(); + if (mResetInProgress) { + LOGV("reset completed"); + + mResetInProgress = false; + finishReset(); + } else if (mResetPostponed) { + (new AMessage(kWhatReset, id()))->post(); + mResetPostponed = false; + } else if (scanSourcesAgain) { + postScanSources(); + } +} + +void NuPlayer::finishReset() { + CHECK(mAudioDecoder == NULL); + CHECK(mVideoDecoder == NULL); + + mRenderer.clear(); + mSource.clear(); + + notifyListener(MEDIA_RESET_COMPLETE, 0, 0); +} + +void NuPlayer::postScanSources() { + if (mScanSourcesPending) { + return; } + + sp<AMessage> msg = new AMessage(kWhatScanSources, id()); + msg->setInt32("generation", mScanSourcesGeneration); + msg->post(); + + mScanSourcesPending = true; } status_t NuPlayer::instantiateDecoder(bool audio, sp<Decoder> *decoder) { @@ -396,37 +477,10 @@ status_t NuPlayer::feedDecoderInputData(bool audio, const sp<AMessage> &msg) { bool formatChange = type == ATSParser::DISCONTINUITY_FORMATCHANGE; - LOGI("%s discontinuity (formatChange=%d)", + LOGV("%s discontinuity (formatChange=%d)", audio ? "audio" : "video", formatChange); - (audio ? mAudioDecoder : mVideoDecoder)->signalFlush(); - mRenderer->flush(audio); - - if (audio) { - CHECK(mFlushingAudio == NONE - || mFlushingAudio == AWAITING_DISCONTINUITY); - - mFlushingAudio = formatChange - ? FLUSHING_DECODER_FORMATCHANGE : FLUSHING_DECODER; - - if (mFlushingVideo == NONE) { - mFlushingVideo = (mVideoDecoder != NULL) - ? AWAITING_DISCONTINUITY - : FLUSHED; - } - } else { - CHECK(mFlushingVideo == NONE - || mFlushingVideo == AWAITING_DISCONTINUITY); - - mFlushingVideo = formatChange - ? FLUSHING_DECODER_FORMATCHANGE : FLUSHING_DECODER; - - if (mFlushingAudio == NONE) { - mFlushingAudio = (mAudioDecoder != NULL) - ? AWAITING_DISCONTINUITY - : FLUSHED; - } - } + flushDecoder(audio, formatChange); } reply->setInt32("err", err); @@ -439,7 +493,7 @@ status_t NuPlayer::feedDecoderInputData(bool audio, const sp<AMessage> &msg) { #if 0 int64_t mediaTimeUs; CHECK(accessUnit->meta()->findInt64("timeUs", &mediaTimeUs)); - LOGI("feeding %s input buffer at media time %.2f secs", + LOGV("feeding %s input buffer at media time %.2f secs", audio ? "audio" : "video", mediaTimeUs / 1E6); #endif @@ -478,4 +532,39 @@ void NuPlayer::notifyListener(int msg, int ext1, int ext2) { listener->sendEvent(msg, ext1, ext2); } +void NuPlayer::flushDecoder(bool audio, bool needShutdown) { + // Make sure we don't continue to scan sources until we finish flushing. + ++mScanSourcesGeneration; + + (audio ? mAudioDecoder : mVideoDecoder)->signalFlush(); + mRenderer->flush(audio); + + FlushStatus newStatus = + needShutdown ? FLUSHING_DECODER_SHUTDOWN : FLUSHING_DECODER; + + if (audio) { + CHECK(mFlushingAudio == NONE + || mFlushingAudio == AWAITING_DISCONTINUITY); + + mFlushingAudio = newStatus; + + if (mFlushingVideo == NONE) { + mFlushingVideo = (mVideoDecoder != NULL) + ? AWAITING_DISCONTINUITY + : FLUSHED; + } + } else { + CHECK(mFlushingVideo == NONE + || mFlushingVideo == AWAITING_DISCONTINUITY); + + mFlushingVideo = newStatus; + + if (mFlushingAudio == NONE) { + mFlushingAudio = (mAudioDecoder != NULL) + ? AWAITING_DISCONTINUITY + : FLUSHED; + } + } +} + } // namespace android diff --git a/media/libmediaplayerservice/nuplayer/NuPlayer.h b/media/libmediaplayerservice/nuplayer/NuPlayer.h index 172a962..1cf2f60 100644 --- a/media/libmediaplayerservice/nuplayer/NuPlayer.h +++ b/media/libmediaplayerservice/nuplayer/NuPlayer.h @@ -40,6 +40,10 @@ struct NuPlayer : public AHandler { void setAudioSink(const sp<MediaPlayerBase::AudioSink> &sink); void start(); + // Will notify the listener that reset() has completed + // with code MEDIA_RESET_COMPLETE. + void resetAsync(); + protected: virtual ~NuPlayer(); @@ -63,6 +67,7 @@ private: kWhatVideoNotify, kWhatAudioNotify, kWhatRendererNotify, + kWhatReset, }; wp<MediaPlayerBase> mListener; @@ -73,17 +78,17 @@ private: sp<Decoder> mAudioDecoder; sp<Renderer> mRenderer; - bool mEOS; bool mAudioEOS; bool mVideoEOS; bool mScanSourcesPending; + int32_t mScanSourcesGeneration; enum FlushStatus { NONE, AWAITING_DISCONTINUITY, FLUSHING_DECODER, - FLUSHING_DECODER_FORMATCHANGE, + FLUSHING_DECODER_SHUTDOWN, SHUTTING_DOWN_DECODER, FLUSHED, SHUT_DOWN, @@ -91,6 +96,8 @@ private: FlushStatus mFlushingAudio; FlushStatus mFlushingVideo; + bool mResetInProgress; + bool mResetPostponed; status_t instantiateDecoder(bool audio, sp<Decoder> *decoder); @@ -101,7 +108,12 @@ private: void finishFlushIfPossible(); - static bool IsFlushingState(FlushStatus state, bool *formatChange = NULL); + void flushDecoder(bool audio, bool needShutdown); + + static bool IsFlushingState(FlushStatus state, bool *needShutdown = NULL); + + void finishReset(); + void postScanSources(); DISALLOW_EVIL_CONSTRUCTORS(NuPlayer); }; diff --git a/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp b/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp index d21d4ff..4988d24 100644 --- a/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp +++ b/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp @@ -22,12 +22,14 @@ #include "NuPlayer.h" +#include <media/stagefright/foundation/ADebug.h> #include <media/stagefright/foundation/ALooper.h> namespace android { NuPlayerDriver::NuPlayerDriver() - : mLooper(new ALooper), + : mResetInProgress(false), + mLooper(new ALooper), mPlayer(false) { mLooper->setName("NuPlayerDriver Looper"); @@ -121,6 +123,15 @@ status_t NuPlayerDriver::getDuration(int *msec) { } status_t NuPlayerDriver::reset() { + Mutex::Autolock autoLock(mLock); + mResetInProgress = true; + + mPlayer->resetAsync(); + + while (mResetInProgress) { + mCondition.wait(mLock); + } + return OK; } @@ -145,4 +156,16 @@ status_t NuPlayerDriver::getMetadata( return INVALID_OPERATION; } +void NuPlayerDriver::sendEvent(int msg, int ext1, int ext2) { + if (msg != MEDIA_RESET_COMPLETE) { + MediaPlayerInterface::sendEvent(msg, ext1, ext2); + return; + } + + Mutex::Autolock autoLock(mLock); + CHECK(mResetInProgress); + mResetInProgress = false; + mCondition.broadcast(); +} + } // namespace android diff --git a/media/libmediaplayerservice/nuplayer/NuPlayerDriver.h b/media/libmediaplayerservice/nuplayer/NuPlayerDriver.h index 44ae3bf..f153af4 100644 --- a/media/libmediaplayerservice/nuplayer/NuPlayerDriver.h +++ b/media/libmediaplayerservice/nuplayer/NuPlayerDriver.h @@ -54,10 +54,16 @@ struct NuPlayerDriver : public MediaPlayerInterface { virtual status_t getMetadata( const media::Metadata::Filter& ids, Parcel *records); + virtual void sendEvent(int msg, int ext1 = 0, int ext2 = 0); + protected: virtual ~NuPlayerDriver(); private: + Mutex mLock; + Condition mCondition; + bool mResetInProgress; + sp<ALooper> mLooper; sp<NuPlayer> mPlayer; bool mPlaying; diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/MediaMetadataRetrieverTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/MediaMetadataRetrieverTest.java index a0c72e6..0870522 100644 --- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/MediaMetadataRetrieverTest.java +++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/MediaMetadataRetrieverTest.java @@ -31,8 +31,8 @@ public class MediaMetadataRetrieverTest extends AndroidTestCase { // Test album art extraction. @MediumTest - public static void testAlbumArt() throws Exception { - Log.v(TAG, "testAlbumArt starts."); + public static void testGetEmbeddedPicture() throws Exception { + Log.v(TAG, "testGetEmbeddedPicture starts."); MediaMetadataRetriever retriever = new MediaMetadataRetriever(); boolean supportWMA = MediaProfileReader.getWMAEnable(); boolean hasFailed = false; @@ -48,13 +48,13 @@ public class MediaMetadataRetrieverTest extends AndroidTestCase { continue; } retriever.setDataSource(MediaNames.ALBUMART_TEST_FILES[i]); - byte[] albumArt = retriever.extractAlbumArt(); + byte[] albumArt = retriever.getEmbeddedPicture(); // TODO: // A better test would be to compare the retrieved album art with the // known result. if (albumArt == null) { // Do we have expect in JUnit? - Log.e(TAG, "Fails to extract album art for " + MediaNames.ALBUMART_TEST_FILES[i]); + Log.e(TAG, "Fails to get embedded picture for " + MediaNames.ALBUMART_TEST_FILES[i]); hasFailed = true; } } catch(Exception e) { @@ -64,7 +64,7 @@ public class MediaMetadataRetrieverTest extends AndroidTestCase { Thread.yield(); // Don't be evil } retriever.release(); - Log.v(TAG, "testAlbumArt completes."); + Log.v(TAG, "testGetEmbeddedPicture completes."); assertTrue(!hasFailed); } diff --git a/packages/SystemUI/res/layout-xlarge/status_bar_notification_area.xml b/packages/SystemUI/res/layout-xlarge/status_bar_notification_area.xml index df60a26..72e2c0b 100644 --- a/packages/SystemUI/res/layout-xlarge/status_bar_notification_area.xml +++ b/packages/SystemUI/res/layout-xlarge/status_bar_notification_area.xml @@ -25,30 +25,39 @@ android:layout_alignParentRight="true" android:orientation="horizontal" > - <com.android.systemui.statusbar.tablet.InputMethodButton - android:id="@+id/imeSwitchButton" - android:layout_width="wrap_content" - android:layout_height="match_parent" - android:layout_marginLeft="8dip" - android:src="@drawable/ic_sysbar_ime_default" - android:visibility="gone" - /> - <com.android.systemui.statusbar.tablet.NotificationIconArea - android:id="@+id/notificationIcons" + + <LinearLayout + android:id="@+id/notificationAndImeArea" android:layout_width="wrap_content" android:layout_height="match_parent" android:orientation="horizontal" > - <view - class="com.android.systemui.statusbar.tablet.NotificationIconArea$IconLayout" - android:id="@+id/icons" + + <com.android.systemui.statusbar.tablet.InputMethodButton + android:id="@+id/imeSwitchButton" android:layout_width="wrap_content" android:layout_height="match_parent" - android:layout_gravity="center_vertical" - android:paddingTop="5dp" - android:layout_marginLeft="8dp" + android:layout_marginLeft="8dip" + android:src="@drawable/ic_sysbar_ime_default" + android:visibility="gone" /> - </com.android.systemui.statusbar.tablet.NotificationIconArea> + <com.android.systemui.statusbar.tablet.NotificationIconArea + android:id="@+id/notificationIcons" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:orientation="horizontal" + > + <view + class="com.android.systemui.statusbar.tablet.NotificationIconArea$IconLayout" + android:id="@+id/icons" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:layout_gravity="center_vertical" + android:paddingTop="5dp" + android:layout_marginLeft="8dp" + /> + </com.android.systemui.statusbar.tablet.NotificationIconArea> + </LinearLayout> <LinearLayout android:id="@+id/notificationTrigger" diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java index 759c17c..3ca1e12 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java @@ -81,11 +81,10 @@ public class NotificationPanel extends LinearLayout implements StatusBarPanel, mContentParent = (ViewGroup)findViewById(R.id.content_parent); mTitleArea = findViewById(R.id.title_area); + mTitleArea.setOnClickListener(this); mSettingsButton = (ImageView)findViewById(R.id.settings_button); - mSettingsButton.setOnClickListener(this); mNotificationButton = (ImageView)findViewById(R.id.notification_button); - mNotificationButton.setOnClickListener(this); mNotificationScroller = findViewById(R.id.notification_scroller); mNotificationGlow = findViewById(R.id.notification_glow); @@ -178,10 +177,12 @@ public class NotificationPanel extends LinearLayout implements StatusBarPanel, } public void onClick(View v) { - if (v == mSettingsButton) { - switchToSettingsMode(); - } else if (v == mNotificationButton) { - switchToNotificationMode(); + if (v == mTitleArea) { + if (mSettingsView == null) { + switchToSettingsMode(); + } else { + switchToNotificationMode(); + } } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/RecentAppsPanel.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/RecentAppsPanel.java index bd9bdb2..612427b 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/RecentAppsPanel.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/RecentAppsPanel.java @@ -257,20 +257,23 @@ public class RecentAppsPanel extends LinearLayout implements StatusBarPanel, OnC private Bitmap compositeBitmap(Bitmap background, Bitmap thumbnail) { Bitmap outBitmap = background.copy(background.getConfig(), true); - Canvas canvas = new Canvas(outBitmap); - Paint paint = new Paint(); - paint.setAntiAlias(true); - paint.setFilterBitmap(true); - paint.setAlpha(255); - final int srcWidth = thumbnail.getWidth(); - final int height = thumbnail.getHeight(); - final int srcHeight = srcWidth > height ? height : (height - height * srcWidth / height); - canvas.drawBitmap(thumbnail, - new Rect(0, 0, srcWidth-1, srcHeight-1), - new RectF(GLOW_PADDING, - GLOW_PADDING - 4.0f, - outBitmap.getWidth() - GLOW_PADDING + 2.0f, - outBitmap.getHeight() - GLOW_PADDING + 3.0f), paint); + if (thumbnail != null) { + Canvas canvas = new Canvas(outBitmap); + Paint paint = new Paint(); + paint.setAntiAlias(true); + paint.setFilterBitmap(true); + paint.setAlpha(255); + final int srcWidth = thumbnail.getWidth(); + final int height = thumbnail.getHeight(); + final int srcHeight = srcWidth > height ? height + : (height - height * srcWidth / height); + canvas.drawBitmap(thumbnail, + new Rect(0, 0, srcWidth-1, srcHeight-1), + new RectF(GLOW_PADDING, + GLOW_PADDING - 4.0f, + outBitmap.getWidth() - GLOW_PADDING + 2.0f, + outBitmap.getHeight() - GLOW_PADDING + 3.0f), paint); + } return outBitmap; } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java index 03e33fa..e527073 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java @@ -119,6 +119,7 @@ public class TabletStatusBar extends StatusBar { View mMenuButton; View mRecentButton; + ViewGroup mNotificationAndImeArea; InputMethodButton mInputMethodSwitchButton; NotificationPanel mNotificationPanel; @@ -344,6 +345,7 @@ public class TabletStatusBar extends StatusBar { mRecentButton.setOnClickListener(mOnClickListener); // The bar contents buttons + mNotificationAndImeArea = (ViewGroup)sb.findViewById(R.id.notificationAndImeArea); mInputMethodSwitchButton = (InputMethodButton) sb.findViewById(R.id.imeSwitchButton); // for redirecting errant bar taps to the IME @@ -535,7 +537,7 @@ public class TabletStatusBar extends StatusBar { } catch (PendingIntent.CanceledException e) { } } else { - tick(key, notification); + tick(key, notification, true); } setAreThereNotifications(); @@ -626,7 +628,7 @@ public class TabletStatusBar extends StatusBar { if (false && immersive) { // TODO: immersive mode } else { - tick(key, notification); + tick(key, notification, false); } setAreThereNotifications(); @@ -705,11 +707,16 @@ public class TabletStatusBar extends StatusBar { return n.tickerView != null || !TextUtils.isEmpty(n.tickerText); } - private void tick(IBinder key, StatusBarNotification n) { + private void tick(IBinder key, StatusBarNotification n, boolean firstTime) { // Don't show the ticker when the windowshade is open. if (mNotificationPanel.isShowing()) { return; } + // If they asked for FLAG_ONLY_ALERT_ONCE, then only show this notification + // if it's a new notification. + if (!firstTime && (n.notification.flags & Notification.FLAG_ONLY_ALERT_ONCE) != 0) { + return; + } // Show the ticker if one is requested. Also don't do this // until status bar window is attached to the window manager, // because... well, what's the point otherwise? And trying to @@ -718,15 +725,14 @@ public class TabletStatusBar extends StatusBar { if (0 == (mDisabled & (StatusBarManager.DISABLE_NOTIFICATION_ICONS | StatusBarManager.DISABLE_NOTIFICATION_TICKER))) { mTicker.add(key, n); - - mNotificationArea.setVisibility(View.GONE); + mNotificationAndImeArea.setVisibility(View.GONE); } } } // called by TabletTicker when it's done with all queued ticks public void doneTicking() { - mNotificationArea.setVisibility(View.VISIBLE); + mNotificationAndImeArea.setVisibility(View.VISIBLE); } public void animateExpand() { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBarView.java index 823b793..6550765 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBarView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBarView.java @@ -60,6 +60,7 @@ public class TabletStatusBarView extends FrameLayout { } } } + Slog.d(TabletStatusBar.TAG, "TabletStatusBarView not intercepting event"); return super.onInterceptTouchEvent(ev); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletTicker.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletTicker.java index 32f1e98..7705dfc 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletTicker.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletTicker.java @@ -53,7 +53,7 @@ public class TabletTicker private static final String TAG = "StatusBar.TabletTicker"; - private static final boolean CLICKABLE_TICKER = true; + private static final boolean CLICKABLE_TICKER = false; // 3 is enough to let us see most cases, but not get so far behind that it's too annoying. private static final int QUEUE_LENGTH = 3; @@ -209,12 +209,16 @@ public class TabletTicker final FrameLayout view = new FrameLayout(mContext); final int width = res.getDimensionPixelSize(R.dimen.notification_ticker_width); final int height = res.getDimensionPixelSize(R.dimen.notification_large_icon_height); - WindowManager.LayoutParams lp = new WindowManager.LayoutParams(width, height, - WindowManager.LayoutParams.TYPE_STATUS_BAR_PANEL, - WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN + int windowFlags = WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE - | WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS - | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL, + | WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS; + if (CLICKABLE_TICKER) { + windowFlags |= WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL; + } else { + windowFlags |= WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE; + } + WindowManager.LayoutParams lp = new WindowManager.LayoutParams(width, height, + WindowManager.LayoutParams.TYPE_STATUS_BAR_PANEL, windowFlags, PixelFormat.TRANSLUCENT); lp.gravity = Gravity.BOTTOM | Gravity.RIGHT; // lp.windowAnimations = com.android.internal.R.style.Animation_Toast; diff --git a/services/input/Android.mk b/services/input/Android.mk new file mode 100644 index 0000000..37804ff --- /dev/null +++ b/services/input/Android.mk @@ -0,0 +1,56 @@ +# Copyright (C) 2010 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES:= \ + EventHub.cpp \ + InputDispatcher.cpp \ + InputManager.cpp \ + InputReader.cpp \ + PointerController.cpp + +LOCAL_SHARED_LIBRARIES := \ + libcutils \ + libutils \ + libhardware \ + libhardware_legacy \ + libsurfaceflinger_client \ + libskia \ + libui + +LOCAL_C_INCLUDES := \ + external/skia/include/core + +LOCAL_MODULE:= libinput + +LOCAL_MODULE_TAGS := optional + +ifeq ($(TARGET_SIMULATOR),true) + LOCAL_LDLIBS += -lpthread +endif + +include $(BUILD_SHARED_LIBRARY) + + +# Include subdirectory makefiles +# ============================================================ + +# If we're building with ONE_SHOT_MAKEFILE (mm, mmm), then what the framework +# team really wants is to build the stuff defined by this makefile. +ifeq (,$(ONE_SHOT_MAKEFILE)) +include $(call first-makefiles-under,$(LOCAL_PATH)) +endif diff --git a/libs/ui/EventHub.cpp b/services/input/EventHub.cpp index 4e9fad0..487e73f 100644 --- a/libs/ui/EventHub.cpp +++ b/services/input/EventHub.cpp @@ -1,5 +1,19 @@ -// -// Copyright 2005 The Android Open Source Project +/* + * Copyright (C) 2005 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + // // Handle events, like key input and vsync. // @@ -15,7 +29,8 @@ //#define LOG_NDEBUG 0 -#include <ui/EventHub.h> +#include "EventHub.h" + #include <hardware_legacy/power.h> #include <cutils/properties.h> @@ -58,18 +73,6 @@ /* this macro computes the number of bytes needed to represent a bit array of the specified size */ #define sizeof_bit_array(bits) ((bits + 7) / 8) -#ifndef ABS_MT_TOUCH_MAJOR -#define ABS_MT_TOUCH_MAJOR 0x30 /* Major axis of touching ellipse */ -#endif - -#ifndef ABS_MT_POSITION_X -#define ABS_MT_POSITION_X 0x35 /* Center X ellipse position */ -#endif - -#ifndef ABS_MT_POSITION_Y -#define ABS_MT_POSITION_Y 0x36 /* Center Y ellipse position */ -#endif - // Fd at index 0 is always reserved for inotify #define FIRST_ACTUAL_DEVICE_INDEX 1 diff --git a/include/ui/EventHub.h b/services/input/EventHub.h index 8f922a5..74b7ec5 100644 --- a/include/ui/EventHub.h +++ b/services/input/EventHub.h @@ -133,7 +133,7 @@ enum { * environment. In addition, the event hub generates fake input events to indicate * when devices are added or removed. * - * The event hub provies a stream of input events (via the getEvent function). + * The event hub provides a stream of input events (via the getEvent function). * It also supports querying the current actual state of input devices such as identifying * which keys are currently down. Finally, the event hub keeps track of the capabilities of * individual input devices, such as their class and the set of key codes that they support. diff --git a/libs/ui/InputDispatcher.cpp b/services/input/InputDispatcher.cpp index 0548e61..3675021 100644 --- a/libs/ui/InputDispatcher.cpp +++ b/services/input/InputDispatcher.cpp @@ -1,8 +1,19 @@ -// -// Copyright 2010 The Android Open Source Project -// -// The input dispatcher. -// +/* + * Copyright (C) 2010 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #define LOG_TAG "InputDispatcher" //#define LOG_NDEBUG 0 @@ -37,8 +48,9 @@ // Log debug messages about the app switch latency optimization. #define DEBUG_APP_SWITCH 0 +#include "InputDispatcher.h" + #include <cutils/log.h> -#include <ui/InputDispatcher.h> #include <ui/PowerManager.h> #include <stddef.h> diff --git a/include/ui/InputDispatcher.h b/services/input/InputDispatcher.h index 7305601..7305601 100644 --- a/include/ui/InputDispatcher.h +++ b/services/input/InputDispatcher.h diff --git a/libs/ui/InputManager.cpp b/services/input/InputManager.cpp index 09fce38..5dfa5d5 100644 --- a/libs/ui/InputManager.cpp +++ b/services/input/InputManager.cpp @@ -1,16 +1,26 @@ -// -// Copyright 2010 The Android Open Source Project -// -// The input manager. -// +/* + * Copyright (C) 2010 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #define LOG_TAG "InputManager" //#define LOG_NDEBUG 0 +#include "InputManager.h" + #include <cutils/log.h> -#include <ui/InputManager.h> -#include <ui/InputReader.h> -#include <ui/InputDispatcher.h> namespace android { diff --git a/include/ui/InputManager.h b/services/input/InputManager.h index 568568b..df4d299 100644 --- a/include/ui/InputManager.h +++ b/services/input/InputManager.h @@ -21,8 +21,12 @@ * Native input manager. */ -#include <ui/EventHub.h> +#include "EventHub.h" +#include "InputReader.h" +#include "InputDispatcher.h" + #include <ui/Input.h> +#include <ui/InputTransport.h> #include <utils/Errors.h> #include <utils/Vector.h> #include <utils/Timers.h> @@ -31,16 +35,6 @@ namespace android { -class InputChannel; - -class InputReaderInterface; -class InputReaderPolicyInterface; -class InputReaderThread; - -class InputDispatcherInterface; -class InputDispatcherPolicyInterface; -class InputDispatcherThread; - /* * The input manager is the core of the system event processing. * diff --git a/libs/ui/InputReader.cpp b/services/input/InputReader.cpp index a11a010..7a45de6 100644 --- a/libs/ui/InputReader.cpp +++ b/services/input/InputReader.cpp @@ -1,8 +1,19 @@ -// -// Copyright 2010 The Android Open Source Project -// -// The input reader. -// +/* + * Copyright (C) 2010 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #define LOG_TAG "InputReader" //#define LOG_NDEBUG 0 @@ -22,8 +33,9 @@ // Log debug messages about pointer assignment calculations. #define DEBUG_POINTER_ASSIGNMENT 0 +#include "InputReader.h" + #include <cutils/log.h> -#include <ui/InputReader.h> #include <ui/Keyboard.h> #include <ui/VirtualKeyMap.h> @@ -84,7 +96,7 @@ static const int keyCodeRotationMapSize = sizeof(keyCodeRotationMap) / sizeof(keyCodeRotationMap[0]); int32_t rotateKeyCode(int32_t keyCode, int32_t orientation) { - if (orientation != InputReaderPolicyInterface::ROTATION_0) { + if (orientation != DISPLAY_ORIENTATION_0) { for (int i = 0; i < keyCodeRotationMapSize; i++) { if (keyCode == keyCodeRotationMap[i][0]) { return keyCodeRotationMap[i][orientation]; @@ -860,7 +872,7 @@ void KeyboardInputMapper::processKey(nsecs_t when, bool down, int32_t keyCode, int32_t orientation; if (!getPolicy()->getDisplayInfo(mParameters.associatedDisplayId, NULL, NULL, & orientation)) { - orientation = InputReaderPolicyInterface::ROTATION_0; + orientation = DISPLAY_ORIENTATION_0; } keyCode = rotateKeyCode(keyCode, orientation); @@ -1195,23 +1207,23 @@ void CursorInputMapper::sync(nsecs_t when) { int32_t orientation; if (! getPolicy()->getDisplayInfo(mParameters.associatedDisplayId, NULL, NULL, & orientation)) { - orientation = InputReaderPolicyInterface::ROTATION_0; + orientation = DISPLAY_ORIENTATION_0; } float temp; switch (orientation) { - case InputReaderPolicyInterface::ROTATION_90: + case DISPLAY_ORIENTATION_90: temp = deltaX; deltaX = deltaY; deltaY = -temp; break; - case InputReaderPolicyInterface::ROTATION_180: + case DISPLAY_ORIENTATION_180: deltaX = -deltaX; deltaY = -deltaY; break; - case InputReaderPolicyInterface::ROTATION_270: + case DISPLAY_ORIENTATION_270: temp = deltaX; deltaX = -deltaY; deltaY = temp; @@ -1485,7 +1497,7 @@ void TouchInputMapper::dumpRawAxes(String8& dump) { bool TouchInputMapper::configureSurfaceLocked() { // Update orientation and dimensions if needed. - int32_t orientation = InputReaderPolicyInterface::ROTATION_0; + int32_t orientation = DISPLAY_ORIENTATION_0; int32_t width = mRawAxes.x.getRange(); int32_t height = mRawAxes.y.getRange(); @@ -1677,8 +1689,8 @@ bool TouchInputMapper::configureSurfaceLocked() { // Compute oriented surface dimensions, precision, and scales. float orientedXScale, orientedYScale; switch (mLocked.surfaceOrientation) { - case InputReaderPolicyInterface::ROTATION_90: - case InputReaderPolicyInterface::ROTATION_270: + case DISPLAY_ORIENTATION_90: + case DISPLAY_ORIENTATION_270: mLocked.orientedSurfaceWidth = mLocked.surfaceHeight; mLocked.orientedSurfaceHeight = mLocked.surfaceWidth; mLocked.orientedXPrecision = mLocked.yPrecision; @@ -2553,7 +2565,7 @@ void TouchInputMapper::dispatchTouch(nsecs_t when, uint32_t policyFlags, // Adjust coords for orientation. switch (mLocked.surfaceOrientation) { - case InputReaderPolicyInterface::ROTATION_90: { + case DISPLAY_ORIENTATION_90: { float xTemp = x; x = y; y = mLocked.surfaceWidth - xTemp; @@ -2563,13 +2575,13 @@ void TouchInputMapper::dispatchTouch(nsecs_t when, uint32_t policyFlags, } break; } - case InputReaderPolicyInterface::ROTATION_180: { + case DISPLAY_ORIENTATION_180: { x = mLocked.surfaceWidth - x; y = mLocked.surfaceHeight - y; orientation = - orientation; break; } - case InputReaderPolicyInterface::ROTATION_270: { + case DISPLAY_ORIENTATION_270: { float xTemp = x; x = mLocked.surfaceHeight - y; y = xTemp; diff --git a/include/ui/InputReader.h b/services/input/InputReader.h index 00a06be..8c849c4 100644 --- a/include/ui/InputReader.h +++ b/services/input/InputReader.h @@ -17,10 +17,12 @@ #ifndef _UI_INPUT_READER_H #define _UI_INPUT_READER_H -#include <ui/EventHub.h> +#include "EventHub.h" +#include "InputDispatcher.h" +#include "PointerController.h" + #include <ui/Input.h> -#include <ui/InputDispatcher.h> -#include <ui/PointerController.h> +#include <ui/DisplayInfo.h> #include <utils/KeyedVector.h> #include <utils/threads.h> #include <utils/Timers.h> diff --git a/services/input/PointerController.cpp b/services/input/PointerController.cpp new file mode 100644 index 0000000..ebc58ee --- /dev/null +++ b/services/input/PointerController.cpp @@ -0,0 +1,407 @@ +/* + * Copyright (C) 2010 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#define LOG_TAG "PointerController" + +//#define LOG_NDEBUG 0 + +// Log debug messages about pointer updates +#define DEBUG_POINTER_UPDATES 0 + +#include "PointerController.h" + +#include <cutils/log.h> + +#include <SkBitmap.h> +#include <SkCanvas.h> +#include <SkColor.h> +#include <SkPaint.h> +#include <SkXfermode.h> + +namespace android { + +// --- PointerController --- + +PointerController::PointerController(int32_t pointerLayer) : + mPointerLayer(pointerLayer) { + AutoMutex _l(mLock); + + mLocked.displayWidth = -1; + mLocked.displayHeight = -1; + mLocked.displayOrientation = DISPLAY_ORIENTATION_0; + + mLocked.pointerX = 0; + mLocked.pointerY = 0; + mLocked.buttonState = 0; + + mLocked.iconBitmap = NULL; + mLocked.iconHotSpotX = 0; + mLocked.iconHotSpotY = 0; + + mLocked.wantVisible = false; + mLocked.visible = false; + mLocked.drawn = false; +} + +PointerController::~PointerController() { + if (mSurfaceControl != NULL) { + mSurfaceControl->clear(); + mSurfaceControl.clear(); + } + + if (mSurfaceComposerClient != NULL) { + mSurfaceComposerClient->dispose(); + mSurfaceComposerClient.clear(); + } + + delete mLocked.iconBitmap; +} + +bool PointerController::getBounds(float* outMinX, float* outMinY, + float* outMaxX, float* outMaxY) const { + AutoMutex _l(mLock); + + return getBoundsLocked(outMinX, outMinY, outMaxX, outMaxY); +} + +bool PointerController::getBoundsLocked(float* outMinX, float* outMinY, + float* outMaxX, float* outMaxY) const { + if (mLocked.displayWidth <= 0 || mLocked.displayHeight <= 0) { + return false; + } + + *outMinX = 0; + *outMinY = 0; + switch (mLocked.displayOrientation) { + case DISPLAY_ORIENTATION_90: + case DISPLAY_ORIENTATION_270: + *outMaxX = mLocked.displayHeight; + *outMaxY = mLocked.displayWidth; + break; + default: + *outMaxX = mLocked.displayWidth; + *outMaxY = mLocked.displayHeight; + break; + } + return true; +} + +void PointerController::move(float deltaX, float deltaY) { +#if DEBUG_POINTER_UPDATES + LOGD("Move pointer by deltaX=%0.3f, deltaY=%0.3f", deltaX, deltaY); +#endif + if (deltaX == 0.0f && deltaY == 0.0f) { + return; + } + + AutoMutex _l(mLock); + + setPositionLocked(mLocked.pointerX + deltaX, mLocked.pointerY + deltaY); +} + +void PointerController::setButtonState(uint32_t buttonState) { +#if DEBUG_POINTER_UPDATES + LOGD("Set button state 0x%08x", buttonState); +#endif + AutoMutex _l(mLock); + + if (mLocked.buttonState != buttonState) { + mLocked.buttonState = buttonState; + mLocked.wantVisible = true; + updateLocked(); + } +} + +uint32_t PointerController::getButtonState() const { + AutoMutex _l(mLock); + + return mLocked.buttonState; +} + +void PointerController::setPosition(float x, float y) { +#if DEBUG_POINTER_UPDATES + LOGD("Set pointer position to x=%0.3f, y=%0.3f", x, y); +#endif + AutoMutex _l(mLock); + + setPositionLocked(x, y); +} + +void PointerController::setPositionLocked(float x, float y) { + float minX, minY, maxX, maxY; + if (getBoundsLocked(&minX, &minY, &maxX, &maxY)) { + if (x <= minX) { + mLocked.pointerX = minX; + } else if (x >= maxX) { + mLocked.pointerX = maxX; + } else { + mLocked.pointerX = x; + } + if (y <= minY) { + mLocked.pointerY = minY; + } else if (y >= maxY) { + mLocked.pointerY = maxY; + } else { + mLocked.pointerY = y; + } + mLocked.wantVisible = true; + updateLocked(); + } +} + +void PointerController::getPosition(float* outX, float* outY) const { + AutoMutex _l(mLock); + + *outX = mLocked.pointerX; + *outY = mLocked.pointerY; +} + +void PointerController::updateLocked() { + bool wantVisibleAndHavePointerIcon = mLocked.wantVisible && mLocked.iconBitmap; + + if (wantVisibleAndHavePointerIcon) { + // Want the pointer to be visible. + // Ensure the surface is created and drawn. + if (!createSurfaceIfNeededLocked() || !drawPointerIfNeededLocked()) { + return; + } + } else { + // Don't want the pointer to be visible. + // If it is not visible then we are done. + if (mSurfaceControl == NULL || !mLocked.visible) { + return; + } + } + + status_t status = mSurfaceComposerClient->openTransaction(); + if (status) { + LOGE("Error opening surface transaction to update pointer surface."); + return; + } + + if (wantVisibleAndHavePointerIcon) { + status = mSurfaceControl->setPosition( + mLocked.pointerX - mLocked.iconHotSpotX, + mLocked.pointerY - mLocked.iconHotSpotY); + if (status) { + LOGE("Error %d moving pointer surface.", status); + goto CloseTransaction; + } + + if (!mLocked.visible) { + status = mSurfaceControl->setLayer(mPointerLayer); + if (status) { + LOGE("Error %d setting pointer surface layer.", status); + goto CloseTransaction; + } + + status = mSurfaceControl->show(mPointerLayer); + if (status) { + LOGE("Error %d showing pointer surface.", status); + goto CloseTransaction; + } + + mLocked.visible = true; + } + } else { + if (mLocked.visible) { + status = mSurfaceControl->hide(); + if (status) { + LOGE("Error %d hiding pointer surface.", status); + goto CloseTransaction; + } + + mLocked.visible = false; + } + } + +CloseTransaction: + status = mSurfaceComposerClient->closeTransaction(); + if (status) { + LOGE("Error closing surface transaction to update pointer surface."); + } +} + +void PointerController::setDisplaySize(int32_t width, int32_t height) { + AutoMutex _l(mLock); + + if (mLocked.displayWidth != width || mLocked.displayHeight != height) { + mLocked.displayWidth = width; + mLocked.displayHeight = height; + + float minX, minY, maxX, maxY; + if (getBoundsLocked(&minX, &minY, &maxX, &maxY)) { + mLocked.pointerX = (minX + maxX) * 0.5f; + mLocked.pointerY = (minY + maxY) * 0.5f; + } else { + mLocked.pointerX = 0; + mLocked.pointerY = 0; + } + + updateLocked(); + } +} + +void PointerController::setDisplayOrientation(int32_t orientation) { + AutoMutex _l(mLock); + + if (mLocked.displayOrientation != orientation) { + float absoluteX, absoluteY; + + // Map from oriented display coordinates to absolute display coordinates. + switch (mLocked.displayOrientation) { + case DISPLAY_ORIENTATION_90: + absoluteX = mLocked.displayWidth - mLocked.pointerY; + absoluteY = mLocked.pointerX; + break; + case DISPLAY_ORIENTATION_180: + absoluteX = mLocked.displayWidth - mLocked.pointerX; + absoluteY = mLocked.displayHeight - mLocked.pointerY; + break; + case DISPLAY_ORIENTATION_270: + absoluteX = mLocked.pointerY; + absoluteY = mLocked.displayHeight - mLocked.pointerX; + break; + default: + absoluteX = mLocked.pointerX; + absoluteY = mLocked.pointerY; + break; + } + + // Map from absolute display coordinates to oriented display coordinates. + switch (orientation) { + case DISPLAY_ORIENTATION_90: + mLocked.pointerX = absoluteY; + mLocked.pointerY = mLocked.displayWidth - absoluteX; + break; + case DISPLAY_ORIENTATION_180: + mLocked.pointerX = mLocked.displayWidth - absoluteX; + mLocked.pointerY = mLocked.displayHeight - absoluteY; + break; + case DISPLAY_ORIENTATION_270: + mLocked.pointerX = mLocked.displayHeight - absoluteY; + mLocked.pointerY = absoluteX; + break; + default: + mLocked.pointerX = absoluteX; + mLocked.pointerY = absoluteY; + break; + } + + mLocked.displayOrientation = orientation; + + updateLocked(); + } +} + +void PointerController::setPointerIcon(const SkBitmap* bitmap, float hotSpotX, float hotSpotY) { + AutoMutex _l(mLock); + + delete mLocked.iconBitmap; + mLocked.iconBitmap = bitmap ? new SkBitmap(*bitmap) : NULL; + mLocked.iconHotSpotX = hotSpotX; + mLocked.iconHotSpotY = hotSpotY; + mLocked.drawn = false; +} + +bool PointerController::createSurfaceIfNeededLocked() { + if (!mLocked.iconBitmap) { + // If we don't have a pointer icon, then no point allocating a surface now. + return false; + } + + if (mSurfaceComposerClient == NULL) { + mSurfaceComposerClient = new SurfaceComposerClient(); + } + + if (mSurfaceControl == NULL) { + mSurfaceControl = mSurfaceComposerClient->createSurface(getpid(), + String8("Pointer Icon"), 0, + mLocked.iconBitmap->width(), mLocked.iconBitmap->height(), + PIXEL_FORMAT_RGBA_8888); + if (mSurfaceControl == NULL) { + LOGE("Error creating pointer surface."); + return false; + } + } + return true; +} + +bool PointerController::drawPointerIfNeededLocked() { + if (!mLocked.drawn) { + if (!mLocked.iconBitmap) { + return false; + } + + if (!resizeSurfaceLocked(mLocked.iconBitmap->width(), mLocked.iconBitmap->height())) { + return false; + } + + sp<Surface> surface = mSurfaceControl->getSurface(); + + Surface::SurfaceInfo surfaceInfo; + status_t status = surface->lock(&surfaceInfo); + if (status) { + LOGE("Error %d locking pointer surface before drawing.", status); + return false; + } + + SkBitmap surfaceBitmap; + ssize_t bpr = surfaceInfo.s * bytesPerPixel(surfaceInfo.format); + surfaceBitmap.setConfig(SkBitmap::kARGB_8888_Config, surfaceInfo.w, surfaceInfo.h, bpr); + surfaceBitmap.setPixels(surfaceInfo.bits); + + SkCanvas surfaceCanvas; + surfaceCanvas.setBitmapDevice(surfaceBitmap); + + SkPaint paint; + paint.setXfermodeMode(SkXfermode::kSrc_Mode); + surfaceCanvas.drawBitmap(*mLocked.iconBitmap, 0, 0, &paint); + + status = surface->unlockAndPost(); + if (status) { + LOGE("Error %d unlocking pointer surface after drawing.", status); + return false; + } + } + + mLocked.drawn = true; + return true; +} + +bool PointerController::resizeSurfaceLocked(int32_t width, int32_t height) { + status_t status = mSurfaceComposerClient->openTransaction(); + if (status) { + LOGE("Error opening surface transaction to resize pointer surface."); + return false; + } + + status = mSurfaceControl->setSize(width, height); + if (status) { + LOGE("Error %d setting pointer surface size.", status); + return false; + } + + status = mSurfaceComposerClient->closeTransaction(); + if (status) { + LOGE("Error closing surface transaction to resize pointer surface."); + return false; + } + + return true; +} + +} // namespace android diff --git a/include/ui/PointerController.h b/services/input/PointerController.h index 4db24e5..a2a9955 100644 --- a/include/ui/PointerController.h +++ b/services/input/PointerController.h @@ -17,7 +17,15 @@ #ifndef _UI_POINTER_CONTROLLER_H #define _UI_POINTER_CONTROLLER_H +#include <ui/DisplayInfo.h> #include <utils/RefBase.h> +#include <utils/String8.h> + +#include <surfaceflinger/Surface.h> +#include <surfaceflinger/SurfaceComposerClient.h> +#include <surfaceflinger/ISurfaceComposer.h> + +#include <SkBitmap.h> namespace android { @@ -58,6 +66,64 @@ public: virtual void getPosition(float* outX, float* outY) const = 0; }; + +/* + * Tracks pointer movements and draws the pointer sprite to a surface. + * + * Handles pointer acceleration and animation. + */ +class PointerController : public PointerControllerInterface { +protected: + virtual ~PointerController(); + +public: + PointerController(int32_t pointerLayer); + + virtual bool getBounds(float* outMinX, float* outMinY, + float* outMaxX, float* outMaxY) const; + virtual void move(float deltaX, float deltaY); + virtual void setButtonState(uint32_t buttonState); + virtual uint32_t getButtonState() const; + virtual void setPosition(float x, float y); + virtual void getPosition(float* outX, float* outY) const; + + void setDisplaySize(int32_t width, int32_t height); + void setDisplayOrientation(int32_t orientation); + void setPointerIcon(const SkBitmap* bitmap, float hotSpotX, float hotSpotY); + +private: + mutable Mutex mLock; + + int32_t mPointerLayer; + sp<SurfaceComposerClient> mSurfaceComposerClient; + sp<SurfaceControl> mSurfaceControl; + + struct Locked { + int32_t displayWidth; + int32_t displayHeight; + int32_t displayOrientation; + + float pointerX; + float pointerY; + uint32_t buttonState; + + SkBitmap* iconBitmap; + float iconHotSpotX; + float iconHotSpotY; + + bool wantVisible; + bool visible; + bool drawn; + } mLocked; + + bool getBoundsLocked(float* outMinX, float* outMinY, float* outMaxX, float* outMaxY) const; + void setPositionLocked(float x, float y); + void updateLocked(); + bool createSurfaceIfNeededLocked(); + bool drawPointerIfNeededLocked(); + bool resizeSurfaceLocked(int32_t width, int32_t height); +}; + } // namespace android #endif // _UI_POINTER_CONTROLLER_H diff --git a/services/input/tests/Android.mk b/services/input/tests/Android.mk new file mode 100644 index 0000000..799eb76 --- /dev/null +++ b/services/input/tests/Android.mk @@ -0,0 +1,50 @@ +# Build the unit tests. +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +ifneq ($(TARGET_SIMULATOR),true) + +# Build the unit tests. +test_src_files := \ + InputReader_test.cpp \ + InputDispatcher_test.cpp + +shared_libraries := \ + libcutils \ + libutils \ + libhardware \ + libhardware_legacy \ + libui \ + libsurfaceflinger_client \ + libskia \ + libstlport \ + libinput + +static_libraries := \ + libgtest \ + libgtest_main + +c_includes := \ + bionic \ + bionic/libstdc++/include \ + external/gtest/include \ + external/stlport/stlport \ + external/skia/include/core + +module_tags := eng tests + +$(foreach file,$(test_src_files), \ + $(eval include $(CLEAR_VARS)) \ + $(eval LOCAL_SHARED_LIBRARIES := $(shared_libraries)) \ + $(eval LOCAL_STATIC_LIBRARIES := $(static_libraries)) \ + $(eval LOCAL_C_INCLUDES := $(c_includes)) \ + $(eval LOCAL_SRC_FILES := $(file)) \ + $(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \ + $(eval LOCAL_MODULE_TAGS := $(module_tags)) \ + $(eval include $(BUILD_EXECUTABLE)) \ +) + +# Build the manual test programs. +include $(call all-subdir-makefiles) + +endif
\ No newline at end of file diff --git a/libs/ui/tests/InputDispatcher_test.cpp b/services/input/tests/InputDispatcher_test.cpp index 7e17c57..b79633a 100644 --- a/libs/ui/tests/InputDispatcher_test.cpp +++ b/services/input/tests/InputDispatcher_test.cpp @@ -2,7 +2,8 @@ // Copyright 2010 The Android Open Source Project // -#include <ui/InputDispatcher.h> +#include "../InputDispatcher.h" + #include <gtest/gtest.h> #include <linux/input.h> diff --git a/libs/ui/tests/InputReader_test.cpp b/services/input/tests/InputReader_test.cpp index 50d3383..9d2c52f 100644 --- a/libs/ui/tests/InputReader_test.cpp +++ b/services/input/tests/InputReader_test.cpp @@ -2,7 +2,8 @@ // Copyright 2010 The Android Open Source Project // -#include <ui/InputReader.h> +#include "../InputReader.h" + #include <utils/List.h> #include <gtest/gtest.h> #include <math.h> @@ -40,7 +41,8 @@ protected: virtual ~FakePointerController() { } public: - FakePointerController() { + FakePointerController() : + mHaveBounds(false), mMinX(0), mMinY(0), mMaxX(0), mMaxY(0) { } void setBounds(float minX, float minY, float maxX, float maxY) { @@ -54,8 +56,8 @@ public: private: virtual bool getBounds(float* outMinX, float* outMinY, float* outMaxX, float* outMaxY) const { *outMinX = mMinX; - *outMaxX = mMinX; *outMinY = mMinY; + *outMaxX = mMaxX; *outMaxY = mMaxY; return mHaveBounds; } @@ -973,6 +975,9 @@ TEST_F(InputReaderTest, GetInputConfiguration_WhenTouchScreenPresent_ReturnsFing } TEST_F(InputReaderTest, GetInputConfiguration_WhenMousePresent_ReturnsNoNavigation) { + sp<FakePointerController> controller = new FakePointerController(); + mFakePolicy->setPointerController(0, controller); + PropertyMap configuration; configuration.addProperty(String8("cursor.mode"), String8("pointer")); ASSERT_NO_FATAL_FAILURE(addDevice(0, String8("mouse"), @@ -1044,6 +1049,9 @@ TEST_F(InputReaderTest, GetInputDeviceInfo_WhenDeviceIdIsIgnored) { } TEST_F(InputReaderTest, GetInputDeviceIds) { + sp<FakePointerController> controller = new FakePointerController(); + mFakePolicy->setPointerController(2, controller); + ASSERT_NO_FATAL_FAILURE(addDevice(1, String8("keyboard"), INPUT_DEVICE_CLASS_KEYBOARD | INPUT_DEVICE_CLASS_ALPHAKEY, NULL)); ASSERT_NO_FATAL_FAILURE(addDevice(2, String8("mouse"), @@ -1675,7 +1683,7 @@ TEST_F(KeyboardInputMapperTest, Process_WhenNotOrientationAware_ShouldNotRotateD mFakePolicy->setDisplayInfo(DISPLAY_ID, DISPLAY_WIDTH, DISPLAY_HEIGHT, - InputReaderPolicyInterface::ROTATION_90); + DISPLAY_ORIENTATION_90); ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, KEY_UP, AKEYCODE_DPAD_UP, AKEYCODE_DPAD_UP)); ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, @@ -1694,7 +1702,7 @@ TEST_F(KeyboardInputMapperTest, Process_WhenOrientationAware_ShouldRotateDPad) { mFakePolicy->setDisplayInfo(DISPLAY_ID, DISPLAY_WIDTH, DISPLAY_HEIGHT, - InputReaderPolicyInterface::ROTATION_0); + DISPLAY_ORIENTATION_0); ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, KEY_UP, AKEYCODE_DPAD_UP, AKEYCODE_DPAD_UP)); ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, @@ -1706,7 +1714,7 @@ TEST_F(KeyboardInputMapperTest, Process_WhenOrientationAware_ShouldRotateDPad) { mFakePolicy->setDisplayInfo(DISPLAY_ID, DISPLAY_WIDTH, DISPLAY_HEIGHT, - InputReaderPolicyInterface::ROTATION_90); + DISPLAY_ORIENTATION_90); ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, KEY_UP, AKEYCODE_DPAD_UP, AKEYCODE_DPAD_LEFT)); ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, @@ -1718,7 +1726,7 @@ TEST_F(KeyboardInputMapperTest, Process_WhenOrientationAware_ShouldRotateDPad) { mFakePolicy->setDisplayInfo(DISPLAY_ID, DISPLAY_WIDTH, DISPLAY_HEIGHT, - InputReaderPolicyInterface::ROTATION_180); + DISPLAY_ORIENTATION_180); ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, KEY_UP, AKEYCODE_DPAD_UP, AKEYCODE_DPAD_DOWN)); ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, @@ -1730,7 +1738,7 @@ TEST_F(KeyboardInputMapperTest, Process_WhenOrientationAware_ShouldRotateDPad) { mFakePolicy->setDisplayInfo(DISPLAY_ID, DISPLAY_WIDTH, DISPLAY_HEIGHT, - InputReaderPolicyInterface::ROTATION_270); + DISPLAY_ORIENTATION_270); ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, KEY_UP, AKEYCODE_DPAD_UP, AKEYCODE_DPAD_RIGHT)); ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, @@ -1746,7 +1754,7 @@ TEST_F(KeyboardInputMapperTest, Process_WhenOrientationAware_ShouldRotateDPad) { mFakePolicy->setDisplayInfo(DISPLAY_ID, DISPLAY_WIDTH, DISPLAY_HEIGHT, - InputReaderPolicyInterface::ROTATION_270); + DISPLAY_ORIENTATION_270); process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_KEY, KEY_UP, AKEYCODE_DPAD_UP, 1, 0); ASSERT_NO_FATAL_FAILURE(mFakeDispatcher->assertNotifyKeyWasCalled(&args)); ASSERT_EQ(AKEY_EVENT_ACTION_DOWN, args.action); @@ -1755,7 +1763,7 @@ TEST_F(KeyboardInputMapperTest, Process_WhenOrientationAware_ShouldRotateDPad) { mFakePolicy->setDisplayInfo(DISPLAY_ID, DISPLAY_WIDTH, DISPLAY_HEIGHT, - InputReaderPolicyInterface::ROTATION_180); + DISPLAY_ORIENTATION_180); process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_KEY, KEY_UP, AKEYCODE_DPAD_UP, 0, 0); ASSERT_NO_FATAL_FAILURE(mFakeDispatcher->assertNotifyKeyWasCalled(&args)); ASSERT_EQ(AKEY_EVENT_ACTION_UP, args.action); @@ -1941,7 +1949,7 @@ TEST_F(CursorInputMapperTest, WhenModeIsPointer_PopulateDeviceInfo_ReturnsRangeF ASSERT_EQ(NULL, info.getMotionRange(AINPUT_MOTION_RANGE_X)); ASSERT_EQ(NULL, info.getMotionRange(AINPUT_MOTION_RANGE_Y)); ASSERT_NO_FATAL_FAILURE(assertMotionRange(info, AINPUT_MOTION_RANGE_PRESSURE, - 0.0f, 1.0f, 0.0f, 1.0f)); + 0.0f, 1.0f, 0.0f, 0.0f)); // When the bounds are set, then there should be a valid motion range. mFakePointerController->setBounds(1, 2, 800, 480); @@ -1950,11 +1958,11 @@ TEST_F(CursorInputMapperTest, WhenModeIsPointer_PopulateDeviceInfo_ReturnsRangeF mapper->populateDeviceInfo(&info2); ASSERT_NO_FATAL_FAILURE(assertMotionRange(info2, AINPUT_MOTION_RANGE_X, - 1, 800, 0.0f, 1.0f)); + 1, 800, 0.0f, 0.0f)); ASSERT_NO_FATAL_FAILURE(assertMotionRange(info2, AINPUT_MOTION_RANGE_Y, - 2, 480, 0.0f, 1.0f)); + 2, 480, 0.0f, 0.0f)); ASSERT_NO_FATAL_FAILURE(assertMotionRange(info2, AINPUT_MOTION_RANGE_PRESSURE, - 0.0f, 1.0f, 0.0f, 1.0f)); + 0.0f, 1.0f, 0.0f, 0.0f)); } TEST_F(CursorInputMapperTest, WhenModeIsNavigation_PopulateDeviceInfo_ReturnsScaledRange) { @@ -1969,6 +1977,8 @@ TEST_F(CursorInputMapperTest, WhenModeIsNavigation_PopulateDeviceInfo_ReturnsSca -1.0f, 1.0f, 0.0f, 1.0f / TRACKBALL_MOVEMENT_THRESHOLD)); ASSERT_NO_FATAL_FAILURE(assertMotionRange(info, AINPUT_MOTION_RANGE_Y, -1.0f, 1.0f, 0.0f, 1.0f / TRACKBALL_MOVEMENT_THRESHOLD)); + ASSERT_NO_FATAL_FAILURE(assertMotionRange(info, AINPUT_MOTION_RANGE_PRESSURE, + 0.0f, 1.0f, 0.0f, 0.0f)); } TEST_F(CursorInputMapperTest, Process_ShouldSetAllFieldsAndIncludeGlobalMetaState) { @@ -2151,7 +2161,7 @@ TEST_F(CursorInputMapperTest, Process_WhenNotOrientationAware_ShouldNotRotateMot mFakePolicy->setDisplayInfo(DISPLAY_ID, DISPLAY_WIDTH, DISPLAY_HEIGHT, - InputReaderPolicyInterface::ROTATION_90); + DISPLAY_ORIENTATION_90); ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, 0, 1, 0, 1)); ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, 1, 1, 1, 1)); ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, 1, 0, 1, 0)); @@ -2169,8 +2179,7 @@ TEST_F(CursorInputMapperTest, Process_WhenOrientationAware_ShouldRotateMotions) addMapperAndConfigure(mapper); mFakePolicy->setDisplayInfo(DISPLAY_ID, - DISPLAY_WIDTH, DISPLAY_HEIGHT, - InputReaderPolicyInterface::ROTATION_0); + DISPLAY_WIDTH, DISPLAY_HEIGHT, DISPLAY_ORIENTATION_0); ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, 0, 1, 0, 1)); ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, 1, 1, 1, 1)); ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, 1, 0, 1, 0)); @@ -2181,8 +2190,7 @@ TEST_F(CursorInputMapperTest, Process_WhenOrientationAware_ShouldRotateMotions) ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, -1, 1, -1, 1)); mFakePolicy->setDisplayInfo(DISPLAY_ID, - DISPLAY_WIDTH, DISPLAY_HEIGHT, - InputReaderPolicyInterface::ROTATION_90); + DISPLAY_WIDTH, DISPLAY_HEIGHT, DISPLAY_ORIENTATION_90); ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, 0, 1, 1, 0)); ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, 1, 1, 1, -1)); ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, 1, 0, 0, -1)); @@ -2193,8 +2201,7 @@ TEST_F(CursorInputMapperTest, Process_WhenOrientationAware_ShouldRotateMotions) ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, -1, 1, 1, 1)); mFakePolicy->setDisplayInfo(DISPLAY_ID, - DISPLAY_WIDTH, DISPLAY_HEIGHT, - InputReaderPolicyInterface::ROTATION_180); + DISPLAY_WIDTH, DISPLAY_HEIGHT, DISPLAY_ORIENTATION_180); ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, 0, 1, 0, -1)); ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, 1, 1, -1, -1)); ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, 1, 0, -1, 0)); @@ -2205,8 +2212,7 @@ TEST_F(CursorInputMapperTest, Process_WhenOrientationAware_ShouldRotateMotions) ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, -1, 1, 1, -1)); mFakePolicy->setDisplayInfo(DISPLAY_ID, - DISPLAY_WIDTH, DISPLAY_HEIGHT, - InputReaderPolicyInterface::ROTATION_270); + DISPLAY_WIDTH, DISPLAY_HEIGHT, DISPLAY_ORIENTATION_270); ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, 0, 1, -1, 0)); ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, 1, 1, -1, 1)); ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, 1, 0, 0, 1)); @@ -2386,7 +2392,7 @@ TEST_F(SingleTouchInputMapperTest, GetSources_WhenDeviceTypeIsTouchScreen_Return TEST_F(SingleTouchInputMapperTest, GetKeyCodeState) { SingleTouchInputMapper* mapper = new SingleTouchInputMapper(mDevice); - prepareDisplay(InputReaderPolicyInterface::ROTATION_0); + prepareDisplay(DISPLAY_ORIENTATION_0); prepareAxes(POSITION); prepareVirtualKeys(); addMapperAndConfigure(mapper); @@ -2413,7 +2419,7 @@ TEST_F(SingleTouchInputMapperTest, GetKeyCodeState) { TEST_F(SingleTouchInputMapperTest, GetScanCodeState) { SingleTouchInputMapper* mapper = new SingleTouchInputMapper(mDevice); - prepareDisplay(InputReaderPolicyInterface::ROTATION_0); + prepareDisplay(DISPLAY_ORIENTATION_0); prepareAxes(POSITION); prepareVirtualKeys(); addMapperAndConfigure(mapper); @@ -2440,7 +2446,7 @@ TEST_F(SingleTouchInputMapperTest, GetScanCodeState) { TEST_F(SingleTouchInputMapperTest, MarkSupportedKeyCodes) { SingleTouchInputMapper* mapper = new SingleTouchInputMapper(mDevice); - prepareDisplay(InputReaderPolicyInterface::ROTATION_0); + prepareDisplay(DISPLAY_ORIENTATION_0); prepareAxes(POSITION); prepareVirtualKeys(); addMapperAndConfigure(mapper); @@ -2456,7 +2462,7 @@ TEST_F(SingleTouchInputMapperTest, Reset_WhenVirtualKeysAreDown_SendsUp) { // Note: Ideally we should send cancels but the implementation is more straightforward // with up and this will only happen if a device is forcibly removed. SingleTouchInputMapper* mapper = new SingleTouchInputMapper(mDevice); - prepareDisplay(InputReaderPolicyInterface::ROTATION_0); + prepareDisplay(DISPLAY_ORIENTATION_0); prepareAxes(POSITION); prepareVirtualKeys(); addMapperAndConfigure(mapper); @@ -2489,7 +2495,7 @@ TEST_F(SingleTouchInputMapperTest, Reset_WhenVirtualKeysAreDown_SendsUp) { TEST_F(SingleTouchInputMapperTest, Reset_WhenNothingIsPressed_NothingMuchHappens) { SingleTouchInputMapper* mapper = new SingleTouchInputMapper(mDevice); - prepareDisplay(InputReaderPolicyInterface::ROTATION_0); + prepareDisplay(DISPLAY_ORIENTATION_0); prepareAxes(POSITION); prepareVirtualKeys(); addMapperAndConfigure(mapper); @@ -2515,7 +2521,7 @@ TEST_F(SingleTouchInputMapperTest, Reset_WhenNothingIsPressed_NothingMuchHappens TEST_F(SingleTouchInputMapperTest, Process_WhenVirtualKeyIsPressedAndReleasedNormally_SendsKeyDownAndKeyUp) { SingleTouchInputMapper* mapper = new SingleTouchInputMapper(mDevice); - prepareDisplay(InputReaderPolicyInterface::ROTATION_0); + prepareDisplay(DISPLAY_ORIENTATION_0); prepareAxes(POSITION); prepareVirtualKeys(); addMapperAndConfigure(mapper); @@ -2564,7 +2570,7 @@ TEST_F(SingleTouchInputMapperTest, Process_WhenVirtualKeyIsPressedAndReleasedNor TEST_F(SingleTouchInputMapperTest, Process_WhenVirtualKeyIsPressedAndMovedOutOfBounds_SendsKeyDownAndKeyCancel) { SingleTouchInputMapper* mapper = new SingleTouchInputMapper(mDevice); - prepareDisplay(InputReaderPolicyInterface::ROTATION_0); + prepareDisplay(DISPLAY_ORIENTATION_0); prepareAxes(POSITION); prepareVirtualKeys(); addMapperAndConfigure(mapper); @@ -2678,7 +2684,7 @@ TEST_F(SingleTouchInputMapperTest, Process_WhenVirtualKeyIsPressedAndMovedOutOfB TEST_F(SingleTouchInputMapperTest, Process_WhenTouchStartsOutsideDisplayAndMovesIn_SendsDownAsTouchEntersDisplay) { SingleTouchInputMapper* mapper = new SingleTouchInputMapper(mDevice); - prepareDisplay(InputReaderPolicyInterface::ROTATION_0); + prepareDisplay(DISPLAY_ORIENTATION_0); prepareAxes(POSITION); prepareVirtualKeys(); addMapperAndConfigure(mapper); @@ -2746,7 +2752,7 @@ TEST_F(SingleTouchInputMapperTest, Process_WhenTouchStartsOutsideDisplayAndMoves TEST_F(SingleTouchInputMapperTest, Process_NormalSingleTouchGesture) { SingleTouchInputMapper* mapper = new SingleTouchInputMapper(mDevice); - prepareDisplay(InputReaderPolicyInterface::ROTATION_0); + prepareDisplay(DISPLAY_ORIENTATION_0); prepareAxes(POSITION); prepareVirtualKeys(); addMapperAndConfigure(mapper); @@ -2836,7 +2842,7 @@ TEST_F(SingleTouchInputMapperTest, Process_WhenNotOrientationAware_DoesNotRotate FakeInputDispatcher::NotifyMotionArgs args; // Rotation 90. - prepareDisplay(InputReaderPolicyInterface::ROTATION_90); + prepareDisplay(DISPLAY_ORIENTATION_90); processDown(mapper, toRawX(50), toRawY(75)); processSync(mapper); @@ -2857,7 +2863,7 @@ TEST_F(SingleTouchInputMapperTest, Process_WhenOrientationAware_RotatesMotions) FakeInputDispatcher::NotifyMotionArgs args; // Rotation 0. - prepareDisplay(InputReaderPolicyInterface::ROTATION_0); + prepareDisplay(DISPLAY_ORIENTATION_0); processDown(mapper, toRawX(50), toRawY(75)); processSync(mapper); @@ -2870,7 +2876,7 @@ TEST_F(SingleTouchInputMapperTest, Process_WhenOrientationAware_RotatesMotions) ASSERT_NO_FATAL_FAILURE(mFakeDispatcher->assertNotifyMotionWasCalled()); // Rotation 90. - prepareDisplay(InputReaderPolicyInterface::ROTATION_90); + prepareDisplay(DISPLAY_ORIENTATION_90); processDown(mapper, toRawX(50), toRawY(75)); processSync(mapper); @@ -2883,7 +2889,7 @@ TEST_F(SingleTouchInputMapperTest, Process_WhenOrientationAware_RotatesMotions) ASSERT_NO_FATAL_FAILURE(mFakeDispatcher->assertNotifyMotionWasCalled()); // Rotation 180. - prepareDisplay(InputReaderPolicyInterface::ROTATION_180); + prepareDisplay(DISPLAY_ORIENTATION_180); processDown(mapper, toRawX(50), toRawY(75)); processSync(mapper); @@ -2896,7 +2902,7 @@ TEST_F(SingleTouchInputMapperTest, Process_WhenOrientationAware_RotatesMotions) ASSERT_NO_FATAL_FAILURE(mFakeDispatcher->assertNotifyMotionWasCalled()); // Rotation 270. - prepareDisplay(InputReaderPolicyInterface::ROTATION_270); + prepareDisplay(DISPLAY_ORIENTATION_270); processDown(mapper, toRawX(50), toRawY(75)); processSync(mapper); @@ -2911,7 +2917,7 @@ TEST_F(SingleTouchInputMapperTest, Process_WhenOrientationAware_RotatesMotions) TEST_F(SingleTouchInputMapperTest, Process_AllAxes_DefaultCalibration) { SingleTouchInputMapper* mapper = new SingleTouchInputMapper(mDevice); - prepareDisplay(InputReaderPolicyInterface::ROTATION_0); + prepareDisplay(DISPLAY_ORIENTATION_0); prepareAxes(POSITION | PRESSURE | TOOL); addMapperAndConfigure(mapper); @@ -3043,7 +3049,7 @@ void MultiTouchInputMapperTest::processSync(MultiTouchInputMapper* mapper) { TEST_F(MultiTouchInputMapperTest, Process_NormalMultiTouchGesture_WithoutTrackingIds) { MultiTouchInputMapper* mapper = new MultiTouchInputMapper(mDevice); - prepareDisplay(InputReaderPolicyInterface::ROTATION_0); + prepareDisplay(DISPLAY_ORIENTATION_0); prepareAxes(POSITION); prepareVirtualKeys(); addMapperAndConfigure(mapper); @@ -3294,7 +3300,7 @@ TEST_F(MultiTouchInputMapperTest, Process_NormalMultiTouchGesture_WithoutTrackin TEST_F(MultiTouchInputMapperTest, Process_NormalMultiTouchGesture_WithTrackingIds) { MultiTouchInputMapper* mapper = new MultiTouchInputMapper(mDevice); - prepareDisplay(InputReaderPolicyInterface::ROTATION_0); + prepareDisplay(DISPLAY_ORIENTATION_0); prepareAxes(POSITION | ID); prepareVirtualKeys(); addMapperAndConfigure(mapper); @@ -3454,7 +3460,7 @@ TEST_F(MultiTouchInputMapperTest, Process_NormalMultiTouchGesture_WithTrackingId TEST_F(MultiTouchInputMapperTest, Process_AllAxes_WithDefaultCalibration) { MultiTouchInputMapper* mapper = new MultiTouchInputMapper(mDevice); - prepareDisplay(InputReaderPolicyInterface::ROTATION_0); + prepareDisplay(DISPLAY_ORIENTATION_0); prepareAxes(POSITION | TOUCH | TOOL | PRESSURE | ORIENTATION | ID | MINOR); addMapperAndConfigure(mapper); @@ -3499,7 +3505,7 @@ TEST_F(MultiTouchInputMapperTest, Process_AllAxes_WithDefaultCalibration) { TEST_F(MultiTouchInputMapperTest, Process_TouchAndToolAxes_GeometricCalibration) { MultiTouchInputMapper* mapper = new MultiTouchInputMapper(mDevice); - prepareDisplay(InputReaderPolicyInterface::ROTATION_0); + prepareDisplay(DISPLAY_ORIENTATION_0); prepareAxes(POSITION | TOUCH | TOOL | MINOR); addConfigurationProperty("touch.touchSize.calibration", "geometric"); addConfigurationProperty("touch.toolSize.calibration", "geometric"); @@ -3540,7 +3546,7 @@ TEST_F(MultiTouchInputMapperTest, Process_TouchAndToolAxes_GeometricCalibration) TEST_F(MultiTouchInputMapperTest, Process_TouchToolPressureSizeAxes_SummedLinearCalibration) { MultiTouchInputMapper* mapper = new MultiTouchInputMapper(mDevice); - prepareDisplay(InputReaderPolicyInterface::ROTATION_0); + prepareDisplay(DISPLAY_ORIENTATION_0); prepareAxes(POSITION | TOUCH | TOOL); addConfigurationProperty("touch.touchSize.calibration", "pressure"); addConfigurationProperty("touch.toolSize.calibration", "linear"); @@ -3596,7 +3602,7 @@ TEST_F(MultiTouchInputMapperTest, Process_TouchToolPressureSizeAxes_SummedLinear TEST_F(MultiTouchInputMapperTest, Process_TouchToolPressureSizeAxes_AreaCalibration) { MultiTouchInputMapper* mapper = new MultiTouchInputMapper(mDevice); - prepareDisplay(InputReaderPolicyInterface::ROTATION_0); + prepareDisplay(DISPLAY_ORIENTATION_0); prepareAxes(POSITION | TOUCH | TOOL); addConfigurationProperty("touch.touchSize.calibration", "pressure"); addConfigurationProperty("touch.toolSize.calibration", "area"); diff --git a/services/java/com/android/server/InputManager.java b/services/java/com/android/server/InputManager.java index b5becb5..410b8c2 100644 --- a/services/java/com/android/server/InputManager.java +++ b/services/java/com/android/server/InputManager.java @@ -19,10 +19,17 @@ package com.android.server; import com.android.internal.util.XmlUtils; import org.xmlpull.v1.XmlPullParser; +import org.xmlpull.v1.XmlPullParserException; import android.content.Context; import android.content.pm.PackageManager; import android.content.res.Configuration; +import android.content.res.Resources; +import android.content.res.TypedArray; +import android.content.res.XmlResourceParser; +import android.graphics.Bitmap; +import android.graphics.drawable.BitmapDrawable; +import android.graphics.drawable.Drawable; import android.os.Environment; import android.os.SystemProperties; import android.util.Slog; @@ -358,7 +365,49 @@ public class InputManager { pw.println(dumpStr); } } - + + private static final class PointerIcon { + public Bitmap bitmap; + public float hotSpotX; + public float hotSpotY; + + public static PointerIcon load(Resources resources, int resourceId) { + PointerIcon icon = new PointerIcon(); + + XmlResourceParser parser = resources.getXml(resourceId); + final int bitmapRes; + try { + XmlUtils.beginDocument(parser, "pointer-icon"); + + TypedArray a = resources.obtainAttributes( + parser, com.android.internal.R.styleable.PointerIcon); + bitmapRes = a.getResourceId(com.android.internal.R.styleable.PointerIcon_bitmap, 0); + icon.hotSpotX = a.getFloat(com.android.internal.R.styleable.PointerIcon_hotSpotX, 0); + icon.hotSpotY = a.getFloat(com.android.internal.R.styleable.PointerIcon_hotSpotY, 0); + a.recycle(); + } catch (Exception ex) { + Slog.e(TAG, "Exception parsing pointer icon resource.", ex); + return null; + } finally { + parser.close(); + } + + if (bitmapRes == 0) { + Slog.e(TAG, "<pointer-icon> is missing bitmap attribute"); + return null; + } + + Drawable drawable = resources.getDrawable(bitmapRes); + if (!(drawable instanceof BitmapDrawable)) { + Slog.e(TAG, "<pointer-icon> bitmap attribute must refer to a bitmap drawable"); + return null; + } + + icon.bitmap = ((BitmapDrawable)drawable).getBitmap(); + return icon; + } + } + /* * Callbacks from native. */ @@ -480,9 +529,15 @@ public class InputManager { @SuppressWarnings("unused") public int getPointerLayer() { return mWindowManagerService.mPolicy.windowTypeToLayerLw( - WindowManager.LayoutParams.TYPE_DRAG) + WindowManager.LayoutParams.TYPE_POINTER) * WindowManagerService.TYPE_LAYER_MULTIPLIER + WindowManagerService.TYPE_LAYER_OFFSET; } + + @SuppressWarnings("unused") + public PointerIcon getPointerIcon() { + return PointerIcon.load(mContext.getResources(), + com.android.internal.R.drawable.pointericon_default); + } } } diff --git a/services/jni/Android.mk b/services/jni/Android.mk index 845869c..4ccea6e 100644 --- a/services/jni/Android.mk +++ b/services/jni/Android.mk @@ -14,7 +14,10 @@ LOCAL_SRC_FILES:= \ onload.cpp LOCAL_C_INCLUDES += \ - $(JNI_H_INCLUDE) + $(JNI_H_INCLUDE) \ + frameworks/base/services \ + frameworks/base/core/jni \ + external/skia/include/core LOCAL_SHARED_LIBRARIES := \ libandroid_runtime \ @@ -25,6 +28,8 @@ LOCAL_SHARED_LIBRARIES := \ libsystem_server \ libutils \ libui \ + libinput \ + libskia \ libsurfaceflinger_client \ libusbhost @@ -43,4 +48,3 @@ endif LOCAL_MODULE:= libandroid_servers include $(BUILD_SHARED_LIBRARY) - diff --git a/services/jni/com_android_server_InputManager.cpp b/services/jni/com_android_server_InputManager.cpp index c757ada..5ed63f0 100644 --- a/services/jni/com_android_server_InputManager.cpp +++ b/services/jni/com_android_server_InputManager.cpp @@ -24,27 +24,23 @@ // Log debug messages about InputDispatcherPolicy #define DEBUG_INPUT_DISPATCHER_POLICY 0 -// Log debug messages about PointerController -#define DEBUG_POINTER_CONTROLLER 1 - #include "JNIHelp.h" #include "jni.h" #include <limits.h> #include <android_runtime/AndroidRuntime.h> -#include <ui/InputReader.h> -#include <ui/InputDispatcher.h> -#include <ui/InputManager.h> -#include <ui/InputTransport.h> + #include <utils/Log.h> #include <utils/threads.h> -#include <surfaceflinger/Surface.h> -#include <surfaceflinger/SurfaceComposerClient.h> -#include <surfaceflinger/ISurfaceComposer.h> -#include "../../core/jni/android_view_KeyEvent.h" -#include "../../core/jni/android_view_MotionEvent.h" -#include "../../core/jni/android_view_InputChannel.h" +#include <input/InputManager.h> +#include <input/PointerController.h> + +#include <android_view_KeyEvent.h> +#include <android_view_MotionEvent.h> +#include <android_view_InputChannel.h> +#include <android/graphics/GraphicsJNI.h> + #include "com_android_server_PowerManagerService.h" namespace android { @@ -67,6 +63,7 @@ static struct { jmethodID getExcludedDeviceNames; jmethodID getMaxEventsPerSecond; jmethodID getPointerLayer; + jmethodID getPointerIcon; } gCallbacksClassInfo; static struct { @@ -136,57 +133,13 @@ static struct { jfieldID navigation; } gConfigurationClassInfo; -// ---------------------------------------------------------------------------- - -static inline nsecs_t now() { - return systemTime(SYSTEM_TIME_MONOTONIC); -} - -// ---------------------------------------------------------------------------- - -class PointerController : public PointerControllerInterface { -protected: - virtual ~PointerController(); - -public: - PointerController(int32_t pointerLayer); - - virtual bool getBounds(float* outMinX, float* outMinY, - float* outMaxX, float* outMaxY) const; - virtual void move(float deltaX, float deltaY); - virtual void setButtonState(uint32_t buttonState); - virtual uint32_t getButtonState() const; - virtual void setPosition(float x, float y); - virtual void getPosition(float* outX, float* outY) const; - - void setDisplaySize(int32_t width, int32_t height); - void setDisplayOrientation(int32_t orientation); - -private: - mutable Mutex mLock; - - int32_t mPointerLayer; - sp<SurfaceComposerClient> mSurfaceComposerClient; - sp<SurfaceControl> mSurfaceControl; - - struct Locked { - int32_t displayWidth; - int32_t displayHeight; - int32_t displayOrientation; - - float pointerX; - float pointerY; - uint32_t buttonState; - - bool wantVisible; - bool visible; - bool drawn; - } mLocked; +static struct { + jclass clazz; - bool getBoundsLocked(float* outMinX, float* outMinY, float* outMaxX, float* outMaxY) const; - void setPositionLocked(float x, float y); - void updateLocked(); -}; + jfieldID bitmap; + jfieldID hotSpotX; + jfieldID hotSpotY; +} gPointerIconClassInfo; // ---------------------------------------------------------------------------- @@ -538,13 +491,30 @@ sp<PointerControllerInterface> NativeInputManager::obtainPointerController(int32 if (controller == NULL) { JNIEnv* env = jniEnv(); jint layer = env->CallIntMethod(mCallbacksObj, gCallbacksClassInfo.getPointerLayer); - checkAndClearExceptionFromCallback(env, "getPointerLayer"); + if (checkAndClearExceptionFromCallback(env, "getPointerLayer")) { + layer = -1; + } controller = new PointerController(layer); mLocked.pointerController = controller; controller->setDisplaySize(mLocked.displayWidth, mLocked.displayHeight); controller->setDisplayOrientation(mLocked.displayOrientation); + + jobject iconObj = env->CallObjectMethod(mCallbacksObj, gCallbacksClassInfo.getPointerIcon); + if (!checkAndClearExceptionFromCallback(env, "getPointerIcon") && iconObj) { + jfloat iconHotSpotX = env->GetFloatField(iconObj, gPointerIconClassInfo.hotSpotX); + jfloat iconHotSpotY = env->GetFloatField(iconObj, gPointerIconClassInfo.hotSpotY); + jobject iconBitmapObj = env->GetObjectField(iconObj, gPointerIconClassInfo.bitmap); + if (iconBitmapObj) { + SkBitmap* iconBitmap = GraphicsJNI::getNativeBitmap(env, iconBitmapObj); + if (iconBitmap) { + controller->setPointerIcon(iconBitmap, iconHotSpotX, iconHotSpotY); + } + env->DeleteLocalRef(iconBitmapObj); + } + env->DeleteLocalRef(iconObj); + } } return controller; } @@ -984,293 +954,6 @@ bool NativeInputManager::checkInjectEventsPermissionNonReentrant( return result; } -// --- PointerController --- - -PointerController::PointerController(int32_t pointerLayer) : - mPointerLayer(pointerLayer) { - AutoMutex _l(mLock); - - mLocked.displayWidth = -1; - mLocked.displayHeight = -1; - mLocked.displayOrientation = InputReaderPolicyInterface::ROTATION_0; - - mLocked.pointerX = 0; - mLocked.pointerY = 0; - mLocked.buttonState = 0; - - mLocked.wantVisible = false; - mLocked.visible = false; - mLocked.drawn = false; -} - -PointerController::~PointerController() { - mSurfaceControl.clear(); - mSurfaceComposerClient.clear(); -} - -bool PointerController::getBounds(float* outMinX, float* outMinY, - float* outMaxX, float* outMaxY) const { - AutoMutex _l(mLock); - - return getBoundsLocked(outMinX, outMinY, outMaxX, outMaxY); -} - -bool PointerController::getBoundsLocked(float* outMinX, float* outMinY, - float* outMaxX, float* outMaxY) const { - if (mLocked.displayWidth <= 0 || mLocked.displayHeight <= 0) { - return false; - } - - *outMinX = 0; - *outMinY = 0; - switch (mLocked.displayOrientation) { - case InputReaderPolicyInterface::ROTATION_90: - case InputReaderPolicyInterface::ROTATION_270: - *outMaxX = mLocked.displayHeight; - *outMaxY = mLocked.displayWidth; - break; - default: - *outMaxX = mLocked.displayWidth; - *outMaxY = mLocked.displayHeight; - break; - } - return true; -} - -void PointerController::move(float deltaX, float deltaY) { -#if DEBUG_POINTER_CONTROLLER - LOGD("Move pointer by deltaX=%0.3f, deltaY=%0.3f", deltaX, deltaY); -#endif - if (deltaX == 0.0f && deltaY == 0.0f) { - return; - } - - AutoMutex _l(mLock); - - setPositionLocked(mLocked.pointerX + deltaX, mLocked.pointerY + deltaY); -} - -void PointerController::setButtonState(uint32_t buttonState) { - AutoMutex _l(mLock); - - if (mLocked.buttonState != buttonState) { - mLocked.buttonState = buttonState; - mLocked.wantVisible = true; - updateLocked(); - } -} - -uint32_t PointerController::getButtonState() const { - AutoMutex _l(mLock); - - return mLocked.buttonState; -} - -void PointerController::setPosition(float x, float y) { - AutoMutex _l(mLock); - - setPositionLocked(x, y); -} - -void PointerController::setPositionLocked(float x, float y) { - float minX, minY, maxX, maxY; - if (getBoundsLocked(&minX, &minY, &maxX, &maxY)) { - if (x <= minX) { - mLocked.pointerX = minX; - } else if (x >= maxX) { - mLocked.pointerX = maxX; - } else { - mLocked.pointerX = x; - } - if (y <= minY) { - mLocked.pointerY = minY; - } else if (y >= maxY) { - mLocked.pointerY = maxY; - } else { - mLocked.pointerY = y; - } - mLocked.wantVisible = true; - updateLocked(); - } -} - -void PointerController::getPosition(float* outX, float* outY) const { - AutoMutex _l(mLock); - - *outX = mLocked.pointerX; - *outY = mLocked.pointerY; -} - -void PointerController::updateLocked() { -#if DEBUG_POINTER_CONTROLLER - LOGD("Pointer at (%f, %f).", mLocked.pointerX, mLocked.pointerY); -#endif - - if (!mLocked.wantVisible && !mLocked.visible) { - return; - } - - if (mSurfaceComposerClient == NULL) { - mSurfaceComposerClient = new SurfaceComposerClient(); - } - - if (mSurfaceControl == NULL) { - mSurfaceControl = mSurfaceComposerClient->createSurface(getpid(), - String8("Pointer"), 0, 16, 16, PIXEL_FORMAT_RGBA_8888); - if (mSurfaceControl == NULL) { - LOGE("Error creating pointer surface."); - return; - } - } - - status_t status = mSurfaceComposerClient->openTransaction(); - if (status) { - LOGE("Error opening surface transaction to update pointer surface."); - return; - } - - if (mLocked.wantVisible) { - if (!mLocked.drawn) { - mLocked.drawn = true; - - sp<Surface> surface = mSurfaceControl->getSurface(); - Surface::SurfaceInfo surfaceInfo; - status = surface->lock(&surfaceInfo); - if (status) { - LOGE("Error %d locking pointer surface before drawing.", status); - goto CloseTransaction; - } - - // TODO: Load pointers from assets and allow them to be set. - char* bitmap = (char*)surfaceInfo.bits; - ssize_t bpr = surfaceInfo.s * 4; - for (int y = 0; y < surfaceInfo.h; y++) { - for (int x = 0; x < surfaceInfo.w; x++) { - bitmap[y * bpr + x * 4] = 128; - bitmap[y * bpr + x * 4 + 1] = 255; - bitmap[y * bpr + x * 4 + 2] = 128; - bitmap[y * bpr + x * 4 + 3] = 255; - } - } - - status = surface->unlockAndPost(); - if (status) { - LOGE("Error %d unlocking pointer surface after drawing.", status); - goto CloseTransaction; - } - } - - status = mSurfaceControl->setPosition(mLocked.pointerX, mLocked.pointerY); - if (status) { - LOGE("Error %d moving pointer surface.", status); - goto CloseTransaction; - } - - if (!mLocked.visible) { - mLocked.visible = true; - - mSurfaceControl->setLayer(mPointerLayer); - - LOGD("XXX Show"); - status = mSurfaceControl->show(mPointerLayer); - if (status) { - LOGE("Error %d showing pointer surface.", status); - goto CloseTransaction; - } - } - } else { - if (mLocked.visible) { - mLocked.visible = false; - - if (mSurfaceControl != NULL) { - status = mSurfaceControl->hide(); - if (status) { - LOGE("Error %d hiding pointer surface.", status); - goto CloseTransaction; - } - } - } - } - -CloseTransaction: - status = mSurfaceComposerClient->closeTransaction(); - if (status) { - LOGE("Error closing surface transaction to update pointer surface."); - } -} - -void PointerController::setDisplaySize(int32_t width, int32_t height) { - AutoMutex _l(mLock); - - if (mLocked.displayWidth != width || mLocked.displayHeight != height) { - mLocked.displayWidth = width; - mLocked.displayHeight = height; - - float minX, minY, maxX, maxY; - if (getBoundsLocked(&minX, &minY, &maxX, &maxY)) { - mLocked.pointerX = (minX + maxX) * 0.5f; - mLocked.pointerY = (minY + maxY) * 0.5f; - } else { - mLocked.pointerX = 0; - mLocked.pointerY = 0; - } - - updateLocked(); - } -} - -void PointerController::setDisplayOrientation(int32_t orientation) { - AutoMutex _l(mLock); - - if (mLocked.displayOrientation != orientation) { - float absoluteX, absoluteY; - - // Map from oriented display coordinates to absolute display coordinates. - switch (mLocked.displayOrientation) { - case InputReaderPolicyInterface::ROTATION_90: - absoluteX = mLocked.displayWidth - mLocked.pointerY; - absoluteY = mLocked.pointerX; - break; - case InputReaderPolicyInterface::ROTATION_180: - absoluteX = mLocked.displayWidth - mLocked.pointerX; - absoluteY = mLocked.displayHeight - mLocked.pointerY; - break; - case InputReaderPolicyInterface::ROTATION_270: - absoluteX = mLocked.pointerY; - absoluteY = mLocked.displayHeight - mLocked.pointerX; - break; - default: - absoluteX = mLocked.pointerX; - absoluteY = mLocked.pointerY; - break; - } - - // Map from absolute display coordinates to oriented display coordinates. - switch (orientation) { - case InputReaderPolicyInterface::ROTATION_90: - mLocked.pointerX = absoluteY; - mLocked.pointerY = mLocked.displayWidth - absoluteX; - break; - case InputReaderPolicyInterface::ROTATION_180: - mLocked.pointerX = mLocked.displayWidth - absoluteX; - mLocked.pointerY = mLocked.displayHeight - absoluteY; - break; - case InputReaderPolicyInterface::ROTATION_270: - mLocked.pointerX = mLocked.displayHeight - absoluteY; - mLocked.pointerY = absoluteX; - break; - default: - mLocked.pointerX = absoluteX; - mLocked.pointerY = absoluteY; - break; - } - - mLocked.displayOrientation = orientation; - - updateLocked(); - } -} - // ---------------------------------------------------------------------------- @@ -1715,6 +1398,9 @@ int register_android_server_InputManager(JNIEnv* env) { GET_METHOD_ID(gCallbacksClassInfo.getPointerLayer, gCallbacksClassInfo.clazz, "getPointerLayer", "()I"); + GET_METHOD_ID(gCallbacksClassInfo.getPointerIcon, gCallbacksClassInfo.clazz, + "getPointerIcon", "()Lcom/android/server/InputManager$PointerIcon;"); + // InputWindow FIND_CLASS(gInputWindowClassInfo.clazz, "com/android/server/InputWindow"); @@ -1854,6 +1540,19 @@ int register_android_server_InputManager(JNIEnv* env) { GET_FIELD_ID(gConfigurationClassInfo.navigation, gConfigurationClassInfo.clazz, "navigation", "I"); + // PointerIcon + + FIND_CLASS(gPointerIconClassInfo.clazz, "com/android/server/InputManager$PointerIcon"); + + GET_FIELD_ID(gPointerIconClassInfo.bitmap, gPointerIconClassInfo.clazz, + "bitmap", "Landroid/graphics/Bitmap;"); + + GET_FIELD_ID(gPointerIconClassInfo.hotSpotX, gPointerIconClassInfo.clazz, + "hotSpotX", "F"); + + GET_FIELD_ID(gPointerIconClassInfo.hotSpotY, gPointerIconClassInfo.clazz, + "hotSpotY", "F"); + return 0; } diff --git a/telephony/java/com/android/internal/telephony/sip/SipPhone.java b/telephony/java/com/android/internal/telephony/sip/SipPhone.java index 461f01d..f9bc0e9 100755 --- a/telephony/java/com/android/internal/telephony/sip/SipPhone.java +++ b/telephony/java/com/android/internal/telephony/sip/SipPhone.java @@ -17,6 +17,7 @@ package com.android.internal.telephony.sip; import android.content.Context; +import android.media.AudioManager; import android.net.rtp.AudioGroup; import android.net.sip.SipAudioCall; import android.net.sip.SipErrorCode; @@ -133,7 +134,7 @@ public class SipPhone extends SipPhoneBase { (ringingCall.getState() == Call.State.WAITING)) { if (DEBUG) Log.d(LOG_TAG, "acceptCall"); // Always unmute when answering a new call - setMute(false); + ringingCall.setMute(false); ringingCall.acceptCall(); } else { throw new CallStateException("phone not ringing"); @@ -173,7 +174,7 @@ public class SipPhone extends SipPhoneBase { throw new CallStateException("cannot dial in current state"); } - setMute(false); + foregroundCall.setMute(false); try { Connection c = foregroundCall.dial(dialString); return c; @@ -291,16 +292,13 @@ public class SipPhone extends SipPhoneBase { @Override public void setEchoSuppressionEnabled(boolean enabled) { + // TODO: Remove the enabled argument. We should check the speakerphone + // state with AudioManager instead of keeping a state here so the + // method with a state argument is redundant. Also rename the method + // to something like onSpeaerphoneStateChanged(). Echo suppression may + // not be available on every device. synchronized (SipPhone.class) { - AudioGroup audioGroup = foregroundCall.getAudioGroup(); - if (audioGroup == null) return; - int mode = audioGroup.getMode(); - audioGroup.setMode(enabled - ? AudioGroup.MODE_ECHO_SUPPRESSION - : AudioGroup.MODE_NORMAL); - if (DEBUG) Log.d(LOG_TAG, String.format( - "audioGroup mode change: %d --> %d", mode, - audioGroup.getMode())); + foregroundCall.setAudioGroupMode(); } } @@ -453,13 +451,33 @@ public class SipPhone extends SipPhoneBase { ((SipConnection) connections.get(0)).acceptCall(); } - void hold() throws CallStateException { - setState(State.HOLDING); + private boolean isSpeakerOn() { + return ((AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE)) + .isSpeakerphoneOn(); + } + + void setAudioGroupMode() { AudioGroup audioGroup = getAudioGroup(); - if (audioGroup != null) { + if (audioGroup == null) return; + int mode = audioGroup.getMode(); + if (state == State.HOLDING) { audioGroup.setMode(AudioGroup.MODE_ON_HOLD); + } else if (getMute()) { + audioGroup.setMode(AudioGroup.MODE_MUTED); + } else if (isSpeakerOn()) { + audioGroup.setMode(AudioGroup.MODE_ECHO_SUPPRESSION); + } else { + audioGroup.setMode(AudioGroup.MODE_NORMAL); } + if (DEBUG) Log.d(LOG_TAG, String.format( + "audioGroup mode change: %d --> %d", mode, + audioGroup.getMode())); + } + + void hold() throws CallStateException { + setState(State.HOLDING); for (Connection c : connections) ((SipConnection) c).hold(); + setAudioGroupMode(); } void unhold() throws CallStateException { @@ -468,19 +486,19 @@ public class SipPhone extends SipPhoneBase { for (Connection c : connections) { ((SipConnection) c).unhold(audioGroup); } + setAudioGroupMode(); } void setMute(boolean muted) { - AudioGroup audioGroup = getAudioGroup(); - if (audioGroup == null) return; - audioGroup.setMode( - muted ? AudioGroup.MODE_MUTED : AudioGroup.MODE_NORMAL); + for (Connection c : connections) { + ((SipConnection) c).setMute(muted); + } } boolean getMute() { - AudioGroup audioGroup = getAudioGroup(); - if (audioGroup == null) return false; - return (audioGroup.getMode() == AudioGroup.MODE_MUTED); + return connections.isEmpty() + ? false + : ((SipConnection) connections.get(0)).getMute(); } void merge(SipCall that) throws CallStateException { @@ -739,6 +757,17 @@ public class SipPhone extends SipPhoneBase { } } + void setMute(boolean muted) { + if ((mSipAudioCall != null) && (muted != mSipAudioCall.isMuted())) { + mSipAudioCall.toggleMute(); + } + } + + boolean getMute() { + return (mSipAudioCall == null) ? false + : mSipAudioCall.isMuted(); + } + @Override protected void setState(Call.State state) { if (state == mState) return; diff --git a/voip/jni/rtp/AudioGroup.cpp b/voip/jni/rtp/AudioGroup.cpp index cba1123..64db250 100644 --- a/voip/jni/rtp/AudioGroup.cpp +++ b/voip/jni/rtp/AudioGroup.cpp @@ -63,6 +63,14 @@ int gRandom = -1; // real jitter buffer. For a stream at 8000Hz it takes 8192 bytes. These numbers // are chosen by experiments and each of them can be adjusted as needed. +// Originally a stream does not send packets when it is receive-only or there is +// nothing to mix. However, this causes some problems with certain firewalls and +// proxies. A firewall might remove a port mapping when there is no outgoing +// packet for a preiod of time, and a proxy might wait for incoming packets from +// both sides before start forwarding. To solve these problems, we send out a +// silence packet on the stream for every second. It should be good enough to +// keep the stream alive with relatively low resources. + // Other notes: // + We use elapsedRealtime() to get the time. Since we use 32bit variables // instead of 64bit ones, comparison must be done by subtraction. @@ -110,7 +118,7 @@ private: int mSampleRate; int mSampleCount; int mInterval; - int mLogThrottle; + int mKeepAlive; int16_t *mBuffer; int mBufferMask; @@ -262,12 +270,8 @@ void AudioStream::encode(int tick, AudioStream *chain) ++mSequence; mTimestamp += mSampleCount; - if (mMode == RECEIVE_ONLY) { - return; - } - // If there is an ongoing DTMF event, send it now. - if (mDtmfEvent != -1) { + if (mMode != RECEIVE_ONLY && mDtmfEvent != -1) { int duration = mTimestamp - mDtmfStart; // Make sure duration is reasonable. if (duration >= 0 && duration < mSampleRate * 100) { @@ -289,43 +293,55 @@ void AudioStream::encode(int tick, AudioStream *chain) mDtmfEvent = -1; } - // It is time to mix streams. - bool mixed = false; int32_t buffer[mSampleCount + 3]; - memset(buffer, 0, sizeof(buffer)); - while (chain) { - if (chain != this && - chain->mix(buffer, tick - mInterval, tick, mSampleRate)) { - mixed = true; + int16_t samples[mSampleCount]; + if (mMode == RECEIVE_ONLY) { + if ((mTick ^ mKeepAlive) >> 10 == 0) { + return; } - chain = chain->mNext; - } - if (!mixed) { - if ((mTick ^ mLogThrottle) >> 10) { - mLogThrottle = mTick; - LOGV("stream[%d] no data", mSocket); + mKeepAlive = mTick; + memset(samples, 0, sizeof(samples)); + } else { + // Mix all other streams. + bool mixed = false; + memset(buffer, 0, sizeof(buffer)); + while (chain) { + if (chain != this && + chain->mix(buffer, tick - mInterval, tick, mSampleRate)) { + mixed = true; + } + chain = chain->mNext; } - return; - } - // Cook the packet and send it out. - int16_t samples[mSampleCount]; - for (int i = 0; i < mSampleCount; ++i) { - int32_t sample = buffer[i]; - if (sample < -32768) { - sample = -32768; - } - if (sample > 32767) { - sample = 32767; + if (mixed) { + // Saturate into 16 bits. + for (int i = 0; i < mSampleCount; ++i) { + int32_t sample = buffer[i]; + if (sample < -32768) { + sample = -32768; + } + if (sample > 32767) { + sample = 32767; + } + samples[i] = sample; + } + } else { + if ((mTick ^ mKeepAlive) >> 10 == 0) { + return; + } + mKeepAlive = mTick; + memset(samples, 0, sizeof(samples)); + LOGV("stream[%d] no data", mSocket); } - samples[i] = sample; } + if (!mCodec) { // Special case for device stream. send(mSocket, samples, sizeof(samples), MSG_DONTWAIT); return; } + // Cook the packet and send it out. buffer[0] = htonl(mCodecMagic | mSequence); buffer[1] = htonl(mTimestamp); buffer[2] = mSsrc; @@ -883,7 +899,7 @@ void add(JNIEnv *env, jobject thiz, jint mode, int codecType = -1; char codecName[16]; int sampleRate = -1; - sscanf(codecSpec, "%d %[^/]%*c%d", &codecType, codecName, &sampleRate); + sscanf(codecSpec, "%d %15[^/]%*c%d", &codecType, codecName, &sampleRate); codec = newAudioCodec(codecName); int sampleCount = (codec ? codec->set(sampleRate, codecSpec) : -1); env->ReleaseStringUTFChars(jCodecSpec, codecSpec); |
