diff options
163 files changed, 950 insertions, 2255 deletions
@@ -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 class Build { 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 final class Settings { 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/core/java/com/android/internal/widget/DigitalClock.java b/core/java/com/android/internal/widget/DigitalClock.java new file mode 100644 index 0000000..ca71722 --- /dev/null +++ b/core/java/com/android/internal/widget/DigitalClock.java @@ -0,0 +1,186 @@ +/* + * Copyright (C) 2008 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.internal.widget; + +import com.android.internal.R; + +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; +import android.content.IntentFilter; +import android.content.res.Resources; +import android.database.ContentObserver; +import android.graphics.Typeface; +import android.os.Handler; +import android.provider.Settings; +import android.text.format.DateFormat; +import android.util.AttributeSet; +import android.view.View; +import android.widget.LinearLayout; +import android.widget.TextView; + +import java.text.DateFormatSymbols; +import java.util.Calendar; + +/** + * Displays the time + */ +public class DigitalClock extends LinearLayout { + + private final static String M12 = "h:mm"; + private final static String M24 = "kk:mm"; + + private Calendar mCalendar; + private String mFormat; + private TextView mTimeDisplay; + private AmPm mAmPm; + private ContentObserver mFormatChangeObserver; + private boolean mLive = true; + private boolean mAttached; + + /* called by system on minute ticks */ + private final Handler mHandler = new Handler(); + private final BroadcastReceiver mIntentReceiver = new BroadcastReceiver() { + @Override + public void onReceive(Context context, Intent intent) { + if (mLive && intent.getAction().equals( + Intent.ACTION_TIMEZONE_CHANGED)) { + mCalendar = Calendar.getInstance(); + } + updateTime(); + } + }; + + static class AmPm { + private TextView mAmPm; + private String mAmString, mPmString; + + AmPm(View parent, Typeface tf) { + mAmPm = (TextView) parent.findViewById(R.id.am_pm); + if (tf != null) { + mAmPm.setTypeface(tf); + } + + String[] ampm = new DateFormatSymbols().getAmPmStrings(); + mAmString = ampm[0]; + mPmString = ampm[1]; + } + + void setShowAmPm(boolean show) { + mAmPm.setVisibility(show ? View.VISIBLE : View.GONE); + } + + void setIsMorning(boolean isMorning) { + mAmPm.setText(isMorning ? mAmString : mPmString); + } + } + + private class FormatChangeObserver extends ContentObserver { + public FormatChangeObserver() { + super(new Handler()); + } + @Override + public void onChange(boolean selfChange) { + setDateFormat(); + updateTime(); + } + } + + public DigitalClock(Context context) { + this(context, null); + } + + public DigitalClock(Context context, AttributeSet attrs) { + super(context, attrs); + } + + @Override + protected void onFinishInflate() { + super.onFinishInflate(); + + mTimeDisplay = (TextView) findViewById(R.id.timeDisplay); + mTimeDisplay.setTypeface(Typeface.createFromFile("/system/fonts/Clockopia.ttf")); + mAmPm = new AmPm(this, Typeface.createFromFile("/system/fonts/DroidSans-Bold.ttf")); + mCalendar = Calendar.getInstance(); + + setDateFormat(); + } + + @Override + protected void onAttachedToWindow() { + super.onAttachedToWindow(); + + if (mAttached) return; + mAttached = true; + + if (mLive) { + /* monitor time ticks, time changed, timezone */ + IntentFilter filter = new IntentFilter(); + filter.addAction(Intent.ACTION_TIME_TICK); + filter.addAction(Intent.ACTION_TIME_CHANGED); + filter.addAction(Intent.ACTION_TIMEZONE_CHANGED); + mContext.registerReceiver(mIntentReceiver, filter, null, mHandler); + } + + /* monitor 12/24-hour display preference */ + mFormatChangeObserver = new FormatChangeObserver(); + mContext.getContentResolver().registerContentObserver( + Settings.System.CONTENT_URI, true, mFormatChangeObserver); + + updateTime(); + } + + @Override + protected void onDetachedFromWindow() { + super.onDetachedFromWindow(); + + if (!mAttached) return; + mAttached = false; + + if (mLive) { + mContext.unregisterReceiver(mIntentReceiver); + } + mContext.getContentResolver().unregisterContentObserver( + mFormatChangeObserver); + } + + + void updateTime(Calendar c) { + mCalendar = c; + updateTime(); + } + + private void updateTime() { + if (mLive) { + mCalendar.setTimeInMillis(System.currentTimeMillis()); + } + + CharSequence newTime = DateFormat.format(mFormat, mCalendar); + mTimeDisplay.setText(newTime); + mAmPm.setIsMorning(mCalendar.get(Calendar.AM_PM) == 0); + } + + private void setDateFormat() { + mFormat = android.text.format.DateFormat.is24HourFormat(getContext()) + ? M24 : M12; + mAmPm.setShowAmPm(mFormat.equals(M12)); + } + + void setLive(boolean live) { + mLive = live; + } +} diff --git a/core/java/com/android/internal/widget/SlidingTab.java b/core/java/com/android/internal/widget/SlidingTab.java index dfd4f40..6ea6460 100644 --- a/core/java/com/android/internal/widget/SlidingTab.java +++ b/core/java/com/android/internal/widget/SlidingTab.java @@ -37,8 +37,11 @@ import com.android.internal.R; /** * A special widget containing two Sliders and a threshold for each. Moving either slider beyond - * the threshold will cause the registered OnTriggerListener.onTrigger() to be called with - * {@link OnTriggerListener#LEFT_HANDLE} or {@link OnTriggerListener#RIGHT_HANDLE} to be called. + * the threshold will cause the registered OnTriggerListener.onTrigger() to be called with + * whichHandle being {@link OnTriggerListener#LEFT_HANDLE} or {@link OnTriggerListener#RIGHT_HANDLE} + * Equivalently, selecting a tab will result in a call to + * {@link OnTriggerListener#onGrabbedStateChange(View, int)} with one of these two states. Releasing + * the tab will result in whichHandle being {@link OnTriggerListener#NO_HANDLE}. * */ public class SlidingTab extends ViewGroup { @@ -50,7 +53,7 @@ public class SlidingTab extends ViewGroup { private static final int MSG_ANIMATE = 100; // TODO: Make these configurable - private static final float TARGET_ZONE = 2.0f / 3.0f; + private static final float THRESHOLD = 2.0f / 3.0f; private static final long VIBRATE_SHORT = 30; private static final long VIBRATE_LONG = 40; @@ -71,35 +74,35 @@ public class SlidingTab extends ViewGroup { private Slider mRightSlider; private Slider mCurrentSlider; private boolean mTracking; - private float mTargetZone; + private float mThreshold; private Slider mOtherSlider; private boolean mAnimating; /** * Interface definition for a callback to be invoked when a tab is triggered - * by moving it beyond a target zone. + * by moving it beyond a threshold. */ public interface OnTriggerListener { /** * The interface was triggered because the user let go of the handle without reaching the - * target zone. + * threshold. */ public static final int NO_HANDLE = 0; /** * The interface was triggered because the user grabbed the left handle and moved it past - * the target zone. + * the threshold. */ public static final int LEFT_HANDLE = 1; /** * The interface was triggered because the user grabbed the right handle and moved it past - * the target zone. + * the threshold. */ public static final int RIGHT_HANDLE = 2; /** - * Called when the user moves a handle beyond the target zone. + * Called when the user moves a handle beyond the threshold. * * @param v The view that was triggered. * @param whichHandle Which "dial handle" the user grabbed, @@ -146,6 +149,7 @@ public class SlidingTab extends ViewGroup { private final ImageView tab; private final TextView text; private final ImageView target; + private int currentState = STATE_NORMAL; /** * Constructor @@ -223,6 +227,7 @@ public class SlidingTab extends ViewGroup { } else { text.setTextAppearance(text.getContext(), R.style.TextAppearance_SlidingTabNormal); } + currentState = state; } void showTarget() { @@ -260,8 +265,8 @@ public class SlidingTab extends ViewGroup { final int parentWidth = r - l; final int parentHeight = b - t; - final int leftTarget = (int) (TARGET_ZONE * parentWidth) - targetWidth + handleWidth / 2; - final int rightTarget = (int) ((1.0f - TARGET_ZONE) * parentWidth) - handleWidth / 2; + final int leftTarget = (int) (THRESHOLD * parentWidth) - targetWidth + handleWidth / 2; + final int rightTarget = (int) ((1.0f - THRESHOLD) * parentWidth) - handleWidth / 2; final int left = (parentWidth - handleWidth) / 2; final int right = left + handleWidth; @@ -286,8 +291,8 @@ public class SlidingTab extends ViewGroup { // vertical final int targetLeft = (parentWidth - targetWidth) / 2; final int targetRight = (parentWidth + targetWidth) / 2; - final int top = (int) (TARGET_ZONE * parentHeight) + handleHeight / 2 - targetHeight; - final int bottom = (int) ((1.0f - TARGET_ZONE) * parentHeight) - handleHeight / 2; + final int top = (int) (THRESHOLD * parentHeight) + handleHeight / 2 - targetHeight; + final int bottom = (int) ((1.0f - THRESHOLD) * parentHeight) - handleHeight / 2; if (alignment == ALIGN_TOP) { tab.layout(left, 0, right, handleHeight); text.layout(left, 0 - parentHeight, right, 0); @@ -300,12 +305,34 @@ public class SlidingTab extends ViewGroup { } } + public void updateDrawableStates() { + setState(currentState); + } + + /** + * Ensure all the dependent widgets are measured. + */ + public void measure() { + tab.measure(View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED), + View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED)); + text.measure(View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED), + View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED)); + } + + /** + * Get the measured tab width. Must be called after {@link Slider#measure()}. + * @return + */ public int getTabWidth() { - return tab.getDrawable().getIntrinsicWidth(); + return tab.getMeasuredWidth(); } + /** + * Get the measured tab width. Must be called after {@link Slider#measure()}. + * @return + */ public int getTabHeight() { - return tab.getDrawable().getIntrinsicHeight(); + return tab.getMeasuredHeight(); } } @@ -351,11 +378,12 @@ public class SlidingTab extends ViewGroup { throw new RuntimeException(LOG_TAG + " cannot have UNSPECIFIED dimensions"); } - final float density = mDensity; - final int leftTabWidth = (int) (density * mLeftSlider.getTabWidth() + 0.5f); - final int rightTabWidth = (int) (density * mRightSlider.getTabWidth() + 0.5f); - final int leftTabHeight = (int) (density * mLeftSlider.getTabHeight() + 0.5f); - final int rightTabHeight = (int) (density * mRightSlider.getTabHeight() + 0.5f); + mLeftSlider.measure(); + mRightSlider.measure(); + final int leftTabWidth = mLeftSlider.getTabWidth(); + final int rightTabWidth = mRightSlider.getTabWidth(); + final int leftTabHeight = mLeftSlider.getTabHeight(); + final int rightTabHeight = mRightSlider.getTabHeight(); final int width; final int height; if (isHorizontal()) { @@ -400,12 +428,12 @@ public class SlidingTab extends ViewGroup { if (leftHit) { mCurrentSlider = mLeftSlider; mOtherSlider = mRightSlider; - mTargetZone = isHorizontal() ? TARGET_ZONE : 1.0f - TARGET_ZONE; + mThreshold = isHorizontal() ? THRESHOLD : 1.0f - THRESHOLD; setGrabbedState(OnTriggerListener.LEFT_HANDLE); } else { mCurrentSlider = mRightSlider; mOtherSlider = mLeftSlider; - mTargetZone = isHorizontal() ? 1.0f - TARGET_ZONE : TARGET_ZONE; + mThreshold = isHorizontal() ? 1.0f - THRESHOLD : THRESHOLD; setGrabbedState(OnTriggerListener.RIGHT_HANDLE); } mCurrentSlider.setState(Slider.STATE_PRESSED); @@ -429,16 +457,16 @@ public class SlidingTab extends ViewGroup { case MotionEvent.ACTION_MOVE: moveHandle(x, y); float position = isHorizontal() ? x : y; - float target = mTargetZone * (isHorizontal() ? getWidth() : getHeight()); - boolean targetZoneReached; + float target = mThreshold * (isHorizontal() ? getWidth() : getHeight()); + boolean thresholdReached; if (isHorizontal()) { - targetZoneReached = mCurrentSlider == mLeftSlider ? + thresholdReached = mCurrentSlider == mLeftSlider ? position > target : position < target; } else { - targetZoneReached = mCurrentSlider == mLeftSlider ? + thresholdReached = mCurrentSlider == mLeftSlider ? position < target : position > target; } - if (!mTriggered && targetZoneReached) { + if (!mTriggered && thresholdReached) { mTriggered = true; mTracking = false; mCurrentSlider.setState(Slider.STATE_ACTIVE); @@ -527,6 +555,7 @@ public class SlidingTab extends ViewGroup { mLeftSlider.setTarget(targetId); mLeftSlider.setBarBackgroundResource(barId); mLeftSlider.setTabBackgroundResource(tabId); + mLeftSlider.updateDrawableStates(); } /** @@ -554,6 +583,7 @@ public class SlidingTab extends ViewGroup { mRightSlider.setTarget(targetId); mRightSlider.setBarBackgroundResource(barId); mRightSlider.setTabBackgroundResource(tabId); + mRightSlider.updateDrawableStates(); } /** diff --git a/core/res/res/drawable-hdpi/blank_tile.png b/core/res/res/drawable-hdpi/blank_tile.png Binary files differindex e2a386c..63b9296 100644 --- a/core/res/res/drawable-hdpi/blank_tile.png +++ b/core/res/res/drawable-hdpi/blank_tile.png diff --git a/core/res/res/drawable-hdpi/ic_jog_dial_answer.png b/core/res/res/drawable-hdpi/ic_jog_dial_answer.png Binary files differnew file mode 100644 index 0000000..ca0a825 --- /dev/null +++ b/core/res/res/drawable-hdpi/ic_jog_dial_answer.png diff --git a/core/res/res/drawable-hdpi/ic_jog_dial_answer_and_end.png b/core/res/res/drawable-hdpi/ic_jog_dial_answer_and_end.png Binary files differnew file mode 100644 index 0000000..82237bd --- /dev/null +++ b/core/res/res/drawable-hdpi/ic_jog_dial_answer_and_end.png diff --git a/core/res/res/drawable-hdpi/ic_jog_dial_answer_and_hold.png b/core/res/res/drawable-hdpi/ic_jog_dial_answer_and_hold.png Binary files differnew file mode 100644 index 0000000..4946ada --- /dev/null +++ b/core/res/res/drawable-hdpi/ic_jog_dial_answer_and_hold.png diff --git a/core/res/res/drawable-hdpi/ic_jog_dial_decline.png b/core/res/res/drawable-hdpi/ic_jog_dial_decline.png Binary files differnew file mode 100644 index 0000000..006a6e4 --- /dev/null +++ b/core/res/res/drawable-hdpi/ic_jog_dial_decline.png diff --git a/core/res/res/drawable-hdpi/jog_tab_bar_confirm_gray.9.png b/core/res/res/drawable-hdpi/jog_tab_bar_confirm_gray.9.png Binary files differdeleted file mode 100644 index 92db44f..0000000 --- a/core/res/res/drawable-hdpi/jog_tab_bar_confirm_gray.9.png +++ /dev/null diff --git a/core/res/res/drawable-hdpi/jog_tab_bar_confirm_green.9.png b/core/res/res/drawable-hdpi/jog_tab_bar_confirm_green.9.png Binary files differdeleted file mode 100644 index 0bed1a0..0000000 --- a/core/res/res/drawable-hdpi/jog_tab_bar_confirm_green.9.png +++ /dev/null diff --git a/core/res/res/drawable-hdpi/jog_tab_bar_confirm_red.9.png b/core/res/res/drawable-hdpi/jog_tab_bar_confirm_red.9.png Binary files differdeleted file mode 100644 index 81fbe5a..0000000 --- a/core/res/res/drawable-hdpi/jog_tab_bar_confirm_red.9.png +++ /dev/null diff --git a/core/res/res/drawable-hdpi/jog_tab_bar_confirm_yellow.9.png b/core/res/res/drawable-hdpi/jog_tab_bar_confirm_yellow.9.png Binary files differdeleted file mode 100644 index d9c33fb..0000000 --- a/core/res/res/drawable-hdpi/jog_tab_bar_confirm_yellow.9.png +++ /dev/null diff --git a/core/res/res/drawable-hdpi/jog_tab_bar_left_end_confirm_gray.9.png b/core/res/res/drawable-hdpi/jog_tab_bar_left_end_confirm_gray.9.png Binary files differnew file mode 100644 index 0000000..53ed136 --- /dev/null +++ b/core/res/res/drawable-hdpi/jog_tab_bar_left_end_confirm_gray.9.png diff --git a/core/res/res/drawable-hdpi/jog_tab_bar_left_end_confirm_green.9.png b/core/res/res/drawable-hdpi/jog_tab_bar_left_end_confirm_green.9.png Binary files differnew file mode 100644 index 0000000..6455790 --- /dev/null +++ b/core/res/res/drawable-hdpi/jog_tab_bar_left_end_confirm_green.9.png diff --git a/core/res/res/drawable-hdpi/jog_tab_bar_left_end_confirm_red.9.png b/core/res/res/drawable-hdpi/jog_tab_bar_left_end_confirm_red.9.png Binary files differnew file mode 100644 index 0000000..49bb9c1 --- /dev/null +++ b/core/res/res/drawable-hdpi/jog_tab_bar_left_end_confirm_red.9.png diff --git a/core/res/res/drawable-hdpi/jog_tab_bar_left_end_confirm_yellow.9.png b/core/res/res/drawable-hdpi/jog_tab_bar_left_end_confirm_yellow.9.png Binary files differnew file mode 100644 index 0000000..b3c4c4c --- /dev/null +++ b/core/res/res/drawable-hdpi/jog_tab_bar_left_end_confirm_yellow.9.png diff --git a/core/res/res/drawable-hdpi/jog_tab_bar_left_end_normal.9.png b/core/res/res/drawable-hdpi/jog_tab_bar_left_end_normal.9.png Binary files differnew file mode 100644 index 0000000..00dea6ec --- /dev/null +++ b/core/res/res/drawable-hdpi/jog_tab_bar_left_end_normal.9.png diff --git a/core/res/res/drawable-hdpi/jog_tab_bar_left_end_pressed.9.png b/core/res/res/drawable-hdpi/jog_tab_bar_left_end_pressed.9.png Binary files differnew file mode 100644 index 0000000..45b1850 --- /dev/null +++ b/core/res/res/drawable-hdpi/jog_tab_bar_left_end_pressed.9.png diff --git a/core/res/res/drawable-hdpi/jog_tab_bar_normal.9.png b/core/res/res/drawable-hdpi/jog_tab_bar_normal.9.png Binary files differdeleted file mode 100644 index 1cf7f1c..0000000 --- a/core/res/res/drawable-hdpi/jog_tab_bar_normal.9.png +++ /dev/null diff --git a/core/res/res/drawable-hdpi/jog_tab_bar_pressed.9.png b/core/res/res/drawable-hdpi/jog_tab_bar_pressed.9.png Binary files differdeleted file mode 100644 index c7b367e..0000000 --- a/core/res/res/drawable-hdpi/jog_tab_bar_pressed.9.png +++ /dev/null diff --git a/core/res/res/drawable-hdpi/jog_tab_bar_right_end_confirm_gray.9.png b/core/res/res/drawable-hdpi/jog_tab_bar_right_end_confirm_gray.9.png Binary files differnew file mode 100644 index 0000000..35b3529 --- /dev/null +++ b/core/res/res/drawable-hdpi/jog_tab_bar_right_end_confirm_gray.9.png diff --git a/core/res/res/drawable-hdpi/jog_tab_bar_right_end_confirm_green.9.png b/core/res/res/drawable-hdpi/jog_tab_bar_right_end_confirm_green.9.png Binary files differnew file mode 100644 index 0000000..720de7f --- /dev/null +++ b/core/res/res/drawable-hdpi/jog_tab_bar_right_end_confirm_green.9.png diff --git a/core/res/res/drawable-hdpi/jog_tab_bar_right_end_confirm_red.9.png b/core/res/res/drawable-hdpi/jog_tab_bar_right_end_confirm_red.9.png Binary files differnew file mode 100644 index 0000000..b3387be --- /dev/null +++ b/core/res/res/drawable-hdpi/jog_tab_bar_right_end_confirm_red.9.png diff --git a/core/res/res/drawable-hdpi/jog_tab_bar_right_end_confirm_yellow.9.png b/core/res/res/drawable-hdpi/jog_tab_bar_right_end_confirm_yellow.9.png Binary files differnew file mode 100644 index 0000000..7ddfbcc --- /dev/null +++ b/core/res/res/drawable-hdpi/jog_tab_bar_right_end_confirm_yellow.9.png diff --git a/core/res/res/drawable-hdpi/jog_tab_bar_right_end_normal.9.png b/core/res/res/drawable-hdpi/jog_tab_bar_right_end_normal.9.png Binary files differnew file mode 100644 index 0000000..1855e5f --- /dev/null +++ b/core/res/res/drawable-hdpi/jog_tab_bar_right_end_normal.9.png diff --git a/core/res/res/drawable-hdpi/jog_tab_bar_right_end_pressed.9.png b/core/res/res/drawable-hdpi/jog_tab_bar_right_end_pressed.9.png Binary files differnew file mode 100644 index 0000000..844f304 --- /dev/null +++ b/core/res/res/drawable-hdpi/jog_tab_bar_right_end_pressed.9.png diff --git a/core/res/res/drawable-hdpi/loading_tile.png b/core/res/res/drawable-hdpi/loading_tile.png Binary files differindex 691ca45..f5a80c9 100644 --- a/core/res/res/drawable-hdpi/loading_tile.png +++ b/core/res/res/drawable-hdpi/loading_tile.png diff --git a/core/res/res/drawable-hdpi/no_tile_128.png b/core/res/res/drawable-hdpi/no_tile_128.png Binary files differindex 86b998d..a9b007d 100644 --- a/core/res/res/drawable-hdpi/no_tile_128.png +++ b/core/res/res/drawable-hdpi/no_tile_128.png diff --git a/core/res/res/drawable-land-hdpi/jog_tab_bar_confirm_gray.9.png b/core/res/res/drawable-land-hdpi/jog_tab_bar_confirm_gray.9.png Binary files differdeleted file mode 100644 index c0f7706..0000000 --- a/core/res/res/drawable-land-hdpi/jog_tab_bar_confirm_gray.9.png +++ /dev/null diff --git a/core/res/res/drawable-land-hdpi/jog_tab_bar_confirm_green.9.png b/core/res/res/drawable-land-hdpi/jog_tab_bar_confirm_green.9.png Binary files differdeleted file mode 100644 index 0f2ce13..0000000 --- a/core/res/res/drawable-land-hdpi/jog_tab_bar_confirm_green.9.png +++ /dev/null diff --git a/core/res/res/drawable-land-hdpi/jog_tab_bar_confirm_red.9.png b/core/res/res/drawable-land-hdpi/jog_tab_bar_confirm_red.9.png Binary files differdeleted file mode 100644 index a34eb7d..0000000 --- a/core/res/res/drawable-land-hdpi/jog_tab_bar_confirm_red.9.png +++ /dev/null diff --git a/core/res/res/drawable-land-hdpi/jog_tab_bar_confirm_yellow.9.png b/core/res/res/drawable-land-hdpi/jog_tab_bar_confirm_yellow.9.png Binary files differdeleted file mode 100644 index e143356..0000000 --- a/core/res/res/drawable-land-hdpi/jog_tab_bar_confirm_yellow.9.png +++ /dev/null diff --git a/core/res/res/drawable-land-hdpi/jog_tab_bar_left_end_confirm_gray.9.png b/core/res/res/drawable-land-hdpi/jog_tab_bar_left_end_confirm_gray.9.png Binary files differnew file mode 100644 index 0000000..76f76bc --- /dev/null +++ b/core/res/res/drawable-land-hdpi/jog_tab_bar_left_end_confirm_gray.9.png diff --git a/core/res/res/drawable-land-hdpi/jog_tab_bar_left_end_confirm_green.9.png b/core/res/res/drawable-land-hdpi/jog_tab_bar_left_end_confirm_green.9.png Binary files differnew file mode 100644 index 0000000..d070fad --- /dev/null +++ b/core/res/res/drawable-land-hdpi/jog_tab_bar_left_end_confirm_green.9.png diff --git a/core/res/res/drawable-land-hdpi/jog_tab_bar_left_end_confirm_red.9.png b/core/res/res/drawable-land-hdpi/jog_tab_bar_left_end_confirm_red.9.png Binary files differnew file mode 100644 index 0000000..8d38ea6 --- /dev/null +++ b/core/res/res/drawable-land-hdpi/jog_tab_bar_left_end_confirm_red.9.png diff --git a/core/res/res/drawable-land-hdpi/jog_tab_bar_left_end_confirm_yellow.9.png b/core/res/res/drawable-land-hdpi/jog_tab_bar_left_end_confirm_yellow.9.png Binary files differnew file mode 100644 index 0000000..2da4677 --- /dev/null +++ b/core/res/res/drawable-land-hdpi/jog_tab_bar_left_end_confirm_yellow.9.png diff --git a/core/res/res/drawable-land-hdpi/jog_tab_bar_left_end_normal.9.png b/core/res/res/drawable-land-hdpi/jog_tab_bar_left_end_normal.9.png Binary files differnew file mode 100644 index 0000000..a181652 --- /dev/null +++ b/core/res/res/drawable-land-hdpi/jog_tab_bar_left_end_normal.9.png diff --git a/core/res/res/drawable-land-hdpi/jog_tab_bar_left_end_pressed.9.png b/core/res/res/drawable-land-hdpi/jog_tab_bar_left_end_pressed.9.png Binary files differnew file mode 100644 index 0000000..6cf3131 --- /dev/null +++ b/core/res/res/drawable-land-hdpi/jog_tab_bar_left_end_pressed.9.png diff --git a/core/res/res/drawable-land-hdpi/jog_tab_bar_normal.9.png b/core/res/res/drawable-land-hdpi/jog_tab_bar_normal.9.png Binary files differdeleted file mode 100644 index b5837f7..0000000 --- a/core/res/res/drawable-land-hdpi/jog_tab_bar_normal.9.png +++ /dev/null diff --git a/core/res/res/drawable-land-hdpi/jog_tab_bar_pressed.9.png b/core/res/res/drawable-land-hdpi/jog_tab_bar_pressed.9.png Binary files differdeleted file mode 100644 index 79ad83d..0000000 --- a/core/res/res/drawable-land-hdpi/jog_tab_bar_pressed.9.png +++ /dev/null diff --git a/core/res/res/drawable-land-hdpi/jog_tab_bar_right_end_confirm_gray.9.png b/core/res/res/drawable-land-hdpi/jog_tab_bar_right_end_confirm_gray.9.png Binary files differnew file mode 100644 index 0000000..05541f3 --- /dev/null +++ b/core/res/res/drawable-land-hdpi/jog_tab_bar_right_end_confirm_gray.9.png diff --git a/core/res/res/drawable-land-hdpi/jog_tab_bar_right_end_confirm_green.9.png b/core/res/res/drawable-land-hdpi/jog_tab_bar_right_end_confirm_green.9.png Binary files differnew file mode 100644 index 0000000..0bf0ea9 --- /dev/null +++ b/core/res/res/drawable-land-hdpi/jog_tab_bar_right_end_confirm_green.9.png diff --git a/core/res/res/drawable-land-hdpi/jog_tab_bar_right_end_confirm_red.9.png b/core/res/res/drawable-land-hdpi/jog_tab_bar_right_end_confirm_red.9.png Binary files differnew file mode 100644 index 0000000..b82a30f --- /dev/null +++ b/core/res/res/drawable-land-hdpi/jog_tab_bar_right_end_confirm_red.9.png diff --git a/core/res/res/drawable-land-hdpi/jog_tab_bar_right_end_confirm_yellow.9.png b/core/res/res/drawable-land-hdpi/jog_tab_bar_right_end_confirm_yellow.9.png Binary files differnew file mode 100644 index 0000000..5f530fa --- /dev/null +++ b/core/res/res/drawable-land-hdpi/jog_tab_bar_right_end_confirm_yellow.9.png diff --git a/core/res/res/drawable-land-hdpi/jog_tab_bar_right_end_normal.9.png b/core/res/res/drawable-land-hdpi/jog_tab_bar_right_end_normal.9.png Binary files differnew file mode 100644 index 0000000..d8bbd17 --- /dev/null +++ b/core/res/res/drawable-land-hdpi/jog_tab_bar_right_end_normal.9.png diff --git a/core/res/res/drawable-land-hdpi/jog_tab_bar_right_end_pressed.9.png b/core/res/res/drawable-land-hdpi/jog_tab_bar_right_end_pressed.9.png Binary files differnew file mode 100644 index 0000000..c408087 --- /dev/null +++ b/core/res/res/drawable-land-hdpi/jog_tab_bar_right_end_pressed.9.png diff --git a/core/res/res/drawable-land-hdpi/jog_tab_left_confirm_gray.png b/core/res/res/drawable-land-hdpi/jog_tab_left_confirm_gray.png Binary files differindex 9c63b22..dff38b4 100644 --- a/core/res/res/drawable-land-hdpi/jog_tab_left_confirm_gray.png +++ b/core/res/res/drawable-land-hdpi/jog_tab_left_confirm_gray.png diff --git a/core/res/res/drawable-land-hdpi/jog_tab_left_confirm_green.png b/core/res/res/drawable-land-hdpi/jog_tab_left_confirm_green.png Binary files differindex 4f9877c..88a95be 100644 --- a/core/res/res/drawable-land-hdpi/jog_tab_left_confirm_green.png +++ b/core/res/res/drawable-land-hdpi/jog_tab_left_confirm_green.png diff --git a/core/res/res/drawable-land-hdpi/jog_tab_left_confirm_red.png b/core/res/res/drawable-land-hdpi/jog_tab_left_confirm_red.png Binary files differindex bdce97d..b9486ea 100644 --- a/core/res/res/drawable-land-hdpi/jog_tab_left_confirm_red.png +++ b/core/res/res/drawable-land-hdpi/jog_tab_left_confirm_red.png diff --git a/core/res/res/drawable-land-hdpi/jog_tab_left_confirm_yellow.png b/core/res/res/drawable-land-hdpi/jog_tab_left_confirm_yellow.png Binary files differindex 327fc2c..9144d7a 100644 --- a/core/res/res/drawable-land-hdpi/jog_tab_left_confirm_yellow.png +++ b/core/res/res/drawable-land-hdpi/jog_tab_left_confirm_yellow.png diff --git a/core/res/res/drawable-land-hdpi/jog_tab_left_normal.png b/core/res/res/drawable-land-hdpi/jog_tab_left_normal.png Binary files differindex e69d91c..b2d7695 100644 --- a/core/res/res/drawable-land-hdpi/jog_tab_left_normal.png +++ b/core/res/res/drawable-land-hdpi/jog_tab_left_normal.png diff --git a/core/res/res/drawable-land-hdpi/jog_tab_left_pressed.png b/core/res/res/drawable-land-hdpi/jog_tab_left_pressed.png Binary files differindex b6153d8..55e170d 100644 --- a/core/res/res/drawable-land-hdpi/jog_tab_left_pressed.png +++ b/core/res/res/drawable-land-hdpi/jog_tab_left_pressed.png diff --git a/core/res/res/drawable-land-hdpi/jog_tab_right_confirm_gray.png b/core/res/res/drawable-land-hdpi/jog_tab_right_confirm_gray.png Binary files differindex 6e3e00b..131b720 100644 --- a/core/res/res/drawable-land-hdpi/jog_tab_right_confirm_gray.png +++ b/core/res/res/drawable-land-hdpi/jog_tab_right_confirm_gray.png diff --git a/core/res/res/drawable-land-hdpi/jog_tab_right_confirm_green.png b/core/res/res/drawable-land-hdpi/jog_tab_right_confirm_green.png Binary files differindex dae9efc..c36b0ad 100644 --- a/core/res/res/drawable-land-hdpi/jog_tab_right_confirm_green.png +++ b/core/res/res/drawable-land-hdpi/jog_tab_right_confirm_green.png diff --git a/core/res/res/drawable-land-hdpi/jog_tab_right_confirm_red.png b/core/res/res/drawable-land-hdpi/jog_tab_right_confirm_red.png Binary files differindex 9de3158..d388619 100644 --- a/core/res/res/drawable-land-hdpi/jog_tab_right_confirm_red.png +++ b/core/res/res/drawable-land-hdpi/jog_tab_right_confirm_red.png diff --git a/core/res/res/drawable-land-hdpi/jog_tab_right_confirm_yellow.png b/core/res/res/drawable-land-hdpi/jog_tab_right_confirm_yellow.png Binary files differindex 8c9f180..24f1aec 100644 --- a/core/res/res/drawable-land-hdpi/jog_tab_right_confirm_yellow.png +++ b/core/res/res/drawable-land-hdpi/jog_tab_right_confirm_yellow.png diff --git a/core/res/res/drawable-land-hdpi/jog_tab_right_normal.png b/core/res/res/drawable-land-hdpi/jog_tab_right_normal.png Binary files differindex 0c4faf2..9111649 100644 --- a/core/res/res/drawable-land-hdpi/jog_tab_right_normal.png +++ b/core/res/res/drawable-land-hdpi/jog_tab_right_normal.png diff --git a/core/res/res/drawable-land-hdpi/jog_tab_right_pressed.png b/core/res/res/drawable-land-hdpi/jog_tab_right_pressed.png Binary files differindex 4ec7b56..3bd2e5b 100644 --- a/core/res/res/drawable-land-hdpi/jog_tab_right_pressed.png +++ b/core/res/res/drawable-land-hdpi/jog_tab_right_pressed.png diff --git a/core/res/res/drawable-land-mdpi/jog_tab_bar_left_end_confirm_gray.9.png b/core/res/res/drawable-land-mdpi/jog_tab_bar_left_end_confirm_gray.9.png Binary files differnew file mode 100644 index 0000000..61222f4 --- /dev/null +++ b/core/res/res/drawable-land-mdpi/jog_tab_bar_left_end_confirm_gray.9.png diff --git a/core/res/res/drawable-land-mdpi/jog_tab_bar_left_end_confirm_green.9.png b/core/res/res/drawable-land-mdpi/jog_tab_bar_left_end_confirm_green.9.png Binary files differnew file mode 100644 index 0000000..3060f72 --- /dev/null +++ b/core/res/res/drawable-land-mdpi/jog_tab_bar_left_end_confirm_green.9.png diff --git a/core/res/res/drawable-land-mdpi/jog_tab_bar_left_end_confirm_red.9.png b/core/res/res/drawable-land-mdpi/jog_tab_bar_left_end_confirm_red.9.png Binary files differnew file mode 100644 index 0000000..cee7bf5 --- /dev/null +++ b/core/res/res/drawable-land-mdpi/jog_tab_bar_left_end_confirm_red.9.png diff --git a/core/res/res/drawable-land-mdpi/jog_tab_bar_left_end_confirm_yellow.9.png b/core/res/res/drawable-land-mdpi/jog_tab_bar_left_end_confirm_yellow.9.png Binary files differnew file mode 100644 index 0000000..4bd56d1 --- /dev/null +++ b/core/res/res/drawable-land-mdpi/jog_tab_bar_left_end_confirm_yellow.9.png diff --git a/core/res/res/drawable-land-mdpi/jog_tab_bar_left_end_normal.9.png b/core/res/res/drawable-land-mdpi/jog_tab_bar_left_end_normal.9.png Binary files differnew file mode 100644 index 0000000..367e887 --- /dev/null +++ b/core/res/res/drawable-land-mdpi/jog_tab_bar_left_end_normal.9.png diff --git a/core/res/res/drawable-land-mdpi/jog_tab_bar_left_end_pressed.9.png b/core/res/res/drawable-land-mdpi/jog_tab_bar_left_end_pressed.9.png Binary files differnew file mode 100644 index 0000000..02f3f27 --- /dev/null +++ b/core/res/res/drawable-land-mdpi/jog_tab_bar_left_end_pressed.9.png diff --git a/core/res/res/drawable-land-mdpi/jog_tab_bar_right_end_confirm_gray.9.png b/core/res/res/drawable-land-mdpi/jog_tab_bar_right_end_confirm_gray.9.png Binary files differnew file mode 100644 index 0000000..bfaba2f --- /dev/null +++ b/core/res/res/drawable-land-mdpi/jog_tab_bar_right_end_confirm_gray.9.png diff --git a/core/res/res/drawable-land-mdpi/jog_tab_bar_right_end_confirm_green.9.png b/core/res/res/drawable-land-mdpi/jog_tab_bar_right_end_confirm_green.9.png Binary files differnew file mode 100644 index 0000000..d35fe7b --- /dev/null +++ b/core/res/res/drawable-land-mdpi/jog_tab_bar_right_end_confirm_green.9.png diff --git a/core/res/res/drawable-land-mdpi/jog_tab_bar_right_end_confirm_red.9.png b/core/res/res/drawable-land-mdpi/jog_tab_bar_right_end_confirm_red.9.png Binary files differnew file mode 100644 index 0000000..508f6bd --- /dev/null +++ b/core/res/res/drawable-land-mdpi/jog_tab_bar_right_end_confirm_red.9.png diff --git a/core/res/res/drawable-land-mdpi/jog_tab_bar_right_end_confirm_yellow.9.png b/core/res/res/drawable-land-mdpi/jog_tab_bar_right_end_confirm_yellow.9.png Binary files differnew file mode 100644 index 0000000..a6041e5 --- /dev/null +++ b/core/res/res/drawable-land-mdpi/jog_tab_bar_right_end_confirm_yellow.9.png diff --git a/core/res/res/drawable-land-mdpi/jog_tab_bar_right_end_normal.9.png b/core/res/res/drawable-land-mdpi/jog_tab_bar_right_end_normal.9.png Binary files differnew file mode 100644 index 0000000..28cdd0b --- /dev/null +++ b/core/res/res/drawable-land-mdpi/jog_tab_bar_right_end_normal.9.png diff --git a/core/res/res/drawable-land-mdpi/jog_tab_bar_right_end_pressed.9.png b/core/res/res/drawable-land-mdpi/jog_tab_bar_right_end_pressed.9.png Binary files differnew file mode 100644 index 0000000..46ba76b --- /dev/null +++ b/core/res/res/drawable-land-mdpi/jog_tab_bar_right_end_pressed.9.png diff --git a/core/res/res/drawable-land-mdpi/jog_tab_left_confirm_gray.png b/core/res/res/drawable-land-mdpi/jog_tab_left_confirm_gray.png Binary files differnew file mode 100644 index 0000000..396dcf7 --- /dev/null +++ b/core/res/res/drawable-land-mdpi/jog_tab_left_confirm_gray.png diff --git a/core/res/res/drawable-land-mdpi/jog_tab_left_confirm_green.png b/core/res/res/drawable-land-mdpi/jog_tab_left_confirm_green.png Binary files differnew file mode 100644 index 0000000..d928310 --- /dev/null +++ b/core/res/res/drawable-land-mdpi/jog_tab_left_confirm_green.png diff --git a/core/res/res/drawable-land-mdpi/jog_tab_left_confirm_red.png b/core/res/res/drawable-land-mdpi/jog_tab_left_confirm_red.png Binary files differnew file mode 100644 index 0000000..c377463 --- /dev/null +++ b/core/res/res/drawable-land-mdpi/jog_tab_left_confirm_red.png diff --git a/core/res/res/drawable-land-mdpi/jog_tab_left_confirm_yellow.png b/core/res/res/drawable-land-mdpi/jog_tab_left_confirm_yellow.png Binary files differnew file mode 100644 index 0000000..b868c76 --- /dev/null +++ b/core/res/res/drawable-land-mdpi/jog_tab_left_confirm_yellow.png diff --git a/core/res/res/drawable-land-mdpi/jog_tab_left_normal.png b/core/res/res/drawable-land-mdpi/jog_tab_left_normal.png Binary files differnew file mode 100644 index 0000000..5ca876b --- /dev/null +++ b/core/res/res/drawable-land-mdpi/jog_tab_left_normal.png diff --git a/core/res/res/drawable-land-mdpi/jog_tab_left_pressed.png b/core/res/res/drawable-land-mdpi/jog_tab_left_pressed.png Binary files differnew file mode 100644 index 0000000..8c33a78 --- /dev/null +++ b/core/res/res/drawable-land-mdpi/jog_tab_left_pressed.png diff --git a/core/res/res/drawable-land-mdpi/jog_tab_right_confirm_gray.png b/core/res/res/drawable-land-mdpi/jog_tab_right_confirm_gray.png Binary files differnew file mode 100644 index 0000000..4f1a002 --- /dev/null +++ b/core/res/res/drawable-land-mdpi/jog_tab_right_confirm_gray.png diff --git a/core/res/res/drawable-land-mdpi/jog_tab_right_confirm_green.png b/core/res/res/drawable-land-mdpi/jog_tab_right_confirm_green.png Binary files differnew file mode 100644 index 0000000..af1550f --- /dev/null +++ b/core/res/res/drawable-land-mdpi/jog_tab_right_confirm_green.png diff --git a/core/res/res/drawable-land-mdpi/jog_tab_right_confirm_red.png b/core/res/res/drawable-land-mdpi/jog_tab_right_confirm_red.png Binary files differnew file mode 100644 index 0000000..b458d27 --- /dev/null +++ b/core/res/res/drawable-land-mdpi/jog_tab_right_confirm_red.png diff --git a/core/res/res/drawable-land-mdpi/jog_tab_right_confirm_yellow.png b/core/res/res/drawable-land-mdpi/jog_tab_right_confirm_yellow.png Binary files differnew file mode 100644 index 0000000..8e55d6a --- /dev/null +++ b/core/res/res/drawable-land-mdpi/jog_tab_right_confirm_yellow.png diff --git a/core/res/res/drawable-land-mdpi/jog_tab_right_normal.png b/core/res/res/drawable-land-mdpi/jog_tab_right_normal.png Binary files differnew file mode 100644 index 0000000..c607c7c --- /dev/null +++ b/core/res/res/drawable-land-mdpi/jog_tab_right_normal.png diff --git a/core/res/res/drawable-land-mdpi/jog_tab_right_pressed.png b/core/res/res/drawable-land-mdpi/jog_tab_right_pressed.png Binary files differnew file mode 100644 index 0000000..2537d73 --- /dev/null +++ b/core/res/res/drawable-land-mdpi/jog_tab_right_pressed.png diff --git a/core/res/res/drawable-mdpi/ic_jog_dial_answer.png b/core/res/res/drawable-mdpi/ic_jog_dial_answer.png Binary files differnew file mode 100644 index 0000000..e2bc483 --- /dev/null +++ b/core/res/res/drawable-mdpi/ic_jog_dial_answer.png diff --git a/core/res/res/drawable-mdpi/ic_jog_dial_answer_and_end.png b/core/res/res/drawable-mdpi/ic_jog_dial_answer_and_end.png Binary files differnew file mode 100644 index 0000000..aa0fab2 --- /dev/null +++ b/core/res/res/drawable-mdpi/ic_jog_dial_answer_and_end.png diff --git a/core/res/res/drawable-mdpi/ic_jog_dial_answer_and_hold.png b/core/res/res/drawable-mdpi/ic_jog_dial_answer_and_hold.png Binary files differnew file mode 100644 index 0000000..9effe37 --- /dev/null +++ b/core/res/res/drawable-mdpi/ic_jog_dial_answer_and_hold.png diff --git a/core/res/res/drawable-mdpi/ic_jog_dial_decline.png b/core/res/res/drawable-mdpi/ic_jog_dial_decline.png Binary files differnew file mode 100644 index 0000000..81c76b5 --- /dev/null +++ b/core/res/res/drawable-mdpi/ic_jog_dial_decline.png diff --git a/core/res/res/drawable-mdpi/jog_tab_bar_left_end_confirm_gray.9.png b/core/res/res/drawable-mdpi/jog_tab_bar_left_end_confirm_gray.9.png Binary files differnew file mode 100644 index 0000000..adbb146 --- /dev/null +++ b/core/res/res/drawable-mdpi/jog_tab_bar_left_end_confirm_gray.9.png diff --git a/core/res/res/drawable-mdpi/jog_tab_bar_left_end_confirm_green.9.png b/core/res/res/drawable-mdpi/jog_tab_bar_left_end_confirm_green.9.png Binary files differnew file mode 100644 index 0000000..e8be7bf --- /dev/null +++ b/core/res/res/drawable-mdpi/jog_tab_bar_left_end_confirm_green.9.png diff --git a/core/res/res/drawable-mdpi/jog_tab_bar_left_end_confirm_red.9.png b/core/res/res/drawable-mdpi/jog_tab_bar_left_end_confirm_red.9.png Binary files differnew file mode 100644 index 0000000..120a9d8 --- /dev/null +++ b/core/res/res/drawable-mdpi/jog_tab_bar_left_end_confirm_red.9.png diff --git a/core/res/res/drawable-mdpi/jog_tab_bar_left_end_confirm_yellow.9.png b/core/res/res/drawable-mdpi/jog_tab_bar_left_end_confirm_yellow.9.png Binary files differnew file mode 100644 index 0000000..60ec146 --- /dev/null +++ b/core/res/res/drawable-mdpi/jog_tab_bar_left_end_confirm_yellow.9.png diff --git a/core/res/res/drawable-mdpi/jog_tab_bar_left_end_normal.9.png b/core/res/res/drawable-mdpi/jog_tab_bar_left_end_normal.9.png Binary files differnew file mode 100644 index 0000000..7477453 --- /dev/null +++ b/core/res/res/drawable-mdpi/jog_tab_bar_left_end_normal.9.png diff --git a/core/res/res/drawable-mdpi/jog_tab_bar_left_end_pressed.9.png b/core/res/res/drawable-mdpi/jog_tab_bar_left_end_pressed.9.png Binary files differnew file mode 100644 index 0000000..c79a35c --- /dev/null +++ b/core/res/res/drawable-mdpi/jog_tab_bar_left_end_pressed.9.png diff --git a/core/res/res/drawable-mdpi/jog_tab_bar_right_end_confirm_gray.9.png b/core/res/res/drawable-mdpi/jog_tab_bar_right_end_confirm_gray.9.png Binary files differnew file mode 100644 index 0000000..4ce09fa --- /dev/null +++ b/core/res/res/drawable-mdpi/jog_tab_bar_right_end_confirm_gray.9.png diff --git a/core/res/res/drawable-mdpi/jog_tab_bar_right_end_confirm_green.9.png b/core/res/res/drawable-mdpi/jog_tab_bar_right_end_confirm_green.9.png Binary files differnew file mode 100644 index 0000000..9d7565f --- /dev/null +++ b/core/res/res/drawable-mdpi/jog_tab_bar_right_end_confirm_green.9.png diff --git a/core/res/res/drawable-mdpi/jog_tab_bar_right_end_confirm_red.9.png b/core/res/res/drawable-mdpi/jog_tab_bar_right_end_confirm_red.9.png Binary files differnew file mode 100644 index 0000000..d5f9bd8 --- /dev/null +++ b/core/res/res/drawable-mdpi/jog_tab_bar_right_end_confirm_red.9.png diff --git a/core/res/res/drawable-mdpi/jog_tab_bar_right_end_confirm_yellow.9.png b/core/res/res/drawable-mdpi/jog_tab_bar_right_end_confirm_yellow.9.png Binary files differnew file mode 100644 index 0000000..5b9c5b4 --- /dev/null +++ b/core/res/res/drawable-mdpi/jog_tab_bar_right_end_confirm_yellow.9.png diff --git a/core/res/res/drawable-mdpi/jog_tab_bar_right_end_normal.9.png b/core/res/res/drawable-mdpi/jog_tab_bar_right_end_normal.9.png Binary files differnew file mode 100644 index 0000000..2e6ca2e --- /dev/null +++ b/core/res/res/drawable-mdpi/jog_tab_bar_right_end_normal.9.png diff --git a/core/res/res/drawable-mdpi/jog_tab_bar_right_end_pressed.9.png b/core/res/res/drawable-mdpi/jog_tab_bar_right_end_pressed.9.png Binary files differnew file mode 100644 index 0000000..f41750d --- /dev/null +++ b/core/res/res/drawable-mdpi/jog_tab_bar_right_end_pressed.9.png diff --git a/core/res/res/drawable-mdpi/jog_tab_left_confirm_gray.png b/core/res/res/drawable-mdpi/jog_tab_left_confirm_gray.png Binary files differnew file mode 100644 index 0000000..e8544ff --- /dev/null +++ b/core/res/res/drawable-mdpi/jog_tab_left_confirm_gray.png diff --git a/core/res/res/drawable-mdpi/jog_tab_left_confirm_green.png b/core/res/res/drawable-mdpi/jog_tab_left_confirm_green.png Binary files differnew file mode 100644 index 0000000..d0ba8f8 --- /dev/null +++ b/core/res/res/drawable-mdpi/jog_tab_left_confirm_green.png diff --git a/core/res/res/drawable-mdpi/jog_tab_left_confirm_red.png b/core/res/res/drawable-mdpi/jog_tab_left_confirm_red.png Binary files differnew file mode 100644 index 0000000..5188c86 --- /dev/null +++ b/core/res/res/drawable-mdpi/jog_tab_left_confirm_red.png diff --git a/core/res/res/drawable-mdpi/jog_tab_left_confirm_yellow.png b/core/res/res/drawable-mdpi/jog_tab_left_confirm_yellow.png Binary files differnew file mode 100644 index 0000000..861e17a --- /dev/null +++ b/core/res/res/drawable-mdpi/jog_tab_left_confirm_yellow.png diff --git a/core/res/res/drawable-mdpi/jog_tab_left_normal.png b/core/res/res/drawable-mdpi/jog_tab_left_normal.png Binary files differnew file mode 100644 index 0000000..7af1b85 --- /dev/null +++ b/core/res/res/drawable-mdpi/jog_tab_left_normal.png diff --git a/core/res/res/drawable-mdpi/jog_tab_left_pressed.png b/core/res/res/drawable-mdpi/jog_tab_left_pressed.png Binary files differnew file mode 100644 index 0000000..b76e83e --- /dev/null +++ b/core/res/res/drawable-mdpi/jog_tab_left_pressed.png diff --git a/core/res/res/drawable-mdpi/jog_tab_right_confirm_gray.png b/core/res/res/drawable-mdpi/jog_tab_right_confirm_gray.png Binary files differnew file mode 100644 index 0000000..814a50d --- /dev/null +++ b/core/res/res/drawable-mdpi/jog_tab_right_confirm_gray.png diff --git a/core/res/res/drawable-mdpi/jog_tab_right_confirm_green.png b/core/res/res/drawable-mdpi/jog_tab_right_confirm_green.png Binary files differnew file mode 100644 index 0000000..cf157fc --- /dev/null +++ b/core/res/res/drawable-mdpi/jog_tab_right_confirm_green.png diff --git a/core/res/res/drawable-mdpi/jog_tab_right_confirm_red.png b/core/res/res/drawable-mdpi/jog_tab_right_confirm_red.png Binary files differnew file mode 100644 index 0000000..74f2935 --- /dev/null +++ b/core/res/res/drawable-mdpi/jog_tab_right_confirm_red.png diff --git a/core/res/res/drawable-mdpi/jog_tab_right_confirm_yellow.png b/core/res/res/drawable-mdpi/jog_tab_right_confirm_yellow.png Binary files differnew file mode 100644 index 0000000..6655731 --- /dev/null +++ b/core/res/res/drawable-mdpi/jog_tab_right_confirm_yellow.png diff --git a/core/res/res/drawable-mdpi/jog_tab_right_normal.png b/core/res/res/drawable-mdpi/jog_tab_right_normal.png Binary files differnew file mode 100644 index 0000000..479c9a5 --- /dev/null +++ b/core/res/res/drawable-mdpi/jog_tab_right_normal.png diff --git a/core/res/res/drawable-mdpi/jog_tab_right_pressed.png b/core/res/res/drawable-mdpi/jog_tab_right_pressed.png Binary files differnew file mode 100644 index 0000000..454aaf2 --- /dev/null +++ b/core/res/res/drawable-mdpi/jog_tab_right_pressed.png diff --git a/core/res/res/drawable-mdpi/jog_tab_target_gray.png b/core/res/res/drawable-mdpi/jog_tab_target_gray.png Binary files differnew file mode 100644 index 0000000..517b253 --- /dev/null +++ b/core/res/res/drawable-mdpi/jog_tab_target_gray.png diff --git a/core/res/res/drawable-mdpi/jog_tab_target_green.png b/core/res/res/drawable-mdpi/jog_tab_target_green.png Binary files differnew file mode 100644 index 0000000..188f3cc --- /dev/null +++ b/core/res/res/drawable-mdpi/jog_tab_target_green.png diff --git a/core/res/res/drawable-mdpi/jog_tab_target_red.png b/core/res/res/drawable-mdpi/jog_tab_target_red.png Binary files differnew file mode 100644 index 0000000..a36394d --- /dev/null +++ b/core/res/res/drawable-mdpi/jog_tab_target_red.png diff --git a/core/res/res/drawable-mdpi/jog_tab_target_yellow.png b/core/res/res/drawable-mdpi/jog_tab_target_yellow.png Binary files differnew file mode 100644 index 0000000..ba999b1 --- /dev/null +++ b/core/res/res/drawable-mdpi/jog_tab_target_yellow.png diff --git a/core/res/res/drawable/jog_tab_bar_left_answer.xml b/core/res/res/drawable/jog_tab_bar_left_answer.xml index b1d7c31..32ce3dc 100644 --- a/core/res/res/drawable/jog_tab_bar_left_answer.xml +++ b/core/res/res/drawable/jog_tab_bar_left_answer.xml @@ -17,12 +17,12 @@ <!-- StateListDrawable used for buttons in the in-call onscreen touch UI. --> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true" - android:drawable="@drawable/jog_tab_bar_pressed" /> + android:drawable="@drawable/jog_tab_bar_left_end_pressed" /> <item android:state_enabled="true" - android:drawable="@drawable/jog_tab_bar_normal" /> + android:drawable="@drawable/jog_tab_bar_left_end_normal" /> <item android:state_active="true" - android:drawable="@drawable/jog_tab_bar_confirm_green" /> + android:drawable="@drawable/jog_tab_bar_left_end_confirm_green" /> </selector> diff --git a/core/res/res/drawable/jog_tab_bar_left_generic.xml b/core/res/res/drawable/jog_tab_bar_left_generic.xml index de1a42f..7e38193 100644 --- a/core/res/res/drawable/jog_tab_bar_left_generic.xml +++ b/core/res/res/drawable/jog_tab_bar_left_generic.xml @@ -17,12 +17,12 @@ <!-- StateListDrawable used for buttons in the in-call onscreen touch UI. --> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true" - android:drawable="@drawable/jog_tab_bar_pressed" /> + android:drawable="@drawable/jog_tab_bar_left_end_pressed" /> <item android:state_enabled="true" - android:drawable="@drawable/jog_tab_bar_normal" /> + android:drawable="@drawable/jog_tab_bar_left_end_normal" /> <item android:state_active="true" - android:drawable="@drawable/jog_tab_bar_confirm_gray" /> + android:drawable="@drawable/jog_tab_bar_left_end_confirm_gray" /> </selector> diff --git a/core/res/res/drawable/jog_tab_bar_left_unlock.xml b/core/res/res/drawable/jog_tab_bar_left_unlock.xml index b1d7c31..32ce3dc 100644 --- a/core/res/res/drawable/jog_tab_bar_left_unlock.xml +++ b/core/res/res/drawable/jog_tab_bar_left_unlock.xml @@ -17,12 +17,12 @@ <!-- StateListDrawable used for buttons in the in-call onscreen touch UI. --> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true" - android:drawable="@drawable/jog_tab_bar_pressed" /> + android:drawable="@drawable/jog_tab_bar_left_end_pressed" /> <item android:state_enabled="true" - android:drawable="@drawable/jog_tab_bar_normal" /> + android:drawable="@drawable/jog_tab_bar_left_end_normal" /> <item android:state_active="true" - android:drawable="@drawable/jog_tab_bar_confirm_green" /> + android:drawable="@drawable/jog_tab_bar_left_end_confirm_green" /> </selector> diff --git a/core/res/res/drawable/jog_tab_bar_right_decline.xml b/core/res/res/drawable/jog_tab_bar_right_decline.xml index ae82aba..83183ac 100644 --- a/core/res/res/drawable/jog_tab_bar_right_decline.xml +++ b/core/res/res/drawable/jog_tab_bar_right_decline.xml @@ -17,12 +17,12 @@ <!-- StateListDrawable used for buttons in the in-call onscreen touch UI. --> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true" - android:drawable="@drawable/jog_tab_bar_pressed" /> + android:drawable="@drawable/jog_tab_bar_right_end_pressed" /> <item android:state_enabled="true" - android:drawable="@drawable/jog_tab_bar_normal" /> + android:drawable="@drawable/jog_tab_bar_right_end_normal" /> <item android:state_active="true" - android:drawable="@drawable/jog_tab_bar_confirm_red" /> + android:drawable="@drawable/jog_tab_bar_right_end_confirm_red" /> </selector> diff --git a/core/res/res/drawable/jog_tab_bar_right_generic.xml b/core/res/res/drawable/jog_tab_bar_right_generic.xml index de1a42f..8797e15 100644 --- a/core/res/res/drawable/jog_tab_bar_right_generic.xml +++ b/core/res/res/drawable/jog_tab_bar_right_generic.xml @@ -17,12 +17,12 @@ <!-- StateListDrawable used for buttons in the in-call onscreen touch UI. --> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true" - android:drawable="@drawable/jog_tab_bar_pressed" /> + android:drawable="@drawable/jog_tab_bar_right_end_pressed" /> <item android:state_enabled="true" - android:drawable="@drawable/jog_tab_bar_normal" /> + android:drawable="@drawable/jog_tab_bar_right_end_normal" /> <item android:state_active="true" - android:drawable="@drawable/jog_tab_bar_confirm_gray" /> + android:drawable="@drawable/jog_tab_bar_right_end_confirm_gray" /> </selector> diff --git a/core/res/res/drawable/jog_tab_bar_right_sound_off.xml b/core/res/res/drawable/jog_tab_bar_right_sound_off.xml index de1a42f..8797e15 100644 --- a/core/res/res/drawable/jog_tab_bar_right_sound_off.xml +++ b/core/res/res/drawable/jog_tab_bar_right_sound_off.xml @@ -17,12 +17,12 @@ <!-- StateListDrawable used for buttons in the in-call onscreen touch UI. --> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true" - android:drawable="@drawable/jog_tab_bar_pressed" /> + android:drawable="@drawable/jog_tab_bar_right_end_pressed" /> <item android:state_enabled="true" - android:drawable="@drawable/jog_tab_bar_normal" /> + android:drawable="@drawable/jog_tab_bar_right_end_normal" /> <item android:state_active="true" - android:drawable="@drawable/jog_tab_bar_confirm_gray" /> + android:drawable="@drawable/jog_tab_bar_right_end_confirm_gray" /> </selector> diff --git a/core/res/res/drawable/jog_tab_bar_right_sound_on.xml b/core/res/res/drawable/jog_tab_bar_right_sound_on.xml index febe32a..d66e1c2 100644 --- a/core/res/res/drawable/jog_tab_bar_right_sound_on.xml +++ b/core/res/res/drawable/jog_tab_bar_right_sound_on.xml @@ -17,12 +17,12 @@ <!-- StateListDrawable used for buttons in the in-call onscreen touch UI. --> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true" - android:drawable="@drawable/jog_tab_bar_pressed" /> + android:drawable="@drawable/jog_tab_bar_right_end_pressed" /> <item android:state_enabled="true" - android:drawable="@drawable/jog_tab_bar_normal" /> + android:drawable="@drawable/jog_tab_bar_right_end_normal" /> <item android:state_active="true" - android:drawable="@drawable/jog_tab_bar_confirm_yellow" /> + android:drawable="@drawable/jog_tab_bar_right_end_confirm_yellow" /> </selector> diff --git a/core/res/res/layout/keyguard_screen_tab_unlock.xml b/core/res/res/layout/keyguard_screen_tab_unlock.xml index 84b5751..1991e98 100644 --- a/core/res/res/layout/keyguard_screen_tab_unlock.xml +++ b/core/res/res/layout/keyguard_screen_tab_unlock.xml @@ -38,58 +38,80 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" - android:layout_marginTop="20dip" + android:layout_alignParentRight="true" + android:layout_marginTop="16dip" + android:layout_marginRight="16dip" android:textAppearance="?android:attr/textAppearanceMedium" - android:textColor="?android:attr/textColorSecondary" /> - <TextView - android:id="@+id/time" + <!-- time and date --> + <com.android.internal.widget.DigitalClock android:id="@+id/time" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/carrier" - android:layout_marginTop="25dip" - android:textAppearance="?android:attr/textAppearanceLarge" - android:textSize="55sp" - /> + android:layout_marginBottom="8dip" + android:layout_marginTop="16dip" + android:layout_marginLeft="24dip" + > + + <TextView android:id="@+id/timeDisplay" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:gravity="bottom" + android:textSize="72sp" + android:textAppearance="?android:attr/textAppearanceMedium" + android:shadowColor="#C0000000" + android:shadowDx="0" + android:shadowDy="0" + android:shadowRadius="3.0" + /> + + + <TextView android:id="@+id/am_pm" + android:layout_width="wrap_content" + android:layout_height="fill_parent" + android:gravity="bottom" + android:textSize="22sp" + android:singleLine="true" + android:layout_marginLeft="8dip" + android:layout_marginBottom="-6dip" + android:textAppearance="?android:attr/textAppearanceMedium" + android:shadowColor="#C0000000" + android:shadowDx="0" + android:shadowDy="0" + android:shadowRadius="3.0" + /> + + </com.android.internal.widget.DigitalClock> <TextView android:id="@+id/date" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/time" - android:layout_marginTop="-12dip" + android:layout_marginLeft="24dip" android:textAppearance="?android:attr/textAppearanceMedium" /> - <View - android:id="@+id/divider" - android:layout_width="fill_parent" - android:layout_height="1dip" - android:layout_marginTop="10dip" - android:layout_below="@id/date" - android:background="@android:drawable/divider_horizontal_dark" - /> - <TextView android:id="@+id/status1" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_below="@id/divider" + android:layout_below="@id/date" android:layout_marginTop="6dip" + android:layout_marginLeft="24dip" android:textAppearance="?android:attr/textAppearanceMedium" - android:textColor="?android:attr/textColorSecondary" android:drawablePadding="4dip" /> - + <TextView android:id="@+id/status2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/status1" android:layout_marginTop="6dip" + android:layout_marginLeft="24dip" android:textAppearance="?android:attr/textAppearanceMedium" - android:textColor="?android:attr/textColorSecondary" android:drawablePadding="4dip" /> @@ -98,9 +120,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/status2" + android:layout_marginLeft="24dip" android:textAppearance="?android:attr/textAppearanceMedium" - android:textColor="?android:attr/textColorSecondary" - android:gravity="center" android:layout_marginTop="12dip" /> @@ -110,7 +131,7 @@ android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" - android:layout_marginBottom="50dip" + android:layout_marginBottom="80dip" /> <!-- emergency call button shown when sim is missing or PUKd --> diff --git a/core/res/res/layout/keyguard_screen_tab_unlock_land.xml b/core/res/res/layout/keyguard_screen_tab_unlock_land.xml index b80806b..5c80235 100644 --- a/core/res/res/layout/keyguard_screen_tab_unlock_land.xml +++ b/core/res/res/layout/keyguard_screen_tab_unlock_land.xml @@ -33,7 +33,8 @@ android:layout_width="0dip" android:layout_height="fill_parent" android:layout_weight="1.0" - android:gravity="center_horizontal"> + android:layout_marginLeft="24dip" + android:gravity="left"> <TextView android:id="@+id/carrier" @@ -42,45 +43,62 @@ android:layout_alignParentTop="true" android:layout_marginTop="20dip" android:textAppearance="?android:attr/textAppearanceMedium" - android:textColor="?android:attr/textColorSecondary" /> - <TextView - android:id="@+id/time" + <com.android.internal.widget.DigitalClock android:id="@+id/time" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/carrier" - android:layout_marginTop="25dip" - android:textAppearance="?android:attr/textAppearanceLarge" - android:textSize="55sp" - /> + android:layout_marginBottom="8dip" + android:layout_marginTop="56dip" + > + + <TextView android:id="@+id/timeDisplay" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:gravity="bottom" + android:textSize="72sp" + android:textAppearance="?android:attr/textAppearanceMedium" + android:shadowColor="#C0000000" + android:shadowDx="0" + android:shadowDy="0" + android:shadowRadius="3.0" + /> + + + <TextView android:id="@+id/am_pm" + android:layout_width="wrap_content" + android:layout_height="fill_parent" + android:gravity="bottom" + android:textSize="22sp" + android:singleLine="true" + android:layout_marginLeft="8dip" + android:layout_marginBottom="-6dip" + android:textAppearance="?android:attr/textAppearanceMedium" + android:shadowColor="#C0000000" + android:shadowDx="0" + android:shadowDy="0" + android:shadowRadius="3.0" + /> + + </com.android.internal.widget.DigitalClock> <TextView android:id="@+id/date" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/time" - android:layout_marginTop="-12dip" + android:layout_marginTop="6dip" android:textAppearance="?android:attr/textAppearanceMedium" /> - <View - android:id="@+id/divider" - android:layout_width="fill_parent" - android:layout_height="1dip" - android:layout_marginTop="10dip" - android:layout_below="@id/date" - android:background="@android:drawable/divider_horizontal_dark" - /> - <TextView android:id="@+id/status1" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_below="@id/divider" + android:layout_below="@id/date" android:layout_marginTop="6dip" android:textAppearance="?android:attr/textAppearanceMedium" - android:textColor="?android:attr/textColorSecondary" android:drawablePadding="4dip" /> @@ -91,7 +109,6 @@ android:layout_below="@id/status1" android:layout_marginTop="6dip" android:textAppearance="?android:attr/textAppearanceMedium" - android:textColor="?android:attr/textColorSecondary" android:drawablePadding="4dip" /> @@ -101,7 +118,6 @@ android:layout_height="wrap_content" android:layout_below="@id/status2" android:textAppearance="?android:attr/textAppearanceMedium" - android:textColor="?android:attr/textColorSecondary" android:gravity="center" android:layout_marginTop="12dip" /> @@ -124,7 +140,7 @@ android:orientation="vertical" android:layout_width="wrap_content" android:layout_height="fill_parent" - android:layout_marginRight="50dip" + android:layout_marginRight="80dip" /> </LinearLayout> diff --git a/core/res/res/layout/keyguard_screen_unlock_landscape.xml b/core/res/res/layout/keyguard_screen_unlock_landscape.xml index 3e00ae8e1..6da82e9 100644 --- a/core/res/res/layout/keyguard_screen_unlock_landscape.xml +++ b/core/res/res/layout/keyguard_screen_unlock_landscape.xml @@ -35,56 +35,73 @@ android:layout_width="0dip" android:layout_height="fill_parent" android:layout_weight="1.0" - android:gravity="center_horizontal" + android:layout_marginLeft="24dip" + android:gravity="left" > <TextView - android:id="@+id/carrier" + android:id="@+id/status1" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginTop="5dip" + android:layout_marginTop="16dip" android:textAppearance="?android:attr/textAppearanceMedium" - android:textColor="?android:attr/textColorSecondary" /> + <TextView - android:id="@+id/centerDot" - android:visibility="gone" + android:id="@+id/carrier" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="5dip" - android:layout_marginRight="5dip" android:textAppearance="?android:attr/textAppearanceMedium" - android:textColor="?android:attr/textColorSecondary" android:textSize="17sp" + android:drawablePadding="4dip" + android:layout_marginTop="32dip" /> - <TextView - android:id="@+id/time" + <com.android.internal.widget.DigitalClock android:id="@+id/time" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_centerHorizontal="true" - android:layout_marginTop="5dip" - android:textAppearance="?android:attr/textAppearanceLarge" - android:textSize="35sp" - /> + android:layout_alignParentTop="true" + android:layout_alignParentLeft="true" + android:layout_marginBottom="8dip" + android:layout_marginTop="8dip" + > + + <TextView android:id="@+id/timeDisplay" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:gravity="bottom" + android:textSize="72sp" + android:textAppearance="?android:attr/textAppearanceMedium" + android:shadowColor="#C0000000" + android:shadowDx="0" + android:shadowDy="0" + android:shadowRadius="3.0" + /> + + + <TextView android:id="@+id/am_pm" + android:layout_width="wrap_content" + android:layout_height="fill_parent" + android:gravity="bottom" + android:textSize="22sp" + android:singleLine="true" + android:layout_marginLeft="8dip" + android:layout_marginBottom="-6dip" + android:textAppearance="?android:attr/textAppearanceMedium" + android:shadowColor="#C0000000" + android:shadowDx="0" + android:shadowDy="0" + android:shadowRadius="3.0" + /> + + </com.android.internal.widget.DigitalClock> + <TextView android:id="@+id/date" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_alignParentTop="true" - android:layout_marginTop="-12dip" + android:layout_below="@id/time" android:textAppearance="?android:attr/textAppearanceMedium" - android:textColor="?android:attr/textColorSecondary" - android:textSize="17sp" /> - - <View - android:id="@+id/divider" - android:layout_width="fill_parent" - android:layout_height="1dip" - android:layout_centerHorizontal="true" - android:background="@android:drawable/divider_horizontal_dark" - /> - <!-- used for instructions such as "draw pattern to unlock", the next alarm, and charging status. --> <LinearLayout @@ -95,22 +112,12 @@ android:gravity="center" > <TextView - android:id="@+id/status1" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:textAppearance="?android:attr/textAppearanceMedium" - android:textColor="?android:attr/textColorSecondary" - android:textSize="17sp" - android:drawablePadding="4dip" - /> - <TextView android:id="@+id/statusSep" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="5dip" android:layout_marginRight="5dip" android:textAppearance="?android:attr/textAppearanceMedium" - android:textColor="?android:attr/textColorSecondary" android:textSize="17sp" /> <TextView @@ -119,7 +126,6 @@ android:layout_height="wrap_content" android:layout_alignParentTop="true" android:textAppearance="?android:attr/textAppearanceMedium" - android:textColor="?android:attr/textColorSecondary" android:textSize="17sp" android:drawablePadding="4dip" /> @@ -136,13 +142,14 @@ <FrameLayout android:layout_width="fill_parent" android:layout_height="wrap_content" + android:layout_marginBottom="16dip" > <!-- option 1: a single emergency call button --> <RelativeLayout android:id="@+id/footerNormal" android:layout_width="fill_parent" android:layout_height="wrap_content" - android:gravity="center" + android:gravity="left" > <Button android:id="@+id/emergencyCallAlone" android:layout_width="wrap_content" @@ -162,7 +169,7 @@ android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" - android:gravity="center" + android:gravity="left" > <Button android:id="@+id/forgotPattern" android:layout_width="fill_parent" @@ -193,4 +200,4 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" /> -</com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
\ No newline at end of file +</com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient> diff --git a/core/res/res/layout/keyguard_screen_unlock_portrait.xml b/core/res/res/layout/keyguard_screen_unlock_portrait.xml index 0525356..2856794 100644 --- a/core/res/res/layout/keyguard_screen_unlock_portrait.xml +++ b/core/res/res/layout/keyguard_screen_unlock_portrait.xml @@ -27,78 +27,99 @@ android:layout_height="fill_parent" android:gravity="center_horizontal" android:background="#70000000" - > + > - <LinearLayout - android:id="@+id/carrierAndDate" - android:orientation="horizontal" - android:layout_width="wrap_content" + <RelativeLayout + android:layout_width="fill_parent" android:layout_height="wrap_content" - android:layout_marginTop="13dip" > <TextView android:id="@+id/carrier" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_alignParentTop="true" + android:layout_alignParentRight="true" + android:layout_marginTop="16dip" + android:layout_marginRight="16dip" android:textAppearance="?android:attr/textAppearanceMedium" - android:textColor="?android:attr/textColorSecondary" - android:textSize="17sp" /> - <TextView - android:id="@+id/centerDot" + + <com.android.internal.widget.DigitalClock android:id="@+id/time" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="5dip" - android:layout_marginRight="5dip" - android:textAppearance="?android:attr/textAppearanceMedium" - android:textColor="?android:attr/textColorSecondary" - android:textSize="17sp" - /> + android:layout_alignParentTop="true" + android:layout_alignParentLeft="true" + android:layout_marginBottom="8dip" + android:layout_marginTop="16dip" + android:layout_marginLeft="24dip" + > + + <TextView android:id="@+id/timeDisplay" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:gravity="bottom" + android:textSize="72sp" + android:textAppearance="?android:attr/textAppearanceMedium" + android:shadowColor="#C0000000" + android:shadowDx="0" + android:shadowDy="0" + android:shadowRadius="3.0" + /> + + + <TextView android:id="@+id/am_pm" + android:layout_width="wrap_content" + android:layout_height="fill_parent" + android:gravity="bottom" + android:textSize="22sp" + android:singleLine="true" + android:layout_marginLeft="8dip" + android:layout_marginBottom="-6dip" + android:textAppearance="?android:attr/textAppearanceMedium" + android:shadowColor="#C0000000" + android:shadowDx="0" + android:shadowDy="0" + android:shadowRadius="3.0" + /> + + </com.android.internal.widget.DigitalClock> + <TextView android:id="@+id/date" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_alignParentTop="true" + android:layout_below="@id/time" + android:layout_marginLeft="24dip" android:textAppearance="?android:attr/textAppearanceMedium" - android:textColor="?android:attr/textColorSecondary" - android:textSize="17sp" /> - </LinearLayout> - - <TextView - android:id="@+id/time" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_centerHorizontal="true" - android:layout_marginTop="-9dip" - android:textAppearance="?android:attr/textAppearanceLarge" - android:textSize="48sp" - /> + + </RelativeLayout> <View android:id="@+id/divider" + android:layout_below="@id/date" android:layout_width="fill_parent" android:layout_height="1dip" - android:layout_marginTop="-4dip" - android:layout_centerHorizontal="true" + android:layout_marginTop="8dip" + android:layout_marginBottom="8dip" android:background="@android:drawable/divider_horizontal_dark" - /> + /> <!-- used for instructions such as "draw pattern to unlock", the next alarm, and charging status. --> <LinearLayout android:orientation="horizontal" - android:layout_width="wrap_content" + android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="3dip" - android:gravity="center" + android:layout_marginLeft="24dip" + android:gravity="left" > <TextView android:id="@+id/status1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceMedium" - android:textColor="?android:attr/textColorSecondary" android:textSize="17sp" android:drawablePadding="4dip" /> @@ -109,7 +130,6 @@ android:layout_marginLeft="5dip" android:layout_marginRight="5dip" android:textAppearance="?android:attr/textAppearanceMedium" - android:textColor="?android:attr/textColorSecondary" android:textSize="17sp" /> <TextView @@ -118,7 +138,6 @@ android:layout_height="wrap_content" android:layout_alignParentTop="true" android:textAppearance="?android:attr/textAppearanceMedium" - android:textColor="?android:attr/textColorSecondary" android:textSize="17sp" android:drawablePadding="4dip" /> diff --git a/data/fonts/Android.mk b/data/fonts/Android.mk index a8abf8b..597cb57 100644 --- a/data/fonts/Android.mk +++ b/data/fonts/Android.mk @@ -22,7 +22,8 @@ copy_from := \ DroidSerif-Bold.ttf \ DroidSerif-Italic.ttf \ DroidSerif-BoldItalic.ttf \ - DroidSansMono.ttf + DroidSansMono.ttf \ + Clockopia.ttf ifneq ($(NO_FALLBACK_FONT),true) copy_from += DroidSansFallback.ttf diff --git a/data/fonts/Clockopia.ttf b/data/fonts/Clockopia.ttf Binary files differnew file mode 100644 index 0000000..123ea4f --- /dev/null +++ b/data/fonts/Clockopia.ttf 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 class RSSurfaceView extends SurfaceView implements SurfaceHolder.Callback */ 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 @@ public class RSSurfaceView extends SurfaceView implements SurfaceHolder.Callback * 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 class RSSurfaceView extends SurfaceView implements SurfaceHolder.Callback // ---------------------------------------------------------------------- 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 class RSSurfaceView extends SurfaceView implements SurfaceHolder.Callback } 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 @@ import android.view.Surface; * **/ 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 @@ public class RenderScript { 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 @@ public class RenderScript { 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 @@ nDeviceSetConfig(JNIEnv *_env, jobject _this, jint dev, jint p, jint value) } 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 @@ nContextSetSurface(JNIEnv *_env, jobject _this, jobject wnd) window = (Surface*)_env->GetIntField(wnd, surfaceFieldID); } - rsContextSetSurface(con, window); + rsContextSetSurface(con, width, height, window); } static void @@ -1345,8 +1332,8 @@ static JNINativeMethod methods[] = { {"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/include/media/stagefright/HardwareAPI.h b/include/media/stagefright/HardwareAPI.h new file mode 100644 index 0000000..7e1f08d --- /dev/null +++ b/include/media/stagefright/HardwareAPI.h @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2009 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. + */ + +#ifndef HARDWARE_API_H_ + +#define HARDWARE_API_H_ + +#include <media/stagefright/VideoRenderer.h> +#include <ui/ISurface.h> +#include <utils/RefBase.h> + +#include <OMX_Component.h> + +extern android::VideoRenderer *createRenderer( + const android::sp<android::ISurface> &surface, + const char *componentName, + OMX_COLOR_FORMATTYPE colorFormat, + size_t displayWidth, size_t displayHeight, + size_t decodedWidth, size_t decodedHeight); + +#endif // HARDWARE_API_H_ + diff --git a/include/media/stagefright/QComHardwareRenderer.h b/include/media/stagefright/QComHardwareRenderer.h deleted file mode 100644 index 8292dd5..0000000 --- a/include/media/stagefright/QComHardwareRenderer.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (C) 2009 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. - */ - -#ifndef QCOM_HARDWARE_RENDERER_H_ - -#define QCOM_HARDWARE_RENDERER_H_ - -#include <media/stagefright/VideoRenderer.h> -#include <utils/RefBase.h> - -namespace android { - -class ISurface; -class MemoryHeapPmem; - -class QComHardwareRenderer : public VideoRenderer { -public: - QComHardwareRenderer( - const sp<ISurface> &surface, - size_t displayWidth, size_t displayHeight, - size_t decodedWidth, size_t decodedHeight); - - virtual ~QComHardwareRenderer(); - - virtual void render( - const void *data, size_t size, void *platformPrivate); - -private: - sp<ISurface> mISurface; - size_t mDisplayWidth, mDisplayHeight; - size_t mDecodedWidth, mDecodedHeight; - size_t mFrameSize; - sp<MemoryHeapPmem> mMemoryHeap; - - bool getOffset(void *platformPrivate, size_t *offset); - void publishBuffers(uint32_t pmem_fd); - - QComHardwareRenderer(const QComHardwareRenderer &); - QComHardwareRenderer &operator=(const QComHardwareRenderer &); -}; - -} // namespace android - -#endif // QCOM_HARDWARE_RENDERER_H_ diff --git a/include/media/stagefright/TIHardwareRenderer.h b/include/media/stagefright/TIHardwareRenderer.h deleted file mode 100644 index ef42648..0000000 --- a/include/media/stagefright/TIHardwareRenderer.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (C) 2009 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. - */ - -#ifndef TI_HARDWARE_RENDERER_H_ - -#define TI_HARDWARE_RENDERER_H_ - -#include <media/stagefright/VideoRenderer.h> -#include <utils/RefBase.h> -#include <utils/Vector.h> - -namespace android { - -class ISurface; -class Overlay; - -class TIHardwareRenderer : public VideoRenderer { -public: - TIHardwareRenderer( - const sp<ISurface> &surface, - size_t displayWidth, size_t displayHeight, - size_t decodedWidth, size_t decodedHeight); - - virtual ~TIHardwareRenderer(); - - virtual void render( - const void *data, size_t size, void *platformPrivate); - -private: - sp<ISurface> mISurface; - size_t mDisplayWidth, mDisplayHeight; - size_t mDecodedWidth, mDecodedHeight; - size_t mFrameSize; - sp<Overlay> mOverlay; - Vector<void *> mOverlayAddresses; - bool mIsFirstFrame; - size_t mIndex; - - TIHardwareRenderer(const TIHardwareRenderer &); - TIHardwareRenderer &operator=(const TIHardwareRenderer &); -}; - -} // namespace android - -#endif // TI_HARDWARE_RENDERER_H_ - diff --git a/libs/binder/ProcessState.cpp b/libs/binder/ProcessState.cpp index d7daf73..2d4e10d 100644 --- a/libs/binder/ProcessState.cpp +++ b/libs/binder/ProcessState.cpp @@ -41,7 +41,7 @@ #include <sys/mman.h> #include <sys/stat.h> -#define BINDER_VM_SIZE (1*1024*1024) +#define BINDER_VM_SIZE ((1*1024*1024) - (4096 *2)) static bool gSingleProcess = false; 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 @@ RsDevice rsDeviceCreate(); 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,29 +48,25 @@ public class FountainView extends RSSurfaceView { private RenderScript mRS; private FountainRS mRender; - private void destroyRS() { - 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); + if (mRS == null) { + mRS = createRenderScript(false, true); + mRS.contextSetSurface(w, h, holder.getSurface()); + mRender = new FountainRS(); + mRender.init(mRS, getResources(), w, h); + } } - public void surfaceDestroyed(SurfaceHolder holder) { - // Surface will be destroyed when we return - destroyRS(); + @Override + protected void onDetachedFromWindow() { + if(mRS != null) { + mRS = null; + destroyRenderScript(); + } } - @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 class ImageProcessingActivity extends Activity implements SurfaceHolder.C } 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 @@ ContextResume { } 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 @@ void Context::initEGL() 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 @@ void * Context::threadProc(void *vrsc) 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 @@ void * Context::threadProc(void *vrsc) return NULL; } -Context::Context(Device *dev, Surface *sur, bool useDepth) +Context::Context(Device *dev, bool useDepth) { pthread_mutex_lock(&gInitMutex); @@ -353,6 +327,7 @@ Context::Context(Device *dev, Surface *sur, bool useDepth) mUseDepth = useDepth; mPaused = false; mObjHead = NULL; + memset(&mEGL, 0, sizeof(mEGL)); int status; pthread_attr_t threadAttr; @@ -380,7 +355,7 @@ Context::Context(Device *dev, Surface *sur, bool useDepth) sparam.sched_priority = ANDROID_PRIORITY_DISPLAY; pthread_attr_setschedparam(&threadAttr, &sparam); - mWndSurface = sur; + mWndSurface = NULL; objDestroyOOBInit(); timerInit(); @@ -426,8 +401,10 @@ Context::~Context() 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 @@ void Context::setSurface(Surface *sur) 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 @@ void Context::setSurface(Surface *sur) 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 @@ void rsi_ContextResume(Context *rsc) rsc->resume(); } -void rsi_ContextSetSurface(Context *rsc, void *sur) +void rsi_ContextSetSurface(Context *rsc, uint32_t w, uint32_t h, void *sur) +{ + rsc->setSurface(w, h, (Surface *)sur); +} + +void rsi_ContextSetPriority(Context *rsc, uint32_t p) { - rsc->setSurface((Surface *)sur); } } } -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 @@ namespace renderscript { class Context { public: - Context(Device *, Surface *, bool useDepth); + Context(Device *, bool useDepth); ~Context(); static pthread_key_t gThreadTLSKey; @@ -94,7 +94,7 @@ public: 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 @@ protected: } 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 @@ bool LocklessCommandFifo::init(uint32_t sizeInBytes) 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 @@ void ProgramVertexState::init(Context *rsc, int32_t w, int32_t h) 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 @@ public: 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/libs/surfaceflinger/LayerBuffer.cpp b/libs/surfaceflinger/LayerBuffer.cpp index a36304c..28d7c48 100644 --- a/libs/surfaceflinger/LayerBuffer.cpp +++ b/libs/surfaceflinger/LayerBuffer.cpp @@ -26,6 +26,8 @@ #include <ui/GraphicBuffer.h> #include <ui/PixelFormat.h> #include <ui/FramebufferNativeWindow.h> +#include <ui/Rect.h> +#include <ui/Region.h> #include <hardware/copybit.h> @@ -46,12 +48,15 @@ gralloc_module_t const* LayerBuffer::sGrallocModule = 0; LayerBuffer::LayerBuffer(SurfaceFlinger* flinger, DisplayID display, const sp<Client>& client, int32_t i) : LayerBaseClient(flinger, display, client, i), - mNeedsBlending(false) + mNeedsBlending(false), mBlitEngine(0) { } LayerBuffer::~LayerBuffer() { + if (mBlitEngine) { + copybit_close(mBlitEngine); + } } void LayerBuffer::onFirstRef() @@ -69,6 +74,10 @@ void LayerBuffer::onFirstRef() sGrallocModule = (gralloc_module_t const *)module; } } + + if (hw_get_module(COPYBIT_HARDWARE_MODULE_ID, &module) == 0) { + copybit_open(module, &mBlitEngine); + } } sp<LayerBaseClient::Surface> LayerBuffer::createSurface() const @@ -350,6 +359,35 @@ LayerBuffer::BufferSource::BufferSource(LayerBuffer& layer, return; } + if (mLayer.mBlitEngine) { + // create our temporary buffer and corresponding EGLImageKHR. + // note that the size of this buffer doesn't really matter, + // the final image will always be drawn with proper aspect ratio. + + int w = buffers.w; + int h = buffers.h; + mTempGraphicBuffer.clear(); + mTempGraphicBuffer = new GraphicBuffer( + w, h, HAL_PIXEL_FORMAT_RGBX_8888, + GraphicBuffer::USAGE_HW_TEXTURE | + GraphicBuffer::USAGE_HW_2D); + + if (mTempGraphicBuffer->initCheck() == NO_ERROR) { + NativeBuffer& dst(mTempBuffer); + dst.img.w = mTempGraphicBuffer->getStride(); + dst.img.h = mTempGraphicBuffer->getHeight(); + dst.img.format = mTempGraphicBuffer->getPixelFormat(); + dst.img.handle = (native_handle_t *)mTempGraphicBuffer->handle; + dst.img.base = 0; + dst.crop.l = 0; + dst.crop.t = 0; + dst.crop.r = mTempGraphicBuffer->getWidth(); + dst.crop.b = mTempGraphicBuffer->getHeight(); + } else { + mTempGraphicBuffer.clear(); + } + } + mBufferHeap = buffers; mLayer.setNeedsBlending((info.h_alpha - info.l_alpha) > 0); mBufferSize = info.getScanlineSize(buffers.hor_stride)*buffers.ver_stride; @@ -438,15 +476,35 @@ void LayerBuffer::BufferSource::onDraw(const Region& clip) const #if defined(EGL_ANDROID_image_native_buffer) if (mLayer.mFlags & DisplayHardware::DIRECT_TEXTURE) { - // NOTE: Assume the buffer is allocated with the proper USAGE flags - sp<GraphicBuffer> graphicBuffer = new GraphicBuffer( - src.crop.r, src.crop.b, src.img.format, - GraphicBuffer::USAGE_HW_TEXTURE, - src.img.w, src.img.handle, false); + copybit_device_t* copybit = mLayer.mBlitEngine; + if (copybit) { + // create our EGLImageKHR the first time + if (mTexture.image == EGL_NO_IMAGE_KHR) { + err = NO_MEMORY; + if (mTempGraphicBuffer!=0) { + err = mLayer.initializeEglImage( + mTempGraphicBuffer, &mTexture); + // once the EGLImage has been created (whether it fails + // or not) we don't need the graphic buffer reference + // anymore. + mTempGraphicBuffer.clear(); + } + } - graphicBuffer->setVerticalStride(src.img.h); + if (err == NO_ERROR) { + // NOTE: Assume the buffer is allocated with the proper USAGE flags + const NativeBuffer& dst(mTempBuffer); + region_iterator clip(Region(Rect(dst.crop.r, dst.crop.b))); + copybit->set_parameter(copybit, COPYBIT_TRANSFORM, 0); + copybit->set_parameter(copybit, COPYBIT_PLANE_ALPHA, 0xFF); + copybit->set_parameter(copybit, COPYBIT_DITHER, COPYBIT_ENABLE); + err = copybit->stretch(copybit, &dst.img, &src.img, + &dst.crop, &src.crop, &clip); - err = mLayer.initializeEglImage(graphicBuffer, &mTexture); + } + } else { + err = INVALID_OPERATION; + } } #endif else { diff --git a/libs/surfaceflinger/LayerBuffer.h b/libs/surfaceflinger/LayerBuffer.h index 47482f4..1abb103 100644 --- a/libs/surfaceflinger/LayerBuffer.h +++ b/libs/surfaceflinger/LayerBuffer.h @@ -135,8 +135,9 @@ private: status_t mStatus; ISurface::BufferHeap mBufferHeap; size_t mBufferSize; - mutable sp<GraphicBuffer> mTempBitmap; mutable LayerBase::Texture mTexture; + NativeBuffer mTempBuffer; + mutable sp<GraphicBuffer> mTempGraphicBuffer; }; class OverlaySource : public Source { @@ -205,6 +206,7 @@ private: sp<Surface> mSurface; bool mInvalidate; bool mNeedsBlending; + copybit_device_t* mBlitEngine; }; // --------------------------------------------------------------------------- diff --git a/libs/ui/FramebufferNativeWindow.cpp b/libs/ui/FramebufferNativeWindow.cpp index 0efba9c..c5e22e5 100644 --- a/libs/ui/FramebufferNativeWindow.cpp +++ b/libs/ui/FramebufferNativeWindow.cpp @@ -118,8 +118,6 @@ FramebufferNativeWindow::FramebufferNativeWindow() LOGE_IF(err, "fb buffer 1 allocation failed w=%d, h=%d, err=%s", fbDev->width, fbDev->height, strerror(-err)); - LOGE("xDpi %d", fbDev->xdpi); - LOGE("yDpi %d", fbDev->ydpi); const_cast<uint32_t&>(android_native_window_t::flags) = fbDev->flags; const_cast<float&>(android_native_window_t::xdpi) = fbDev->xdpi; const_cast<float&>(android_native_window_t::ydpi) = fbDev->ydpi; diff --git a/media/libstagefright/omx/Android.mk b/media/libstagefright/omx/Android.mk index 20fb4f3..25da813 100644 --- a/media/libstagefright/omx/Android.mk +++ b/media/libstagefright/omx/Android.mk @@ -6,15 +6,12 @@ include external/opencore/Config.mk LOCAL_C_INCLUDES := $(PV_INCLUDES) LOCAL_CFLAGS := $(PV_CFLAGS_MINUS_VISIBILITY) -LOCAL_C_INCLUDES += $(TOP)/hardware/ti/omap3/liboverlay LOCAL_C_INCLUDES += $(JNI_H_INCLUDE) LOCAL_SRC_FILES:= \ OMX.cpp \ OMXNodeInstance.cpp \ - QComHardwareRenderer.cpp \ - SoftwareRenderer.cpp \ - TIHardwareRenderer.cpp + SoftwareRenderer.cpp LOCAL_SHARED_LIBRARIES := \ libbinder \ @@ -25,7 +22,11 @@ LOCAL_SHARED_LIBRARIES := \ libopencore_common ifeq ($(TARGET_OS)-$(TARGET_SIMULATOR),linux-true) - LOCAL_LDLIBS += -lpthread + LOCAL_LDLIBS += -lpthread -ldl +endif + +ifneq ($(TARGET_SIMULATOR),true) +LOCAL_SHARED_LIBRARIES += libdl endif LOCAL_PRELINK_MODULE:= false diff --git a/media/libstagefright/omx/OMX.cpp b/media/libstagefright/omx/OMX.cpp index 9ac0d44..4ccd4bd 100644 --- a/media/libstagefright/omx/OMX.cpp +++ b/media/libstagefright/omx/OMX.cpp @@ -27,9 +27,7 @@ #include <binder/IMemory.h> #include <media/stagefright/MediaDebug.h> -#include <media/stagefright/QComHardwareRenderer.h> #include <media/stagefright/SoftwareRenderer.h> -#include <media/stagefright/TIHardwareRenderer.h> #include <media/stagefright/VideoRenderer.h> #include <OMX_Component.h> @@ -431,27 +429,37 @@ sp<IOMXRenderer> OMX::createRenderer( OMX_COLOR_FORMATTYPE colorFormat, size_t encodedWidth, size_t encodedHeight, size_t displayWidth, size_t displayHeight) { + Mutex::Autolock autoLock(mLock); + VideoRenderer *impl = NULL; - static const int OMX_QCOM_COLOR_FormatYVU420SemiPlanar = 0x7FA30C00; - - if (colorFormat == OMX_QCOM_COLOR_FormatYVU420SemiPlanar - && !strncmp(componentName, "OMX.qcom.video.decoder.", 23)) { - LOGW("Using QComHardwareRenderer."); - impl = - new QComHardwareRenderer( - surface, - displayWidth, displayHeight, - encodedWidth, encodedHeight); - } else if (colorFormat == OMX_COLOR_FormatCbYCrY - && !strcmp(componentName, "OMX.TI.Video.Decoder")) { - LOGW("Using TIHardwareRenderer."); - impl = - new TIHardwareRenderer( - surface, - displayWidth, displayHeight, - encodedWidth, encodedHeight); - } else { + static void *libHandle = NULL; + + if (!libHandle) { + libHandle = dlopen("libstagefrighthw.so", RTLD_NOW); + } + + if (libHandle) { + typedef VideoRenderer *(*CreateRendererFunc)( + const sp<ISurface> &surface, + const char *componentName, + OMX_COLOR_FORMATTYPE colorFormat, + size_t displayWidth, size_t displayHeight, + size_t decodedWidth, size_t decodedHeight); + + CreateRendererFunc func = + (CreateRendererFunc)dlsym( + libHandle, + "_Z14createRendererRKN7android2spINS_8ISurfaceEEEPKc20" + "OMX_COLOR_FORMATTYPEjjjj"); + + if (func) { + impl = (*func)(surface, componentName, colorFormat, + displayWidth, displayHeight, encodedWidth, encodedHeight); + } + } + + if (!impl) { LOGW("Using software renderer."); impl = new SoftwareRenderer( colorFormat, diff --git a/media/libstagefright/omx/QComHardwareRenderer.cpp b/media/libstagefright/omx/QComHardwareRenderer.cpp deleted file mode 100644 index c65d1f3..0000000 --- a/media/libstagefright/omx/QComHardwareRenderer.cpp +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Copyright (C) 2009 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. - */ - -#include <binder/MemoryHeapBase.h> -#include <binder/MemoryHeapPmem.h> -#include <media/stagefright/MediaDebug.h> -#include <media/stagefright/QComHardwareRenderer.h> -#include <ui/ISurface.h> - -namespace android { - -//////////////////////////////////////////////////////////////////////////////// - -typedef struct PLATFORM_PRIVATE_ENTRY -{ - /* Entry type */ - uint32_t type; - - /* Pointer to platform specific entry */ - void *entry; - -} PLATFORM_PRIVATE_ENTRY; - -typedef struct PLATFORM_PRIVATE_LIST -{ - /* Number of entries */ - uint32_t nEntries; - - /* Pointer to array of platform specific entries * - * Contiguous block of PLATFORM_PRIVATE_ENTRY elements */ - PLATFORM_PRIVATE_ENTRY *entryList; - -} PLATFORM_PRIVATE_LIST; - -// data structures for tunneling buffers -typedef struct PLATFORM_PRIVATE_PMEM_INFO -{ - /* pmem file descriptor */ - uint32_t pmem_fd; - uint32_t offset; - -} PLATFORM_PRIVATE_PMEM_INFO; - -#define PLATFORM_PRIVATE_PMEM 1 - -QComHardwareRenderer::QComHardwareRenderer( - const sp<ISurface> &surface, - size_t displayWidth, size_t displayHeight, - size_t decodedWidth, size_t decodedHeight) - : mISurface(surface), - mDisplayWidth(displayWidth), - mDisplayHeight(displayHeight), - mDecodedWidth(decodedWidth), - mDecodedHeight(decodedHeight), - mFrameSize((mDecodedWidth * mDecodedHeight * 3) / 2) { - CHECK(mISurface.get() != NULL); - CHECK(mDecodedWidth > 0); - CHECK(mDecodedHeight > 0); -} - -QComHardwareRenderer::~QComHardwareRenderer() { - mISurface->unregisterBuffers(); -} - -void QComHardwareRenderer::render( - const void *data, size_t size, void *platformPrivate) { - size_t offset; - if (!getOffset(platformPrivate, &offset)) { - return; - } - - mISurface->postBuffer(offset); - - // Since we cannot tell how long it'll take until surface flinger - // has displayed the data onscreen, we'll just have to guess... - // We must not return the buffer to the decoder before it's been displayed. - usleep(25000); -} - -bool QComHardwareRenderer::getOffset(void *platformPrivate, size_t *offset) { - *offset = 0; - - PLATFORM_PRIVATE_LIST *list = (PLATFORM_PRIVATE_LIST *)platformPrivate; - for (uint32_t i = 0; i < list->nEntries; ++i) { - if (list->entryList[i].type != PLATFORM_PRIVATE_PMEM) { - continue; - } - - PLATFORM_PRIVATE_PMEM_INFO *info = - (PLATFORM_PRIVATE_PMEM_INFO *)list->entryList[i].entry; - - if (info != NULL) { - if (mMemoryHeap.get() == NULL) { - publishBuffers(info->pmem_fd); - } - - if (mMemoryHeap.get() == NULL) { - return false; - } - - *offset = info->offset; - - return true; - } - } - - return false; -} - -void QComHardwareRenderer::publishBuffers(uint32_t pmem_fd) { - sp<MemoryHeapBase> master = - reinterpret_cast<MemoryHeapBase *>(pmem_fd); - - master->setDevice("/dev/pmem"); - - uint32_t heap_flags = master->getFlags() & MemoryHeapBase::NO_CACHING; - mMemoryHeap = new MemoryHeapPmem(master, heap_flags); - mMemoryHeap->slap(); - - ISurface::BufferHeap bufferHeap( - mDisplayWidth, mDisplayHeight, - mDecodedWidth, mDecodedHeight, - PIXEL_FORMAT_YCbCr_420_SP, - mMemoryHeap); - - status_t err = mISurface->registerBuffers(bufferHeap); - CHECK_EQ(err, OK); -} - -} // namespace android diff --git a/media/libstagefright/omx/SoftwareRenderer.cpp b/media/libstagefright/omx/SoftwareRenderer.cpp index 4ed6869..39de504 100644 --- a/media/libstagefright/omx/SoftwareRenderer.cpp +++ b/media/libstagefright/omx/SoftwareRenderer.cpp @@ -79,7 +79,7 @@ void SoftwareRenderer::render( default: { - LOGW("Cannot render color format %ld", mColorFormat); + LOGW("Cannot render color format %d", mColorFormat); break; } } diff --git a/media/libstagefright/omx/TIHardwareRenderer.cpp b/media/libstagefright/omx/TIHardwareRenderer.cpp deleted file mode 100644 index ebade4a..0000000 --- a/media/libstagefright/omx/TIHardwareRenderer.cpp +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright (C) 2009 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define LOG_TAG "TIHardwareRenderer" -#include <utils/Log.h> - -#include <media/stagefright/TIHardwareRenderer.h> -#include <media/stagefright/MediaDebug.h> -#include <ui/ISurface.h> -#include <ui/Overlay.h> - -#include "v4l2_utils.h" - -#define CACHEABLE_BUFFERS 0x1 - -namespace android { - -//////////////////////////////////////////////////////////////////////////////// - -TIHardwareRenderer::TIHardwareRenderer( - const sp<ISurface> &surface, - size_t displayWidth, size_t displayHeight, - size_t decodedWidth, size_t decodedHeight) - : mISurface(surface), - mDisplayWidth(displayWidth), - mDisplayHeight(displayHeight), - mDecodedWidth(decodedWidth), - mDecodedHeight(decodedHeight), - mFrameSize(mDecodedWidth * mDecodedHeight * 2), - mIsFirstFrame(true), - mIndex(0) { - CHECK(mISurface.get() != NULL); - CHECK(mDecodedWidth > 0); - CHECK(mDecodedHeight > 0); - - sp<OverlayRef> ref = mISurface->createOverlay( - mDisplayWidth, mDisplayHeight, OVERLAY_FORMAT_CbYCrY_422_I); - - if (ref.get() == NULL) { - LOGE("Unable to create the overlay!"); - return; - } - - mOverlay = new Overlay(ref); - mOverlay->setParameter(CACHEABLE_BUFFERS, 0); - - for (size_t i = 0; i < (size_t)mOverlay->getBufferCount(); ++i) { - mapping_data_t *data = - (mapping_data_t *)mOverlay->getBufferAddress((void *)i); - - mOverlayAddresses.push(data->ptr); - } -} - -TIHardwareRenderer::~TIHardwareRenderer() { - if (mOverlay.get() != NULL) { - mOverlay->destroy(); - mOverlay.clear(); - - // XXX apparently destroying an overlay is an asynchronous process... - sleep(1); - } -} - -void TIHardwareRenderer::render( - const void *data, size_t size, void *platformPrivate) { - // CHECK_EQ(size, mFrameSize); - - if (mOverlay.get() == NULL) { - return; - } - -#if 0 - size_t i = 0; - for (; i < mOverlayAddresses.size(); ++i) { - if (mOverlayAddresses[i] == data) { - break; - } - - if (mIsFirstFrame) { - LOGI("overlay buffer #%d: %p", i, mOverlayAddresses[i]); - } - } - - if (i == mOverlayAddresses.size()) { - LOGE("No suitable overlay buffer found."); - return; - } - - mOverlay->queueBuffer((void *)i); - - overlay_buffer_t overlay_buffer; - if (!mIsFirstFrame) { - CHECK_EQ(mOverlay->dequeueBuffer(&overlay_buffer), OK); - } else { - mIsFirstFrame = false; - } -#else - memcpy(mOverlayAddresses[mIndex], data, size); - - mOverlay->queueBuffer((void *)mIndex); - - if (++mIndex == mOverlayAddresses.size()) { - mIndex = 0; - } - - overlay_buffer_t overlay_buffer; - if (!mIsFirstFrame) { - CHECK_EQ(mOverlay->dequeueBuffer(&overlay_buffer), OK); - } else { - mIsFirstFrame = false; - } -#endif -} - -} // namespace android - 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 @@ struct config_management_t { #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 @@ namespace android { // ---------------------------------------------------------------------------- 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.List; 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 @@ class PackageManagerService extends IPackageManager.Stub { return pkg; } - private int cachePackageSharedLibsLI(PackageParser.Package pkg, - File dataPath, File scanFile) { + // 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; + + // 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 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(); + 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; + } - while (entries.hasMoreElements()) { - ZipEntry entry = entries.nextElement(); - if (entry.isDirectory()) { - if (!hasNativeCode && entry.getName().startsWith("lib")) { - hasNativeCode = true; - } - 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; - } - String libFileName = entryName.substring( - apkLibraryDirectory.length()); - if (libFileName.contains("/") - || (!FileUtils.isFilenameSafe(new File(libFileName)))) { - 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); } - - 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/services/java/com/android/server/SystemBackupAgent.java b/services/java/com/android/server/SystemBackupAgent.java index 8903ebd..67abe55 100644 --- a/services/java/com/android/server/SystemBackupAgent.java +++ b/services/java/com/android/server/SystemBackupAgent.java @@ -45,8 +45,16 @@ public class SystemBackupAgent extends BackupHelperAgent { public void onBackup(ParcelFileDescriptor oldState, BackupDataOutput data, ParcelFileDescriptor newState) throws IOException { // We only back up the data under the current "wallpaper" schema with metadata - addHelper("wallpaper", new AbsoluteFileBackupHelper(SystemBackupAgent.this, - new String[] { WALLPAPER_IMAGE, WALLPAPER_INFO })); + WallpaperManagerService wallpaper = (WallpaperManagerService)ServiceManager.getService( + Context.WALLPAPER_SERVICE); + String[] files = new String[] { WALLPAPER_IMAGE, WALLPAPER_INFO }; + if (wallpaper != null && wallpaper.mName != null && wallpaper.mName.length() > 0) { + // When the wallpaper has a name, back up the info by itself. + // TODO: Don't rely on the innards of the service object like this! + // TODO: Send a delete for any stored wallpaper image in this case? + files = new String[] { WALLPAPER_INFO }; + } + addHelper("wallpaper", new AbsoluteFileBackupHelper(SystemBackupAgent.this, files)); super.onBackup(oldState, data, newState); } 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 @@ final class CdmaServiceStateTracker extends ServiceStateTracker { 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 @@ final class CdmaServiceStateTracker extends ServiceStateTracker { super(); this.phone = phone; + cr = phone.getContext().getContentResolver(); cm = phone.mCM; ss = new ServiceState(); newSS = new ServiceState(); @@ -184,12 +186,9 @@ final class CdmaServiceStateTracker extends ServiceStateTracker { 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 @@ final class CdmaServiceStateTracker extends ServiceStateTracker { } 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 @@ final class CdmaServiceStateTracker extends ServiceStateTracker { */ 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 @@ final class CdmaServiceStateTracker extends ServiceStateTracker { 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 @@ final class CdmaServiceStateTracker extends ServiceStateTracker { } 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 class GSMPhone extends PhoneBase { } 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) { diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/FsUtils.java b/tests/DumpRenderTree/src/com/android/dumprendertree/FsUtils.java index 85e0422..fea366c 100644 --- a/tests/DumpRenderTree/src/com/android/dumprendertree/FsUtils.java +++ b/tests/DumpRenderTree/src/com/android/dumprendertree/FsUtils.java @@ -26,6 +26,7 @@ import java.io.File; import java.io.FileOutputStream; import java.io.FileReader; import java.io.IOException; +import java.util.regex.Pattern; public class FsUtils { @@ -121,4 +122,38 @@ public class FsUtils { return url; } + public static boolean diffIgnoreSpaces(String file1, String file2) throws IOException { + BufferedReader br1 = new BufferedReader(new FileReader(file1)); + BufferedReader br2 = new BufferedReader(new FileReader(file2)); + boolean same = true; + Pattern trailingSpace = Pattern.compile("\\s+$"); + + while(true) { + String line1 = br1.readLine(); + String line2 = br2.readLine(); + + if (line1 == null && line2 == null) + break; + if (line1 != null) { + line1 = trailingSpace.matcher(line1).replaceAll(""); + } else { + line1 = ""; + } + if (line2 != null) { + line2 = trailingSpace.matcher(line2).replaceAll(""); + } else { + line2 = ""; + } + if(!line1.equals(line2)) { + same = false; + break; + } + } + + br1.close(); + br2.close(); + + return same; + } + } diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java b/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java index 235e10e..8983612 100644 --- a/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java +++ b/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java @@ -249,28 +249,11 @@ public class LayoutTestsAutoTest extends ActivityInstrumentationTestCase2<TestSh File expected = new File(expectedResultFile); if (actual.exists() && expected.exists()) { try { - boolean passing = true; - BufferedReader fr = new BufferedReader(new FileReader(actual)); - BufferedReader fe = new BufferedReader(new FileReader(expected)); - while (true) { - String s1 = fr.readLine(); - String s2 = fe.readLine(); - if (s1 == null && s2 == null) - break; // both files are the same - if (s1 == null || s2 == null || !s1.equals(s2)) { - passing = false; - break; - } - } - - if (passing) { + if (FsUtils.diffIgnoreSpaces(actualResultFile, expectedResultFile)) { passedCase(testFile); } else { failedCase(testFile); } - - fe.close(); - fr.close(); } catch (FileNotFoundException ex) { Log.e(LOGTAG, "File not found : " + ex.getMessage()); } catch (IOException ex) { |
