Merge change I8061e6ac into eclair
* changes:
Fix 2209086: Updated assets and fixed widget dimension calculation.
diff --git a/api/6.xml b/api/6.xml
index 32d0f1e..74c2375 100644
--- a/api/6.xml
+++ b/api/6.xml
@@ -6389,72 +6389,6 @@
visibility="public"
>
</field>
-<field name="quickContactBadgeStyleSmallWindowLarge"
- type="int"
- transient="false"
- volatile="false"
- value="16843443"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="quickContactBadgeStyleSmallWindowMedium"
- type="int"
- transient="false"
- volatile="false"
- value="16843442"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="quickContactBadgeStyleSmallWindowSmall"
- type="int"
- transient="false"
- volatile="false"
- value="16843441"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="quickContactBadgeStyleWindowLarge"
- type="int"
- transient="false"
- volatile="false"
- value="16843440"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="quickContactBadgeStyleWindowMedium"
- type="int"
- transient="false"
- volatile="false"
- value="16843439"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="quickContactBadgeStyleWindowSmall"
- type="int"
- transient="false"
- volatile="false"
- value="16843438"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
<field name="radioButtonStyle"
type="int"
transient="false"
@@ -8842,17 +8776,6 @@
visibility="public"
>
</field>
-<field name="wallpaperAuthor"
- type="int"
- transient="false"
- volatile="false"
- value="16843444"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
<field name="wallpaperCloseEnterAnimation"
type="int"
transient="false"
@@ -8875,17 +8798,6 @@
visibility="public"
>
</field>
-<field name="wallpaperDescription"
- type="int"
- transient="false"
- volatile="false"
- value="16843445"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
<field name="wallpaperIntraCloseEnterAnimation"
type="int"
transient="false"
@@ -13892,8 +13804,6 @@
</parameter>
<parameter name="options" type="android.os.Bundle">
</parameter>
-<exception name="NetworkErrorException" type="android.accounts.NetworkErrorException">
-</exception>
</method>
<method name="editProperties"
return="android.os.Bundle"
@@ -13943,7 +13853,7 @@
</parameter>
<parameter name="authTokenType" type="java.lang.String">
</parameter>
-<parameter name="options" type="android.os.Bundle">
+<parameter name="loginOptions" type="android.os.Bundle">
</parameter>
<exception name="NetworkErrorException" type="android.accounts.NetworkErrorException">
</exception>
@@ -14007,10 +13917,8 @@
</parameter>
<parameter name="authTokenType" type="java.lang.String">
</parameter>
-<parameter name="options" type="android.os.Bundle">
+<parameter name="loginOptions" type="android.os.Bundle">
</parameter>
-<exception name="NetworkErrorException" type="android.accounts.NetworkErrorException">
-</exception>
</method>
</class>
<class name="Account"
@@ -14275,7 +14183,7 @@
</parameter>
<parameter name="password" type="java.lang.String">
</parameter>
-<parameter name="userdata" type="android.os.Bundle">
+<parameter name="extras" type="android.os.Bundle">
</parameter>
</method>
<method name="addOnAccountsUpdatedListener"
@@ -14441,7 +14349,7 @@
</parameter>
<parameter name="authTokenType" type="java.lang.String">
</parameter>
-<parameter name="options" type="android.os.Bundle">
+<parameter name="loginOptions" type="android.os.Bundle">
</parameter>
<parameter name="activity" type="android.app.Activity">
</parameter>
@@ -14491,7 +14399,7 @@
</parameter>
<parameter name="addAccountOptions" type="android.os.Bundle">
</parameter>
-<parameter name="getAuthTokenOptions" type="android.os.Bundle">
+<parameter name="loginOptions" type="android.os.Bundle">
</parameter>
<parameter name="callback" type="android.accounts.AccountManagerCallback<android.os.Bundle>">
</parameter>
@@ -14660,7 +14568,7 @@
</parameter>
<parameter name="authTokenType" type="java.lang.String">
</parameter>
-<parameter name="options" type="android.os.Bundle">
+<parameter name="loginOptions" type="android.os.Bundle">
</parameter>
<parameter name="activity" type="android.app.Activity">
</parameter>
@@ -15058,71 +14966,6 @@
>
</method>
</interface>
-<class name="AccountManagerResponse"
- extends="java.lang.Object"
- abstract="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<implements name="android.os.Parcelable">
-</implements>
-<method name="describeContents"
- return="int"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="onError"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="errorCode" type="int">
-</parameter>
-<parameter name="errorMessage" type="java.lang.String">
-</parameter>
-</method>
-<method name="onResult"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="result" type="android.os.Bundle">
-</parameter>
-</method>
-<method name="writeToParcel"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="dest" type="android.os.Parcel">
-</parameter>
-<parameter name="flags" type="int">
-</parameter>
-</method>
-</class>
<class name="AccountsException"
extends="java.lang.Exception"
abstract="false"
@@ -24703,208 +24546,6 @@
</parameter>
</method>
</interface>
-<class name="WallpaperInfo"
- extends="java.lang.Object"
- abstract="false"
- static="false"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-<implements name="android.os.Parcelable">
-</implements>
-<constructor name="WallpaperInfo"
- type="android.app.WallpaperInfo"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="context" type="android.content.Context">
-</parameter>
-<parameter name="service" type="android.content.pm.ResolveInfo">
-</parameter>
-<exception name="IOException" type="java.io.IOException">
-</exception>
-<exception name="XmlPullParserException" type="org.xmlpull.v1.XmlPullParserException">
-</exception>
-</constructor>
-<method name="describeContents"
- return="int"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="dump"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="pw" type="android.util.Printer">
-</parameter>
-<parameter name="prefix" type="java.lang.String">
-</parameter>
-</method>
-<method name="getComponent"
- return="android.content.ComponentName"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="getPackageName"
- return="java.lang.String"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="getServiceInfo"
- return="android.content.pm.ServiceInfo"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="getServiceName"
- return="java.lang.String"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="getSettingsActivity"
- return="java.lang.String"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="loadAuthor"
- return="java.lang.CharSequence"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="pm" type="android.content.pm.PackageManager">
-</parameter>
-<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
-</exception>
-</method>
-<method name="loadDescription"
- return="java.lang.CharSequence"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="pm" type="android.content.pm.PackageManager">
-</parameter>
-<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
-</exception>
-</method>
-<method name="loadIcon"
- return="android.graphics.drawable.Drawable"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="pm" type="android.content.pm.PackageManager">
-</parameter>
-</method>
-<method name="loadLabel"
- return="java.lang.CharSequence"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="pm" type="android.content.pm.PackageManager">
-</parameter>
-</method>
-<method name="loadThumbnail"
- return="android.graphics.drawable.Drawable"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="pm" type="android.content.pm.PackageManager">
-</parameter>
-</method>
-<method name="writeToParcel"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="dest" type="android.os.Parcel">
-</parameter>
-<parameter name="flags" type="int">
-</parameter>
-</method>
-<field name="CREATOR"
- type="android.os.Parcelable.Creator"
- transient="false"
- volatile="false"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-</class>
<class name="WallpaperManager"
extends="java.lang.Object"
abstract="false"
@@ -24996,17 +24637,6 @@
<parameter name="context" type="android.content.Context">
</parameter>
</method>
-<method name="getWallpaperInfo"
- return="android.app.WallpaperInfo"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
<method name="peekDrawable"
return="android.graphics.drawable.Drawable"
abstract="false"
@@ -25029,29 +24659,6 @@
visibility="public"
>
</method>
-<method name="sendWallpaperCommand"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="windowToken" type="android.os.IBinder">
-</parameter>
-<parameter name="action" type="java.lang.String">
-</parameter>
-<parameter name="x" type="int">
-</parameter>
-<parameter name="y" type="int">
-</parameter>
-<parameter name="z" type="int">
-</parameter>
-<parameter name="extras" type="android.os.Bundle">
-</parameter>
-</method>
<method name="setBitmap"
return="void"
abstract="false"
@@ -25097,21 +24704,6 @@
<exception name="IOException" type="java.io.IOException">
</exception>
</method>
-<method name="setWallpaperOffsetSteps"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="xStep" type="float">
-</parameter>
-<parameter name="yStep" type="float">
-</parameter>
-</method>
<method name="setWallpaperOffsets"
return="void"
abstract="false"
@@ -25144,17 +24736,6 @@
<parameter name="minimumHeight" type="int">
</parameter>
</method>
-<field name="ACTION_LIVE_WALLPAPER_CHOOSER"
- type="java.lang.String"
- transient="false"
- volatile="false"
- value=""android.service.wallpaper.LIVE_WALLPAPER_CHOOSER""
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
</class>
</package>
<package name="android.appwidget"
@@ -79940,17 +79521,6 @@
deprecated="not deprecated"
visibility="public"
>
-<field name="CAMCORDER"
- type="int"
- transient="false"
- volatile="false"
- value="5"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
<field name="DEFAULT"
type="int"
transient="false"
@@ -79995,17 +79565,6 @@
visibility="public"
>
</field>
-<field name="VOICE_RECOGNITION"
- type="int"
- transient="false"
- volatile="false"
- value="6"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
<field name="VOICE_UPLINK"
type="int"
transient="false"
@@ -99828,7 +99387,7 @@
visibility="public"
>
</field>
-<field name="ECLAIR_MR1"
+<field name="ECLAIR_0_1"
type="int"
transient="false"
volatile="false"
@@ -105903,17 +105462,6 @@
<parameter name="time" type="long">
</parameter>
</method>
-<method name="isScreenOn"
- return="boolean"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
<method name="newWakeLock"
return="android.os.PowerManager.WakeLock"
abstract="false"
@@ -123478,341 +123026,6 @@
</implements>
</interface>
</package>
-<package name="android.service.wallpaper"
->
-<class name="WallpaperService"
- extends="android.app.Service"
- abstract="true"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<constructor name="WallpaperService"
- type="android.service.wallpaper.WallpaperService"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</constructor>
-<method name="onBind"
- return="android.os.IBinder"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="intent" type="android.content.Intent">
-</parameter>
-</method>
-<method name="onCreateEngine"
- return="android.service.wallpaper.WallpaperService.Engine"
- abstract="true"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<field name="SERVICE_INTERFACE"
- type="java.lang.String"
- transient="false"
- volatile="false"
- value=""android.service.wallpaper.WallpaperService""
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="SERVICE_META_DATA"
- type="java.lang.String"
- transient="false"
- volatile="false"
- value=""android.service.wallpaper""
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-</class>
-<class name="WallpaperService.Engine"
- extends="java.lang.Object"
- abstract="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<constructor name="WallpaperService.Engine"
- type="android.service.wallpaper.WallpaperService.Engine"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</constructor>
-<method name="getDesiredMinimumHeight"
- return="int"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="getDesiredMinimumWidth"
- return="int"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="getSurfaceHolder"
- return="android.view.SurfaceHolder"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="isPreview"
- return="boolean"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="isVisible"
- return="boolean"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="onCommand"
- return="android.os.Bundle"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="action" type="java.lang.String">
-</parameter>
-<parameter name="x" type="int">
-</parameter>
-<parameter name="y" type="int">
-</parameter>
-<parameter name="z" type="int">
-</parameter>
-<parameter name="extras" type="android.os.Bundle">
-</parameter>
-<parameter name="resultRequested" type="boolean">
-</parameter>
-</method>
-<method name="onCreate"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="surfaceHolder" type="android.view.SurfaceHolder">
-</parameter>
-</method>
-<method name="onDesiredSizeChanged"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="desiredWidth" type="int">
-</parameter>
-<parameter name="desiredHeight" type="int">
-</parameter>
-</method>
-<method name="onDestroy"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="onOffsetsChanged"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="xOffset" type="float">
-</parameter>
-<parameter name="yOffset" type="float">
-</parameter>
-<parameter name="xOffsetStep" type="float">
-</parameter>
-<parameter name="yOffsetStep" type="float">
-</parameter>
-<parameter name="xPixelOffset" type="int">
-</parameter>
-<parameter name="yPixelOffset" type="int">
-</parameter>
-</method>
-<method name="onSurfaceChanged"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="holder" type="android.view.SurfaceHolder">
-</parameter>
-<parameter name="format" type="int">
-</parameter>
-<parameter name="width" type="int">
-</parameter>
-<parameter name="height" type="int">
-</parameter>
-</method>
-<method name="onSurfaceCreated"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="holder" type="android.view.SurfaceHolder">
-</parameter>
-</method>
-<method name="onSurfaceDestroyed"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="holder" type="android.view.SurfaceHolder">
-</parameter>
-</method>
-<method name="onTouchEvent"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="event" type="android.view.MotionEvent">
-</parameter>
-</method>
-<method name="onVisibilityChanged"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="visible" type="boolean">
-</parameter>
-</method>
-<method name="setTouchEventsEnabled"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="enabled" type="boolean">
-</parameter>
-</method>
-</class>
-<class name="WallpaperSettingsActivity"
- extends="android.preference.PreferenceActivity"
- abstract="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<constructor name="WallpaperSettingsActivity"
- type="android.service.wallpaper.WallpaperSettingsActivity"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</constructor>
-<field name="EXTRA_PREVIEW_MODE"
- type="java.lang.String"
- transient="false"
- volatile="false"
- value=""android.service.wallpaper.PREVIEW_MODE""
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-</class>
-</package>
<package name="android.speech"
>
<class name="RecognizerIntent"
@@ -158737,17 +157950,6 @@
visibility="public"
>
</method>
-<method name="isOpaque"
- return="boolean"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
<method name="isPaddingOffsetRequired"
return="boolean"
abstract="false"
@@ -159029,19 +158231,6 @@
<parameter name="canvas" type="android.graphics.Canvas">
</parameter>
</method>
-<method name="onDrawScrollBars"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="true"
- deprecated="not deprecated"
- visibility="protected"
->
-<parameter name="canvas" type="android.graphics.Canvas">
-</parameter>
-</method>
<method name="onFinishInflate"
return="void"
abstract="false"
@@ -162629,17 +161818,6 @@
visibility="public"
>
</method>
-<method name="isChildrenDrawingOrderEnabled"
- return="boolean"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="protected"
->
-</method>
<method name="isChildrenDrawnWithCacheEnabled"
return="boolean"
abstract="false"
@@ -163023,19 +162201,6 @@
<parameter name="enabled" type="boolean">
</parameter>
</method>
-<method name="setChildrenDrawingOrderEnabled"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="protected"
->
-<parameter name="enabled" type="boolean">
-</parameter>
-</method>
<method name="setChildrenDrawnWithCacheEnabled"
return="void"
abstract="false"
@@ -172907,17 +172072,6 @@
visibility="public"
>
</constructor>
-<method name="getContentDisposition"
- return="java.lang.String"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
<method name="getContentLength"
return="long"
abstract="false"
@@ -172962,17 +172116,6 @@
visibility="public"
>
</method>
-<method name="getExpiresString"
- return="java.lang.String"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
<method name="getHttpStatusCode"
return="int"
abstract="false"
@@ -173097,23 +172240,6 @@
<parameter name="w" type="android.webkit.WebView">
</parameter>
</constructor>
-<method name="addMessageToConsole"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="message" type="java.lang.String">
-</parameter>
-<parameter name="lineNumber" type="int">
-</parameter>
-<parameter name="sourceID" type="java.lang.String">
-</parameter>
-</method>
<method name="createWindow"
return="android.webkit.WebView"
abstract="false"
@@ -173166,30 +172292,6 @@
visibility="public"
>
</method>
-<method name="getVisitedHistory"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="callback" type="android.webkit.ValueCallback<java.lang.String[]>">
-</parameter>
-</method>
-<method name="getWebChromeClient"
- return="android.webkit.WebChromeClient"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
<method name="onCloseWindow"
return="void"
abstract="false"
@@ -173262,32 +172364,6 @@
<parameter name="resend" type="android.os.Message">
</parameter>
</method>
-<method name="onGeolocationPermissionsHidePrompt"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="onGeolocationPermissionsShowPrompt"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="origin" type="java.lang.String">
-</parameter>
-<parameter name="callback" type="android.webkit.GeolocationPermissions.Callback">
-</parameter>
-</method>
<method name="onJsAlert"
return="void"
abstract="false"
@@ -173350,17 +172426,6 @@
<parameter name="defaultValue" type="java.lang.String">
</parameter>
</method>
-<method name="onJsTimeout"
- return="boolean"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
<method name="onLoadResource"
return="void"
abstract="false"
@@ -173415,23 +172480,6 @@
<parameter name="newProgress" type="int">
</parameter>
</method>
-<method name="onReachedMaxAppCacheSize"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="spaceNeeded" type="long">
-</parameter>
-<parameter name="totalUsedQuota" type="long">
-</parameter>
-<parameter name="quotaUpdater" type="android.webkit.WebStorage.QuotaUpdater">
-</parameter>
-</method>
<method name="onReceivedError"
return="void"
abstract="false"
@@ -173918,82 +172966,6 @@
visibility="public"
>
</constructor>
-<method name="allow"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="origin" type="java.lang.String">
-</parameter>
-</method>
-<method name="clear"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="origin" type="java.lang.String">
-</parameter>
-</method>
-<method name="clearAll"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="getAllowed"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="origin" type="java.lang.String">
-</parameter>
-<parameter name="callback" type="android.webkit.ValueCallback<java.lang.Boolean>">
-</parameter>
-</method>
-<method name="getInstance"
- return="android.webkit.GeolocationPermissions"
- abstract="false"
- native="false"
- synchronized="false"
- static="true"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="getOrigins"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="callback" type="android.webkit.ValueCallback<java.util.Set>">
-</parameter>
-</method>
</class>
<interface name="GeolocationPermissions.Callback"
abstract="true"
@@ -174991,27 +173963,6 @@
>
</method>
</class>
-<interface name="ValueCallback"
- abstract="true"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<method name="onReceiveValue"
- return="void"
- abstract="true"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="value" type="T">
-</parameter>
-</method>
-</interface>
<class name="WebBackForwardList"
extends="java.lang.Object"
abstract="false"
@@ -175087,58 +174038,6 @@
visibility="public"
>
</constructor>
-<method name="addMessageToConsole"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="message" type="java.lang.String">
-</parameter>
-<parameter name="lineNumber" type="int">
-</parameter>
-<parameter name="sourceID" type="java.lang.String">
-</parameter>
-</method>
-<method name="getDefaultVideoPoster"
- return="android.graphics.Bitmap"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="getVideoLoadingProgressView"
- return="android.view.View"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="getVisitedHistory"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="callback" type="android.webkit.ValueCallback<java.lang.String[]>">
-</parameter>
-</method>
<method name="onCloseWindow"
return="void"
abstract="false"
@@ -175220,17 +174119,6 @@
<parameter name="callback" type="android.webkit.GeolocationPermissions.Callback">
</parameter>
</method>
-<method name="onHideCustomView"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
<method name="onJsAlert"
return="boolean"
abstract="false"
@@ -175309,17 +174197,6 @@
<parameter name="result" type="android.webkit.JsPromptResult">
</parameter>
</method>
-<method name="onJsTimeout"
- return="boolean"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
<method name="onProgressChanged"
return="void"
abstract="false"
@@ -175335,23 +174212,6 @@
<parameter name="newProgress" type="int">
</parameter>
</method>
-<method name="onReachedMaxAppCacheSize"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="spaceNeeded" type="long">
-</parameter>
-<parameter name="totalUsedQuota" type="long">
-</parameter>
-<parameter name="quotaUpdater" type="android.webkit.WebStorage.QuotaUpdater">
-</parameter>
-</method>
<method name="onReceivedIcon"
return="void"
abstract="false"
@@ -175382,23 +174242,6 @@
<parameter name="title" type="java.lang.String">
</parameter>
</method>
-<method name="onReceivedTouchIconUrl"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="view" type="android.webkit.WebView">
-</parameter>
-<parameter name="url" type="java.lang.String">
-</parameter>
-<parameter name="precomposed" type="boolean">
-</parameter>
-</method>
<method name="onRequestFocus"
return="void"
abstract="false"
@@ -175412,41 +174255,7 @@
<parameter name="view" type="android.webkit.WebView">
</parameter>
</method>
-<method name="onShowCustomView"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="view" type="android.view.View">
-</parameter>
-<parameter name="callback" type="android.webkit.WebChromeClient.CustomViewCallback">
-</parameter>
-</method>
</class>
-<interface name="WebChromeClient.CustomViewCallback"
- abstract="true"
- static="true"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<method name="onCustomViewHidden"
- return="void"
- abstract="true"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-</interface>
<class name="WebHistoryItem"
extends="java.lang.Object"
abstract="false"
@@ -175750,28 +174559,6 @@
visibility="public"
>
</method>
-<method name="getDefaultZoom"
- return="android.webkit.WebSettings.ZoomDensity"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="getDomStorageEnabled"
- return="boolean"
- abstract="false"
- native="false"
- synchronized="true"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
<method name="getFantasyFontFamily"
return="java.lang.String"
abstract="false"
@@ -175838,17 +174625,6 @@
visibility="public"
>
</method>
-<method name="getLoadWithOverviewMode"
- return="boolean"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
<method name="getLoadsImagesAutomatically"
return="boolean"
abstract="false"
@@ -176038,45 +174814,6 @@
<parameter name="allow" type="boolean">
</parameter>
</method>
-<method name="setAppCacheEnabled"
- return="void"
- abstract="false"
- native="false"
- synchronized="true"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="flag" type="boolean">
-</parameter>
-</method>
-<method name="setAppCacheMaxSize"
- return="void"
- abstract="false"
- native="false"
- synchronized="true"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="appCacheMaxSize" type="long">
-</parameter>
-</method>
-<method name="setAppCachePath"
- return="void"
- abstract="false"
- native="false"
- synchronized="true"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="appCachePath" type="java.lang.String">
-</parameter>
-</method>
<method name="setBlockNetworkImage"
return="void"
abstract="false"
@@ -176194,32 +174931,6 @@
<parameter name="encoding" type="java.lang.String">
</parameter>
</method>
-<method name="setDefaultZoom"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="zoom" type="android.webkit.WebSettings.ZoomDensity">
-</parameter>
-</method>
-<method name="setDomStorageEnabled"
- return="void"
- abstract="false"
- native="false"
- synchronized="true"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="flag" type="boolean">
-</parameter>
-</method>
<method name="setFantasyFontFamily"
return="void"
abstract="false"
@@ -176324,19 +175035,6 @@
<parameter name="enabled" type="boolean">
</parameter>
</method>
-<method name="setLoadWithOverviewMode"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="overview" type="boolean">
-</parameter>
-</method>
<method name="setLoadsImagesAutomatically"
return="void"
abstract="false"
@@ -176774,39 +175472,6 @@
>
</method>
</class>
-<class name="WebSettings.ZoomDensity"
- extends="java.lang.Enum"
- abstract="false"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-<method name="valueOf"
- return="android.webkit.WebSettings.ZoomDensity"
- abstract="false"
- native="false"
- synchronized="false"
- static="true"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="name" type="java.lang.String">
-</parameter>
-</method>
-<method name="values"
- return="android.webkit.WebSettings.ZoomDensity[]"
- abstract="false"
- native="false"
- synchronized="false"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-</class>
<class name="WebStorage"
extends="java.lang.Object"
abstract="false"
@@ -176823,99 +175488,6 @@
visibility="public"
>
</constructor>
-<method name="deleteAllData"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="deleteOrigin"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="origin" type="java.lang.String">
-</parameter>
-</method>
-<method name="getInstance"
- return="android.webkit.WebStorage"
- abstract="false"
- native="false"
- synchronized="false"
- static="true"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="getOrigins"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="callback" type="android.webkit.ValueCallback<java.util.Map>">
-</parameter>
-</method>
-<method name="getQuotaForOrigin"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="origin" type="java.lang.String">
-</parameter>
-<parameter name="callback" type="android.webkit.ValueCallback<java.lang.Long>">
-</parameter>
-</method>
-<method name="getUsageForOrigin"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="origin" type="java.lang.String">
-</parameter>
-<parameter name="callback" type="android.webkit.ValueCallback<java.lang.Long>">
-</parameter>
-</method>
-<method name="setQuotaForOrigin"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="origin" type="java.lang.String">
-</parameter>
-<parameter name="quota" type="long">
-</parameter>
-</method>
</class>
<interface name="WebStorage.QuotaUpdater"
abstract="true"
@@ -177357,17 +175929,6 @@
<parameter name="vy" type="int">
</parameter>
</method>
-<method name="freeMemory"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
<method name="getCertificate"
return="android.net.http.SslCertificate"
abstract="false"
diff --git a/api/current.xml b/api/current.xml
index d6af516..6ddd439 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -99850,7 +99850,7 @@
visibility="public"
>
</field>
-<field name="ECLAIR_MR1"
+<field name="ECLAIR_0_1"
type="int"
transient="false"
volatile="false"
diff --git a/core/java/android/os/Build.java b/core/java/android/os/Build.java
index d4aaba3..ee18e88 100644
--- a/core/java/android/os/Build.java
+++ b/core/java/android/os/Build.java
@@ -158,9 +158,9 @@
public static final int ECLAIR = 5;
/**
- * Current work on Eclair MR1.
+ * December 2009: Android 2.0.1
*/
- public static final int ECLAIR_MR1 = 6;
+ public static final int ECLAIR_0_1 = 6;
}
/** The type of build, like "user" or "eng". */
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index cb3dc16..7433a79 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -3638,6 +3638,19 @@
public static final String LAST_KMSG_KB = "last_kmsg_kb";
/**
+ * The length of time in milli-seconds that automatic small adjustments to
+ * SystemClock are ignored if NITZ_UPDATE_DIFF is not exceeded.
+ */
+ public static final String NITZ_UPDATE_SPACING = "nitz_update_spacing";
+
+ /**
+ * If the NITZ_UPDATE_DIFF time is exceeded then an automatic adjustment
+ * to SystemClock will be allowed even if NITZ_UPDATE_SPACING has not been
+ * exceeded.
+ */
+ public static final String NITZ_UPDATE_DIFF = "nitz_update_diff";
+
+ /**
* @deprecated
* @hide
*/
diff --git a/graphics/java/android/renderscript/RSSurfaceView.java b/graphics/java/android/renderscript/RSSurfaceView.java
index 1bc03ac..ad1bb54 100644
--- a/graphics/java/android/renderscript/RSSurfaceView.java
+++ b/graphics/java/android/renderscript/RSSurfaceView.java
@@ -80,10 +80,10 @@
*/
public void surfaceDestroyed(SurfaceHolder holder) {
// Surface will be destroyed when we return
+ Log.v(RenderScript.LOG_TAG, "surfaceDestroyed");
if (mRS != null) {
- mRS.contextSetSurface(null);
+ mRS.contextSetSurface(0, 0, null);
}
- //Log.v(RenderScript.LOG_TAG, "surfaceDestroyed");
}
/**
@@ -91,10 +91,10 @@
* not normally called or subclassed by clients of RSSurfaceView.
*/
public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {
+ Log.v(RenderScript.LOG_TAG, "surfaceChanged");
if (mRS != null) {
- mRS.contextSetSurface(holder.getSurface());
+ mRS.contextSetSurface(w, h, holder.getSurface());
}
- //Log.v(RenderScript.LOG_TAG, "surfaceChanged");
}
/**
@@ -147,11 +147,8 @@
// ----------------------------------------------------------------------
public RenderScript createRenderScript(boolean useDepth, boolean forceSW) {
- Surface sur = null;
- while ((sur == null) || (mSurfaceHolder == null)) {
- sur = getHolder().getSurface();
- }
- mRS = new RenderScript(sur, useDepth, forceSW);
+ Log.v(RenderScript.LOG_TAG, "createRenderScript");
+ mRS = new RenderScript(useDepth, forceSW);
return mRS;
}
@@ -160,6 +157,7 @@
}
public void destroyRenderScript() {
+ Log.v(RenderScript.LOG_TAG, "destroyRenderScript");
mRS.destroy();
mRS = null;
}
diff --git a/graphics/java/android/renderscript/RenderScript.java b/graphics/java/android/renderscript/RenderScript.java
index f1e5af1..ea11882 100644
--- a/graphics/java/android/renderscript/RenderScript.java
+++ b/graphics/java/android/renderscript/RenderScript.java
@@ -30,10 +30,12 @@
*
**/
public class RenderScript {
- static final String LOG_TAG = "libRS_jni";
+ static final String LOG_TAG = "RenderScript_jni";
private static final boolean DEBUG = false;
@SuppressWarnings({"UnusedDeclaration", "deprecation"})
private static final boolean LOG_ENABLED = DEBUG ? Config.LOGD : Config.LOGV;
+ int mWidth;
+ int mHeight;
@@ -62,9 +64,9 @@
native int nDeviceCreate();
native void nDeviceDestroy(int dev);
native void nDeviceSetConfig(int dev, int param, int value);
- native int nContextCreate(int dev, Surface sur, int ver, boolean useDepth);
+ native int nContextCreate(int dev, int ver, boolean useDepth);
native void nContextDestroy(int con);
- native void nContextSetSurface(Surface sur);
+ native void nContextSetSurface(int w, int h, Surface sur);
native void nContextBindRootScript(int script);
native void nContextBindSampler(int sampler, int slot);
@@ -259,27 +261,31 @@
mRS.mMessageCallback.mID = msg;
mRS.mMessageCallback.run();
}
- //Log.d("rs", "MessageThread msg " + msg + " v1 " + rbuf[0] + " v2 " + rbuf[1] + " v3 " +rbuf[2]);
+ //Log.d(LOG_TAG, "MessageThread msg " + msg + " v1 " + rbuf[0] + " v2 " + rbuf[1] + " v3 " +rbuf[2]);
}
- Log.d("rs", "MessageThread exiting.");
+ Log.d(LOG_TAG, "MessageThread exiting.");
}
}
- public RenderScript(Surface sur, boolean useDepth, boolean forceSW) {
- mSurface = sur;
+ public RenderScript(boolean useDepth, boolean forceSW) {
+ mSurface = null;
+ mWidth = 0;
+ mHeight = 0;
mDev = nDeviceCreate();
if(forceSW) {
nDeviceSetConfig(mDev, 0, 1);
}
- mContext = nContextCreate(mDev, mSurface, 0, useDepth);
+ mContext = nContextCreate(mDev, 0, useDepth);
Element.initPredefined(this);
mMessageThread = new MessageThread(this);
mMessageThread.start();
}
- public void contextSetSurface(Surface sur) {
+ public void contextSetSurface(int w, int h, Surface sur) {
mSurface = sur;
- nContextSetSurface(mSurface);
+ mWidth = w;
+ mHeight = h;
+ nContextSetSurface(w, h, mSurface);
}
public void destroy() {
diff --git a/graphics/jni/android_renderscript_RenderScript.cpp b/graphics/jni/android_renderscript_RenderScript.cpp
index f3dda41..709cb97 100644
--- a/graphics/jni/android_renderscript_RenderScript.cpp
+++ b/graphics/jni/android_renderscript_RenderScript.cpp
@@ -151,30 +151,17 @@
}
static jint
-nContextCreate(JNIEnv *_env, jobject _this, jint dev, jobject wnd, jint ver, jboolean useDepth)
+nContextCreate(JNIEnv *_env, jobject _this, jint dev, jint ver, jboolean useDepth)
{
LOG_API("nContextCreate");
-
- if (wnd == NULL) {
- not_valid_surface:
- doThrow(_env, "java/lang/IllegalArgumentException",
- "Make sure the SurfaceView or associated SurfaceHolder has a valid Surface");
- return 0;
- }
- jclass surface_class = _env->FindClass("android/view/Surface");
- jfieldID surfaceFieldID = _env->GetFieldID(surface_class, "mSurface", "I");
- Surface * window = (Surface*)_env->GetIntField(wnd, surfaceFieldID);
- if (window == NULL)
- goto not_valid_surface;
-
- return (jint)rsContextCreate((RsDevice)dev, window, ver, useDepth);
+ return (jint)rsContextCreate((RsDevice)dev, ver, useDepth);
}
static void
-nContextSetSurface(JNIEnv *_env, jobject _this, jobject wnd)
+nContextSetSurface(JNIEnv *_env, jobject _this, jint width, jint height, jobject wnd)
{
RsContext con = (RsContext)(_env->GetIntField(_this, gContextId));
- LOG_API("nContextSetSurface, con(%p), surface(%p)", con, (Surface *)wnd);
+ LOG_API("nContextSetSurface, con(%p), width(%i), height(%i), surface(%p)", con, width, height, (Surface *)wnd);
Surface * window = NULL;
if (wnd == NULL) {
@@ -185,7 +172,7 @@
window = (Surface*)_env->GetIntField(wnd, surfaceFieldID);
}
- rsContextSetSurface(con, window);
+ rsContextSetSurface(con, width, height, window);
}
static void
@@ -1345,8 +1332,8 @@
{"nDeviceCreate", "()I", (void*)nDeviceCreate },
{"nDeviceDestroy", "(I)V", (void*)nDeviceDestroy },
{"nDeviceSetConfig", "(III)V", (void*)nDeviceSetConfig },
-{"nContextCreate", "(ILandroid/view/Surface;IZ)I", (void*)nContextCreate },
-{"nContextSetSurface", "(Landroid/view/Surface;)V", (void*)nContextSetSurface },
+{"nContextCreate", "(IIZ)I", (void*)nContextCreate },
+{"nContextSetSurface", "(IILandroid/view/Surface;)V", (void*)nContextSetSurface },
{"nContextDestroy", "(I)V", (void*)nContextDestroy },
{"nContextPause", "()V", (void*)nContextPause },
{"nContextResume", "()V", (void*)nContextResume },
diff --git a/libs/rs/RenderScript.h b/libs/rs/RenderScript.h
index 9b04393..3ca8b15 100644
--- a/libs/rs/RenderScript.h
+++ b/libs/rs/RenderScript.h
@@ -55,7 +55,7 @@
void rsDeviceDestroy(RsDevice);
void rsDeviceSetConfig(RsDevice, RsDeviceParam, int32_t value);
-RsContext rsContextCreate(RsDevice, void *, uint32_t version, bool useDepth);
+RsContext rsContextCreate(RsDevice, uint32_t version, bool useDepth);
void rsContextDestroy(RsContext);
void rsObjDestroyOOB(RsContext, void *);
diff --git a/libs/rs/java/Fountain/src/com/android/fountain/FountainView.java b/libs/rs/java/Fountain/src/com/android/fountain/FountainView.java
index cda005e..1e7c5a2 100644
--- a/libs/rs/java/Fountain/src/com/android/fountain/FountainView.java
+++ b/libs/rs/java/Fountain/src/com/android/fountain/FountainView.java
@@ -48,28 +48,24 @@
private RenderScript mRS;
private FountainRS mRender;
- private void destroyRS() {
+ public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {
+ super.surfaceChanged(holder, format, w, h);
+ if (mRS == null) {
+ mRS = createRenderScript(false, true);
+ mRS.contextSetSurface(w, h, holder.getSurface());
+ mRender = new FountainRS();
+ mRender.init(mRS, getResources(), w, h);
+ }
+ }
+
+ @Override
+ protected void onDetachedFromWindow() {
if(mRS != null) {
mRS = null;
destroyRenderScript();
}
- java.lang.System.gc();
}
- public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {
- super.surfaceChanged(holder, format, w, h);
- destroyRS();
- mRS = createRenderScript(false, true);
- mRender = new FountainRS();
- mRender.init(mRS, getResources(), w, h);
- }
-
- public void surfaceDestroyed(SurfaceHolder holder) {
- // Surface will be destroyed when we return
- destroyRS();
- }
-
-
@Override
public boolean onTouchEvent(MotionEvent ev)
diff --git a/libs/rs/java/ImageProcessing/src/com/android/rs/image/ImageProcessingActivity.java b/libs/rs/java/ImageProcessing/src/com/android/rs/image/ImageProcessingActivity.java
index b1facfc..334fd9c 100644
--- a/libs/rs/java/ImageProcessing/src/com/android/rs/image/ImageProcessingActivity.java
+++ b/libs/rs/java/ImageProcessing/src/com/android/rs/image/ImageProcessingActivity.java
@@ -126,13 +126,14 @@
}
public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {
+ mRS.contextSetSurface(width, height, holder.getSurface());
}
public void surfaceDestroyed(SurfaceHolder holder) {
}
private Script.Invokable createScript() {
- mRS = new RenderScript(mSurfaceView.getHolder().getSurface(), false, false);
+ mRS = new RenderScript(false, false);
mRS.mMessageCallback = new FilterCallback();
mParamsType = Type.createFromClass(mRS, Params.class, 1, "Parameters");
diff --git a/libs/rs/rs.spec b/libs/rs/rs.spec
index 865e435..da25a27 100644
--- a/libs/rs/rs.spec
+++ b/libs/rs/rs.spec
@@ -37,9 +37,15 @@
}
ContextSetSurface {
+ param uint32_t width
+ param uint32_t height
param void *sur
}
+ContextSetPriority {
+ param uint32_t priority
+ }
+
AssignName {
param void *obj
param const char *name
diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp
index 3e4cc36..c835dda 100644
--- a/libs/rs/rsContext.cpp
+++ b/libs/rs/rsContext.cpp
@@ -92,38 +92,12 @@
LOGE("eglCreateContext returned EGL_NO_CONTEXT");
}
gGLContextCount++;
-
- if (mWndSurface) {
- setSurface(mWndSurface);
- } else {
- setSurface((Surface *)android_createDisplaySurface());
- }
-
- eglQuerySurface(mEGL.mDisplay, mEGL.mSurface, EGL_WIDTH, &mEGL.mWidth);
- eglQuerySurface(mEGL.mDisplay, mEGL.mSurface, EGL_HEIGHT, &mEGL.mHeight);
-
-
- mGL.mVersion = glGetString(GL_VERSION);
- mGL.mVendor = glGetString(GL_VENDOR);
- mGL.mRenderer = glGetString(GL_RENDERER);
- mGL.mExtensions = glGetString(GL_EXTENSIONS);
-
- LOGV("EGL Version %i %i", mEGL.mMajorVersion, mEGL.mMinorVersion);
- LOGV("GL Version %s", mGL.mVersion);
- LOGV("GL Vendor %s", mGL.mVendor);
- LOGV("GL Renderer %s", mGL.mRenderer);
- LOGV("GL Extensions %s", mGL.mExtensions);
-
- if ((strlen((const char *)mGL.mVersion) < 12) || memcmp(mGL.mVersion, "OpenGL ES-CM", 12)) {
- LOGE("Error, OpenGL ES Lite not supported");
- } else {
- sscanf((const char *)mGL.mVersion + 13, "%i.%i", &mGL.mMajorVersion, &mGL.mMinorVersion);
- }
}
void Context::deinitEGL()
{
- setSurface(NULL);
+ LOGV("deinitEGL");
+ setSurface(0, 0, NULL);
eglDestroyContext(mEGL.mDisplay, mEGL.mContext);
checkEglError("eglDestroyContext");
@@ -265,9 +239,9 @@
rsc->props.mLogScripts = getProp("debug.rs.script");
rsc->props.mLogObjects = getProp("debug.rs.objects");
- pthread_mutex_lock(&gInitMutex);
- rsc->initEGL();
- pthread_mutex_unlock(&gInitMutex);
+ //pthread_mutex_lock(&gInitMutex);
+ //rsc->initEGL();
+ //pthread_mutex_unlock(&gInitMutex);
ScriptTLSStruct *tlsStruct = new ScriptTLSStruct;
if (!tlsStruct) {
@@ -342,7 +316,7 @@
return NULL;
}
-Context::Context(Device *dev, Surface *sur, bool useDepth)
+Context::Context(Device *dev, bool useDepth)
{
pthread_mutex_lock(&gInitMutex);
@@ -353,6 +327,7 @@
mUseDepth = useDepth;
mPaused = false;
mObjHead = NULL;
+ memset(&mEGL, 0, sizeof(mEGL));
int status;
pthread_attr_t threadAttr;
@@ -380,7 +355,7 @@
sparam.sched_priority = ANDROID_PRIORITY_DISPLAY;
pthread_attr_setschedparam(&threadAttr, &sparam);
- mWndSurface = sur;
+ mWndSurface = NULL;
objDestroyOOBInit();
timerInit();
@@ -426,8 +401,10 @@
objDestroyOOBDestroy();
}
-void Context::setSurface(Surface *sur)
+void Context::setSurface(uint32_t w, uint32_t h, Surface *sur)
{
+ LOGV("setSurface %i %i %p", w, h, sur);
+
EGLBoolean ret;
if (mEGL.mSurface != NULL) {
ret = eglMakeCurrent(mEGL.mDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
@@ -437,10 +414,22 @@
checkEglError("eglDestroySurface", ret);
mEGL.mSurface = NULL;
+ mEGL.mWidth = 0;
+ mEGL.mHeight = 0;
+ mWidth = 0;
+ mHeight = 0;
}
mWndSurface = sur;
if (mWndSurface != NULL) {
+ bool first = false;
+ if (!mEGL.mContext) {
+ first = true;
+ pthread_mutex_lock(&gInitMutex);
+ initEGL();
+ pthread_mutex_unlock(&gInitMutex);
+ }
+
mEGL.mSurface = eglCreateWindowSurface(mEGL.mDisplay, mEGL.mConfig, mWndSurface, NULL);
checkEglError("eglCreateWindowSurface");
if (mEGL.mSurface == EGL_NO_SURFACE) {
@@ -449,6 +438,36 @@
ret = eglMakeCurrent(mEGL.mDisplay, mEGL.mSurface, mEGL.mSurface, mEGL.mContext);
checkEglError("eglMakeCurrent", ret);
+
+ eglQuerySurface(mEGL.mDisplay, mEGL.mSurface, EGL_WIDTH, &mEGL.mWidth);
+ eglQuerySurface(mEGL.mDisplay, mEGL.mSurface, EGL_HEIGHT, &mEGL.mHeight);
+ mWidth = w;
+ mHeight = h;
+ mStateVertex.updateSize(this, w, h);
+
+ if ((int)mWidth != mEGL.mWidth || (int)mHeight != mEGL.mHeight) {
+ LOGE("EGL/Surface mismatch EGL (%i x %i) SF (%i x %i)", mEGL.mWidth, mEGL.mHeight, mWidth, mHeight);
+ }
+
+ if (first) {
+ mGL.mVersion = glGetString(GL_VERSION);
+ mGL.mVendor = glGetString(GL_VENDOR);
+ mGL.mRenderer = glGetString(GL_RENDERER);
+ mGL.mExtensions = glGetString(GL_EXTENSIONS);
+
+ //LOGV("EGL Version %i %i", mEGL.mMajorVersion, mEGL.mMinorVersion);
+ LOGV("GL Version %s", mGL.mVersion);
+ LOGV("GL Vendor %s", mGL.mVendor);
+ LOGV("GL Renderer %s", mGL.mRenderer);
+ //LOGV("GL Extensions %s", mGL.mExtensions);
+
+ if ((strlen((const char *)mGL.mVersion) < 12) || memcmp(mGL.mVersion, "OpenGL ES-CM", 12)) {
+ LOGE("Error, OpenGL ES Lite not supported");
+ } else {
+ sscanf((const char *)mGL.mVersion + 13, "%i.%i", &mGL.mMajorVersion, &mGL.mMinorVersion);
+ }
+ }
+
}
}
@@ -767,19 +786,23 @@
rsc->resume();
}
-void rsi_ContextSetSurface(Context *rsc, void *sur)
+void rsi_ContextSetSurface(Context *rsc, uint32_t w, uint32_t h, void *sur)
{
- rsc->setSurface((Surface *)sur);
+ rsc->setSurface(w, h, (Surface *)sur);
+}
+
+void rsi_ContextSetPriority(Context *rsc, uint32_t p)
+{
}
}
}
-RsContext rsContextCreate(RsDevice vdev, void *sur, uint32_t version, bool useDepth)
+RsContext rsContextCreate(RsDevice vdev, uint32_t version, bool useDepth)
{
Device * dev = static_cast<Device *>(vdev);
- Context *rsc = new Context(dev, (Surface *)sur, useDepth);
+ Context *rsc = new Context(dev, useDepth);
return rsc;
}
diff --git a/libs/rs/rsContext.h b/libs/rs/rsContext.h
index bffc55b..f3803a5 100644
--- a/libs/rs/rsContext.h
+++ b/libs/rs/rsContext.h
@@ -49,7 +49,7 @@
class Context
{
public:
- Context(Device *, Surface *, bool useDepth);
+ Context(Device *, bool useDepth);
~Context();
static pthread_key_t gThreadTLSKey;
@@ -94,7 +94,7 @@
void pause();
void resume();
- void setSurface(Surface *sur);
+ void setSurface(uint32_t w, uint32_t h, Surface *sur);
void assignName(ObjectBase *obj, const char *name, uint32_t len);
void removeName(ObjectBase *obj);
@@ -189,6 +189,9 @@
} mGL;
+ uint32_t mWidth;
+ uint32_t mHeight;
+
bool mRunning;
bool mExit;
bool mUseDepth;
diff --git a/libs/rs/rsLocklessFifo.cpp b/libs/rs/rsLocklessFifo.cpp
index 085a81e..c796520 100644
--- a/libs/rs/rsLocklessFifo.cpp
+++ b/libs/rs/rsLocklessFifo.cpp
@@ -57,7 +57,7 @@
mPut = mBuffer;
mGet = mBuffer;
mEnd = mBuffer + (sizeInBytes) - 1;
- dumpState("init");
+ //dumpState("init");
return true;
}
diff --git a/libs/rs/rsProgramVertex.cpp b/libs/rs/rsProgramVertex.cpp
index eea8b3b..68f589f 100644
--- a/libs/rs/rsProgramVertex.cpp
+++ b/libs/rs/rsProgramVertex.cpp
@@ -157,12 +157,17 @@
pv->bindAllocation(alloc);
+ updateSize(rsc, w, h);
+}
+
+void ProgramVertexState::updateSize(Context *rsc, int32_t w, int32_t h)
+{
Matrix m;
m.loadOrtho(0,w, h,0, -1,1);
- alloc->subData(RS_PROGRAM_VERTEX_PROJECTION_OFFSET, 16, &m.m[0], 16*4);
+ mDefaultAlloc->subData(RS_PROGRAM_VERTEX_PROJECTION_OFFSET, 16, &m.m[0], 16*4);
m.loadIdentity();
- alloc->subData(RS_PROGRAM_VERTEX_MODELVIEW_OFFSET, 16, &m.m[0], 16*4);
+ mDefaultAlloc->subData(RS_PROGRAM_VERTEX_MODELVIEW_OFFSET, 16, &m.m[0], 16*4);
}
void ProgramVertexState::deinit(Context *rsc)
diff --git a/libs/rs/rsProgramVertex.h b/libs/rs/rsProgramVertex.h
index 493668c..a97ba38 100644
--- a/libs/rs/rsProgramVertex.h
+++ b/libs/rs/rsProgramVertex.h
@@ -63,6 +63,7 @@
void init(Context *rsc, int32_t w, int32_t h);
void deinit(Context *rsc);
+ void updateSize(Context *rsc, int32_t w, int32_t h);
ObjectBaseRef<ProgramVertex> mDefault;
ObjectBaseRef<ProgramVertex> mLast;
diff --git a/libs/rs/rsUtils.h b/libs/rs/rsUtils.h
index 63d73a1..07f8933 100644
--- a/libs/rs/rsUtils.h
+++ b/libs/rs/rsUtils.h
@@ -18,7 +18,7 @@
#define ANDROID_RS_UTILS_H
#define LOG_NDEBUG 0
-#define LOG_TAG "rs"
+#define LOG_TAG "RenderScript"
#include <utils/Log.h>
#include <utils/Vector.h>
#include <utils/KeyedVector.h>
diff --git a/opengl/libagl/egl.cpp b/opengl/libagl/egl.cpp
index 673c174..781b8c3 100644
--- a/opengl/libagl/egl.cpp
+++ b/opengl/libagl/egl.cpp
@@ -876,7 +876,7 @@
#define VERSION_MAJOR 1
#define VERSION_MINOR 2
static char const * const gVendorString = "Google Inc.";
-static char const * const gVersionString = "1.2 Android Driver";
+static char const * const gVersionString = "1.2 Android Driver 1.1.0";
static char const * const gClientApiString = "OpenGL ES";
static char const * const gExtensionsString =
"EGL_KHR_image_base "
diff --git a/opengl/libagl/state.cpp b/opengl/libagl/state.cpp
index a59b3b0..0f1f27d 100644
--- a/opengl/libagl/state.cpp
+++ b/opengl/libagl/state.cpp
@@ -37,7 +37,7 @@
// ----------------------------------------------------------------------------
static char const * const gVendorString = "Android";
-static char const * const gRendererString = "Android PixelFlinger 1.1";
+static char const * const gRendererString = "Android PixelFlinger 1.2";
static char const * const gVersionString = "OpenGL ES-CM 1.0";
static char const * const gExtensionsString =
"GL_OES_byte_coordinates " // OK
diff --git a/services/java/com/android/server/PackageManagerService.java b/services/java/com/android/server/PackageManagerService.java
index 39129d4..5ed2d35 100644
--- a/services/java/com/android/server/PackageManagerService.java
+++ b/services/java/com/android/server/PackageManagerService.java
@@ -102,6 +102,7 @@
import java.util.Map;
import java.util.Set;
import java.util.zip.ZipEntry;
+import java.util.zip.ZipException;
import java.util.zip.ZipFile;
import java.util.zip.ZipOutputStream;
@@ -2781,72 +2782,156 @@
return pkg;
}
- private int cachePackageSharedLibsLI(PackageParser.Package pkg,
- File dataPath, File scanFile) {
- File sharedLibraryDir = new File(dataPath.getPath() + "/lib");
- final String sharedLibraryABI = Build.CPU_ABI;
- final String apkLibraryDirectory = "lib/" + sharedLibraryABI + "/";
- final String apkSharedLibraryPrefix = apkLibraryDirectory + "lib";
- final String sharedLibrarySuffix = ".so";
- boolean hasNativeCode = false;
- boolean installedNativeCode = false;
- try {
- ZipFile zipFile = new ZipFile(scanFile);
- Enumeration<ZipEntry> entries =
- (Enumeration<ZipEntry>) zipFile.entries();
+ // The following constants are returned by cachePackageSharedLibsForAbiLI
+ // to indicate if native shared libraries were found in the package.
+ // Values are:
+ // PACKAGE_INSTALL_NATIVE_FOUND_LIBRARIES => native libraries found and installed
+ // PACKAGE_INSTALL_NATIVE_NO_LIBRARIES => no native libraries in package
+ // PACKAGE_INSTALL_NATIVE_ABI_MISMATCH => native libraries for another ABI found
+ // in package (and not installed)
+ //
+ private static final int PACKAGE_INSTALL_NATIVE_FOUND_LIBRARIES = 0;
+ private static final int PACKAGE_INSTALL_NATIVE_NO_LIBRARIES = 1;
+ private static final int PACKAGE_INSTALL_NATIVE_ABI_MISMATCH = 2;
- while (entries.hasMoreElements()) {
- ZipEntry entry = entries.nextElement();
- if (entry.isDirectory()) {
- if (!hasNativeCode && entry.getName().startsWith("lib")) {
- hasNativeCode = true;
- }
- continue;
+ // Find all files of the form lib/<cpuAbi>/lib<name>.so in the .apk
+ // and automatically copy them to /data/data/<appname>/lib if present.
+ //
+ // NOTE: this method may throw an IOException if the library cannot
+ // be copied to its final destination, e.g. if there isn't enough
+ // room left on the data partition, or a ZipException if the package
+ // file is malformed.
+ //
+ private int cachePackageSharedLibsForAbiLI( PackageParser.Package pkg,
+ File dataPath, File scanFile, String cpuAbi)
+ throws IOException, ZipException {
+ File sharedLibraryDir = new File(dataPath.getPath() + "/lib");
+ final String apkLib = "lib/";
+ final int apkLibLen = apkLib.length();
+ final int cpuAbiLen = cpuAbi.length();
+ final String libPrefix = "lib";
+ final int libPrefixLen = libPrefix.length();
+ final String libSuffix = ".so";
+ final int libSuffixLen = libSuffix.length();
+ boolean hasNativeLibraries = false;
+ boolean installedNativeLibraries = false;
+
+ // the minimum length of a valid native shared library of the form
+ // lib/<something>/lib<name>.so.
+ final int minEntryLen = apkLibLen + 2 + libPrefixLen + 1 + libSuffixLen;
+
+ ZipFile zipFile = new ZipFile(scanFile);
+ Enumeration<ZipEntry> entries =
+ (Enumeration<ZipEntry>) zipFile.entries();
+
+ while (entries.hasMoreElements()) {
+ ZipEntry entry = entries.nextElement();
+ // skip directories
+ if (entry.isDirectory()) {
+ continue;
+ }
+ String entryName = entry.getName();
+
+ // check that the entry looks like lib/<something>/lib<name>.so
+ // here, but don't check the ABI just yet.
+ //
+ // - must be sufficiently long
+ // - must end with libSuffix, i.e. ".so"
+ // - must start with apkLib, i.e. "lib/"
+ if (entryName.length() < minEntryLen ||
+ !entryName.endsWith(libSuffix) ||
+ !entryName.startsWith(apkLib) ) {
+ continue;
+ }
+
+ // file name must start with libPrefix, i.e. "lib"
+ int lastSlash = entryName.lastIndexOf('/');
+
+ if (lastSlash < 0 ||
+ !entryName.regionMatches(lastSlash+1, libPrefix, 0, libPrefixLen) ) {
+ continue;
+ }
+
+ hasNativeLibraries = true;
+
+ // check the cpuAbi now, between lib/ and /lib<name>.so
+ //
+ if (lastSlash != apkLibLen + cpuAbiLen ||
+ !entryName.regionMatches(apkLibLen, cpuAbi, 0, cpuAbiLen) )
+ continue;
+
+ // extract the library file name, ensure it doesn't contain
+ // weird characters. we're guaranteed here that it doesn't contain
+ // a directory separator though.
+ String libFileName = entryName.substring(lastSlash+1);
+ if (!FileUtils.isFilenameSafe(new File(libFileName))) {
+ continue;
+ }
+
+ installedNativeLibraries = true;
+
+ String sharedLibraryFilePath = sharedLibraryDir.getPath() +
+ File.separator + libFileName;
+ File sharedLibraryFile = new File(sharedLibraryFilePath);
+ if (! sharedLibraryFile.exists() ||
+ sharedLibraryFile.length() != entry.getSize() ||
+ sharedLibraryFile.lastModified() != entry.getTime()) {
+ if (Config.LOGD) {
+ Log.d(TAG, "Caching shared lib " + entry.getName());
}
- String entryName = entry.getName();
- if (entryName.startsWith("lib/")) {
- hasNativeCode = true;
+ if (mInstaller == null) {
+ sharedLibraryDir.mkdir();
}
- if (! (entryName.startsWith(apkSharedLibraryPrefix)
- && entryName.endsWith(sharedLibrarySuffix))) {
- continue;
+ cacheSharedLibLI(pkg, zipFile, entry, sharedLibraryDir,
+ sharedLibraryFile);
+ }
+ }
+ if (!hasNativeLibraries)
+ return PACKAGE_INSTALL_NATIVE_NO_LIBRARIES;
+
+ if (!installedNativeLibraries)
+ return PACKAGE_INSTALL_NATIVE_ABI_MISMATCH;
+
+ return PACKAGE_INSTALL_NATIVE_FOUND_LIBRARIES;
+ }
+
+ // extract shared libraries stored in the APK as lib/<cpuAbi>/lib<name>.so
+ // and copy them to /data/data/<appname>/lib.
+ //
+ // This function will first try the main CPU ABI defined by Build.CPU_ABI
+ // (which corresponds to ro.product.cpu.abi), and also try an alternate
+ // one if ro.product.cpu.abi2 is defined.
+ //
+ private int cachePackageSharedLibsLI(PackageParser.Package pkg,
+ File dataPath, File scanFile) {
+ final String cpuAbi = Build.CPU_ABI;
+ try {
+ int result = cachePackageSharedLibsForAbiLI(pkg, dataPath, scanFile, cpuAbi);
+
+ // some architectures are capable of supporting several CPU ABIs
+ // for example, 'armeabi-v7a' also supports 'armeabi' native code
+ // this is indicated by the definition of the ro.product.cpu.abi2
+ // system property.
+ //
+ // only scan the package twice in case of ABI mismatch
+ if (result == PACKAGE_INSTALL_NATIVE_ABI_MISMATCH) {
+ String cpuAbi2 = SystemProperties.get("ro.product.cpu.abi2",null);
+ if (cpuAbi2 != null) {
+ result = cachePackageSharedLibsForAbiLI(pkg, dataPath, scanFile, cpuAbi2);
}
- String libFileName = entryName.substring(
- apkLibraryDirectory.length());
- if (libFileName.contains("/")
- || (!FileUtils.isFilenameSafe(new File(libFileName)))) {
- continue;
- }
-
- installedNativeCode = true;
-
- String sharedLibraryFilePath = sharedLibraryDir.getPath() +
- File.separator + libFileName;
- File sharedLibraryFile = new File(sharedLibraryFilePath);
- if (! sharedLibraryFile.exists() ||
- sharedLibraryFile.length() != entry.getSize() ||
- sharedLibraryFile.lastModified() != entry.getTime()) {
- if (Config.LOGD) {
- Log.d(TAG, "Caching shared lib " + entry.getName());
- }
- if (mInstaller == null) {
- sharedLibraryDir.mkdir();
- }
- cacheSharedLibLI(pkg, zipFile, entry, sharedLibraryDir,
- sharedLibraryFile);
+
+ if (result == PACKAGE_INSTALL_NATIVE_ABI_MISMATCH) {
+ Log.w(TAG,"Native ABI mismatch from package file");
+ return PackageManager.INSTALL_FAILED_INVALID_APK;
}
}
+ } catch (ZipException e) {
+ Log.w(TAG, "Failed to extract data from package file", e);
+ return PackageManager.INSTALL_FAILED_INVALID_APK;
} catch (IOException e) {
Log.w(TAG, "Failed to cache package shared libs", e);
return PackageManager.INSTALL_FAILED_INSUFFICIENT_STORAGE;
}
-
- if (hasNativeCode && !installedNativeCode) {
- Log.w(TAG, "Install failed: .apk has native code but none for arch "
- + Build.CPU_ABI);
- return PackageManager.INSTALL_FAILED_CPU_ABI_INCOMPATIBLE;
- }
-
return PackageManager.INSTALL_SUCCEEDED;
}
diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java b/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
index bb3f2a7..425682a 100644
--- a/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
+++ b/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
@@ -76,6 +76,7 @@
private static final int NITZ_UPDATE_DIFF_DEFAULT = 2000;
private int mNitzUpdateDiff = SystemProperties.getInt("ro.nitz_update_diff",
NITZ_UPDATE_DIFF_DEFAULT);
+
/**
* Values correspond to ServiceStateTracker.DATA_ACCESS_ definitions.
*/
@@ -159,6 +160,7 @@
super();
this.phone = phone;
+ cr = phone.getContext().getContentResolver();
cm = phone.mCM;
ss = new ServiceState();
newSS = new ServiceState();
@@ -184,12 +186,9 @@
cm.registerForCdmaOtaProvision(this,EVENT_OTA_PROVISION_STATUS_CHANGE, null);
// System setting property AIRPLANE_MODE_ON is set in Settings.
- int airplaneMode = Settings.System.getInt(
- phone.getContext().getContentResolver(),
- Settings.System.AIRPLANE_MODE_ON, 0);
+ int airplaneMode = Settings.System.getInt(cr, Settings.System.AIRPLANE_MODE_ON, 0);
mDesiredPowerState = ! (airplaneMode > 0);
- cr = phone.getContext().getContentResolver();
cr.registerContentObserver(
Settings.System.getUriFor(Settings.System.AUTO_TIME), true,
mAutoTimeObserver);
@@ -1021,8 +1020,7 @@
}
if (hasRegistered) {
- Checkin.updateStats(phone.getContext().getContentResolver(),
- Checkin.Stats.Tag.PHONE_CDMA_REGISTERED, 1, 0.0);
+ Checkin.updateStats(cr, Checkin.Stats.Tag.PHONE_CDMA_REGISTERED, 1, 0.0);
networkAttachedRegistrants.notifyRegistrants();
}
@@ -1460,9 +1458,13 @@
*/
long gained = c.getTimeInMillis() - System.currentTimeMillis();
long timeSinceLastUpdate = SystemClock.elapsedRealtime() - mSavedAtTime;
+ int nitzUpdateSpacing = Settings.Gservices.getInt(cr,
+ Settings.Gservices.NITZ_UPDATE_SPACING, mNitzUpdateSpacing);
+ int nitzUpdateDiff = Settings.Gservices.getInt(cr,
+ Settings.Gservices.NITZ_UPDATE_DIFF, mNitzUpdateDiff);
- if ((timeSinceLastUpdate > mNitzUpdateSpacing)
- || (Math.abs(gained) > mNitzUpdateDiff)) {
+ if ((mSavedAtTime == 0) || (timeSinceLastUpdate > nitzUpdateSpacing)
+ || (Math.abs(gained) > nitzUpdateDiff)) {
Log.i(LOG_TAG, "NITZ: Auto updating time of day to " + c.getTime()
+ " NITZ receive delay=" + millisSinceNitzReceived
+ "ms gained=" + gained + "ms from " + nitz);
@@ -1494,8 +1496,7 @@
private boolean getAutoTime() {
try {
- return Settings.System.getInt(phone.getContext().getContentResolver(),
- Settings.System.AUTO_TIME) > 0;
+ return Settings.System.getInt(cr, Settings.System.AUTO_TIME) > 0;
} catch (SettingNotFoundException snfe) {
return true;
}
@@ -1534,8 +1535,7 @@
}
private void revertToNitz() {
- if (Settings.System.getInt(phone.getContext().getContentResolver(),
- Settings.System.AUTO_TIME, 0) == 0) {
+ if (Settings.System.getInt(cr, Settings.System.AUTO_TIME, 0) == 0) {
return;
}
Log.d(LOG_TAG, "Reverting to NITZ: tz='" + mSavedTimeZone
diff --git a/telephony/java/com/android/internal/telephony/gsm/GSMPhone.java b/telephony/java/com/android/internal/telephony/gsm/GSMPhone.java
index 5614c12..a5188ce 100755
--- a/telephony/java/com/android/internal/telephony/gsm/GSMPhone.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GSMPhone.java
@@ -879,16 +879,7 @@
}
public String getLine1AlphaTag() {
- String ret;
-
- ret = mSIMRecords.getMsisdnAlphaTag();
-
- if (ret == null || ret.length() == 0) {
- return mContext.getText(
- com.android.internal.R.string.defaultMsisdnAlphaTag).toString();
- }
-
- return ret;
+ return mSIMRecords.getMsisdnAlphaTag();
}
public void setLine1Number(String alphaTag, String number, Message onComplete) {