diff options
54 files changed, 1233 insertions, 1108 deletions
diff --git a/Android.mk b/Android.mk index ad7027c5af15..f581515c0ad9 100644 --- a/Android.mk +++ b/Android.mk @@ -366,7 +366,7 @@ framework_docs_LOCAL_DROIDDOC_OPTIONS := \ -since ./frameworks/base/api/7.xml 7 \ -since ./frameworks/base/api/8.xml 8 \ -since ./frameworks/base/api/9.xml 9 \ - -since ./frameworks/base/api/current.xml HC \ + -since ./frameworks/base/api/current.xml Honeycomb \ -werror -hide 113 \ -overview $(LOCAL_PATH)/core/java/overview.html @@ -436,15 +436,14 @@ web_docs_sample_code_flags := \ ## SDK version identifiers used in the published docs # major[.minor] version for current SDK. (full releases only) -framework_docs_SDK_VERSION:=2.3 +framework_docs_SDK_VERSION:=3.0 # release version (ie "Release x") (full releases only) -framework_docs_SDK_REL_ID:=1 +framework_docs_SDK_REL_ID:=Preview framework_docs_LOCAL_DROIDDOC_OPTIONS += \ -hdf sdk.version $(framework_docs_SDK_VERSION) \ -hdf sdk.rel.id $(framework_docs_SDK_REL_ID) \ -hdf sdk.preview true \ - -hdf sdk.preview.version Honeycomb # ==== the api stubs and current.xml =========================== include $(CLEAR_VARS) diff --git a/api/11.xml b/api/11.xml index 6d12990facd7..b087c20f922d 100644 --- a/api/11.xml +++ b/api/11.xml @@ -1790,7 +1790,7 @@ type="int" transient="false" volatile="false" - value="16843501" + value="16843499" static="true" final="true" deprecated="not deprecated" @@ -1812,7 +1812,7 @@ type="int" transient="false" volatile="false" - value="16843510" + value="16843508" static="true" final="true" deprecated="not deprecated" @@ -1823,7 +1823,7 @@ type="int" transient="false" volatile="false" - value="16843509" + value="16843507" static="true" final="true" deprecated="not deprecated" @@ -1834,7 +1834,7 @@ type="int" transient="false" volatile="false" - value="16843511" + value="16843509" static="true" final="true" deprecated="not deprecated" @@ -1867,7 +1867,7 @@ type="int" transient="false" volatile="false" - value="16843517" + value="16843515" static="true" final="true" deprecated="not deprecated" @@ -1889,7 +1889,7 @@ type="int" transient="false" volatile="false" - value="16843513" + value="16843511" static="true" final="true" deprecated="not deprecated" @@ -1911,7 +1911,7 @@ type="int" transient="false" volatile="false" - value="16843540" + value="16843538" static="true" final="true" deprecated="not deprecated" @@ -1922,7 +1922,7 @@ type="int" transient="false" volatile="false" - value="16843539" + value="16843537" static="true" final="true" deprecated="not deprecated" @@ -1933,7 +1933,7 @@ type="int" transient="false" volatile="false" - value="16843541" + value="16843539" static="true" final="true" deprecated="not deprecated" @@ -1944,7 +1944,7 @@ type="int" transient="false" volatile="false" - value="16843512" + value="16843510" static="true" final="true" deprecated="not deprecated" @@ -1955,7 +1955,7 @@ type="int" transient="false" volatile="false" - value="16843518" + value="16843516" static="true" final="true" deprecated="not deprecated" @@ -1966,7 +1966,7 @@ type="int" transient="false" volatile="false" - value="16843519" + value="16843517" static="true" final="true" deprecated="not deprecated" @@ -2043,7 +2043,7 @@ type="int" transient="false" volatile="false" - value="16843607" + value="16843605" static="true" final="true" deprecated="not deprecated" @@ -2065,7 +2065,7 @@ type="int" transient="false" volatile="false" - value="16843531" + value="16843529" static="true" final="true" deprecated="not deprecated" @@ -2109,7 +2109,7 @@ type="int" transient="false" volatile="false" - value="16843572" + value="16843570" static="true" final="true" deprecated="not deprecated" @@ -2142,7 +2142,7 @@ type="int" transient="false" volatile="false" - value="16843553" + value="16843551" static="true" final="true" deprecated="not deprecated" @@ -2208,7 +2208,7 @@ type="int" transient="false" volatile="false" - value="16843508" + value="16843506" static="true" final="true" deprecated="not deprecated" @@ -2274,7 +2274,7 @@ type="int" transient="false" volatile="false" - value="16843548" + value="16843546" static="true" final="true" deprecated="not deprecated" @@ -2340,7 +2340,7 @@ type="int" transient="false" volatile="false" - value="16843537" + value="16843535" static="true" final="true" deprecated="not deprecated" @@ -2450,7 +2450,7 @@ type="int" transient="false" volatile="false" - value="16843550" + value="16843548" static="true" final="true" deprecated="not deprecated" @@ -2494,7 +2494,7 @@ type="int" transient="false" volatile="false" - value="16843565" + value="16843563" static="true" final="true" deprecated="not deprecated" @@ -2582,7 +2582,7 @@ type="int" transient="false" volatile="false" - value="16843526" + value="16843524" static="true" final="true" deprecated="not deprecated" @@ -2593,7 +2593,7 @@ type="int" transient="false" volatile="false" - value="16843525" + value="16843523" static="true" final="true" deprecated="not deprecated" @@ -2626,7 +2626,7 @@ type="int" transient="false" volatile="false" - value="16843569" + value="16843567" static="true" final="true" deprecated="not deprecated" @@ -2637,7 +2637,7 @@ type="int" transient="false" volatile="false" - value="16843568" + value="16843566" static="true" final="true" deprecated="not deprecated" @@ -2703,7 +2703,7 @@ type="int" transient="false" volatile="false" - value="16843598" + value="16843596" static="true" final="true" deprecated="not deprecated" @@ -3220,7 +3220,7 @@ type="int" transient="false" volatile="false" - value="16843581" + value="16843579" static="true" final="true" deprecated="not deprecated" @@ -3275,7 +3275,7 @@ type="int" transient="false" volatile="false" - value="16843595" + value="16843593" static="true" final="true" deprecated="not deprecated" @@ -3385,7 +3385,7 @@ type="int" transient="false" volatile="false" - value="16843600" + value="16843598" static="true" final="true" deprecated="not deprecated" @@ -3451,7 +3451,7 @@ type="int" transient="false" volatile="false" - value="16843530" + value="16843528" static="true" final="true" deprecated="not deprecated" @@ -3572,7 +3572,7 @@ type="int" transient="false" volatile="false" - value="16843566" + value="16843564" static="true" final="true" deprecated="not deprecated" @@ -3583,7 +3583,7 @@ type="int" transient="false" volatile="false" - value="16843564" + value="16843562" static="true" final="true" deprecated="not deprecated" @@ -3594,7 +3594,7 @@ type="int" transient="false" volatile="false" - value="16843532" + value="16843530" static="true" final="true" deprecated="not deprecated" @@ -3825,7 +3825,7 @@ type="int" transient="false" volatile="false" - value="16843604" + value="16843602" static="true" final="true" deprecated="not deprecated" @@ -3836,7 +3836,7 @@ type="int" transient="false" volatile="false" - value="16843603" + value="16843601" static="true" final="true" deprecated="not deprecated" @@ -3946,7 +3946,7 @@ type="int" transient="false" volatile="false" - value="16843534" + value="16843532" static="true" final="true" deprecated="not deprecated" @@ -4001,7 +4001,7 @@ type="int" transient="false" volatile="false" - value="16843535" + value="16843533" static="true" final="true" deprecated="not deprecated" @@ -4199,7 +4199,7 @@ type="int" transient="false" volatile="false" - value="16843575" + value="16843573" static="true" final="true" deprecated="not deprecated" @@ -4221,7 +4221,7 @@ type="int" transient="false" volatile="false" - value="16843580" + value="16843578" static="true" final="true" deprecated="not deprecated" @@ -4232,7 +4232,7 @@ type="int" transient="false" volatile="false" - value="16843577" + value="16843575" static="true" final="true" deprecated="not deprecated" @@ -4243,7 +4243,7 @@ type="int" transient="false" volatile="false" - value="16843578" + value="16843576" static="true" final="true" deprecated="not deprecated" @@ -4254,7 +4254,7 @@ type="int" transient="false" volatile="false" - value="16843611" + value="16843609" static="true" final="true" deprecated="not deprecated" @@ -4265,7 +4265,7 @@ type="int" transient="false" volatile="false" - value="16843576" + value="16843574" static="true" final="true" deprecated="not deprecated" @@ -4276,7 +4276,7 @@ type="int" transient="false" volatile="false" - value="16843579" + value="16843577" static="true" final="true" deprecated="not deprecated" @@ -4375,7 +4375,7 @@ type="int" transient="false" volatile="false" - value="16843583" + value="16843581" static="true" final="true" deprecated="not deprecated" @@ -4430,7 +4430,7 @@ type="int" transient="false" volatile="false" - value="16843589" + value="16843587" static="true" final="true" deprecated="not deprecated" @@ -4514,7 +4514,7 @@ visibility="public" > </field> -<field name="fragmentNextEnterAnimation" +<field name="fragmentFadeEnterAnimation" type="int" transient="false" volatile="false" @@ -4525,7 +4525,7 @@ visibility="public" > </field> -<field name="fragmentNextExitAnimation" +<field name="fragmentFadeExitAnimation" type="int" transient="false" volatile="false" @@ -4558,28 +4558,6 @@ visibility="public" > </field> -<field name="fragmentPrevEnterAnimation" - type="int" - transient="false" - volatile="false" - value="16843499" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="fragmentPrevExitAnimation" - type="int" - transient="false" - volatile="false" - value="16843500" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> <field name="freezesText" type="int" transient="false" @@ -4969,7 +4947,7 @@ type="int" transient="false" volatile="false" - value="16843533" + value="16843531" static="true" final="true" deprecated="not deprecated" @@ -4980,7 +4958,7 @@ type="int" transient="false" volatile="false" - value="16843551" + value="16843549" static="true" final="true" deprecated="not deprecated" @@ -5013,7 +4991,7 @@ type="int" transient="false" volatile="false" - value="16843605" + value="16843603" static="true" final="true" deprecated="not deprecated" @@ -5068,7 +5046,7 @@ type="int" transient="false" volatile="false" - value="16843516" + value="16843514" static="true" final="true" deprecated="not deprecated" @@ -5189,7 +5167,7 @@ type="int" transient="false" volatile="false" - value="16843504" + value="16843502" static="true" final="true" deprecated="not deprecated" @@ -5200,7 +5178,7 @@ type="int" transient="false" volatile="false" - value="16843502" + value="16843500" static="true" final="true" deprecated="not deprecated" @@ -5211,7 +5189,7 @@ type="int" transient="false" volatile="false" - value="16843503" + value="16843501" static="true" final="true" deprecated="not deprecated" @@ -5321,7 +5299,7 @@ type="int" transient="false" volatile="false" - value="16843546" + value="16843544" static="true" final="true" deprecated="not deprecated" @@ -5497,7 +5475,7 @@ type="int" transient="false" volatile="false" - value="16843573" + value="16843571" static="true" final="true" deprecated="not deprecated" @@ -5596,7 +5574,7 @@ type="int" transient="false" volatile="false" - value="16843567" + value="16843565" static="true" final="true" deprecated="not deprecated" @@ -5827,7 +5805,7 @@ type="int" transient="false" volatile="false" - value="16843612" + value="16843610" static="true" final="true" deprecated="not deprecated" @@ -5860,7 +5838,7 @@ type="int" transient="false" volatile="false" - value="16843606" + value="16843604" static="true" final="true" deprecated="not deprecated" @@ -6289,7 +6267,7 @@ type="int" transient="false" volatile="false" - value="16843506" + value="16843504" static="true" final="true" deprecated="not deprecated" @@ -6333,7 +6311,7 @@ type="int" transient="false" volatile="false" - value="16843527" + value="16843525" static="true" final="true" deprecated="not deprecated" @@ -6344,7 +6322,7 @@ type="int" transient="false" volatile="false" - value="16843521" + value="16843519" static="true" final="true" deprecated="not deprecated" @@ -6432,7 +6410,7 @@ type="int" transient="false" volatile="false" - value="16843529" + value="16843527" static="true" final="true" deprecated="not deprecated" @@ -6487,7 +6465,7 @@ type="int" transient="false" volatile="false" - value="16843586" + value="16843584" static="true" final="true" deprecated="not deprecated" @@ -6641,7 +6619,7 @@ type="int" transient="false" volatile="false" - value="16843585" + value="16843583" static="true" final="true" deprecated="not deprecated" @@ -6795,7 +6773,7 @@ type="int" transient="false" volatile="false" - value="16843582" + value="16843580" static="true" final="true" deprecated="not deprecated" @@ -6927,7 +6905,7 @@ type="int" transient="false" volatile="false" - value="16843552" + value="16843550" static="true" final="true" deprecated="not deprecated" @@ -7323,7 +7301,7 @@ type="int" transient="false" volatile="false" - value="16843522" + value="16843520" static="true" final="true" deprecated="not deprecated" @@ -7477,7 +7455,7 @@ type="int" transient="false" volatile="false" - value="16843547" + value="16843545" static="true" final="true" deprecated="not deprecated" @@ -7642,7 +7620,7 @@ type="int" transient="false" volatile="false" - value="16843610" + value="16843608" static="true" final="true" deprecated="not deprecated" @@ -7961,7 +7939,7 @@ type="int" transient="false" volatile="false" - value="16843560" + value="16843558" static="true" final="true" deprecated="not deprecated" @@ -7972,7 +7950,7 @@ type="int" transient="false" volatile="false" - value="16843561" + value="16843559" static="true" final="true" deprecated="not deprecated" @@ -7983,7 +7961,7 @@ type="int" transient="false" volatile="false" - value="16843562" + value="16843560" static="true" final="true" deprecated="not deprecated" @@ -8082,7 +8060,7 @@ type="int" transient="false" volatile="false" - value="16843558" + value="16843556" static="true" final="true" deprecated="not deprecated" @@ -8093,7 +8071,7 @@ type="int" transient="false" volatile="false" - value="16843559" + value="16843557" static="true" final="true" deprecated="not deprecated" @@ -8445,7 +8423,7 @@ type="int" transient="false" volatile="false" - value="16843570" + value="16843568" static="true" final="true" deprecated="not deprecated" @@ -8478,7 +8456,7 @@ type="int" transient="false" volatile="false" - value="16843536" + value="16843534" static="true" final="true" deprecated="not deprecated" @@ -8489,7 +8467,7 @@ type="int" transient="false" volatile="false" - value="16843593" + value="16843591" static="true" final="true" deprecated="not deprecated" @@ -8500,7 +8478,7 @@ type="int" transient="false" volatile="false" - value="16843588" + value="16843586" static="true" final="true" deprecated="not deprecated" @@ -8643,7 +8621,7 @@ type="int" transient="false" volatile="false" - value="16843563" + value="16843561" static="true" final="true" deprecated="not deprecated" @@ -8665,7 +8643,7 @@ type="int" transient="false" volatile="false" - value="16843584" + value="16843582" static="true" final="true" deprecated="not deprecated" @@ -8676,7 +8654,7 @@ type="int" transient="false" volatile="false" - value="16843587" + value="16843585" static="true" final="true" deprecated="not deprecated" @@ -8742,7 +8720,7 @@ type="int" transient="false" volatile="false" - value="16843596" + value="16843594" static="true" final="true" deprecated="not deprecated" @@ -8797,7 +8775,7 @@ type="int" transient="false" volatile="false" - value="16843507" + value="16843505" static="true" final="true" deprecated="not deprecated" @@ -8819,7 +8797,7 @@ type="int" transient="false" volatile="false" - value="16843597" + value="16843595" static="true" final="true" deprecated="not deprecated" @@ -8830,7 +8808,7 @@ type="int" transient="false" volatile="false" - value="16843505" + value="16843503" static="true" final="true" deprecated="not deprecated" @@ -8929,7 +8907,7 @@ type="int" transient="false" volatile="false" - value="16843549" + value="16843547" static="true" final="true" deprecated="not deprecated" @@ -8940,7 +8918,7 @@ type="int" transient="false" volatile="false" - value="16843520" + value="16843518" static="true" final="true" deprecated="not deprecated" @@ -9072,7 +9050,7 @@ type="int" transient="false" volatile="false" - value="16843599" + value="16843597" static="true" final="true" deprecated="not deprecated" @@ -9127,7 +9105,7 @@ type="int" transient="false" volatile="false" - value="16843571" + value="16843569" static="true" final="true" deprecated="not deprecated" @@ -9193,7 +9171,7 @@ type="int" transient="false" volatile="false" - value="16843515" + value="16843513" static="true" final="true" deprecated="not deprecated" @@ -9578,7 +9556,7 @@ type="int" transient="false" volatile="false" - value="16843523" + value="16843521" static="true" final="true" deprecated="not deprecated" @@ -9655,7 +9633,7 @@ type="int" transient="false" volatile="false" - value="16843524" + value="16843522" static="true" final="true" deprecated="not deprecated" @@ -9699,7 +9677,7 @@ type="int" transient="false" volatile="false" - value="16843528" + value="16843526" static="true" final="true" deprecated="not deprecated" @@ -9721,7 +9699,7 @@ type="int" transient="false" volatile="false" - value="16843601" + value="16843599" static="true" final="true" deprecated="not deprecated" @@ -9765,7 +9743,7 @@ type="int" transient="false" volatile="false" - value="16843602" + value="16843600" static="true" final="true" deprecated="not deprecated" @@ -9908,7 +9886,7 @@ type="int" transient="false" volatile="false" - value="16843543" + value="16843541" static="true" final="true" deprecated="not deprecated" @@ -9919,7 +9897,7 @@ type="int" transient="false" volatile="false" - value="16843542" + value="16843540" static="true" final="true" deprecated="not deprecated" @@ -9941,7 +9919,7 @@ type="int" transient="false" volatile="false" - value="16843544" + value="16843542" static="true" final="true" deprecated="not deprecated" @@ -10172,7 +10150,7 @@ type="int" transient="false" volatile="false" - value="16843514" + value="16843512" static="true" final="true" deprecated="not deprecated" @@ -10326,7 +10304,7 @@ type="int" transient="false" volatile="false" - value="16843554" + value="16843552" static="true" final="true" deprecated="not deprecated" @@ -10337,7 +10315,7 @@ type="int" transient="false" volatile="false" - value="16843555" + value="16843553" static="true" final="true" deprecated="not deprecated" @@ -10348,7 +10326,7 @@ type="int" transient="false" volatile="false" - value="16843556" + value="16843554" static="true" final="true" deprecated="not deprecated" @@ -10359,7 +10337,7 @@ type="int" transient="false" volatile="false" - value="16843557" + value="16843555" static="true" final="true" deprecated="not deprecated" @@ -10403,7 +10381,7 @@ type="int" transient="false" volatile="false" - value="16843590" + value="16843588" static="true" final="true" deprecated="not deprecated" @@ -10436,7 +10414,7 @@ type="int" transient="false" volatile="false" - value="16843538" + value="16843536" static="true" final="true" deprecated="not deprecated" @@ -10579,7 +10557,7 @@ type="int" transient="false" volatile="false" - value="16843574" + value="16843572" static="true" final="true" deprecated="not deprecated" @@ -10799,7 +10777,7 @@ type="int" transient="false" volatile="false" - value="16843594" + value="16843592" static="true" final="true" deprecated="not deprecated" @@ -10810,7 +10788,7 @@ type="int" transient="false" volatile="false" - value="16843591" + value="16843589" static="true" final="true" deprecated="not deprecated" @@ -10821,7 +10799,7 @@ type="int" transient="false" volatile="false" - value="16843592" + value="16843590" static="true" final="true" deprecated="not deprecated" @@ -10942,7 +10920,7 @@ type="int" transient="false" volatile="false" - value="16843545" + value="16843543" static="true" final="true" deprecated="not deprecated" @@ -11030,7 +11008,7 @@ type="int" transient="false" volatile="false" - value="16843608" + value="16843606" static="true" final="true" deprecated="not deprecated" @@ -11041,7 +11019,7 @@ type="int" transient="false" volatile="false" - value="16843609" + value="16843607" static="true" final="true" deprecated="not deprecated" @@ -28602,8 +28580,8 @@ visibility="public" > </method> -<method name="getCancelable" - return="boolean" +<method name="getDialog" + return="android.app.Dialog" abstract="false" native="false" synchronized="false" @@ -28613,8 +28591,8 @@ visibility="public" > </method> -<method name="getDialog" - return="android.app.Dialog" +<method name="getShowsDialog" + return="boolean" abstract="false" native="false" synchronized="false" @@ -28624,8 +28602,8 @@ visibility="public" > </method> -<method name="getShowsDialog" - return="boolean" +<method name="getTheme" + return="int" abstract="false" native="false" synchronized="false" @@ -28635,8 +28613,8 @@ visibility="public" > </method> -<method name="getTheme" - return="int" +<method name="isCancelable" + return="boolean" abstract="false" native="false" synchronized="false" @@ -28822,6 +28800,19 @@ <parameter name="request" type="android.app.DownloadManager.Request"> </parameter> </method> +<method name="getMaxBytesOverMobile" + return="java.lang.Long" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="context" type="android.content.Context"> +</parameter> +</method> <method name="getMimeTypeForDownloadedFile" return="java.lang.String" abstract="false" @@ -28835,6 +28826,19 @@ <parameter name="id" type="long"> </parameter> </method> +<method name="getRecommendedMaxBytesOverMobile" + return="java.lang.Long" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="context" type="android.content.Context"> +</parameter> +</method> <method name="getUriForDownloadedFile" return="android.net.Uri" abstract="false" @@ -30683,17 +30687,6 @@ visibility="public" > </method> -<method name="countBackStackEntries" - return="int" - abstract="true" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> <method name="dump" return="void" abstract="true" @@ -30763,7 +30756,7 @@ <parameter name="tag" type="java.lang.String"> </parameter> </method> -<method name="getBackStackEntry" +<method name="getBackStackEntryAt" return="android.app.FragmentManager.BackStackEntry" abstract="true" native="false" @@ -30776,8 +30769,8 @@ <parameter name="index" type="int"> </parameter> </method> -<method name="getFragment" - return="android.app.Fragment" +<method name="getBackStackEntryCount" + return="int" abstract="true" native="false" synchronized="false" @@ -30786,14 +30779,10 @@ deprecated="not deprecated" visibility="public" > -<parameter name="bundle" type="android.os.Bundle"> -</parameter> -<parameter name="key" type="java.lang.String"> -</parameter> </method> -<method name="openTransaction" - return="android.app.FragmentTransaction" - abstract="false" +<method name="getFragment" + return="android.app.Fragment" + abstract="true" native="false" synchronized="false" static="false" @@ -30801,6 +30790,10 @@ deprecated="not deprecated" visibility="public" > +<parameter name="bundle" type="android.os.Bundle"> +</parameter> +<parameter name="key" type="java.lang.String"> +</parameter> </method> <method name="popBackStack" return="void" @@ -30944,6 +30937,17 @@ visibility="public" > </method> +<method name="getBreadCrumbShortTitleRes" + return="int" + abstract="true" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> <method name="getBreadCrumbTitle" return="java.lang.CharSequence" abstract="true" @@ -30955,6 +30959,17 @@ visibility="public" > </method> +<method name="getBreadCrumbTitleRes" + return="int" + abstract="true" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> <method name="getId" return="int" abstract="true" @@ -31314,7 +31329,7 @@ visibility="public" > </field> -<field name="TRANSIT_FRAGMENT_NEXT" +<field name="TRANSIT_FRAGMENT_FADE" type="int" transient="false" volatile="false" @@ -31336,17 +31351,6 @@ visibility="public" > </field> -<field name="TRANSIT_FRAGMENT_PREV" - type="int" - transient="false" - volatile="false" - value="8196" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> <field name="TRANSIT_NONE" type="int" transient="false" @@ -33072,19 +33076,6 @@ <parameter name="callback" type="android.app.LoaderManager.LoaderCallbacks<D>"> </parameter> </method> -<method name="stopLoader" - return="void" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="deprecated" - visibility="public" -> -<parameter name="id" type="int"> -</parameter> -</method> </class> <interface name="LoaderManager.LoaderCallbacks" abstract="true" @@ -43781,7 +43772,7 @@ visibility="public" > </method> -<method name="onCancelled" +<method name="onCanceled" return="void" abstract="false" native="false" @@ -43794,6 +43785,19 @@ <parameter name="data" type="D"> </parameter> </method> +<method name="onCancelled" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="deprecated" + visibility="public" +> +<parameter name="data" type="D"> +</parameter> +</method> <method name="onLoadInBackground" return="D" abstract="false" @@ -44236,8 +44240,6 @@ </parameter> <parameter name="mimeTypes" type="java.lang.String[]"> </parameter> -<parameter name="icon" type="android.graphics.Bitmap"> -</parameter> <parameter name="item" type="android.content.ClipData.Item"> </parameter> </constructor> @@ -44250,8 +44252,6 @@ > <parameter name="description" type="android.content.ClipDescription"> </parameter> -<parameter name="icon" type="android.graphics.Bitmap"> -</parameter> <parameter name="item" type="android.content.ClipData.Item"> </parameter> </constructor> @@ -44290,18 +44290,7 @@ visibility="public" > </method> -<method name="getIcon" - return="android.graphics.Bitmap" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> -<method name="getItem" +<method name="getItemAt" return="android.content.ClipData.Item" abstract="false" native="false" @@ -44337,8 +44326,6 @@ > <parameter name="label" type="java.lang.CharSequence"> </parameter> -<parameter name="icon" type="android.graphics.Bitmap"> -</parameter> <parameter name="intent" type="android.content.Intent"> </parameter> </method> @@ -44354,8 +44341,6 @@ > <parameter name="label" type="java.lang.CharSequence"> </parameter> -<parameter name="icon" type="android.graphics.Bitmap"> -</parameter> <parameter name="text" type="java.lang.CharSequence"> </parameter> </method> @@ -44371,8 +44356,6 @@ > <parameter name="label" type="java.lang.CharSequence"> </parameter> -<parameter name="icon" type="android.graphics.Bitmap"> -</parameter> <parameter name="uri" type="android.net.Uri"> </parameter> </method> @@ -44390,8 +44373,6 @@ </parameter> <parameter name="label" type="java.lang.CharSequence"> </parameter> -<parameter name="icon" type="android.graphics.Bitmap"> -</parameter> <parameter name="uri" type="android.net.Uri"> </parameter> </method> @@ -50362,6 +50343,16 @@ > <parameter name="context" type="android.content.Context"> </parameter> +</constructor> +<constructor name="CursorLoader" + type="android.content.CursorLoader" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="context" type="android.content.Context"> +</parameter> <parameter name="uri" type="android.net.Uri"> </parameter> <parameter name="projection" type="java.lang.String[]"> @@ -50452,7 +50443,7 @@ visibility="public" > </method> -<method name="onCancelled" +<method name="onCanceled" return="void" abstract="false" native="false" @@ -57386,145 +57377,6 @@ > </field> </class> -<class name="XmlDocumentProvider" - extends="android.content.ContentProvider" - abstract="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<constructor name="XmlDocumentProvider" - type="android.content.XmlDocumentProvider" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</constructor> -<method name="delete" - return="int" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="uri" type="android.net.Uri"> -</parameter> -<parameter name="selection" type="java.lang.String"> -</parameter> -<parameter name="selectionArgs" type="java.lang.String[]"> -</parameter> -</method> -<method name="getResourceXmlPullParser" - return="org.xmlpull.v1.XmlPullParser" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="protected" -> -<parameter name="resourceUri" type="android.net.Uri"> -</parameter> -</method> -<method name="getType" - return="java.lang.String" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="uri" type="android.net.Uri"> -</parameter> -</method> -<method name="getUriXmlPullParser" - return="org.xmlpull.v1.XmlPullParser" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="protected" -> -<parameter name="url" type="java.lang.String"> -</parameter> -</method> -<method name="insert" - return="android.net.Uri" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="uri" type="android.net.Uri"> -</parameter> -<parameter name="values" type="android.content.ContentValues"> -</parameter> -</method> -<method name="onCreate" - return="boolean" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> -<method name="query" - return="android.database.Cursor" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="uri" type="android.net.Uri"> -</parameter> -<parameter name="projection" type="java.lang.String[]"> -</parameter> -<parameter name="selection" type="java.lang.String"> -</parameter> -<parameter name="selectionArgs" type="java.lang.String[]"> -</parameter> -<parameter name="sortOrder" type="java.lang.String"> -</parameter> -</method> -<method name="update" - return="int" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="uri" type="android.net.Uri"> -</parameter> -<parameter name="values" type="android.content.ContentValues"> -</parameter> -<parameter name="selection" type="java.lang.String"> -</parameter> -<parameter name="selectionArgs" type="java.lang.String[]"> -</parameter> -</method> -</class> </package> <package name="android.content.pm" > @@ -57794,17 +57646,6 @@ type="int" transient="false" volatile="false" - value="1024" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="FLAG_IMMERSIVE" - type="int" - transient="false" - volatile="false" value="512" static="true" final="true" diff --git a/api/current.xml b/api/current.xml index 1309201ebd62..b087c20f922d 100644 --- a/api/current.xml +++ b/api/current.xml @@ -1790,7 +1790,7 @@ type="int" transient="false" volatile="false" - value="16843501" + value="16843499" static="true" final="true" deprecated="not deprecated" @@ -1812,7 +1812,7 @@ type="int" transient="false" volatile="false" - value="16843510" + value="16843508" static="true" final="true" deprecated="not deprecated" @@ -1823,7 +1823,7 @@ type="int" transient="false" volatile="false" - value="16843509" + value="16843507" static="true" final="true" deprecated="not deprecated" @@ -1834,7 +1834,7 @@ type="int" transient="false" volatile="false" - value="16843511" + value="16843509" static="true" final="true" deprecated="not deprecated" @@ -1867,7 +1867,7 @@ type="int" transient="false" volatile="false" - value="16843517" + value="16843515" static="true" final="true" deprecated="not deprecated" @@ -1889,7 +1889,7 @@ type="int" transient="false" volatile="false" - value="16843513" + value="16843511" static="true" final="true" deprecated="not deprecated" @@ -1911,7 +1911,7 @@ type="int" transient="false" volatile="false" - value="16843540" + value="16843538" static="true" final="true" deprecated="not deprecated" @@ -1922,7 +1922,7 @@ type="int" transient="false" volatile="false" - value="16843539" + value="16843537" static="true" final="true" deprecated="not deprecated" @@ -1933,7 +1933,7 @@ type="int" transient="false" volatile="false" - value="16843541" + value="16843539" static="true" final="true" deprecated="not deprecated" @@ -1944,7 +1944,7 @@ type="int" transient="false" volatile="false" - value="16843512" + value="16843510" static="true" final="true" deprecated="not deprecated" @@ -1955,7 +1955,7 @@ type="int" transient="false" volatile="false" - value="16843518" + value="16843516" static="true" final="true" deprecated="not deprecated" @@ -1966,7 +1966,7 @@ type="int" transient="false" volatile="false" - value="16843519" + value="16843517" static="true" final="true" deprecated="not deprecated" @@ -2043,7 +2043,7 @@ type="int" transient="false" volatile="false" - value="16843607" + value="16843605" static="true" final="true" deprecated="not deprecated" @@ -2065,7 +2065,7 @@ type="int" transient="false" volatile="false" - value="16843531" + value="16843529" static="true" final="true" deprecated="not deprecated" @@ -2109,7 +2109,7 @@ type="int" transient="false" volatile="false" - value="16843572" + value="16843570" static="true" final="true" deprecated="not deprecated" @@ -2142,7 +2142,7 @@ type="int" transient="false" volatile="false" - value="16843553" + value="16843551" static="true" final="true" deprecated="not deprecated" @@ -2208,7 +2208,7 @@ type="int" transient="false" volatile="false" - value="16843508" + value="16843506" static="true" final="true" deprecated="not deprecated" @@ -2274,7 +2274,7 @@ type="int" transient="false" volatile="false" - value="16843548" + value="16843546" static="true" final="true" deprecated="not deprecated" @@ -2340,7 +2340,7 @@ type="int" transient="false" volatile="false" - value="16843537" + value="16843535" static="true" final="true" deprecated="not deprecated" @@ -2450,7 +2450,7 @@ type="int" transient="false" volatile="false" - value="16843550" + value="16843548" static="true" final="true" deprecated="not deprecated" @@ -2494,7 +2494,7 @@ type="int" transient="false" volatile="false" - value="16843565" + value="16843563" static="true" final="true" deprecated="not deprecated" @@ -2582,7 +2582,7 @@ type="int" transient="false" volatile="false" - value="16843526" + value="16843524" static="true" final="true" deprecated="not deprecated" @@ -2593,7 +2593,7 @@ type="int" transient="false" volatile="false" - value="16843525" + value="16843523" static="true" final="true" deprecated="not deprecated" @@ -2626,7 +2626,7 @@ type="int" transient="false" volatile="false" - value="16843569" + value="16843567" static="true" final="true" deprecated="not deprecated" @@ -2637,7 +2637,7 @@ type="int" transient="false" volatile="false" - value="16843568" + value="16843566" static="true" final="true" deprecated="not deprecated" @@ -2703,7 +2703,7 @@ type="int" transient="false" volatile="false" - value="16843598" + value="16843596" static="true" final="true" deprecated="not deprecated" @@ -3220,7 +3220,7 @@ type="int" transient="false" volatile="false" - value="16843581" + value="16843579" static="true" final="true" deprecated="not deprecated" @@ -3275,7 +3275,7 @@ type="int" transient="false" volatile="false" - value="16843595" + value="16843593" static="true" final="true" deprecated="not deprecated" @@ -3385,7 +3385,7 @@ type="int" transient="false" volatile="false" - value="16843600" + value="16843598" static="true" final="true" deprecated="not deprecated" @@ -3451,7 +3451,7 @@ type="int" transient="false" volatile="false" - value="16843530" + value="16843528" static="true" final="true" deprecated="not deprecated" @@ -3572,7 +3572,7 @@ type="int" transient="false" volatile="false" - value="16843566" + value="16843564" static="true" final="true" deprecated="not deprecated" @@ -3583,7 +3583,7 @@ type="int" transient="false" volatile="false" - value="16843564" + value="16843562" static="true" final="true" deprecated="not deprecated" @@ -3594,7 +3594,7 @@ type="int" transient="false" volatile="false" - value="16843532" + value="16843530" static="true" final="true" deprecated="not deprecated" @@ -3825,7 +3825,7 @@ type="int" transient="false" volatile="false" - value="16843604" + value="16843602" static="true" final="true" deprecated="not deprecated" @@ -3836,7 +3836,7 @@ type="int" transient="false" volatile="false" - value="16843603" + value="16843601" static="true" final="true" deprecated="not deprecated" @@ -3946,7 +3946,7 @@ type="int" transient="false" volatile="false" - value="16843534" + value="16843532" static="true" final="true" deprecated="not deprecated" @@ -4001,7 +4001,7 @@ type="int" transient="false" volatile="false" - value="16843535" + value="16843533" static="true" final="true" deprecated="not deprecated" @@ -4199,7 +4199,7 @@ type="int" transient="false" volatile="false" - value="16843575" + value="16843573" static="true" final="true" deprecated="not deprecated" @@ -4221,7 +4221,7 @@ type="int" transient="false" volatile="false" - value="16843580" + value="16843578" static="true" final="true" deprecated="not deprecated" @@ -4232,7 +4232,7 @@ type="int" transient="false" volatile="false" - value="16843577" + value="16843575" static="true" final="true" deprecated="not deprecated" @@ -4243,7 +4243,7 @@ type="int" transient="false" volatile="false" - value="16843578" + value="16843576" static="true" final="true" deprecated="not deprecated" @@ -4254,7 +4254,7 @@ type="int" transient="false" volatile="false" - value="16843611" + value="16843609" static="true" final="true" deprecated="not deprecated" @@ -4265,7 +4265,7 @@ type="int" transient="false" volatile="false" - value="16843576" + value="16843574" static="true" final="true" deprecated="not deprecated" @@ -4276,7 +4276,7 @@ type="int" transient="false" volatile="false" - value="16843579" + value="16843577" static="true" final="true" deprecated="not deprecated" @@ -4375,7 +4375,7 @@ type="int" transient="false" volatile="false" - value="16843583" + value="16843581" static="true" final="true" deprecated="not deprecated" @@ -4430,7 +4430,7 @@ type="int" transient="false" volatile="false" - value="16843589" + value="16843587" static="true" final="true" deprecated="not deprecated" @@ -4514,7 +4514,7 @@ visibility="public" > </field> -<field name="fragmentNextEnterAnimation" +<field name="fragmentFadeEnterAnimation" type="int" transient="false" volatile="false" @@ -4525,7 +4525,7 @@ visibility="public" > </field> -<field name="fragmentNextExitAnimation" +<field name="fragmentFadeExitAnimation" type="int" transient="false" volatile="false" @@ -4558,28 +4558,6 @@ visibility="public" > </field> -<field name="fragmentPrevEnterAnimation" - type="int" - transient="false" - volatile="false" - value="16843499" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="fragmentPrevExitAnimation" - type="int" - transient="false" - volatile="false" - value="16843500" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> <field name="freezesText" type="int" transient="false" @@ -4969,7 +4947,7 @@ type="int" transient="false" volatile="false" - value="16843533" + value="16843531" static="true" final="true" deprecated="not deprecated" @@ -4980,7 +4958,7 @@ type="int" transient="false" volatile="false" - value="16843551" + value="16843549" static="true" final="true" deprecated="not deprecated" @@ -5013,7 +4991,7 @@ type="int" transient="false" volatile="false" - value="16843605" + value="16843603" static="true" final="true" deprecated="not deprecated" @@ -5068,7 +5046,7 @@ type="int" transient="false" volatile="false" - value="16843516" + value="16843514" static="true" final="true" deprecated="not deprecated" @@ -5189,7 +5167,7 @@ type="int" transient="false" volatile="false" - value="16843504" + value="16843502" static="true" final="true" deprecated="not deprecated" @@ -5200,7 +5178,7 @@ type="int" transient="false" volatile="false" - value="16843502" + value="16843500" static="true" final="true" deprecated="not deprecated" @@ -5211,7 +5189,7 @@ type="int" transient="false" volatile="false" - value="16843503" + value="16843501" static="true" final="true" deprecated="not deprecated" @@ -5321,7 +5299,7 @@ type="int" transient="false" volatile="false" - value="16843546" + value="16843544" static="true" final="true" deprecated="not deprecated" @@ -5497,7 +5475,7 @@ type="int" transient="false" volatile="false" - value="16843573" + value="16843571" static="true" final="true" deprecated="not deprecated" @@ -5596,7 +5574,7 @@ type="int" transient="false" volatile="false" - value="16843567" + value="16843565" static="true" final="true" deprecated="not deprecated" @@ -5827,7 +5805,7 @@ type="int" transient="false" volatile="false" - value="16843612" + value="16843610" static="true" final="true" deprecated="not deprecated" @@ -5860,7 +5838,7 @@ type="int" transient="false" volatile="false" - value="16843606" + value="16843604" static="true" final="true" deprecated="not deprecated" @@ -6289,7 +6267,7 @@ type="int" transient="false" volatile="false" - value="16843506" + value="16843504" static="true" final="true" deprecated="not deprecated" @@ -6333,7 +6311,7 @@ type="int" transient="false" volatile="false" - value="16843527" + value="16843525" static="true" final="true" deprecated="not deprecated" @@ -6344,7 +6322,7 @@ type="int" transient="false" volatile="false" - value="16843521" + value="16843519" static="true" final="true" deprecated="not deprecated" @@ -6432,7 +6410,7 @@ type="int" transient="false" volatile="false" - value="16843529" + value="16843527" static="true" final="true" deprecated="not deprecated" @@ -6487,7 +6465,7 @@ type="int" transient="false" volatile="false" - value="16843586" + value="16843584" static="true" final="true" deprecated="not deprecated" @@ -6641,7 +6619,7 @@ type="int" transient="false" volatile="false" - value="16843585" + value="16843583" static="true" final="true" deprecated="not deprecated" @@ -6795,7 +6773,7 @@ type="int" transient="false" volatile="false" - value="16843582" + value="16843580" static="true" final="true" deprecated="not deprecated" @@ -6927,7 +6905,7 @@ type="int" transient="false" volatile="false" - value="16843552" + value="16843550" static="true" final="true" deprecated="not deprecated" @@ -7323,7 +7301,7 @@ type="int" transient="false" volatile="false" - value="16843522" + value="16843520" static="true" final="true" deprecated="not deprecated" @@ -7477,7 +7455,7 @@ type="int" transient="false" volatile="false" - value="16843547" + value="16843545" static="true" final="true" deprecated="not deprecated" @@ -7642,7 +7620,7 @@ type="int" transient="false" volatile="false" - value="16843610" + value="16843608" static="true" final="true" deprecated="not deprecated" @@ -7961,7 +7939,7 @@ type="int" transient="false" volatile="false" - value="16843560" + value="16843558" static="true" final="true" deprecated="not deprecated" @@ -7972,7 +7950,7 @@ type="int" transient="false" volatile="false" - value="16843561" + value="16843559" static="true" final="true" deprecated="not deprecated" @@ -7983,7 +7961,7 @@ type="int" transient="false" volatile="false" - value="16843562" + value="16843560" static="true" final="true" deprecated="not deprecated" @@ -8082,7 +8060,7 @@ type="int" transient="false" volatile="false" - value="16843558" + value="16843556" static="true" final="true" deprecated="not deprecated" @@ -8093,7 +8071,7 @@ type="int" transient="false" volatile="false" - value="16843559" + value="16843557" static="true" final="true" deprecated="not deprecated" @@ -8445,7 +8423,7 @@ type="int" transient="false" volatile="false" - value="16843570" + value="16843568" static="true" final="true" deprecated="not deprecated" @@ -8478,7 +8456,7 @@ type="int" transient="false" volatile="false" - value="16843536" + value="16843534" static="true" final="true" deprecated="not deprecated" @@ -8489,7 +8467,7 @@ type="int" transient="false" volatile="false" - value="16843593" + value="16843591" static="true" final="true" deprecated="not deprecated" @@ -8500,7 +8478,7 @@ type="int" transient="false" volatile="false" - value="16843588" + value="16843586" static="true" final="true" deprecated="not deprecated" @@ -8643,7 +8621,7 @@ type="int" transient="false" volatile="false" - value="16843563" + value="16843561" static="true" final="true" deprecated="not deprecated" @@ -8665,7 +8643,7 @@ type="int" transient="false" volatile="false" - value="16843584" + value="16843582" static="true" final="true" deprecated="not deprecated" @@ -8676,7 +8654,7 @@ type="int" transient="false" volatile="false" - value="16843587" + value="16843585" static="true" final="true" deprecated="not deprecated" @@ -8742,7 +8720,7 @@ type="int" transient="false" volatile="false" - value="16843596" + value="16843594" static="true" final="true" deprecated="not deprecated" @@ -8797,7 +8775,7 @@ type="int" transient="false" volatile="false" - value="16843507" + value="16843505" static="true" final="true" deprecated="not deprecated" @@ -8819,7 +8797,7 @@ type="int" transient="false" volatile="false" - value="16843597" + value="16843595" static="true" final="true" deprecated="not deprecated" @@ -8830,7 +8808,7 @@ type="int" transient="false" volatile="false" - value="16843505" + value="16843503" static="true" final="true" deprecated="not deprecated" @@ -8929,7 +8907,7 @@ type="int" transient="false" volatile="false" - value="16843549" + value="16843547" static="true" final="true" deprecated="not deprecated" @@ -8940,7 +8918,7 @@ type="int" transient="false" volatile="false" - value="16843520" + value="16843518" static="true" final="true" deprecated="not deprecated" @@ -9072,7 +9050,7 @@ type="int" transient="false" volatile="false" - value="16843599" + value="16843597" static="true" final="true" deprecated="not deprecated" @@ -9127,7 +9105,7 @@ type="int" transient="false" volatile="false" - value="16843571" + value="16843569" static="true" final="true" deprecated="not deprecated" @@ -9193,7 +9171,7 @@ type="int" transient="false" volatile="false" - value="16843515" + value="16843513" static="true" final="true" deprecated="not deprecated" @@ -9578,7 +9556,7 @@ type="int" transient="false" volatile="false" - value="16843523" + value="16843521" static="true" final="true" deprecated="not deprecated" @@ -9655,7 +9633,7 @@ type="int" transient="false" volatile="false" - value="16843524" + value="16843522" static="true" final="true" deprecated="not deprecated" @@ -9699,7 +9677,7 @@ type="int" transient="false" volatile="false" - value="16843528" + value="16843526" static="true" final="true" deprecated="not deprecated" @@ -9721,7 +9699,7 @@ type="int" transient="false" volatile="false" - value="16843601" + value="16843599" static="true" final="true" deprecated="not deprecated" @@ -9765,7 +9743,7 @@ type="int" transient="false" volatile="false" - value="16843602" + value="16843600" static="true" final="true" deprecated="not deprecated" @@ -9908,7 +9886,7 @@ type="int" transient="false" volatile="false" - value="16843543" + value="16843541" static="true" final="true" deprecated="not deprecated" @@ -9919,7 +9897,7 @@ type="int" transient="false" volatile="false" - value="16843542" + value="16843540" static="true" final="true" deprecated="not deprecated" @@ -9941,7 +9919,7 @@ type="int" transient="false" volatile="false" - value="16843544" + value="16843542" static="true" final="true" deprecated="not deprecated" @@ -10172,7 +10150,7 @@ type="int" transient="false" volatile="false" - value="16843514" + value="16843512" static="true" final="true" deprecated="not deprecated" @@ -10326,7 +10304,7 @@ type="int" transient="false" volatile="false" - value="16843554" + value="16843552" static="true" final="true" deprecated="not deprecated" @@ -10337,7 +10315,7 @@ type="int" transient="false" volatile="false" - value="16843555" + value="16843553" static="true" final="true" deprecated="not deprecated" @@ -10348,7 +10326,7 @@ type="int" transient="false" volatile="false" - value="16843556" + value="16843554" static="true" final="true" deprecated="not deprecated" @@ -10359,7 +10337,7 @@ type="int" transient="false" volatile="false" - value="16843557" + value="16843555" static="true" final="true" deprecated="not deprecated" @@ -10403,7 +10381,7 @@ type="int" transient="false" volatile="false" - value="16843590" + value="16843588" static="true" final="true" deprecated="not deprecated" @@ -10436,7 +10414,7 @@ type="int" transient="false" volatile="false" - value="16843538" + value="16843536" static="true" final="true" deprecated="not deprecated" @@ -10579,7 +10557,7 @@ type="int" transient="false" volatile="false" - value="16843574" + value="16843572" static="true" final="true" deprecated="not deprecated" @@ -10799,7 +10777,7 @@ type="int" transient="false" volatile="false" - value="16843594" + value="16843592" static="true" final="true" deprecated="not deprecated" @@ -10810,7 +10788,7 @@ type="int" transient="false" volatile="false" - value="16843591" + value="16843589" static="true" final="true" deprecated="not deprecated" @@ -10821,7 +10799,7 @@ type="int" transient="false" volatile="false" - value="16843592" + value="16843590" static="true" final="true" deprecated="not deprecated" @@ -10942,7 +10920,7 @@ type="int" transient="false" volatile="false" - value="16843545" + value="16843543" static="true" final="true" deprecated="not deprecated" @@ -11030,7 +11008,7 @@ type="int" transient="false" volatile="false" - value="16843608" + value="16843606" static="true" final="true" deprecated="not deprecated" @@ -11041,7 +11019,7 @@ type="int" transient="false" volatile="false" - value="16843609" + value="16843607" static="true" final="true" deprecated="not deprecated" @@ -28602,8 +28580,8 @@ visibility="public" > </method> -<method name="getCancelable" - return="boolean" +<method name="getDialog" + return="android.app.Dialog" abstract="false" native="false" synchronized="false" @@ -28613,8 +28591,8 @@ visibility="public" > </method> -<method name="getDialog" - return="android.app.Dialog" +<method name="getShowsDialog" + return="boolean" abstract="false" native="false" synchronized="false" @@ -28624,8 +28602,8 @@ visibility="public" > </method> -<method name="getShowsDialog" - return="boolean" +<method name="getTheme" + return="int" abstract="false" native="false" synchronized="false" @@ -28635,8 +28613,8 @@ visibility="public" > </method> -<method name="getTheme" - return="int" +<method name="isCancelable" + return="boolean" abstract="false" native="false" synchronized="false" @@ -30709,17 +30687,6 @@ visibility="public" > </method> -<method name="countBackStackEntries" - return="int" - abstract="true" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> <method name="dump" return="void" abstract="true" @@ -30789,7 +30756,7 @@ <parameter name="tag" type="java.lang.String"> </parameter> </method> -<method name="getBackStackEntry" +<method name="getBackStackEntryAt" return="android.app.FragmentManager.BackStackEntry" abstract="true" native="false" @@ -30802,8 +30769,8 @@ <parameter name="index" type="int"> </parameter> </method> -<method name="getFragment" - return="android.app.Fragment" +<method name="getBackStackEntryCount" + return="int" abstract="true" native="false" synchronized="false" @@ -30812,14 +30779,10 @@ deprecated="not deprecated" visibility="public" > -<parameter name="bundle" type="android.os.Bundle"> -</parameter> -<parameter name="key" type="java.lang.String"> -</parameter> </method> -<method name="openTransaction" - return="android.app.FragmentTransaction" - abstract="false" +<method name="getFragment" + return="android.app.Fragment" + abstract="true" native="false" synchronized="false" static="false" @@ -30827,6 +30790,10 @@ deprecated="not deprecated" visibility="public" > +<parameter name="bundle" type="android.os.Bundle"> +</parameter> +<parameter name="key" type="java.lang.String"> +</parameter> </method> <method name="popBackStack" return="void" @@ -30970,6 +30937,17 @@ visibility="public" > </method> +<method name="getBreadCrumbShortTitleRes" + return="int" + abstract="true" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> <method name="getBreadCrumbTitle" return="java.lang.CharSequence" abstract="true" @@ -30981,6 +30959,17 @@ visibility="public" > </method> +<method name="getBreadCrumbTitleRes" + return="int" + abstract="true" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> <method name="getId" return="int" abstract="true" @@ -31340,7 +31329,7 @@ visibility="public" > </field> -<field name="TRANSIT_FRAGMENT_NEXT" +<field name="TRANSIT_FRAGMENT_FADE" type="int" transient="false" volatile="false" @@ -31362,17 +31351,6 @@ visibility="public" > </field> -<field name="TRANSIT_FRAGMENT_PREV" - type="int" - transient="false" - volatile="false" - value="8196" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> <field name="TRANSIT_NONE" type="int" transient="false" @@ -33098,19 +33076,6 @@ <parameter name="callback" type="android.app.LoaderManager.LoaderCallbacks<D>"> </parameter> </method> -<method name="stopLoader" - return="void" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="deprecated" - visibility="public" -> -<parameter name="id" type="int"> -</parameter> -</method> </class> <interface name="LoaderManager.LoaderCallbacks" abstract="true" @@ -43807,7 +43772,7 @@ visibility="public" > </method> -<method name="onCancelled" +<method name="onCanceled" return="void" abstract="false" native="false" @@ -43820,6 +43785,19 @@ <parameter name="data" type="D"> </parameter> </method> +<method name="onCancelled" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="deprecated" + visibility="public" +> +<parameter name="data" type="D"> +</parameter> +</method> <method name="onLoadInBackground" return="D" abstract="false" @@ -44262,8 +44240,6 @@ </parameter> <parameter name="mimeTypes" type="java.lang.String[]"> </parameter> -<parameter name="icon" type="android.graphics.Bitmap"> -</parameter> <parameter name="item" type="android.content.ClipData.Item"> </parameter> </constructor> @@ -44276,8 +44252,6 @@ > <parameter name="description" type="android.content.ClipDescription"> </parameter> -<parameter name="icon" type="android.graphics.Bitmap"> -</parameter> <parameter name="item" type="android.content.ClipData.Item"> </parameter> </constructor> @@ -44316,18 +44290,7 @@ visibility="public" > </method> -<method name="getIcon" - return="android.graphics.Bitmap" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> -<method name="getItem" +<method name="getItemAt" return="android.content.ClipData.Item" abstract="false" native="false" @@ -44363,8 +44326,6 @@ > <parameter name="label" type="java.lang.CharSequence"> </parameter> -<parameter name="icon" type="android.graphics.Bitmap"> -</parameter> <parameter name="intent" type="android.content.Intent"> </parameter> </method> @@ -44380,8 +44341,6 @@ > <parameter name="label" type="java.lang.CharSequence"> </parameter> -<parameter name="icon" type="android.graphics.Bitmap"> -</parameter> <parameter name="text" type="java.lang.CharSequence"> </parameter> </method> @@ -44397,8 +44356,6 @@ > <parameter name="label" type="java.lang.CharSequence"> </parameter> -<parameter name="icon" type="android.graphics.Bitmap"> -</parameter> <parameter name="uri" type="android.net.Uri"> </parameter> </method> @@ -44416,8 +44373,6 @@ </parameter> <parameter name="label" type="java.lang.CharSequence"> </parameter> -<parameter name="icon" type="android.graphics.Bitmap"> -</parameter> <parameter name="uri" type="android.net.Uri"> </parameter> </method> @@ -50388,6 +50343,16 @@ > <parameter name="context" type="android.content.Context"> </parameter> +</constructor> +<constructor name="CursorLoader" + type="android.content.CursorLoader" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="context" type="android.content.Context"> +</parameter> <parameter name="uri" type="android.net.Uri"> </parameter> <parameter name="projection" type="java.lang.String[]"> @@ -50478,7 +50443,7 @@ visibility="public" > </method> -<method name="onCancelled" +<method name="onCanceled" return="void" abstract="false" native="false" @@ -57412,145 +57377,6 @@ > </field> </class> -<class name="XmlDocumentProvider" - extends="android.content.ContentProvider" - abstract="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<constructor name="XmlDocumentProvider" - type="android.content.XmlDocumentProvider" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</constructor> -<method name="delete" - return="int" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="uri" type="android.net.Uri"> -</parameter> -<parameter name="selection" type="java.lang.String"> -</parameter> -<parameter name="selectionArgs" type="java.lang.String[]"> -</parameter> -</method> -<method name="getResourceXmlPullParser" - return="org.xmlpull.v1.XmlPullParser" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="protected" -> -<parameter name="resourceUri" type="android.net.Uri"> -</parameter> -</method> -<method name="getType" - return="java.lang.String" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="uri" type="android.net.Uri"> -</parameter> -</method> -<method name="getUriXmlPullParser" - return="org.xmlpull.v1.XmlPullParser" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="protected" -> -<parameter name="url" type="java.lang.String"> -</parameter> -</method> -<method name="insert" - return="android.net.Uri" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="uri" type="android.net.Uri"> -</parameter> -<parameter name="values" type="android.content.ContentValues"> -</parameter> -</method> -<method name="onCreate" - return="boolean" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> -<method name="query" - return="android.database.Cursor" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="uri" type="android.net.Uri"> -</parameter> -<parameter name="projection" type="java.lang.String[]"> -</parameter> -<parameter name="selection" type="java.lang.String"> -</parameter> -<parameter name="selectionArgs" type="java.lang.String[]"> -</parameter> -<parameter name="sortOrder" type="java.lang.String"> -</parameter> -</method> -<method name="update" - return="int" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="uri" type="android.net.Uri"> -</parameter> -<parameter name="values" type="android.content.ContentValues"> -</parameter> -<parameter name="selection" type="java.lang.String"> -</parameter> -<parameter name="selectionArgs" type="java.lang.String[]"> -</parameter> -</method> -</class> </package> <package name="android.content.pm" > @@ -57820,17 +57646,6 @@ type="int" transient="false" volatile="false" - value="1024" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="FLAG_IMMERSIVE" - type="int" - transient="false" - volatile="false" value="512" static="true" final="true" diff --git a/core/java/android/app/BackStackRecord.java b/core/java/android/app/BackStackRecord.java index 33b747cc85fe..1d217f030221 100644 --- a/core/java/android/app/BackStackRecord.java +++ b/core/java/android/app/BackStackRecord.java @@ -267,6 +267,14 @@ final class BackStackRecord extends FragmentTransaction implements return mIndex; } + public int getBreadCrumbTitleRes() { + return mBreadCrumbTitleRes; + } + + public int getBreadCrumbShortTitleRes() { + return mBreadCrumbShortTitleRes; + } + public CharSequence getBreadCrumbTitle() { if (mBreadCrumbTitleRes != 0) { return mManager.mActivity.getText(mBreadCrumbTitleRes); diff --git a/core/java/android/app/DialogFragment.java b/core/java/android/app/DialogFragment.java index 6f252934db99..0bc89e722719 100644 --- a/core/java/android/app/DialogFragment.java +++ b/core/java/android/app/DialogFragment.java @@ -295,7 +295,7 @@ public class DialogFragment extends Fragment /** * Return the current value of {@link #setCancelable(boolean)}. */ - public boolean getCancelable() { + public boolean isCancelable() { return mCancelable; } diff --git a/core/java/android/app/FragmentBreadCrumbs.java b/core/java/android/app/FragmentBreadCrumbs.java index fb890990d732..72a8e9a6feee 100644 --- a/core/java/android/app/FragmentBreadCrumbs.java +++ b/core/java/android/app/FragmentBreadCrumbs.java @@ -204,13 +204,13 @@ public class FragmentBreadCrumbs extends ViewGroup void updateCrumbs() { FragmentManager fm = mActivity.getFragmentManager(); - int numEntries = fm.countBackStackEntries(); + int numEntries = fm.getBackStackEntryCount(); int numPreEntries = getPreEntryCount(); int numViews = mContainer.getChildCount(); for (int i = 0; i < numEntries + numPreEntries; i++) { BackStackEntry bse = i < numPreEntries ? getPreEntry(i) - : fm.getBackStackEntry(i - numPreEntries); + : fm.getBackStackEntryAt(i - numPreEntries); if (i < numViews) { View v = mContainer.getChildAt(i); Object tag = v.getTag(); diff --git a/core/java/android/app/FragmentManager.java b/core/java/android/app/FragmentManager.java index e35ef87cada8..bce240fc2ef0 100644 --- a/core/java/android/app/FragmentManager.java +++ b/core/java/android/app/FragmentManager.java @@ -49,7 +49,7 @@ public abstract class FragmentManager { * Representation of an entry on the fragment back stack, as created * with {@link FragmentTransaction#addToBackStack(String) * FragmentTransaction.addToBackStack()}. Entries can later be - * retrieved with {@link FragmentManager#getBackStackEntry(int) + * retrieved with {@link FragmentManager#getBackStackEntryAt(int) * FragmentManager.getBackStackEntry()}. * * <p>Note that you should never hold on to a BackStackEntry object; @@ -65,6 +65,18 @@ public abstract class FragmentManager { public int getId(); /** + * Return the full bread crumb title resource identifier for the entry, + * or 0 if it does not have one. + */ + public int getBreadCrumbTitleRes(); + + /** + * Return the short bread crumb title resource identifier for the entry, + * or 0 if it does not have one. + */ + public int getBreadCrumbShortTitleRes(); + + /** * Return the full bread crumb title for the entry, or null if it * does not have one. */ @@ -102,7 +114,8 @@ public abstract class FragmentManager { */ public abstract FragmentTransaction beginTransaction(); - /** Old API */ + /** @hide -- remove once prebuilts are in. */ + @Deprecated public FragmentTransaction openTransaction() { return beginTransaction(); } @@ -153,7 +166,9 @@ public abstract class FragmentManager { /** * Pop the top state off the back stack. Returns true if there was one - * to pop, else false. + * to pop, else false. This function is asynchronous -- it enqueues the + * request to pop, but the action will not be performed until the application + * returns to its event loop. */ public abstract void popBackStack(); @@ -168,6 +183,10 @@ public abstract class FragmentManager { /** * Pop the last fragment transition from the manager's fragment * back stack. If there is nothing to pop, false is returned. + * This function is asynchronous -- it enqueues the + * request to pop, but the action will not be performed until the application + * returns to its event loop. + * * @param name If non-null, this is the name of a previous back state * to look for; if found, all states up to that state will be popped. The * {@link #POP_BACK_STACK_INCLUSIVE} flag can be used to control whether @@ -186,6 +205,10 @@ public abstract class FragmentManager { /** * Pop all back stack states up to the one with the given identifier. + * This function is asynchronous -- it enqueues the + * request to pop, but the action will not be performed until the application + * returns to its event loop. + * * @param id Identifier of the stated to be popped. If no identifier exists, * false is returned. * The identifier is the number returned by @@ -207,13 +230,13 @@ public abstract class FragmentManager { /** * Return the number of entries currently in the back stack. */ - public abstract int countBackStackEntries(); + public abstract int getBackStackEntryCount(); /** * Return the BackStackEntry at index <var>index</var> in the back stack; * entries start index 0 being the bottom of the stack. */ - public abstract BackStackEntry getBackStackEntry(int index); + public abstract BackStackEntry getBackStackEntryAt(int index); /** * Add a new listener for changes to the fragment back stack. @@ -416,12 +439,12 @@ final class FragmentManagerImpl extends FragmentManager { } @Override - public int countBackStackEntries() { + public int getBackStackEntryCount() { return mBackStack != null ? mBackStack.size() : 0; } @Override - public BackStackEntry getBackStackEntry(int index) { + public BackStackEntry getBackStackEntryAt(int index) { return mBackStack.get(index); } @@ -1678,11 +1701,8 @@ final class FragmentManagerImpl extends FragmentManager { case FragmentTransaction.TRANSIT_FRAGMENT_CLOSE: rev = FragmentTransaction.TRANSIT_FRAGMENT_OPEN; break; - case FragmentTransaction.TRANSIT_FRAGMENT_NEXT: - rev = FragmentTransaction.TRANSIT_FRAGMENT_PREV; - break; - case FragmentTransaction.TRANSIT_FRAGMENT_PREV: - rev = FragmentTransaction.TRANSIT_FRAGMENT_NEXT; + case FragmentTransaction.TRANSIT_FRAGMENT_FADE: + rev = FragmentTransaction.TRANSIT_FRAGMENT_FADE; break; } return rev; @@ -1702,15 +1722,10 @@ final class FragmentManagerImpl extends FragmentManager { ? com.android.internal.R.styleable.FragmentAnimation_fragmentCloseEnterAnimation : com.android.internal.R.styleable.FragmentAnimation_fragmentCloseExitAnimation; break; - case FragmentTransaction.TRANSIT_FRAGMENT_NEXT: - animAttr = enter - ? com.android.internal.R.styleable.FragmentAnimation_fragmentNextEnterAnimation - : com.android.internal.R.styleable.FragmentAnimation_fragmentNextExitAnimation; - break; - case FragmentTransaction.TRANSIT_FRAGMENT_PREV: + case FragmentTransaction.TRANSIT_FRAGMENT_FADE: animAttr = enter - ? com.android.internal.R.styleable.FragmentAnimation_fragmentPrevEnterAnimation - : com.android.internal.R.styleable.FragmentAnimation_fragmentPrevExitAnimation; + ? com.android.internal.R.styleable.FragmentAnimation_fragmentFadeEnterAnimation + : com.android.internal.R.styleable.FragmentAnimation_fragmentFadeExitAnimation; break; } return animAttr; diff --git a/core/java/android/app/FragmentTransaction.java b/core/java/android/app/FragmentTransaction.java index 1b8debcda993..0cc774d3d2f9 100644 --- a/core/java/android/app/FragmentTransaction.java +++ b/core/java/android/app/FragmentTransaction.java @@ -110,10 +110,9 @@ public abstract class FragmentTransaction { public static final int TRANSIT_FRAGMENT_OPEN = 1 | TRANSIT_ENTER_MASK; /** Fragment is being removed from the stack */ public static final int TRANSIT_FRAGMENT_CLOSE = 2 | TRANSIT_EXIT_MASK; - /** Fragment is being added in a 'next' operation*/ - public static final int TRANSIT_FRAGMENT_NEXT = 3 | TRANSIT_ENTER_MASK; - /** Fragment is being removed in a 'previous' operation */ - public static final int TRANSIT_FRAGMENT_PREV = 4 | TRANSIT_EXIT_MASK; + /** Fragment should simply fade in or out; that is, no strong navigation associated + * with it except that it is appearing or disappearing for some reason. */ + public static final int TRANSIT_FRAGMENT_FADE = 3 | TRANSIT_ENTER_MASK; /** * Set specific animation resources to run for the fragments that are diff --git a/core/java/android/app/LoaderManager.java b/core/java/android/app/LoaderManager.java index cd5e3bb5b2eb..ffe2a5d68aaf 100644 --- a/core/java/android/app/LoaderManager.java +++ b/core/java/android/app/LoaderManager.java @@ -159,14 +159,6 @@ public abstract class LoaderManager { public abstract void destroyLoader(int id); /** - * @deprecated Renamed to {@link #destroyLoader}. - */ - @Deprecated - public void stopLoader(int id) { - destroyLoader(id); - } - - /** * Return the Loader with the given id or null if no matching Loader * is found. */ diff --git a/core/java/android/content/AsyncTaskLoader.java b/core/java/android/content/AsyncTaskLoader.java index c6b9e805afce..4cf356f3a7ad 100644 --- a/core/java/android/content/AsyncTaskLoader.java +++ b/core/java/android/content/AsyncTaskLoader.java @@ -168,9 +168,14 @@ public abstract class AsyncTaskLoader<D> extends Loader<D> { * Called if the task was canceled before it was completed. Gives the class a chance * to properly dispose of the result. */ - public void onCancelled(D data) { + public void onCanceled(D data) { + onCancelled(data); } + @Deprecated + public void onCancelled(D data) { + } + void executePendingTask() { if (mCancellingTask == null && mTask != null) { if (mTask.waiting) { @@ -195,7 +200,7 @@ public abstract class AsyncTaskLoader<D> extends Loader<D> { } void dispatchOnCancelled(LoadTask task, D data) { - onCancelled(data); + onCanceled(data); if (mCancellingTask == task) { if (DEBUG) Slog.v(TAG, "Cancelled task is now canceled!"); mLastLoadCompleteTime = SystemClock.uptimeMillis(); diff --git a/core/java/android/content/BroadcastReceiver.java b/core/java/android/content/BroadcastReceiver.java index 5939643e85a8..028149b3760b 100644 --- a/core/java/android/content/BroadcastReceiver.java +++ b/core/java/android/content/BroadcastReceiver.java @@ -170,6 +170,16 @@ public abstract class BroadcastReceiver { * State for a result that is pending for a broadcast receiver. Returned * by {@link BroadcastReceiver#goAsync() goAsync()} * while in {@link BroadcastReceiver#onReceive BroadcastReceiver.onReceive()}. + * This allows you to return from onReceive() without having the broadcast + * terminate; you must call {@link #finish()} once you are done with the + * broadcast. This allows you to process the broadcast off of the main + * thread of your app. + * + * <p>Note on threading: the state inside of this class is not itself + * thread-safe, however you can use it from any thread if you properly + * sure that you do not have races. Typically this means you will hand + * the entire object to another thread, which will be solely responsible + * for setting any results and finally calling {@link #finish()}. */ public static class PendingResult { /** @hide */ diff --git a/core/java/android/content/ClipData.java b/core/java/android/content/ClipData.java index 6f4d098075dc..d9c6b0748f31 100644 --- a/core/java/android/content/ClipData.java +++ b/core/java/android/content/ClipData.java @@ -42,9 +42,9 @@ import java.util.ArrayList; * {@link ClipDescription#getMimeType(int) getDescription().getMimeType(int)} * must return correct MIME type(s) describing the data in the clip. For help * in correctly constructing a clip with the correct MIME type, use - * {@link #newPlainText(CharSequence, Bitmap, CharSequence)}, - * {@link #newUri(ContentResolver, CharSequence, Bitmap, Uri)}, and - * {@link #newIntent(CharSequence, Bitmap, Intent)}. + * {@link #newPlainText(CharSequence, CharSequence)}, + * {@link #newUri(ContentResolver, CharSequence, Uri)}, and + * {@link #newIntent(CharSequence, Intent)}. * * <p>Each Item instance can be one of three main classes of data: a simple * CharSequence of text, a single Intent object, or a Uri. See {@link Item} @@ -70,7 +70,7 @@ import java.util.ArrayList; * "content:" URIs. A content URI allows the recipient of a ClippedData item * to interact closely with the ContentProvider holding the data in order to * negotiate the transfer of that data. The clip must also be filled in with - * the available MIME types; {@link #newUri(ContentResolver, CharSequence, Bitmap, Uri)} + * the available MIME types; {@link #newUri(ContentResolver, CharSequence, Uri)} * will take care of correctly doing this. * * <p>For example, here is the paste function of a simple NotePad application. @@ -321,16 +321,14 @@ public class ClipData implements Parcelable { * * @param label Label to show to the user describing this clip. * @param mimeTypes An array of MIME types this data is available as. - * @param icon Bitmap providing the user with an iconing representation of - * the clip. * @param item The contents of the first item in the clip. */ - public ClipData(CharSequence label, String[] mimeTypes, Bitmap icon, Item item) { + public ClipData(CharSequence label, String[] mimeTypes, Item item) { mClipDescription = new ClipDescription(label, mimeTypes); if (item == null) { throw new NullPointerException("item is null"); } - mIcon = icon; + mIcon = null; mItems.add(item); } @@ -338,16 +336,14 @@ public class ClipData implements Parcelable { * Create a new clip. * * @param description The ClipDescription describing the clip contents. - * @param icon Bitmap providing the user with an iconing representation of - * the clip. * @param item The contents of the first item in the clip. */ - public ClipData(ClipDescription description, Bitmap icon, Item item) { + public ClipData(ClipDescription description, Item item) { mClipDescription = description; if (item == null) { throw new NullPointerException("item is null"); } - mIcon = icon; + mIcon = null; mItems.add(item); } @@ -356,13 +352,12 @@ public class ClipData implements Parcelable { * {@link ClipDescription#MIMETYPE_TEXT_PLAIN}. * * @param label User-visible label for the clip data. - * @param icon Iconic representation of the clip data. * @param text The actual text in the clip. * @return Returns a new ClipData containing the specified data. */ - static public ClipData newPlainText(CharSequence label, Bitmap icon, CharSequence text) { + static public ClipData newPlainText(CharSequence label, CharSequence text) { Item item = new Item(text); - return new ClipData(label, MIMETYPES_TEXT_PLAIN, icon, item); + return new ClipData(label, MIMETYPES_TEXT_PLAIN, item); } /** @@ -370,13 +365,12 @@ public class ClipData implements Parcelable { * {@link ClipDescription#MIMETYPE_TEXT_INTENT}. * * @param label User-visible label for the clip data. - * @param icon Iconic representation of the clip data. * @param intent The actual Intent in the clip. * @return Returns a new ClipData containing the specified data. */ - static public ClipData newIntent(CharSequence label, Bitmap icon, Intent intent) { + static public ClipData newIntent(CharSequence label, Intent intent) { Item item = new Item(intent); - return new ClipData(label, MIMETYPES_TEXT_INTENT, icon, item); + return new ClipData(label, MIMETYPES_TEXT_INTENT, item); } /** @@ -387,12 +381,11 @@ public class ClipData implements Parcelable { * * @param resolver ContentResolver used to get information about the URI. * @param label User-visible label for the clip data. - * @param icon Iconic representation of the clip data. * @param uri The URI in the clip. * @return Returns a new ClipData containing the specified data. */ static public ClipData newUri(ContentResolver resolver, CharSequence label, - Bitmap icon, Uri uri) { + Uri uri) { Item item = new Item(uri); String[] mimeTypes = null; if ("content".equals(uri.getScheme())) { @@ -417,24 +410,23 @@ public class ClipData implements Parcelable { if (mimeTypes == null) { mimeTypes = MIMETYPES_TEXT_URILIST; } - return new ClipData(label, mimeTypes, icon, item); + return new ClipData(label, mimeTypes, item); } /** * Create a new ClipData holding an URI with MIME type * {@link ClipDescription#MIMETYPE_TEXT_URILIST}. - * Unlike {@link #newUri(ContentResolver, CharSequence, Bitmap, Uri)}, nothing + * Unlike {@link #newUri(ContentResolver, CharSequence, Uri)}, nothing * is inferred about the URI -- if it is a content: URI holding a bitmap, * the reported type will still be uri-list. Use this with care! * * @param label User-visible label for the clip data. - * @param icon Iconic representation of the clip data. * @param uri The URI in the clip. * @return Returns a new ClipData containing the specified data. */ - static public ClipData newRawUri(CharSequence label, Bitmap icon, Uri uri) { + static public ClipData newRawUri(CharSequence label, Uri uri) { Item item = new Item(uri); - return new ClipData(label, MIMETYPES_TEXT_URILIST, icon, item); + return new ClipData(label, MIMETYPES_TEXT_URILIST, item); } /** @@ -445,6 +437,9 @@ public class ClipData implements Parcelable { return mClipDescription; } + /** + * Add a new Item to the overall ClipData container. + */ public void addItem(Item item) { if (item == null) { throw new NullPointerException("item is null"); @@ -452,15 +447,23 @@ public class ClipData implements Parcelable { mItems.add(item); } + /** @hide */ public Bitmap getIcon() { return mIcon; } + /** + * Return the number of items in the clip data. + */ public int getItemCount() { return mItems.size(); } - public Item getItem(int index) { + /** + * Return a single item inside of the clip data. The index can range + * from 0 to {@link #getItemCount()}-1. + */ + public Item getItemAt(int index) { return mItems.get(index); } diff --git a/core/java/android/content/ClipboardManager.java b/core/java/android/content/ClipboardManager.java index 3e2b763ecdd8..a79f0602ad11 100644 --- a/core/java/android/content/ClipboardManager.java +++ b/core/java/android/content/ClipboardManager.java @@ -170,7 +170,7 @@ public class ClipboardManager extends android.text.ClipboardManager { public CharSequence getText() { ClipData clip = getPrimaryClip(); if (clip != null && clip.getItemCount() > 0) { - return clip.getItem(0).coerceToText(mContext); + return clip.getItemAt(0).coerceToText(mContext); } return null; } @@ -181,7 +181,7 @@ public class ClipboardManager extends android.text.ClipboardManager { * primary clip. It has no label or icon. */ public void setText(CharSequence text) { - setPrimaryClip(ClipData.newPlainText(null, null, text)); + setPrimaryClip(ClipData.newPlainText(null, text)); } /** diff --git a/core/java/android/content/CursorLoader.java b/core/java/android/content/CursorLoader.java index 38ebaf2ffc20..6228bd059f2d 100644 --- a/core/java/android/content/CursorLoader.java +++ b/core/java/android/content/CursorLoader.java @@ -26,6 +26,17 @@ import java.util.Arrays; /** * A loader that queries the {@link ContentResolver} and returns a {@link Cursor}. + * This class implements the {@link Loader} protocol in a standard way for + * querying cursors, building on {@link AsyncTaskLoader} to perform the cursor + * query on a background thread so that it does not block the application's UI. + * + * <p>A CursorLoader must be built with the full information for the query to + * perform, either through the + * {@link #CursorLoader(Context, Uri, String[], String, String[], String)} or + * creating an empty instance with {@link #CursorLoader(Context)} and filling + * in the desired paramters with {@link #setUri(Uri)}, {@link #setSelection(String)}, + * {@link #setSelectionArgs(String[])}, {@link #setSortOrder(String)}, + * and {@link #setProjection(String[])}. */ public class CursorLoader extends AsyncTaskLoader<Cursor> { final ForceLoadContentObserver mObserver; @@ -81,6 +92,22 @@ public class CursorLoader extends AsyncTaskLoader<Cursor> { } } + /** + * Creates an empty unspecified CursorLoader. You must follow this with + * calls to {@link #setUri(Uri)}, {@link #setSelection(String)}, etc + * to specify the query to perform. + */ + public CursorLoader(Context context) { + super(context); + mObserver = new ForceLoadContentObserver(); + } + + /** + * Creates a fully-specified CursorLoader. See + * {@link ContentResolver#query(Uri, String[], String, String[], String) + * ContentResolver.query()} for documentation on the meaning of the + * parameters. These will be passed as-is to that call. + */ public CursorLoader(Context context, Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) { super(context); @@ -119,7 +146,7 @@ public class CursorLoader extends AsyncTaskLoader<Cursor> { } @Override - public void onCancelled(Cursor cursor) { + public void onCanceled(Cursor cursor) { if (cursor != null && !cursor.isClosed()) { cursor.close(); } diff --git a/core/java/android/content/XmlDocumentProvider.java b/core/java/android/content/XmlDocumentProvider.java index 153ad38b8bfd..76539c75ba1c 100644 --- a/core/java/android/content/XmlDocumentProvider.java +++ b/core/java/android/content/XmlDocumentProvider.java @@ -40,6 +40,8 @@ import java.util.Stack; import java.util.regex.Pattern; /** + * @hide -- not yet ready to support, should be provided just as a static lib. + * * A read-only content provider which extracts data out of an XML document. * * <p>A XPath-like selection pattern is used to select some nodes in the XML document. Each such diff --git a/core/java/android/content/pm/ActivityInfo.java b/core/java/android/content/pm/ActivityInfo.java index e688c86d0f9b..46f611fba8cb 100644 --- a/core/java/android/content/pm/ActivityInfo.java +++ b/core/java/android/content/pm/ActivityInfo.java @@ -149,7 +149,13 @@ public class ActivityInfo extends ComponentInfo * {@link android.R.attr#finishOnCloseSystemDialogs} attribute. */ public static final int FLAG_FINISH_ON_CLOSE_SYSTEM_DIALOGS = 0x0100; - /** + /** + * Value for {@link #flags}: true when the application's rendering should + * be hardware accelerated. + */ + public static final int FLAG_HARDWARE_ACCELERATED = 0x0200; + /** + * @hide * Bit in {@link #flags} corresponding to an immersive activity * that wishes not to be interrupted by notifications. * Applications that hide the system notification bar with @@ -164,12 +170,7 @@ public class ActivityInfo extends ComponentInfo * "toast" window). * {@see android.app.Notification#FLAG_HIGH_PRIORITY} */ - public static final int FLAG_IMMERSIVE = 0x0200; - /** - * Value for {@link #flags}: true when the application's rendering should - * be hardware accelerated. - */ - public static final int FLAG_HARDWARE_ACCELERATED = 0x0400; + public static final int FLAG_IMMERSIVE = 0x0400; /** * Options that have been set in the activity declaration in the * manifest. @@ -180,7 +181,7 @@ public class ActivityInfo extends ComponentInfo * {@link #FLAG_STATE_NOT_NEEDED}, {@link #FLAG_EXCLUDE_FROM_RECENTS}, * {@link #FLAG_ALLOW_TASK_REPARENTING}, {@link #FLAG_NO_HISTORY}, * {@link #FLAG_FINISH_ON_CLOSE_SYSTEM_DIALOGS}, - * {@link #FLAG_IMMERSIVE}, {@link #FLAG_HARDWARE_ACCELERATED} + * {@link #FLAG_HARDWARE_ACCELERATED} */ public int flags; diff --git a/core/java/android/preference/PreferenceActivity.java b/core/java/android/preference/PreferenceActivity.java index ee3bdab3e0c2..3883451e4b23 100644 --- a/core/java/android/preference/PreferenceActivity.java +++ b/core/java/android/preference/PreferenceActivity.java @@ -1045,9 +1045,7 @@ public abstract class PreferenceActivity extends ListActivity implements FragmentManager.POP_BACK_STACK_INCLUSIVE); Fragment f = Fragment.instantiate(this, fragmentName, args); FragmentTransaction transaction = getFragmentManager().beginTransaction(); - transaction.setTransition(direction == 0 ? FragmentTransaction.TRANSIT_NONE - : direction > 0 ? FragmentTransaction.TRANSIT_FRAGMENT_NEXT - : FragmentTransaction.TRANSIT_FRAGMENT_PREV); + transaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE); transaction.replace(com.android.internal.R.id.prefs, f); transaction.commit(); } @@ -1142,7 +1140,7 @@ public abstract class PreferenceActivity extends ListActivity implements transaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN); transaction.addToBackStack(BACK_STACK_PREFS); } else { - transaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_NEXT); + transaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE); } transaction.commit(); } diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index eddfffe78b3f..0a32c9e69a7b 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -1037,7 +1037,7 @@ public class WebView extends AbsoluteLayout String host = proxyProperties.getHost(); int port = proxyProperties.getPort(); if (port != 0) - host += ": " + port; + host += ":" + port; // TODO: Handle exclusion list // The plan is to make an AndroidProxyResolver, and handle the blacklist @@ -6723,6 +6723,14 @@ public class WebView extends AbsoluteLayout } } + /** + * Returns true if x/y in content coordinates corresponds to a plugin. + */ + boolean isPluginAt(int x, int y) { + return nativePointInNavCache(x, y, mNavSlop) && + nativeCacheHitIsPlugin(); + } + /* * Return true if the view (Plugin) is fully visible and maximized inside * the WebView. @@ -8150,6 +8158,7 @@ public class WebView extends AbsoluteLayout } private native int nativeCacheHitFramePointer(); + private native boolean nativeCacheHitIsPlugin(); private native Rect nativeCacheHitNodeBounds(); private native int nativeCacheHitNodePointer(); /* package */ native void nativeClearCursor(); diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java index 7631df49e6bb..d8f597207dac 100644 --- a/core/java/android/widget/AbsListView.java +++ b/core/java/android/widget/AbsListView.java @@ -2642,6 +2642,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te setPressed(true); layoutChildren(); positionSelector(mMotionPosition, child); + refreshDrawableState(); final int longPressTimeout = ViewConfiguration.getLongPressTimeout(); final boolean longClickable = isLongClickable(); diff --git a/core/java/android/widget/RemoteViews.java b/core/java/android/widget/RemoteViews.java index 24165aa7f344..8f2531172c4a 100644 --- a/core/java/android/widget/RemoteViews.java +++ b/core/java/android/widget/RemoteViews.java @@ -796,18 +796,21 @@ public class RemoteViews implements Parcelable, Filter { if (this.value != null) { final Bitmap b = (Bitmap) this.value; final Bitmap.Config c = b.getConfig(); + // If we don't know, be pessimistic and assume 4 int bpp = 4; - switch (c) { - case ALPHA_8: - bpp = 1; - break; - case RGB_565: - case ARGB_4444: - bpp = 2; - break; - case ARGB_8888: - bpp = 4; - break; + if (c != null) { + switch (c) { + case ALPHA_8: + bpp = 1; + break; + case RGB_565: + case ARGB_4444: + bpp = 2; + break; + case ARGB_8888: + bpp = 4; + break; + } } counter.bitmapIncrement(b.getWidth() * b.getHeight() * bpp); } diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index 1604fde64e6d..1895d793de13 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -7939,7 +7939,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener for (int i=0; i<urls.length; i++) { Uri uri = Uri.parse(urls[0].getURL()); if (clip == null) { - clip = ClipData.newRawUri(null, null, uri); + clip = ClipData.newRawUri(null, uri); } else { clip.addItem(new ClipData.Item(uri)); } @@ -7973,15 +7973,13 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener return true; case ID_CUT: - setPrimaryClip(ClipData.newPlainText(null, null, - mTransformed.subSequence(min, max))); + setPrimaryClip(ClipData.newPlainText(null, mTransformed.subSequence(min, max))); ((Editable) mText).delete(min, max); stopSelectionActionMode(); return true; case ID_COPY: - setPrimaryClip(ClipData.newPlainText(null, null, - mTransformed.subSequence(min, max))); + setPrimaryClip(ClipData.newPlainText(null, mTransformed.subSequence(min, max))); stopSelectionActionMode(); return true; } @@ -8102,7 +8100,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener final int start = getSelectionStart(); final int end = getSelectionEnd(); CharSequence selectedText = mTransformed.subSequence(start, end); - ClipData data = ClipData.newPlainText(null, null, selectedText); + ClipData data = ClipData.newPlainText(null, selectedText); DragLocalState localState = new DragLocalState(this, start, end); startDrag(data, getTextThumbnailBuilder(selectedText), localState, 0); stopSelectionActionMode(); @@ -8254,7 +8252,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener if (clip != null) { boolean didfirst = false; for (int i=0; i<clip.getItemCount(); i++) { - CharSequence paste = clip.getItem(i).coerceToText(getContext()); + CharSequence paste = clip.getItemAt(i).coerceToText(getContext()); if (paste != null) { if (!didfirst) { long minMax = prepareSpacesAroundPaste(min, max, paste); @@ -9362,7 +9360,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener ClipData clipData = event.getClipData(); final int itemCount = clipData.getItemCount(); for (int i=0; i < itemCount; i++) { - Item item = clipData.getItem(i); + Item item = clipData.getItemAt(i); content.append(item.coerceToText(TextView.this.mContext)); } diff --git a/core/java/com/android/internal/widget/WaveView.java b/core/java/com/android/internal/widget/WaveView.java index 4cb3966aa2a1..c7a90c40bd63 100644 --- a/core/java/com/android/internal/widget/WaveView.java +++ b/core/java/com/android/internal/widget/WaveView.java @@ -152,7 +152,6 @@ public class WaveView extends View implements ValueAnimator.AnimatorUpdateListen mUnlockRing.setScaleX(0.1f); mUnlockRing.setScaleY(0.1f); mUnlockRing.setAlpha(0.0f); - mDrawables.add(mUnlockRing); mUnlockDefault = new DrawableHolder(createDrawable(R.drawable.unlock_default)); @@ -192,7 +191,6 @@ public class WaveView extends View implements ValueAnimator.AnimatorUpdateListen if (DBG) Log.v(TAG, "State RESET_LOCK"); mWaveTimerDelay = WAVE_DELAY; for (int i = 0; i < mLightWaves.size(); i++) { - //TweenMax.to(mLightWave.get(i), .3, {alpha:0, ease:Quint.easeOut}); DrawableHolder holder = mLightWaves.get(i); holder.addAnimTo(300, 0, "alpha", 0.0f, false); } @@ -200,16 +198,12 @@ public class WaveView extends View implements ValueAnimator.AnimatorUpdateListen mLightWaves.get(i).startAnimations(this); } - //TweenMax.to(unlockRing, .5, { x: lockX, y: lockY, scaleX: .1, scaleY: .1, - // alpha: 0, overwrite: true, ease:Quint.easeOut }); mUnlockRing.addAnimTo(DURATION, 0, "x", mLockCenterX, true); mUnlockRing.addAnimTo(DURATION, 0, "y", mLockCenterY, true); mUnlockRing.addAnimTo(DURATION, 0, "scaleX", 0.1f, true); mUnlockRing.addAnimTo(DURATION, 0, "scaleY", 0.1f, true); mUnlockRing.addAnimTo(DURATION, 0, "alpha", 0.0f, true); - //TweenMax.to(unlockDefault, 0, { x: lockX, y: lockY, scaleX: .1, scaleY: .1, - // alpha: 0 , overwrite: true }); mUnlockDefault.removeAnimationFor("x"); mUnlockDefault.removeAnimationFor("y"); mUnlockDefault.removeAnimationFor("scaleX"); @@ -220,15 +214,10 @@ public class WaveView extends View implements ValueAnimator.AnimatorUpdateListen mUnlockDefault.setScaleX(0.1f); mUnlockDefault.setScaleY(0.1f); mUnlockDefault.setAlpha(0.0f); - - //TweenMax.to(unlockDefault, .5, { delay: .1, scaleX: 1, scaleY: 1, - // alpha: 1, overwrite: true, ease:Quint.easeOut }); mUnlockDefault.addAnimTo(DURATION, SHORT_DELAY, "scaleX", 1.0f, true); mUnlockDefault.addAnimTo(DURATION, SHORT_DELAY, "scaleY", 1.0f, true); mUnlockDefault.addAnimTo(DURATION, SHORT_DELAY, "alpha", 1.0f, true); - //TweenMax.to(unlockHalo, 0, { x: lockX, y: lockY, scaleX:.1, scaleY: .1, - // alpha: 0 , overwrite: true }); mUnlockHalo.removeAnimationFor("x"); mUnlockHalo.removeAnimationFor("y"); mUnlockHalo.removeAnimationFor("scaleX"); @@ -239,16 +228,12 @@ public class WaveView extends View implements ValueAnimator.AnimatorUpdateListen mUnlockHalo.setScaleX(0.1f); mUnlockHalo.setScaleY(0.1f); mUnlockHalo.setAlpha(0.0f); - - //TweenMax.to(unlockHalo, .5, { x: lockX, y: lockY, scaleX: 1, scaleY: 1, - // alpha: 1 , overwrite: true, ease:Quint.easeOut }); mUnlockHalo.addAnimTo(DURATION, SHORT_DELAY, "x", mLockCenterX, true); mUnlockHalo.addAnimTo(DURATION, SHORT_DELAY, "y", mLockCenterY, true); mUnlockHalo.addAnimTo(DURATION, SHORT_DELAY, "scaleX", 1.0f, true); mUnlockHalo.addAnimTo(DURATION, SHORT_DELAY, "scaleY", 1.0f, true); mUnlockHalo.addAnimTo(DURATION, SHORT_DELAY, "alpha", 1.0f, true); - //lockTimer.stop(); removeCallbacks(mLockTimerActions); mLockState = STATE_READY; @@ -260,8 +245,6 @@ public class WaveView extends View implements ValueAnimator.AnimatorUpdateListen case STATE_START_ATTEMPT: if (DBG) Log.v(TAG, "State START_ATTEMPT"); - //TweenMax.to(unlockDefault, 0, {scaleX: .1, scaleY:.1, alpha: 0, - // x:lockX +182, y: lockY , overwrite: true }); mUnlockDefault.removeAnimationFor("x"); mUnlockDefault.removeAnimationFor("y"); mUnlockDefault.removeAnimationFor("scaleX"); @@ -273,14 +256,10 @@ public class WaveView extends View implements ValueAnimator.AnimatorUpdateListen mUnlockDefault.setScaleY(0.1f); mUnlockDefault.setAlpha(0.0f); - //TweenMax.to(unlockDefault, 0.5, { delay: .1 , scaleX: 1, scaleY: 1, - // alpha: 1, ease:Quint.easeOut }); mUnlockDefault.addAnimTo(DURATION, SHORT_DELAY, "scaleX", 1.0f, false); mUnlockDefault.addAnimTo(DURATION, SHORT_DELAY, "scaleY", 1.0f, false); mUnlockDefault.addAnimTo(DURATION, SHORT_DELAY, "alpha", 1.0f, false); - //TweenMax.to(unlockRing, 0.5, {scaleX: 1, scaleY: 1, - // alpha: 1, ease:Quint.easeOut, overwrite: true }); mUnlockRing.addAnimTo(DURATION, 0, "scaleX", 1.0f, true); mUnlockRing.addAnimTo(DURATION, 0, "scaleY", 1.0f, true); mUnlockRing.addAnimTo(DURATION, 0, "alpha", 1.0f, true); @@ -292,12 +271,8 @@ public class WaveView extends View implements ValueAnimator.AnimatorUpdateListen case STATE_ATTEMPTING: if (DBG) Log.v(TAG, "State ATTEMPTING (fingerDown = " + fingerDown + ")"); - //TweenMax.to(unlockHalo, 0.4, { x:mouseX, y:mouseY, scaleX:1, scaleY:1, - // alpha: 1, ease:Quint.easeOut }); if (dragDistance > mSnapRadius) { if (fingerDown) { - //TweenMax.to(unlockHalo, 0.4, {x:ringX, y:ringY, scaleX:1, scaleY:1, - // alpha: 1 , ease:Quint.easeOut , overwrite: true }); mUnlockHalo.addAnimTo(0, 0, "x", ringX, true); mUnlockHalo.addAnimTo(0, 0, "y", ringY, true); mUnlockHalo.addAnimTo(0, 0, "scaleX", 1.0f, true); @@ -320,8 +295,6 @@ public class WaveView extends View implements ValueAnimator.AnimatorUpdateListen if (DBG) Log.v(TAG, "State UNLOCK_ATTEMPT"); if (dragDistance > mSnapRadius) { for (int n = 0; n < mLightWaves.size(); n++) { - //TweenMax.to(this["lightWave"+n], .5,{alpha:0, delay: (6+n-currentWave)*.1, - // x:ringX, y:ringY, scaleX: .1, scaleY: .1, ease:Quint.easeOut}); DrawableHolder wave = mLightWaves.get(n); long delay = 1000L*(6 + n - mCurrentWave)/10L; wave.addAnimTo(FINAL_DURATION, delay, "x", ringX, true); @@ -334,19 +307,14 @@ public class WaveView extends View implements ValueAnimator.AnimatorUpdateListen mLightWaves.get(i).startAnimations(this); } - //TweenMax.to(unlockRing, .5, {x:ringX, y: ringY, scaleX: .1, scaleY: .1, - // alpha: 0, ease: Quint.easeOut }); mUnlockRing.addAnimTo(FINAL_DURATION, 0, "x", ringX, false); mUnlockRing.addAnimTo(FINAL_DURATION, 0, "y", ringY, false); mUnlockRing.addAnimTo(FINAL_DURATION, 0, "scaleX", 0.1f, false); mUnlockRing.addAnimTo(FINAL_DURATION, 0, "scaleY", 0.1f, false); mUnlockRing.addAnimTo(FINAL_DURATION, 0, "alpha", 0.0f, false); - //TweenMax.to(unlockRing, .5, { delay: 1.3, alpha: 0 , ease: Quint.easeOut }); mUnlockRing.addAnimTo(FINAL_DURATION, FINAL_DELAY, "alpha", 0.0f, false); - //TweenMax.to(unlockDefault, 0, { x:ringX, y: ringY, scaleX: .1, scaleY: .1, - // alpha: 0 , overwrite: true }); mUnlockDefault.removeAnimationFor("x"); mUnlockDefault.removeAnimationFor("y"); mUnlockDefault.removeAnimationFor("scaleX"); @@ -358,26 +326,19 @@ public class WaveView extends View implements ValueAnimator.AnimatorUpdateListen mUnlockDefault.setScaleY(0.1f); mUnlockDefault.setAlpha(0.0f); - //TweenMax.to(unlockDefault, .5, { x:ringX, y: ringY, scaleX: 1, scaleY: 1, - // alpha: 1 , ease: Quint.easeOut , overwrite: true }); mUnlockDefault.addAnimTo(FINAL_DURATION, 0, "x", ringX, true); mUnlockDefault.addAnimTo(FINAL_DURATION, 0, "y", ringY, true); mUnlockDefault.addAnimTo(FINAL_DURATION, 0, "scaleX", 1.0f, true); mUnlockDefault.addAnimTo(FINAL_DURATION, 0, "scaleY", 1.0f, true); mUnlockDefault.addAnimTo(FINAL_DURATION, 0, "alpha", 1.0f, true); - //TweenMax.to(unlockDefault, .5, { delay: 1.3, scaleX: 3, scaleY: 3, - // alpha: 1, ease: Quint.easeOut }); mUnlockDefault.addAnimTo(FINAL_DURATION, FINAL_DELAY, "scaleX", 3.0f, false); mUnlockDefault.addAnimTo(FINAL_DURATION, FINAL_DELAY, "scaleY", 3.0f, false); mUnlockDefault.addAnimTo(FINAL_DURATION, FINAL_DELAY, "alpha", 0.0f, false); - //TweenMax.to(unlockHalo, .5, { x:ringX, y: ringY , ease: Back.easeOut }); mUnlockHalo.addAnimTo(FINAL_DURATION, 0, "x", ringX, false); mUnlockHalo.addAnimTo(FINAL_DURATION, 0, "y", ringY, false); - //TweenMax.to(unlockHalo, .5, { delay: 1.3, scaleX: 3, scaleY: 3, - // alpha: 1, ease: Quint.easeOut }); mUnlockHalo.addAnimTo(FINAL_DURATION, FINAL_DELAY, "scaleX", 3.0f, false); mUnlockHalo.addAnimTo(FINAL_DURATION, FINAL_DELAY, "scaleY", 3.0f, false); mUnlockHalo.addAnimTo(FINAL_DURATION, FINAL_DELAY, "alpha", 0.0f, false); @@ -429,10 +390,12 @@ public class WaveView extends View implements ValueAnimator.AnimatorUpdateListen if (DBG) Log.v(TAG, "LockTimerActions"); // reset lock after inactivity if (mLockState == STATE_ATTEMPTING) { + if (DBG) Log.v(TAG, "Timer resets to STATE_RESET_LOCK"); mLockState = STATE_RESET_LOCK; } // for prototype, reset after successful unlock if (mLockState == STATE_UNLOCK_SUCCESS) { + if (DBG) Log.v(TAG, "Timer resets to STATE_RESET_LOCK after success"); mLockState = STATE_RESET_LOCK; } invalidate(); @@ -455,16 +418,12 @@ public class WaveView extends View implements ValueAnimator.AnimatorUpdateListen wave.setX(mMouseX); wave.setY(mMouseY); - //TweenMax.to(this["lightWave"+currentWave], 2, { x:lockX , y:lockY, alpha: 1.5, - // scaleX: 1, scaleY:1, ease:Cubic.easeOut}); wave.addAnimTo(WAVE_DURATION, 0, "x", mLockCenterX, true); wave.addAnimTo(WAVE_DURATION, 0, "y", mLockCenterY, true); wave.addAnimTo(WAVE_DURATION*2/3, 0, "alpha", 1.0f, true); wave.addAnimTo(WAVE_DURATION, 0, "scaleX", 1.0f, true); wave.addAnimTo(WAVE_DURATION, 0, "scaleY", 1.0f, true); - //TweenMax.to(this["lightWave"+currentWave], 1, { delay: 1.3 - // , alpha: 0 , ease:Quint.easeOut}); wave.addAnimTo(1000, RING_DELAY, "alpha", 0.0f, false); wave.startAnimations(WaveView.this); @@ -603,6 +562,8 @@ public class WaveView extends View implements ValueAnimator.AnimatorUpdateListen } public void reset() { + if (DBG) Log.v(TAG, "reset() : resets state to STATE_RESET_LOCK"); mLockState = STATE_RESET_LOCK; + invalidate(); } } diff --git a/core/jni/android/graphics/BitmapFactory.cpp b/core/jni/android/graphics/BitmapFactory.cpp index e47d91cd45f7..491a3884bf51 100644 --- a/core/jni/android/graphics/BitmapFactory.cpp +++ b/core/jni/android/graphics/BitmapFactory.cpp @@ -517,6 +517,11 @@ static void nativeSetDefaultConfig(JNIEnv* env, jobject, int nativeConfig) { } } +static jboolean nativeIsSeekable(JNIEnv* env, jobject, jobject fileDescriptor) { + jint descriptor = env->GetIntField(fileDescriptor, gFileDescriptor_descriptor); + return ::lseek64(descriptor, 0, SEEK_CUR) != -1 ? JNI_TRUE : JNI_FALSE; +} + /////////////////////////////////////////////////////////////////////////////// static JNINativeMethod gMethods[] = { @@ -546,6 +551,11 @@ static JNINativeMethod gMethods[] = { }, { "nativeSetDefaultConfig", "(I)V", (void*)nativeSetDefaultConfig }, + + { "nativeIsSeekable", + "(Ljava/io/FileDescriptor;)Z", + (void*)nativeIsSeekable + }, }; static JNINativeMethod gOptionsMethods[] = { diff --git a/core/res/res/animator/fragment_next_enter.xml b/core/res/res/animator/fragment_fade_enter.xml index 13b15f318e46..13b15f318e46 100644 --- a/core/res/res/animator/fragment_next_enter.xml +++ b/core/res/res/animator/fragment_fade_enter.xml diff --git a/core/res/res/animator/fragment_next_exit.xml b/core/res/res/animator/fragment_fade_exit.xml index 503b7ad2338a..503b7ad2338a 100644 --- a/core/res/res/animator/fragment_next_exit.xml +++ b/core/res/res/animator/fragment_fade_exit.xml diff --git a/core/res/res/animator/fragment_prev_enter.xml b/core/res/res/animator/fragment_prev_enter.xml deleted file mode 100644 index 13b15f318e46..000000000000 --- a/core/res/res/animator/fragment_prev_enter.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -/* -** Copyright 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. -*/ ---> -<set xmlns:android="http://schemas.android.com/apk/res/android" - android:zAdjustment="top"> - <objectAnimator - android:interpolator="@interpolator/decelerate_cubic" - android:valueFrom="0" - android:valueTo="1" - android:valueType="floatType" - android:propertyName="alpha" - android:duration="@android:integer/config_activityDefaultDur"/> -</set>
\ No newline at end of file diff --git a/core/res/res/animator/fragment_prev_exit.xml b/core/res/res/animator/fragment_prev_exit.xml deleted file mode 100644 index 503b7ad2338a..000000000000 --- a/core/res/res/animator/fragment_prev_exit.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -/* -** Copyright 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. -*/ ---> -<set xmlns:android="http://schemas.android.com/apk/res/android" - android:zAdjustment="normal"> - <objectAnimator - android:interpolator="@interpolator/decelerate_cubic" - android:valueFrom="1" - android:valueTo="0" - android:valueType="floatType" - android:propertyName="alpha" - android:duration="@android:integer/config_activityShortDur"/> -</set>
\ No newline at end of file diff --git a/core/res/res/color/secondary_text_holo_dark.xml b/core/res/res/color/secondary_text_holo_dark.xml index 881a1de3d0c2..7c564f777a66 100644 --- a/core/res/res/color/secondary_text_holo_dark.xml +++ b/core/res/res/color/secondary_text_holo_dark.xml @@ -17,11 +17,11 @@ <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_window_focused="false" android:state_enabled="false" android:color="@android:color/dim_foreground_disabled_holo_dark"/> <item android:state_window_focused="false" android:color="@android:color/dim_foreground_holo_dark"/> - <item android:state_selected="true" android:state_enabled="false" android:color="@android:color/dim_foreground_inverse_disabled_holo_dark"/> - <item android:state_pressed="true" android:state_enabled="false" android:color="@android:color/dim_foreground_inverse_disabled_holo_dark"/> - <item android:state_selected="true" android:color="@android:color/dim_foreground_inverse_holo_dark"/> - <item android:state_activated="true" android:color="@android:color/bright_foreground_inverse_holo_dark"/> - <item android:state_pressed="true" android:color="@android:color/dim_foreground_inverse_holo_dark"/> + <item android:state_selected="true" android:state_enabled="false" android:color="@android:color/dim_foreground_disabled_holo_dark"/> + <item android:state_pressed="true" android:state_enabled="false" android:color="@android:color/dim_foreground_disabled_holo_dark"/> + <item android:state_selected="true" android:color="@android:color/dim_foreground_holo_dark"/> + <item android:state_activated="true" android:color="@android:color/bright_foreground_holo_dark"/> + <item android:state_pressed="true" android:color="@android:color/dim_foreground_holo_dark"/> <item android:state_enabled="false" android:color="@android:color/dim_foreground_disabled_holo_dark"/> <item android:color="@android:color/dim_foreground_holo_dark"/> <!-- not selected --> </selector> diff --git a/core/res/res/drawable-mdpi/pointer_arrow.png b/core/res/res/drawable-mdpi/pointer_arrow.png Binary files differindex e01129c1647d..fbd187c19f18 100644 --- a/core/res/res/drawable-mdpi/pointer_arrow.png +++ b/core/res/res/drawable-mdpi/pointer_arrow.png diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml index 19e2b8d9c937..6ca42e3c85d0 100755 --- a/core/res/res/values/attrs.xml +++ b/core/res/res/values/attrs.xml @@ -1379,10 +1379,8 @@ <attr name="fragmentOpenExitAnimation" format="reference" /> <attr name="fragmentCloseEnterAnimation" format="reference" /> <attr name="fragmentCloseExitAnimation" format="reference" /> - <attr name="fragmentNextEnterAnimation" format="reference" /> - <attr name="fragmentNextExitAnimation" format="reference" /> - <attr name="fragmentPrevEnterAnimation" format="reference" /> - <attr name="fragmentPrevExitAnimation" format="reference" /> + <attr name="fragmentFadeEnterAnimation" format="reference" /> + <attr name="fragmentFadeExitAnimation" format="reference" /> </declare-styleable> <!-- Window animation class attributes. --> diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml index 3ad29c4bd933..eabd4575e1c3 100644 --- a/core/res/res/values/public.xml +++ b/core/res/res/values/public.xml @@ -1311,10 +1311,8 @@ <public type="attr" name="fragmentOpenExitAnimation" /> <public type="attr" name="fragmentCloseEnterAnimation" /> <public type="attr" name="fragmentCloseExitAnimation" /> - <public type="attr" name="fragmentNextEnterAnimation" /> - <public type="attr" name="fragmentNextExitAnimation" /> - <public type="attr" name="fragmentPrevEnterAnimation" /> - <public type="attr" name="fragmentPrevExitAnimation" /> + <public type="attr" name="fragmentFadeEnterAnimation" /> + <public type="attr" name="fragmentFadeExitAnimation" /> <public type="attr" name="actionBarSize" /> <public type="attr" name="imeSubtypeLocale" /> <public type="attr" name="imeSubtypeMode" /> diff --git a/core/res/res/values/styles.xml b/core/res/res/values/styles.xml index a3660470ca19..16c80d0e72fd 100644 --- a/core/res/res/values/styles.xml +++ b/core/res/res/values/styles.xml @@ -85,10 +85,8 @@ <item name="fragmentOpenExitAnimation">@animator/fragment_open_exit</item> <item name="fragmentCloseEnterAnimation">@animator/fragment_close_enter</item> <item name="fragmentCloseExitAnimation">@animator/fragment_close_exit</item> - <item name="fragmentNextEnterAnimation">@animator/fragment_next_enter</item> - <item name="fragmentNextExitAnimation">@animator/fragment_next_exit</item> - <item name="fragmentPrevEnterAnimation">@animator/fragment_prev_enter</item> - <item name="fragmentPrevExitAnimation">@animator/fragment_prev_exit</item> + <item name="fragmentFadeEnterAnimation">@animator/fragment_fade_enter</item> + <item name="fragmentFadeExitAnimation">@animator/fragment_fade_exit</item> </style> <!-- Standard animations for a non-full-screen window or activity. --> diff --git a/docs/html/guide/guide_toc.cs b/docs/html/guide/guide_toc.cs index a984acd18d39..67f1fec35e44 100644 --- a/docs/html/guide/guide_toc.cs +++ b/docs/html/guide/guide_toc.cs @@ -58,6 +58,9 @@ <span class="zh-TW" style="display:none">應用程式基本原理</span> </a></li> + <li><a href="<?cs var:toroot ?>guide/topics/fundamentals/fragments.html"> + <span class="en">Fragments</span> + </a> <span class="new">new!</span></li> </ul> <ul> <li class="toggle-list"> @@ -199,9 +202,6 @@ </li> </ul> <ul> - <li><a href="<?cs var:toroot ?>guide/topics/fragments/index.html"> - <span class="en">Fragments</span> - </a> <span class="new">new!</span></li> <li class="toggle-list"> <div><a href="<?cs var:toroot ?>guide/topics/graphics/index.html"> <span class="en">Graphics</span> diff --git a/docs/html/guide/topics/fragments/index.jd b/docs/html/guide/topics/fundamentals/fragments.jd index 045a1e8ae676..09728059c27a 100644 --- a/docs/html/guide/topics/fragments/index.jd +++ b/docs/html/guide/topics/fundamentals/fragments.jd @@ -319,7 +319,7 @@ of {@link android.app.FragmentTransaction} from your {@link android.app.Activity <pre> FragmentManager fragmentManager = {@link android.app.Activity#getFragmentManager()} -FragmentTransaction fragmentTransaction = fragmentManager.{@link android.app.FragmentManager#openTransaction()}; +FragmentTransaction fragmentTransaction = fragmentManager.{@link android.app.FragmentManager#beginTransaction()}; </pre> <p>You can then add a fragment using the {@link @@ -406,7 +406,7 @@ android.app.FragmentManager} like this:</p> <pre> FragmentManager fragmentManager = {@link android.app.Activity#getFragmentManager()}; -FragmentTransaction fragmentTransaction = fragmentManager.{@link android.app.FragmentManager#openTransaction()}; +FragmentTransaction fragmentTransaction = fragmentManager.{@link android.app.FragmentManager#beginTransaction()}; </pre> <p>Each transaction is a set of changes that you want to perform at the same time. You can set @@ -428,7 +428,7 @@ state in the back stack:</p> <pre> // Create new fragment and transaction Fragment newFragment = new ExampleFragment(); -FragmentTransaction transaction = getFragmentManager().openTransaction(); +FragmentTransaction transaction = getFragmentManager().beginTransaction(); // Replace whatever is in the fragment_container view with this fragment, // and add the transaction to the back stack diff --git a/docs/html/guide/topics/ui/actionbar.jd b/docs/html/guide/topics/ui/actionbar.jd index 44d75c19dee5..c17fc3cc9493 100644 --- a/docs/html/guide/topics/ui/actionbar.jd +++ b/docs/html/guide/topics/ui/actionbar.jd @@ -53,7 +53,7 @@ href="{@docRoot}guide/topics/ui/menus.html#OptionsMenu">Options Menu</a> as "act items"—providing instant access to key user actions. (Menu items not appearing as action items are placed in the Overflow Menu, revealed by a drop-down in the Action Bar.)</li> <li>Provide tabs for navigating between <a -href="{@docRoot}guide/topics/fragments/index.html">fragments</a>.</li> +href="{@docRoot}guide/topics/fundamentals/fragments.html">fragments</a>.</li> <li>Provide drop-down navigation items.</li> <li>Provide interactive "action views" in place of action items.</li> <li>Use the application logo as a "return home" or "up" navigation action.</li> @@ -432,7 +432,7 @@ tab.</p> the state of each fragment as necessary, so when the user switches fragments with the tabs, then returns to a previous fragment, it appears the way they left. For information about saving the state of your fragment, see the <a -href="{@docRoot}guide/topics/fragments/index.html">Fragments</a> developer guide.</p> +href="{@docRoot}guide/topics/fundamentals/fragments.html">Fragments</a> developer guide.</p> diff --git a/graphics/java/android/graphics/BitmapFactory.java b/graphics/java/android/graphics/BitmapFactory.java index dd6bf1991cda..cffee5fd4e9c 100644 --- a/graphics/java/android/graphics/BitmapFactory.java +++ b/graphics/java/android/graphics/BitmapFactory.java @@ -564,11 +564,22 @@ public class BitmapFactory { * @return the decoded bitmap, or null */ public static Bitmap decodeFileDescriptor(FileDescriptor fd, Rect outPadding, Options opts) { - Bitmap bm = nativeDecodeFileDescriptor(fd, outPadding, opts); - if (bm == null && opts != null && opts.inBitmap != null) { - throw new IllegalArgumentException("Problem decoding into existing bitmap"); + if (nativeIsSeekable(fd)) { + Bitmap bm = nativeDecodeFileDescriptor(fd, outPadding, opts); + if (bm == null && opts != null && opts.inBitmap != null) { + throw new IllegalArgumentException("Problem decoding into existing bitmap"); + } + return finishDecode(bm, outPadding, opts); + } else { + FileInputStream fis = new FileInputStream(fd); + try { + return decodeStream(fis, outPadding, opts); + } finally { + try { + fis.close(); + } catch (Throwable t) {/* ignore */} + } } - return finishDecode(bm, outPadding, opts); } /** @@ -615,4 +626,5 @@ public class BitmapFactory { private static native Bitmap nativeDecodeByteArray(byte[] data, int offset, int length, Options opts); private static native byte[] nativeScaleNinePatch(byte[] chunk, float scale, Rect pad); + private static native boolean nativeIsSeekable(FileDescriptor fd); } diff --git a/graphics/java/android/renderscript/FileA3D.java b/graphics/java/android/renderscript/FileA3D.java index fe3971a5e116..79ee99758e45 100644 --- a/graphics/java/android/renderscript/FileA3D.java +++ b/graphics/java/android/renderscript/FileA3D.java @@ -46,7 +46,13 @@ public class FileA3D extends BaseObj { **/ public enum EntryType { + /** + * Unknown or or invalid object, nothing will be loaded + **/ UNKNOWN (0), + /** + * Renderscript Mesh object + **/ MESH (1); int mID; @@ -74,14 +80,20 @@ public class FileA3D extends BaseObj { BaseObj mLoadedObj; /** + * Returns the name of a renderscript object the index entry + * describes + * * @return name of a renderscript object the index entry - * describes + * describes + * */ public String getName() { return mName; } /** + * Returns the type of a renderscript object the index entry + * describes * @return type of a renderscript object the index entry * describes */ @@ -90,7 +102,8 @@ public class FileA3D extends BaseObj { } /** - * @return renderscript object described by the entry + * Used to load the object described by the index entry + * @return base renderscript object described by the entry */ public BaseObj getObject() { mRS.validate(); @@ -99,6 +112,9 @@ public class FileA3D extends BaseObj { } /** + * Used to load the mesh described by the index entry, object + * described by the index entry must be a renderscript mesh + * * @return renderscript mesh object described by the entry */ public Mesh getMesh() { @@ -166,7 +182,9 @@ public class FileA3D extends BaseObj { } /** - * @return the numberof objects stored inside a FileA3D + * Returns the number of objects stored inside the a3d file + * + * @return the number of objects stored inside the a3d file */ public int getIndexEntryCount() { if(mFileEntries == null) { @@ -180,6 +198,8 @@ public class FileA3D extends BaseObj { * FileA3D * * @param index number of the entry from the list to return + * + * @return entry in the a3d file described by the index */ public IndexEntry getIndexEntry(int index) { if(getIndexEntryCount() == 0 || index < 0 || index >= mFileEntries.length) { @@ -195,6 +215,7 @@ public class FileA3D extends BaseObj { * @param mgr asset manager used to load asset * @param path location of the file to load * + * @return a3d file containing renderscript objects */ static public FileA3D createFromAsset(RenderScript rs, AssetManager mgr, String path) { rs.validate(); @@ -214,6 +235,7 @@ public class FileA3D extends BaseObj { * @param rs Context to which the object will belong. * @param path location of the file to load * + * @return a3d file containing renderscript objects */ static public FileA3D createFromFile(RenderScript rs, String path) { int fileId = rs.nFileA3DCreateFromFile(path); @@ -232,6 +254,7 @@ public class FileA3D extends BaseObj { * @param rs Context to which the object will belong. * @param path location of the file to load * + * @return a3d file containing renderscript objects */ static public FileA3D createFromFile(RenderScript rs, File path) { return createFromFile(rs, path.getAbsolutePath()); @@ -244,6 +267,7 @@ public class FileA3D extends BaseObj { * @param res resource manager used for loading * @param id resource to create FileA3D from * + * @return a3d file containing renderscript objects */ static public FileA3D createFromResource(RenderScript rs, Resources res, int id) { diff --git a/graphics/java/android/renderscript/Matrix2f.java b/graphics/java/android/renderscript/Matrix2f.java index 2fffe8ceebb1..c9a0ea8ab04b 100644 --- a/graphics/java/android/renderscript/Matrix2f.java +++ b/graphics/java/android/renderscript/Matrix2f.java @@ -26,28 +26,61 @@ import android.util.Log; **/ public class Matrix2f { + /** + * Creates a new identity 2x2 matrix + */ public Matrix2f() { mMat = new float[4]; loadIdentity(); } + /** + * Creates a new matrix and sets its values from the given + * parameter + * + * @param dataArray values to set the matrix to, must be 4 + * floats long + */ public Matrix2f(float[] dataArray) { mMat = new float[2]; System.arraycopy(dataArray, 0, mMat, 0, mMat.length); } + /** + * Return a reference to the internal array representing matrix + * values. Modifying this array will also change the matrix + * + * @return internal array representing the matrix + */ public float[] getArray() { return mMat; } + /** + * Returns the value for a given row and column + * + * @param i row of the value to return + * @param j column of the value to return + * + * @return value in the ith row and jth column + */ public float get(int i, int j) { return mMat[i*2 + j]; } + /** + * Sets the value for a given row and column + * + * @param i row of the value to set + * @param j column of the value to set + */ public void set(int i, int j, float v) { mMat[i*2 + j] = v; } + /** + * Sets the matrix values to identity + */ public void loadIdentity() { mMat[0] = 1; mMat[1] = 0; @@ -56,10 +89,20 @@ public class Matrix2f { mMat[3] = 1; } + /** + * Sets the values of the matrix to those of the parameter + * + * @param src matrix to load the values from + */ public void load(Matrix2f src) { System.arraycopy(src.getArray(), 0, mMat, 0, mMat.length); } + /** + * Sets current values to be a rotation matrix of given angle + * + * @param rot rotation angle + */ public void loadRotate(float rot) { float c, s; rot *= (float)(java.lang.Math.PI / 180.0f); @@ -71,11 +114,25 @@ public class Matrix2f { mMat[3] = c; } + /** + * Sets current values to be a scale matrix of given dimensions + * + * @param x scale component x + * @param y scale component y + */ public void loadScale(float x, float y) { loadIdentity(); mMat[0] = x; mMat[3] = y; } + + /** + * Sets current values to be the result of multiplying two given + * matrices + * + * @param lhs left hand side matrix + * @param rhs right hand side matrix + */ public void loadMultiply(Matrix2f lhs, Matrix2f rhs) { for (int i=0 ; i<2 ; i++) { float ri0 = 0; @@ -90,21 +147,42 @@ public class Matrix2f { } } + /** + * Post-multiplies the current matrix by a given parameter + * + * @param rhs right hand side to multiply by + */ public void multiply(Matrix2f rhs) { Matrix2f tmp = new Matrix2f(); tmp.loadMultiply(this, rhs); load(tmp); } + /** + * Modifies the current matrix by post-multiplying it with a + * rotation matrix of given angle + * + * @param rot angle of rotation + */ public void rotate(float rot) { Matrix2f tmp = new Matrix2f(); tmp.loadRotate(rot); multiply(tmp); } + /** + * Modifies the current matrix by post-multiplying it with a + * scale matrix of given dimensions + * + * @param x scale component x + * @param y scale component y + */ public void scale(float x, float y) { Matrix2f tmp = new Matrix2f(); tmp.loadScale(x, y); multiply(tmp); } + /** + * Sets the current matrix to its transpose + */ public void transpose() { float temp = mMat[1]; mMat[1] = mMat[2]; diff --git a/graphics/java/android/renderscript/Matrix3f.java b/graphics/java/android/renderscript/Matrix3f.java index e4c5e00cdb10..2ec8c625f079 100644 --- a/graphics/java/android/renderscript/Matrix3f.java +++ b/graphics/java/android/renderscript/Matrix3f.java @@ -26,28 +26,61 @@ import android.util.Log; **/ public class Matrix3f { + /** + * Creates a new identity 3x3 matrix + */ public Matrix3f() { mMat = new float[9]; loadIdentity(); } + /** + * Creates a new matrix and sets its values from the given + * parameter + * + * @param dataArray values to set the matrix to, must be 9 + * floats long + */ public Matrix3f(float[] dataArray) { mMat = new float[9]; System.arraycopy(dataArray, 0, mMat, 0, mMat.length); } + /** + * Return a reference to the internal array representing matrix + * values. Modifying this array will also change the matrix + * + * @return internal array representing the matrix + */ public float[] getArray() { return mMat; } + /** + * Returns the value for a given row and column + * + * @param i row of the value to return + * @param j column of the value to return + * + * @return value in the ith row and jth column + */ public float get(int i, int j) { return mMat[i*3 + j]; } + /** + * Sets the value for a given row and column + * + * @param i row of the value to set + * @param j column of the value to set + */ public void set(int i, int j, float v) { mMat[i*3 + j] = v; } + /** + * Sets the matrix values to identity + */ public void loadIdentity() { mMat[0] = 1; mMat[1] = 0; @@ -62,10 +95,24 @@ public class Matrix3f { mMat[8] = 1; } + /** + * Sets the values of the matrix to those of the parameter + * + * @param src matrix to load the values from + */ public void load(Matrix3f src) { System.arraycopy(src.getArray(), 0, mMat, 0, mMat.length); } + /** + * Sets current values to be a rotation matrix of certain angle + * about a given axis + * + * @param rot angle of rotation + * @param x rotation axis x + * @param y rotation axis y + * @param z rotation axis z + */ public void loadRotate(float rot, float x, float y, float z) { float c, s; rot *= (float)(java.lang.Math.PI / 180.0f); @@ -97,7 +144,13 @@ public class Matrix3f { mMat[8] = z*z*nc + c; } + /** + * Makes the upper 2x2 a rotation matrix of the given angle + * + * @param rot rotation angle + */ public void loadRotate(float rot) { + loadIdentity(); float c, s; rot *= (float)(java.lang.Math.PI / 180.0f); c = (float)java.lang.Math.cos(rot); @@ -108,12 +161,25 @@ public class Matrix3f { mMat[4] = c; } + /** + * Makes the upper 2x2 a scale matrix of given dimensions + * + * @param x scale component x + * @param y scale component y + */ public void loadScale(float x, float y) { loadIdentity(); mMat[0] = x; mMat[4] = y; } + /** + * Sets current values to be a scale matrix of given dimensions + * + * @param x scale component x + * @param y scale component y + * @param z scale component z + */ public void loadScale(float x, float y, float z) { loadIdentity(); mMat[0] = x; @@ -121,12 +187,26 @@ public class Matrix3f { mMat[8] = z; } + /** + * Sets current values to be a translation matrix of given + * dimensions + * + * @param x translation component x + * @param y translation component y + */ public void loadTranslate(float x, float y) { loadIdentity(); mMat[6] = x; mMat[7] = y; } + /** + * Sets current values to be the result of multiplying two given + * matrices + * + * @param lhs left hand side matrix + * @param rhs right hand side matrix + */ public void loadMultiply(Matrix3f lhs, Matrix3f rhs) { for (int i=0 ; i<3 ; i++) { float ri0 = 0; @@ -144,36 +224,87 @@ public class Matrix3f { } } + /** + * Post-multiplies the current matrix by a given parameter + * + * @param rhs right hand side to multiply by + */ public void multiply(Matrix3f rhs) { Matrix3f tmp = new Matrix3f(); tmp.loadMultiply(this, rhs); load(tmp); } + + /** + * Modifies the current matrix by post-multiplying it with a + * rotation matrix of certain angle about a given axis + * + * @param rot angle of rotation + * @param x rotation axis x + * @param y rotation axis y + * @param z rotation axis z + */ public void rotate(float rot, float x, float y, float z) { Matrix3f tmp = new Matrix3f(); tmp.loadRotate(rot, x, y, z); multiply(tmp); } + + /** + * Modifies the upper 2x2 of the current matrix by + * post-multiplying it with a rotation matrix of given angle + * + * @param rot angle of rotation + */ public void rotate(float rot) { Matrix3f tmp = new Matrix3f(); tmp.loadRotate(rot); multiply(tmp); } + + /** + * Modifies the upper 2x2 of the current matrix by + * post-multiplying it with a scale matrix of given dimensions + * + * @param x scale component x + * @param y scale component y + */ public void scale(float x, float y) { Matrix3f tmp = new Matrix3f(); tmp.loadScale(x, y); multiply(tmp); } + + /** + * Modifies the current matrix by post-multiplying it with a + * scale matrix of given dimensions + * + * @param x scale component x + * @param y scale component y + * @param z scale component z + */ public void scale(float x, float y, float z) { Matrix3f tmp = new Matrix3f(); tmp.loadScale(x, y, z); multiply(tmp); } + + /** + * Modifies the current matrix by post-multiplying it with a + * translation matrix of given dimensions + * + * @param x translation component x + * @param y translation component y + */ public void translate(float x, float y) { Matrix3f tmp = new Matrix3f(); tmp.loadTranslate(x, y); multiply(tmp); } + + /** + * Sets the current matrix to its transpose + */ public void transpose() { for(int i = 0; i < 2; ++i) { for(int j = i + 1; j < 3; ++j) { diff --git a/graphics/java/android/renderscript/Matrix4f.java b/graphics/java/android/renderscript/Matrix4f.java index ec07cd5b7b0e..2afd72e6f49b 100644 --- a/graphics/java/android/renderscript/Matrix4f.java +++ b/graphics/java/android/renderscript/Matrix4f.java @@ -26,28 +26,61 @@ import android.util.Log; **/ public class Matrix4f { + /** + * Creates a new identity 4x4 matrix + */ public Matrix4f() { mMat = new float[16]; loadIdentity(); } + /** + * Creates a new matrix and sets its values from the given + * parameter + * + * @param dataArray values to set the matrix to, must be 16 + * floats long + */ public Matrix4f(float[] dataArray) { mMat = new float[16]; System.arraycopy(dataArray, 0, mMat, 0, mMat.length); } + /** + * Return a reference to the internal array representing matrix + * values. Modifying this array will also change the matrix + * + * @return internal array representing the matrix + */ public float[] getArray() { return mMat; } + /** + * Returns the value for a given row and column + * + * @param i row of the value to return + * @param j column of the value to return + * + * @return value in the ith row and jth column + */ public float get(int i, int j) { return mMat[i*4 + j]; } + /** + * Sets the value for a given row and column + * + * @param i row of the value to set + * @param j column of the value to set + */ public void set(int i, int j, float v) { mMat[i*4 + j] = v; } + /** + * Sets the matrix values to identity + */ public void loadIdentity() { mMat[0] = 1; mMat[1] = 0; @@ -70,10 +103,24 @@ public class Matrix4f { mMat[15] = 1; } + /** + * Sets the values of the matrix to those of the parameter + * + * @param src matrix to load the values from + */ public void load(Matrix4f src) { System.arraycopy(src.getArray(), 0, mMat, 0, mMat.length); } + /** + * Sets current values to be a rotation matrix of certain angle + * about a given axis + * + * @param rot angle of rotation + * @param x rotation axis x + * @param y rotation axis y + * @param z rotation axis z + */ public void loadRotate(float rot, float x, float y, float z) { float c, s; mMat[3] = 0; @@ -112,6 +159,13 @@ public class Matrix4f { mMat[10] = z*z*nc + c; } + /** + * Sets current values to be a scale matrix of given dimensions + * + * @param x scale component x + * @param y scale component y + * @param z scale component z + */ public void loadScale(float x, float y, float z) { loadIdentity(); mMat[0] = x; @@ -119,6 +173,14 @@ public class Matrix4f { mMat[10] = z; } + /** + * Sets current values to be a translation matrix of given + * dimensions + * + * @param x translation component x + * @param y translation component y + * @param z translation component z + */ public void loadTranslate(float x, float y, float z) { loadIdentity(); mMat[12] = x; @@ -126,6 +188,13 @@ public class Matrix4f { mMat[14] = z; } + /** + * Sets current values to be the result of multiplying two given + * matrices + * + * @param lhs left hand side matrix + * @param rhs right hand side matrix + */ public void loadMultiply(Matrix4f lhs, Matrix4f rhs) { for (int i=0 ; i<4 ; i++) { float ri0 = 0; @@ -146,6 +215,16 @@ public class Matrix4f { } } + /** + * Set current values to be an orthographic projection matrix + * + * @param l location of the left vertical clipping plane + * @param r location of the right vertical clipping plane + * @param b location of the bottom horizontal clipping plane + * @param t location of the top horizontal clipping plane + * @param n location of the near clipping plane + * @param f location of the far clipping plane + */ public void loadOrtho(float l, float r, float b, float t, float n, float f) { loadIdentity(); mMat[0] = 2 / (r - l); @@ -156,10 +235,31 @@ public class Matrix4f { mMat[14]= -(f + n) / (f - n); } + /** + * Set current values to be an orthographic projection matrix + * with the right and bottom clipping planes set to the given + * values. Left and top clipping planes are set to 0. Near and + * far are set to -1, 1 respectively + * + * @param w location of the right vertical clipping plane + * @param h location of the bottom horizontal clipping plane + * + */ public void loadOrthoWindow(int w, int h) { loadOrtho(0,w, h,0, -1,1); } + /** + * Sets current values to be a perspective projection matrix + * + * @param l location of the left vertical clipping plane + * @param r location of the right vertical clipping plane + * @param b location of the bottom horizontal clipping plane + * @param t location of the top horizontal clipping plane + * @param n location of the near clipping plane, must be positive + * @param f location of the far clipping plane, must be positive + * + */ public void loadFrustum(float l, float r, float b, float t, float n, float f) { loadIdentity(); mMat[0] = 2 * n / (r - l); @@ -172,6 +272,14 @@ public class Matrix4f { mMat[15]= 0; } + /** + * Sets current values to be a perspective projection matrix + * + * @param fovy vertical field of view angle in degrees + * @param aspect aspect ratio of the screen + * @param near near cliping plane, must be positive + * @param far far clipping plane, must be positive + */ public void loadPerspective(float fovy, float aspect, float near, float far) { float top = near * (float)Math.tan((float) (fovy * Math.PI / 360.0f)); float bottom = -top; @@ -180,6 +288,14 @@ public class Matrix4f { loadFrustum(left, right, bottom, top, near, far); } + /** + * Helper function to set the current values to a perspective + * projection matrix with aspect ratio defined by the parameters + * and (near, far), (bottom, top) mapping to (-1, 1) at z = 0 + * + * @param w screen width + * @param h screen height + */ public void loadProjectionNormalized(int w, int h) { // range -1,1 in the narrow axis at z = 0. Matrix4f m1 = new Matrix4f(); @@ -205,22 +321,53 @@ public class Matrix4f { load(m1); } - + /** + * Post-multiplies the current matrix by a given parameter + * + * @param rhs right hand side to multiply by + */ public void multiply(Matrix4f rhs) { Matrix4f tmp = new Matrix4f(); tmp.loadMultiply(this, rhs); load(tmp); } + /** + * Modifies the current matrix by post-multiplying it with a + * rotation matrix of certain angle about a given axis + * + * @param rot angle of rotation + * @param x rotation axis x + * @param y rotation axis y + * @param z rotation axis z + */ public void rotate(float rot, float x, float y, float z) { Matrix4f tmp = new Matrix4f(); tmp.loadRotate(rot, x, y, z); multiply(tmp); } + + /** + * Modifies the current matrix by post-multiplying it with a + * scale matrix of given dimensions + * + * @param x scale component x + * @param y scale component y + * @param z scale component z + */ public void scale(float x, float y, float z) { Matrix4f tmp = new Matrix4f(); tmp.loadScale(x, y, z); multiply(tmp); } + + /** + * Modifies the current matrix by post-multiplying it with a + * translation matrix of given dimensions + * + * @param x translation component x + * @param y translation component y + * @param z translation component z + */ public void translate(float x, float y, float z) { Matrix4f tmp = new Matrix4f(); tmp.loadTranslate(x, y, z); @@ -245,6 +392,9 @@ public class Matrix4f { return cofactor; } + /** + * Sets the current matrix to its inverse + */ public boolean inverse() { Matrix4f result = new Matrix4f(); @@ -271,6 +421,9 @@ public class Matrix4f { return true; } + /** + * Sets the current matrix to its inverse transpose + */ public boolean inverseTranspose() { Matrix4f result = new Matrix4f(); @@ -296,6 +449,9 @@ public class Matrix4f { return true; } + /** + * Sets the current matrix to its transpose + */ public void transpose() { for(int i = 0; i < 3; ++i) { for(int j = i + 1; j < 4; ++j) { @@ -308,8 +464,3 @@ public class Matrix4f { final float[] mMat; } - - - - - diff --git a/graphics/java/android/renderscript/Mesh.java b/graphics/java/android/renderscript/Mesh.java index c20151ef99f7..7269cea76ecc 100644 --- a/graphics/java/android/renderscript/Mesh.java +++ b/graphics/java/android/renderscript/Mesh.java @@ -46,11 +46,32 @@ public class Mesh extends BaseObj { * **/ public enum Primitive { + /** + * Vertex data will be rendered as a series of points + */ POINT (0), + /** + * Vertex pairs will be rendered as lines + */ LINE (1), + /** + * Vertex data will be rendered as a connected line strip + */ LINE_STRIP (2), + /** + * Vertices will be rendered as individual triangles + */ TRIANGLE (3), + /** + * Vertices will be rendered as a connected triangle strip + * defined by the first three vertices with each additional + * triangle defined by a new vertex + */ TRIANGLE_STRIP (4), + /** + * Vertices will be rendered as a sequence of triangles that all + * share first vertex as the origin + */ TRIANGLE_FAN (5); int mID; diff --git a/libs/rs/rsScriptC.cpp b/libs/rs/rsScriptC.cpp index 1ab210950525..042f6c72eb7c 100644 --- a/libs/rs/rsScriptC.cpp +++ b/libs/rs/rsScriptC.cpp @@ -471,45 +471,42 @@ void ScriptCState::runCompiler(Context *rsc, ScriptC *s, const char *resName, const char *cacheDir) { - { - s->mBccScript = bccCreateScript(); + s->mBccScript = bccCreateScript(); - s->mEnviroment.mIsThreadable = true; + s->mEnviroment.mIsThreadable = true; - bccRegisterSymbolCallback(s->mBccScript, symbolLookup, s); + bccRegisterSymbolCallback(s->mBccScript, symbolLookup, s); - if (bccReadBC(s->mBccScript, - resName, - s->mEnviroment.mScriptText, - s->mEnviroment.mScriptTextLength, 0) != 0) { - LOGE("bcc: FAILS to read bitcode"); - // Handle Fatal Error - } + if (bccReadBC(s->mBccScript, + resName, + s->mEnviroment.mScriptText, + s->mEnviroment.mScriptTextLength, 0) != 0) { + LOGE("bcc: FAILS to read bitcode"); + // Handle Fatal Error + } #if 1 - if (bccLinkBC(s->mBccScript, - resName, - NULL /*rs_runtime_lib_bc*/, - 1 /*rs_runtime_lib_bc_size*/ - /*"1" means skip buffer here, and let libbcc decide*/, - 0) != 0) { - LOGE("bcc: FAILS to link bitcode"); - // Handle Fatal Error - } + if (bccLinkBC(s->mBccScript, + resName, + NULL /*rs_runtime_lib_bc*/, + 1 /*rs_runtime_lib_bc_size*/ + /*"1" means skip buffer here, and let libbcc decide*/, + 0) != 0) { + LOGE("bcc: FAILS to link bitcode"); + // Handle Fatal Error + } #endif - char *cachePath = genCacheFileName(cacheDir, resName, ".oBCC"); + char *cachePath = genCacheFileName(cacheDir, resName, ".oBCC"); - if (bccPrepareExecutable(s->mBccScript, cachePath, 0) != 0) { - LOGE("bcc: FAILS to prepare executable"); - // Handle Fatal Error - } + if (bccPrepareExecutable(s->mBccScript, cachePath, 0) != 0) { + LOGE("bcc: FAILS to prepare executable"); + // Handle Fatal Error + } - free(cachePath); + free(cachePath); - s->mProgram.mRoot = reinterpret_cast<int (*)()>(bccGetFuncAddr(s->mBccScript, "root")); - s->mProgram.mInit = reinterpret_cast<void (*)()>(bccGetFuncAddr(s->mBccScript, "init")); - } - LOGV("%p ScriptCState::runCompiler root %p, init %p", rsc, s->mProgram.mRoot, s->mProgram.mInit); + s->mProgram.mRoot = reinterpret_cast<int (*)()>(bccGetFuncAddr(s->mBccScript, "root")); + s->mProgram.mInit = reinterpret_cast<void (*)()>(bccGetFuncAddr(s->mBccScript, "init")); if (s->mProgram.mInit) { s->mProgram.mInit(); @@ -537,66 +534,62 @@ void ScriptCState::runCompiler(Context *rsc, s->mEnviroment.mFragmentStore.set(rsc->getDefaultProgramStore()); s->mEnviroment.mRaster.set(rsc->getDefaultProgramRaster()); - if (s->mProgram.mRoot) { - const static int pragmaMax = 16; - size_t pragmaCount = bccGetPragmaCount(s->mBccScript); - char const *keys[pragmaMax]; - char const *values[pragmaMax]; - bccGetPragmaList(s->mBccScript, pragmaMax, keys, values); + const static int pragmaMax = 16; + size_t pragmaCount = bccGetPragmaCount(s->mBccScript); + char const *keys[pragmaMax]; + char const *values[pragmaMax]; + bccGetPragmaList(s->mBccScript, pragmaMax, keys, values); - for (size_t i=0; i < pragmaCount; ++i) { - //LOGE("pragma %s %s", keys[i], values[i]); - if (!strcmp(keys[i], "version")) { + for (size_t i=0; i < pragmaCount; ++i) { + //LOGE("pragma %s %s", keys[i], values[i]); + if (!strcmp(keys[i], "version")) { + // TODO: Verify that version is correct + continue; + } + + if (!strcmp(keys[i], "stateVertex")) { + if (!strcmp(values[i], "default")) { continue; } - - if (!strcmp(keys[i], "stateVertex")) { - if (!strcmp(values[i], "default")) { - continue; - } - if (!strcmp(values[i], "parent")) { - s->mEnviroment.mVertex.clear(); - continue; - } - LOGE("Unreconized value %s passed to stateVertex", values[i]); + if (!strcmp(values[i], "parent")) { + s->mEnviroment.mVertex.clear(); + continue; } + LOGE("Unreconized value %s passed to stateVertex", values[i]); + } - if (!strcmp(keys[i], "stateRaster")) { - if (!strcmp(values[i], "default")) { - continue; - } - if (!strcmp(values[i], "parent")) { - s->mEnviroment.mRaster.clear(); - continue; - } - LOGE("Unreconized value %s passed to stateRaster", values[i]); + if (!strcmp(keys[i], "stateRaster")) { + if (!strcmp(values[i], "default")) { + continue; } + if (!strcmp(values[i], "parent")) { + s->mEnviroment.mRaster.clear(); + continue; + } + LOGE("Unreconized value %s passed to stateRaster", values[i]); + } - if (!strcmp(keys[i], "stateFragment")) { - if (!strcmp(values[i], "default")) { - continue; - } - if (!strcmp(values[i], "parent")) { - s->mEnviroment.mFragment.clear(); - continue; - } - LOGE("Unreconized value %s passed to stateFragment", values[i]); + if (!strcmp(keys[i], "stateFragment")) { + if (!strcmp(values[i], "default")) { + continue; + } + if (!strcmp(values[i], "parent")) { + s->mEnviroment.mFragment.clear(); + continue; } + LOGE("Unreconized value %s passed to stateFragment", values[i]); + } - if (!strcmp(keys[i], "stateStore")) { - if (!strcmp(values[i], "default")) { - continue; - } - if (!strcmp(values[i], "parent")) { - s->mEnviroment.mFragmentStore.clear(); - continue; - } - LOGE("Unreconized value %s passed to stateStore", values[i]); + if (!strcmp(keys[i], "stateStore")) { + if (!strcmp(values[i], "default")) { + continue; } + if (!strcmp(values[i], "parent")) { + s->mEnviroment.mFragmentStore.clear(); + continue; + } + LOGE("Unreconized value %s passed to stateStore", values[i]); } - } else { - LOGE("bcc: FAILS to prepare executable"); - // Handle Fatal Error } } diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_ime_pressed.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_ime_pressed.png Binary files differindex 993ea5591c8b..335960243cfe 100644 --- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_ime_pressed.png +++ b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_ime_pressed.png diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/InputMethodButton.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/InputMethodButton.java index 69bc161fea7c..7012ddcbce8d 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/InputMethodButton.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/InputMethodButton.java @@ -188,6 +188,12 @@ public class InputMethodButton extends ImageView { Settings.Secure.INPUT_METHOD_SELECTOR_VISIBILITY, ID_IME_BUTTON_VISIBILITY_AUTO); } + public void setIconImage(int resId) { + if (mIcon != null) { + mIcon.setImageResource(resId); + } + } + public void setIMEButtonVisible(IBinder token, boolean keyboardVisible) { mToken = token; mKeyboardVisible = keyboardVisible; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/InputMethodsPanel.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/InputMethodsPanel.java index add67b156785..cc200e39d028 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/InputMethodsPanel.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/InputMethodsPanel.java @@ -19,7 +19,6 @@ package com.android.systemui.statusbar.tablet; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; -import android.content.res.Resources; import android.graphics.drawable.Drawable; import android.os.IBinder; import android.provider.Settings; @@ -53,11 +52,12 @@ public class InputMethodsPanel extends LinearLayout implements StatusBarPanel, O new HashMap<InputMethodInfo, List<InputMethodSubtype>>(); private final HashMap<View, Pair<InputMethodInfo, InputMethodSubtype>> mRadioViewAndImiMap = new HashMap<View, Pair<InputMethodInfo, InputMethodSubtype>>(); - private final PackageManager mPackageManager; private Context mContext; private IBinder mToken; + private InputMethodButton mInputMethodSwitchButton; private LinearLayout mInputMethodMenuList; + private PackageManager mPackageManager; private String mEnabledInputMethodAndSubtypesCacheStr; private View mConfigureImeShortcut; @@ -69,7 +69,6 @@ public class InputMethodsPanel extends LinearLayout implements StatusBarPanel, O super(context, attrs, defStyle); mContext = context; mImm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE); - mPackageManager = context.getPackageManager(); } @Override @@ -90,8 +89,17 @@ public class InputMethodsPanel extends LinearLayout implements StatusBarPanel, O @Override protected void onVisibilityChanged(View changedView, int visibility) { super.onVisibilityChanged(changedView, visibility); - if (visibility == View.VISIBLE && changedView == this) { - updateUiElements(); + if (changedView == this) { + if (visibility == View.VISIBLE) { + updateUiElements(); + if (mInputMethodSwitchButton != null) { + mInputMethodSwitchButton.setIconImage(R.drawable.ic_sysbar_ime_pressed); + } + } else { + if (mInputMethodSwitchButton != null) { + mInputMethodSwitchButton.setIconImage(R.drawable.ic_sysbar_ime); + } + } } } @@ -180,6 +188,8 @@ public class InputMethodsPanel extends LinearLayout implements StatusBarPanel, O // TODO: Reuse subtype views. mInputMethodMenuList.removeAllViews(); mRadioViewAndImiMap.clear(); + mPackageManager = mContext.getPackageManager(); + HashMap<InputMethodInfo, List<InputMethodSubtype>> enabledIMIs = getEnabledInputMethodAndSubtypeList(); // TODO: Sort by alphabet and mode. @@ -198,10 +208,14 @@ public class InputMethodsPanel extends LinearLayout implements StatusBarPanel, O updateRadioButtons(); } - public void setIMEToken(IBinder token) { + public void setImeToken(IBinder token) { mToken = token; } + public void setImeSwitchButton(InputMethodButton imb) { + mInputMethodSwitchButton = imb; + } + private void setInputMethodAndSubtype(InputMethodInfo imi, InputMethodSubtype subtype) { if (mToken != null) { mImm.setInputMethodAndSubtype(mToken, imi.getId(), subtype); @@ -308,6 +322,10 @@ public class InputMethodsPanel extends LinearLayout implements StatusBarPanel, O private CharSequence getSubtypeName(InputMethodInfo imi, InputMethodSubtype subtype) { if (imi == null || subtype == null) return null; + if (DEBUG) { + Log.d(TAG, "Get text from: " + imi.getPackageName() + subtype.getNameResId() + + imi.getServiceInfo().applicationInfo); + } // TODO: Change the language of subtype name according to subtype's locale. return mPackageManager.getText( imi.getPackageName(), subtype.getNameResId(), imi.getServiceInfo().applicationInfo); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/ShirtPocket.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/ShirtPocket.java index e864577b97c6..a67f9157459f 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/ShirtPocket.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/ShirtPocket.java @@ -120,7 +120,7 @@ public class ShirtPocket extends ImageView { mAltText.setVisibility(View.VISIBLE); if (mClipping.getItemCount() > 0) { // TODO: figure out how to visualize every kind of ClipData! - mAltText.setText(mClipping.getItem(0).coerceToText(getContext())); + mAltText.setText(mClipping.getItemAt(0).coerceToText(getContext())); } } } 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 825877a7451f..6db74d133372 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java @@ -272,6 +272,7 @@ public class TabletStatusBar extends StatusBar implements mInputMethodsPanel.setVisibility(View.GONE); mInputMethodsPanel.setOnTouchListener(new TouchOutsideListener( MSG_CLOSE_INPUT_METHODS_PANEL, mInputMethodsPanel)); + mInputMethodsPanel.setImeSwitchButton(mInputMethodSwitchButton); mStatusBarView.setIgnoreChildren(3, mInputMethodSwitchButton, mInputMethodsPanel); lp = new WindowManager.LayoutParams( ViewGroup.LayoutParams.WRAP_CONTENT, @@ -853,7 +854,7 @@ public class TabletStatusBar extends StatusBar implements if (oldVisibility != mInputMethodSwitchButton.getVisibility()) { updateNotificationIcons(); } - mInputMethodsPanel.setIMEToken(token); + mInputMethodsPanel.setImeToken(token); mBackButton.setImageResource( visible ? R.drawable.ic_sysbar_back_ime : R.drawable.ic_sysbar_back); if (FAKE_SPACE_BAR) { diff --git a/policy/src/com/android/internal/policy/impl/KeyguardViewManager.java b/policy/src/com/android/internal/policy/impl/KeyguardViewManager.java index 70a4b20bb61a..32c016d8407e 100644 --- a/policy/src/com/android/internal/policy/impl/KeyguardViewManager.java +++ b/policy/src/com/android/internal/policy/impl/KeyguardViewManager.java @@ -114,14 +114,12 @@ public class KeyguardViewManager implements KeyguardWindowController { lp.softInputMode = WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN; lp.windowAnimations = com.android.internal.R.style.Animation_LockScreen; - if (mContext.getResources().getBoolean(R.bool.config_enableLockScreenRotation)) { - Log.d(TAG, "Rotation sensor for lock screen On!"); - lp.screenOrientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR; - } else { - Log.d(TAG, "Rotation sensor for lock screen Off!"); - lp.screenOrientation = ActivityInfo.SCREEN_ORIENTATION_NOSENSOR; - } - + // TODO: Sometimes we get the wrong value for the sensor resource we use to configure + // this. However, the current UI design has LockScreen always respond to orientation so + // we don't need this for the time-being. + // + // For reference, the configuration variable is R.bool.config_enableLockScreenRotation + lp.screenOrientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR; lp.setTitle("Keyguard"); mWindowLayoutParams = lp; diff --git a/services/input/PointerController.cpp b/services/input/PointerController.cpp index ebc58eeb03c2..92af51e6c82c 100644 --- a/services/input/PointerController.cpp +++ b/services/input/PointerController.cpp @@ -310,8 +310,16 @@ void PointerController::setDisplayOrientation(int32_t orientation) { void PointerController::setPointerIcon(const SkBitmap* bitmap, float hotSpotX, float hotSpotY) { AutoMutex _l(mLock); - delete mLocked.iconBitmap; - mLocked.iconBitmap = bitmap ? new SkBitmap(*bitmap) : NULL; + if (mLocked.iconBitmap) { + delete mLocked.iconBitmap; + mLocked.iconBitmap = NULL; + } + + if (bitmap) { + mLocked.iconBitmap = new SkBitmap(); + bitmap->copyTo(mLocked.iconBitmap, SkBitmap::kARGB_8888_Config); + } + mLocked.iconHotSpotX = hotSpotX; mLocked.iconHotSpotY = hotSpotY; mLocked.drawn = false; diff --git a/services/java/com/android/server/ClipboardService.java b/services/java/com/android/server/ClipboardService.java index bec35d162abf..062ab74ff406 100644 --- a/services/java/com/android/server/ClipboardService.java +++ b/services/java/com/android/server/ClipboardService.java @@ -140,7 +140,7 @@ public class ClipboardService extends IClipboard.Stub { public boolean hasClipboardText() { synchronized (this) { if (mPrimaryClip != null) { - CharSequence text = mPrimaryClip.getItem(0).getText(); + CharSequence text = mPrimaryClip.getItemAt(0).getText(); return text != null && text.length() > 0; } return false; @@ -175,7 +175,7 @@ public class ClipboardService extends IClipboard.Stub { private final void checkDataOwnerLocked(ClipData data, int uid) { final int N = data.getItemCount(); for (int i=0; i<N; i++) { - checkItemOwnerLocked(data.getItem(i), uid); + checkItemOwnerLocked(data.getItemAt(i), uid); } } @@ -214,7 +214,7 @@ public class ClipboardService extends IClipboard.Stub { if (mPrimaryClip != null && !mActivePermissionOwners.contains(pkg)) { final int N = mPrimaryClip.getItemCount(); for (int i=0; i<N; i++) { - grantItemLocked(mPrimaryClip.getItem(i), pkg); + grantItemLocked(mPrimaryClip.getItemAt(i), pkg); } mActivePermissionOwners.add(pkg); } @@ -249,7 +249,7 @@ public class ClipboardService extends IClipboard.Stub { } final int N = mPrimaryClip.getItemCount(); for (int i=0; i<N; i++) { - revokeItemLocked(mPrimaryClip.getItem(i)); + revokeItemLocked(mPrimaryClip.getItemAt(i)); } } } diff --git a/services/java/com/android/server/InputMethodManagerService.java b/services/java/com/android/server/InputMethodManagerService.java index 7b4f24697226..4d406209e74b 100644 --- a/services/java/com/android/server/InputMethodManagerService.java +++ b/services/java/com/android/server/InputMethodManagerService.java @@ -2049,8 +2049,9 @@ public class InputMethodManagerService extends IInputMethodManager.Stub for (int i = 0; i < N; ++i) { InputMethodSubtype subtype = subtypes.get(i); final String subtypeLocale = subtype.getLocale(); - // An applicable subtype should match "mode". - if (subtypes.get(i).getMode().equalsIgnoreCase(mode)) { + // An applicable subtype should match "mode". If mode is null, mode will be ignored, + // and all subtypes with all modes can be candidates. + if (mode == null || subtypes.get(i).getMode().equalsIgnoreCase(mode)) { if (firstMatchedModeSubtype == null) { firstMatchedModeSubtype = subtype; } @@ -2175,11 +2176,24 @@ public class InputMethodManagerService extends IInputMethodManager.Stub InputMethodInfo imi = mMethodMap.get(lastInputMethodId); if (imi != null) { // If there are no selected subtypes, the framework will try to find - // the most applicable subtype from all subtypes whose mode is - // SUBTYPE_MODE_KEYBOARD. This is an exceptional case, so we will hardcode - // the mode. - mCurrentSubtype = findLastResortApplicableSubtypeLocked( - mRes, imi.getSubtypes(), SUBTYPE_MODE_KEYBOARD, null, true); + // the most applicable subtype from explicitly or implicitly enabled + // subtypes. + List<InputMethodSubtype> explicitlyOrImplicitlyEnabledSubtypes = + getEnabledInputMethodSubtypeList(imi, true); + // If there is only one explicitly or implicitly enabled subtype, + // just returns it. + if (explicitlyOrImplicitlyEnabledSubtypes.size() == 1) { + mCurrentSubtype = explicitlyOrImplicitlyEnabledSubtypes.get(0); + } else if (explicitlyOrImplicitlyEnabledSubtypes.size() > 1) { + mCurrentSubtype = findLastResortApplicableSubtypeLocked( + mRes, explicitlyOrImplicitlyEnabledSubtypes, + SUBTYPE_MODE_KEYBOARD, null, true); + if (mCurrentSubtype == null) { + mCurrentSubtype = findLastResortApplicableSubtypeLocked( + mRes, explicitlyOrImplicitlyEnabledSubtypes, null, null, + true); + } + } } } else { mCurrentSubtype = diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java index 166dbc304e80..8d194925652d 100644 --- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java +++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java @@ -80,6 +80,7 @@ public final class BridgeContext extends Activity { private final Object mProjectKey; private final DisplayMetrics mMetrics; private final RenderResources mRenderResources; + private final ApplicationInfo mApplicationInfo; private final Map<Object, Map<String, String>> mDefaultPropMaps = new IdentityHashMap<Object, Map<String,String>>(); @@ -112,10 +113,12 @@ public final class BridgeContext extends Activity { * value is the resource value. * @param styleInheritanceMap * @param projectCallback + * @param targetSdkVersion the targetSdkVersion of the application. */ public BridgeContext(Object projectKey, DisplayMetrics metrics, RenderResources renderResources, - IProjectCallback projectCallback) { + IProjectCallback projectCallback, + int targetSdkVersion) { mProjectKey = projectKey; mMetrics = metrics; mProjectCallback = projectCallback; @@ -124,6 +127,9 @@ public final class BridgeContext extends Activity { mFragments.mCurState = Fragment.CREATED; mFragments.mActivity = this; + + mApplicationInfo = new ApplicationInfo(); + mApplicationInfo.targetSdkVersion = targetSdkVersion; } /** @@ -836,7 +842,7 @@ public final class BridgeContext extends Activity { @Override public ApplicationInfo getApplicationInfo() { - return new ApplicationInfo(); + return mApplicationInfo; } @Override diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java index e5951f6a23f0..63d52e9638da 100644 --- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java +++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java @@ -67,8 +67,10 @@ import android.view.View.AttachInfo; import android.view.View.MeasureSpec; import android.view.ViewGroup.LayoutParams; import android.widget.FrameLayout; +import android.widget.LinearLayout; import android.widget.TabHost; import android.widget.TabWidget; +import android.widget.TabHost.TabSpec; import java.awt.Color; import java.awt.Graphics2D; @@ -170,7 +172,7 @@ public class RenderSessionImpl extends FrameworkResourceIdProvider { // build the context mContext = new BridgeContext(mParams.getProjectKey(), metrics, resources, - mParams.getProjectCallback()); + mParams.getProjectCallback(), mParams.getTargetSdkVersion()); setUp(); @@ -918,7 +920,7 @@ public class RenderSessionImpl extends FrameworkResourceIdProvider { /** * Returns the top screen offset. This depends on whether the current theme defines the user * of the title and status bars. - * @param resolver The {@link ResourceResolver} + * @param resolver The {@link RenderResources} * @param metrics The display metrics * @return the pixel height offset */ @@ -1047,28 +1049,36 @@ public class RenderSessionImpl extends FrameworkResourceIdProvider { // now process the content of the framelayout and dynamically create tabs for it. final int count = content.getChildCount(); - if (count == 0) { - throw new PostInflateException( - "The FrameLayout for the TabHost has no content. Rendering failed.\n"); - } - // this must be called before addTab() so that the TabHost searches its TabWidget // and FrameLayout. tabHost.setup(); - // for each child of the framelayout, add a new TabSpec - for (int i = 0 ; i < count ; i++) { - View child = content.getChildAt(i); - String tabSpec = String.format("tab_spec%d", i+1); - int id = child.getId(); - String[] resource = projectCallback.resolveResourceValue(id); - String name; - if (resource != null) { - name = resource[0]; // 0 is resource name, 1 is resource type. - } else { - name = String.format("Tab %d", i+1); // default name if id is unresolved. + if (count == 0) { + // Create a dummy child to get a single tab + TabSpec spec = tabHost.newTabSpec("tag").setIndicator("Tab Label", + tabHost.getResources().getDrawable(android.R.drawable.ic_menu_info_details)) + .setContent(new TabHost.TabContentFactory() { + public View createTabContent(String tag) { + return new LinearLayout(mContext); + } + }); + tabHost.addTab(spec); + return; + } else { + // for each child of the framelayout, add a new TabSpec + for (int i = 0 ; i < count ; i++) { + View child = content.getChildAt(i); + String tabSpec = String.format("tab_spec%d", i+1); + int id = child.getId(); + String[] resource = projectCallback.resolveResourceValue(id); + String name; + if (resource != null) { + name = resource[0]; // 0 is resource name, 1 is resource type. + } else { + name = String.format("Tab %d", i+1); // default name if id is unresolved. + } + tabHost.addTab(tabHost.newTabSpec(tabSpec).setIndicator(name).setContent(id)); } - tabHost.addTab(tabHost.newTabSpec(tabSpec).setIndicator(name).setContent(id)); } } diff --git a/voip/java/com/android/server/sip/SipService.java b/voip/java/com/android/server/sip/SipService.java index 3af6e78068b3..dc669896e35c 100644 --- a/voip/java/com/android/server/sip/SipService.java +++ b/voip/java/com/android/server/sip/SipService.java @@ -105,7 +105,7 @@ public final class SipService extends ISipService.Stub { if (SipManager.isApiSupported(context)) { ServiceManager.addService("sip", new SipService(context)); context.sendBroadcast(new Intent(SipManager.ACTION_SIP_SERVICE_UP)); - if (DEBUG) Log.i(TAG, "SIP service started"); + if (DEBUG) Log.d(TAG, "SIP service started"); } } @@ -113,10 +113,6 @@ public final class SipService extends ISipService.Stub { if (DEBUG) Log.d(TAG, " service started!"); mContext = context; mConnectivityReceiver = new ConnectivityReceiver(); - context.registerReceiver(mConnectivityReceiver, - new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION)); - context.registerReceiver(mWifiStateReceiver, - new IntentFilter(WifiManager.WIFI_STATE_CHANGED_ACTION)); mMyWakeLock = new SipWakeLock((PowerManager) context.getSystemService(Context.POWER_SERVICE)); @@ -124,7 +120,7 @@ public final class SipService extends ISipService.Stub { mWifiOnly = SipManager.isSipWifiOnly(context); } - BroadcastReceiver mWifiStateReceiver = new BroadcastReceiver() { + private BroadcastReceiver mWifiStateReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); @@ -147,6 +143,20 @@ public final class SipService extends ISipService.Stub { } }; + private void registerReceivers() { + mContext.registerReceiver(mConnectivityReceiver, + new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION)); + mContext.registerReceiver(mWifiStateReceiver, + new IntentFilter(WifiManager.WIFI_STATE_CHANGED_ACTION)); + if (DEBUG) Log.d(TAG, " +++ register receivers"); + } + + private void unregisterReceivers() { + mContext.unregisterReceiver(mConnectivityReceiver); + mContext.unregisterReceiver(mWifiStateReceiver); + if (DEBUG) Log.d(TAG, " --- unregister receivers"); + } + private MyExecutor getExecutor() { // create mExecutor lazily if (mExecutor == null) mExecutor = new MyExecutor(); @@ -166,12 +176,14 @@ public final class SipService extends ISipService.Stub { return profiles.toArray(new SipProfile[profiles.size()]); } - public void open(SipProfile localProfile) { + public synchronized void open(SipProfile localProfile) { mContext.enforceCallingOrSelfPermission( android.Manifest.permission.USE_SIP, null); localProfile.setCallingUid(Binder.getCallingUid()); try { + boolean addingFirstProfile = mSipGroups.isEmpty(); createGroup(localProfile); + if (addingFirstProfile && !mSipGroups.isEmpty()) registerReceivers(); } catch (SipException e) { Log.e(TAG, "openToMakeCalls()", e); // TODO: how to send the exception back @@ -192,8 +204,10 @@ public final class SipService extends ISipService.Stub { if (DEBUG) Log.d(TAG, "open3: " + localProfile.getUriString() + ": " + incomingCallPendingIntent + ": " + listener); try { + boolean addingFirstProfile = mSipGroups.isEmpty(); SipSessionGroupExt group = createGroup(localProfile, incomingCallPendingIntent, listener); + if (addingFirstProfile && !mSipGroups.isEmpty()) registerReceivers(); if (localProfile.getAutoRegistration()) { group.openToReceiveCalls(); if (mWifiEnabled) grabWifiLock(); @@ -235,6 +249,7 @@ public final class SipService extends ISipService.Stub { releaseWifiLock(); mMyWakeLock.reset(); // in case there's leak } + if (mSipGroups.isEmpty()) unregisterReceivers(); } public synchronized boolean isOpened(String localProfileUri) { @@ -1055,7 +1070,10 @@ public final class SipService extends ISipService.Stub { // we want to skip the interim ones) but deliver bad news // immediately if (connected) { - if (mTask != null) mTask.cancel(); + if (mTask != null) { + mTask.cancel(); + mMyWakeLock.release(mTask); + } mTask = new MyTimerTask(type, connected); mTimer.schedule(mTask, 2 * 1000L); // hold wakup lock so that we can finish changes before the @@ -1096,6 +1114,7 @@ public final class SipService extends ISipService.Stub { if (mTask != this) { Log.w(TAG, " unexpected task: " + mNetworkType + (mConnected ? " CONNECTED" : "DISCONNECTED")); + mMyWakeLock.release(this); return; } mTask = null; |