diff options
303 files changed, 9044 insertions, 4407 deletions
diff --git a/Android.mk b/Android.mk index d92809a9ab7e..5034c7ef517a 100644 --- a/Android.mk +++ b/Android.mk @@ -208,6 +208,7 @@ aidl_files := \ frameworks/base/core/java/android/accounts/IAccountAuthenticatorResponse.aidl \ frameworks/base/core/java/android/app/Notification.aidl \ frameworks/base/core/java/android/app/PendingIntent.aidl \ + frameworks/base/core/java/android/bluetooth/BluetoothDevice.aidl \ frameworks/base/core/java/android/content/ComponentName.aidl \ frameworks/base/core/java/android/content/Intent.aidl \ frameworks/base/core/java/android/content/IntentSender.aidl \ diff --git a/api/5.xml b/api/5.xml index 614804708a48..73df0cbd1944 100644 --- a/api/5.xml +++ b/api/5.xml @@ -162357,17 +162357,6 @@ visibility="protected" > </field> -<field name="FLAG_USE_CHILD_DRAWING_ORDER" - type="int" - transient="false" - volatile="false" - value="1024" - static="true" - final="true" - deprecated="not deprecated" - visibility="protected" -> -</field> <field name="FOCUS_AFTER_DESCENDANTS" type="int" transient="false" diff --git a/api/current.xml b/api/current.xml index 614804708a48..2cda5bd96bf8 100644 --- a/api/current.xml +++ b/api/current.xml @@ -6389,6 +6389,72 @@ 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" @@ -8776,6 +8842,17 @@ 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" @@ -8798,6 +8875,17 @@ 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" @@ -13804,6 +13892,8 @@ </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" @@ -13853,7 +13943,7 @@ </parameter> <parameter name="authTokenType" type="java.lang.String"> </parameter> -<parameter name="loginOptions" type="android.os.Bundle"> +<parameter name="options" type="android.os.Bundle"> </parameter> <exception name="NetworkErrorException" type="android.accounts.NetworkErrorException"> </exception> @@ -13917,8 +14007,10 @@ </parameter> <parameter name="authTokenType" type="java.lang.String"> </parameter> -<parameter name="loginOptions" type="android.os.Bundle"> +<parameter name="options" type="android.os.Bundle"> </parameter> +<exception name="NetworkErrorException" type="android.accounts.NetworkErrorException"> +</exception> </method> </class> <class name="Account" @@ -14183,7 +14275,7 @@ </parameter> <parameter name="password" type="java.lang.String"> </parameter> -<parameter name="extras" type="android.os.Bundle"> +<parameter name="userdata" type="android.os.Bundle"> </parameter> </method> <method name="addOnAccountsUpdatedListener" @@ -14349,7 +14441,7 @@ </parameter> <parameter name="authTokenType" type="java.lang.String"> </parameter> -<parameter name="loginOptions" type="android.os.Bundle"> +<parameter name="options" type="android.os.Bundle"> </parameter> <parameter name="activity" type="android.app.Activity"> </parameter> @@ -14399,7 +14491,7 @@ </parameter> <parameter name="addAccountOptions" type="android.os.Bundle"> </parameter> -<parameter name="loginOptions" type="android.os.Bundle"> +<parameter name="getAuthTokenOptions" type="android.os.Bundle"> </parameter> <parameter name="callback" type="android.accounts.AccountManagerCallback<android.os.Bundle>"> </parameter> @@ -14568,7 +14660,7 @@ </parameter> <parameter name="authTokenType" type="java.lang.String"> </parameter> -<parameter name="loginOptions" type="android.os.Bundle"> +<parameter name="options" type="android.os.Bundle"> </parameter> <parameter name="activity" type="android.app.Activity"> </parameter> @@ -14966,6 +15058,71 @@ > </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" @@ -24546,6 +24703,208 @@ </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" @@ -24637,6 +24996,17 @@ <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" @@ -24659,6 +25029,29 @@ 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" @@ -24736,6 +25129,17 @@ <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" @@ -79521,6 +79925,17 @@ 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" @@ -79565,6 +79980,17 @@ 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" @@ -99387,6 +99813,17 @@ visibility="public" > </field> +<field name="ECLAIR_MR1" + type="int" + transient="false" + volatile="false" + value="6" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +</field> </class> <class name="Bundle" extends="java.lang.Object" @@ -123015,6 +123452,309 @@ </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="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> +</package> <package name="android.speech" > <class name="RecognizerIntent" @@ -157939,6 +158679,17 @@ 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" @@ -158220,6 +158971,19 @@ <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" @@ -161807,6 +162571,17 @@ 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" @@ -162190,6 +162965,19 @@ <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" @@ -162357,17 +163145,6 @@ visibility="protected" > </field> -<field name="FLAG_USE_CHILD_DRAWING_ORDER" - type="int" - transient="false" - volatile="false" - value="1024" - static="true" - final="true" - deprecated="not deprecated" - visibility="protected" -> -</field> <field name="FOCUS_AFTER_DESCENDANTS" type="int" transient="false" diff --git a/camera/libcameraservice/CameraService.cpp b/camera/libcameraservice/CameraService.cpp index b63e97fdc4a9..29531ca7840c 100644 --- a/camera/libcameraservice/CameraService.cpp +++ b/camera/libcameraservice/CameraService.cpp @@ -309,7 +309,7 @@ status_t CameraService::Client::connect(const sp<ICameraClient>& client) oldClient = mCameraClient; // did the client actually change? - if (client->asBinder() == mCameraClient->asBinder()) { + if ((mCameraClient != NULL) && (client->asBinder() == mCameraClient->asBinder())) { LOGD("Connect to the same client"); return NO_ERROR; } @@ -865,7 +865,11 @@ status_t CameraService::Client::takePicture() } // snapshot taken -void CameraService::Client::handleShutter() +void CameraService::Client::handleShutter( + image_rect_type *size // The width and height of yuv picture for + // registerBuffer. If this is NULL, use the picture + // size from parameters. +) { // Play shutter sound. if (mMediaPlayerClick.get() != NULL) { @@ -878,7 +882,10 @@ void CameraService::Client::handleShutter() mSurface->unregisterBuffers(); } - mCameraClient->notifyCallback(CAMERA_MSG_SHUTTER, 0, 0); + sp<ICameraClient> c = mCameraClient; + if (c != NULL) { + c->notifyCallback(CAMERA_MSG_SHUTTER, 0, 0); + } mHardware->disableMsgType(CAMERA_MSG_SHUTTER); // It takes some time before yuvPicture callback to be called. @@ -886,12 +893,21 @@ void CameraService::Client::handleShutter() if (mSurface != 0 && !mUseOverlay) { int w, h; CameraParameters params(mHardware->getParameters()); - params.getPictureSize(&w, &h); uint32_t transform = 0; if (params.getOrientation() == CameraParameters::CAMERA_ORIENTATION_PORTRAIT) { LOGV("portrait mode"); transform = ISurface::BufferHeap::ROT_90; } + + if (size == NULL) { + params.getPictureSize(&w, &h); + } else { + w = size->width; + h = size->height; + w &= ~1; + h &= ~1; + LOGD("Snapshot image width=%d, height=%d", w, h); + } ISurface::BufferHeap buffers(w, h, w, h, PIXEL_FORMAT_YCbCr_420_SP, transform, 0, mHardware->getRawHeap()); @@ -932,31 +948,38 @@ void CameraService::Client::handlePreviewData(const sp<IMemory>& mem) } } - // Is the callback enabled or not? - if (!(mPreviewCallbackFlag & FRAME_CALLBACK_FLAG_ENABLE_MASK)) { + // local copy of the callback flags + int flags = mPreviewCallbackFlag; + + // is callback enabled? + if (!(flags & FRAME_CALLBACK_FLAG_ENABLE_MASK)) { // If the enable bit is off, the copy-out and one-shot bits are ignored LOGV("frame callback is diabled"); return; } - // Is the received frame copied out or not? - if (mPreviewCallbackFlag & FRAME_CALLBACK_FLAG_COPY_OUT_MASK) { - LOGV("frame is copied out"); - copyFrameAndPostCopiedFrame(heap, offset, size); - } else { - LOGV("frame is directly sent out without copying"); - mCameraClient->dataCallback(CAMERA_MSG_PREVIEW_FRAME, mem); - } + // hold a strong pointer to the client + sp<ICameraClient> c = mCameraClient; - // Is this is one-shot only? - if (mPreviewCallbackFlag & FRAME_CALLBACK_FLAG_ONE_SHOT_MASK) { - LOGV("One-shot only, thus clear the bits and disable frame callback"); + // clear callback flags if no client or one-shot mode + if ((c == NULL) || (mPreviewCallbackFlag & FRAME_CALLBACK_FLAG_ONE_SHOT_MASK)) { + LOGV("Disable preview callback"); mPreviewCallbackFlag &= ~(FRAME_CALLBACK_FLAG_ONE_SHOT_MASK | FRAME_CALLBACK_FLAG_COPY_OUT_MASK | FRAME_CALLBACK_FLAG_ENABLE_MASK); + // TODO: Shouldn't we use this API for non-overlay hardware as well? if (mUseOverlay) mHardware->disableMsgType(CAMERA_MSG_PREVIEW_FRAME); } + + // Is the received frame copied out or not? + if (flags & FRAME_CALLBACK_FLAG_COPY_OUT_MASK) { + LOGV("frame is copied"); + copyFrameAndPostCopiedFrame(c, heap, offset, size); + } else { + LOGV("frame is forwarded"); + c->dataCallback(CAMERA_MSG_PREVIEW_FRAME, mem); + } } // picture callback - postview image ready @@ -972,7 +995,10 @@ void CameraService::Client::handlePostview(const sp<IMemory>& mem) } #endif - mCameraClient->dataCallback(CAMERA_MSG_POSTVIEW_FRAME, mem); + sp<ICameraClient> c = mCameraClient; + if (c != NULL) { + c->dataCallback(CAMERA_MSG_POSTVIEW_FRAME, mem); + } mHardware->disableMsgType(CAMERA_MSG_POSTVIEW_FRAME); } @@ -997,7 +1023,10 @@ void CameraService::Client::handleRawPicture(const sp<IMemory>& mem) mSurface->postBuffer(offset); } - mCameraClient->dataCallback(CAMERA_MSG_RAW_IMAGE, mem); + sp<ICameraClient> c = mCameraClient; + if (c != NULL) { + c->dataCallback(CAMERA_MSG_RAW_IMAGE, mem); + } mHardware->disableMsgType(CAMERA_MSG_RAW_IMAGE); } @@ -1014,7 +1043,10 @@ void CameraService::Client::handleCompressedPicture(const sp<IMemory>& mem) } #endif - mCameraClient->dataCallback(CAMERA_MSG_COMPRESSED_IMAGE, mem); + sp<ICameraClient> c = mCameraClient; + if (c != NULL) { + c->dataCallback(CAMERA_MSG_COMPRESSED_IMAGE, mem); + } mHardware->disableMsgType(CAMERA_MSG_COMPRESSED_IMAGE); } @@ -1029,10 +1061,14 @@ void CameraService::Client::notifyCallback(int32_t msgType, int32_t ext1, int32_ switch (msgType) { case CAMERA_MSG_SHUTTER: - client->handleShutter(); + // ext1 is the dimension of the yuv picture. + client->handleShutter((image_rect_type *)ext1); break; default: - client->mCameraClient->notifyCallback(msgType, ext1, ext2); + sp<ICameraClient> c = client->mCameraClient; + if (c != NULL) { + c->notifyCallback(msgType, ext1, ext2); + } break; } @@ -1053,10 +1089,13 @@ void CameraService::Client::dataCallback(int32_t msgType, const sp<IMemory>& dat return; } + sp<ICameraClient> c = client->mCameraClient; if (dataPtr == NULL) { LOGE("Null data returned in data callback"); - client->mCameraClient->notifyCallback(CAMERA_MSG_ERROR, UNKNOWN_ERROR, 0); - client->mCameraClient->dataCallback(msgType, NULL); + if (c != NULL) { + c->notifyCallback(CAMERA_MSG_ERROR, UNKNOWN_ERROR, 0); + c->dataCallback(msgType, NULL); + } return; } @@ -1074,7 +1113,9 @@ void CameraService::Client::dataCallback(int32_t msgType, const sp<IMemory>& dat client->handleCompressedPicture(dataPtr); break; default: - client->mCameraClient->dataCallback(msgType, dataPtr); + if (c != NULL) { + c->dataCallback(msgType, dataPtr); + } break; } @@ -1095,15 +1136,20 @@ void CameraService::Client::dataCallbackTimestamp(nsecs_t timestamp, int32_t msg if (client == 0) { return; } + sp<ICameraClient> c = client->mCameraClient; if (dataPtr == NULL) { LOGE("Null data returned in data with timestamp callback"); - client->mCameraClient->notifyCallback(CAMERA_MSG_ERROR, UNKNOWN_ERROR, 0); - client->mCameraClient->dataCallbackTimestamp(0, msgType, NULL); + if (c != NULL) { + c->notifyCallback(CAMERA_MSG_ERROR, UNKNOWN_ERROR, 0); + c->dataCallbackTimestamp(0, msgType, NULL); + } return; } - client->mCameraClient->dataCallbackTimestamp(timestamp, msgType, dataPtr); + if (c != NULL) { + c->dataCallbackTimestamp(timestamp, msgType, dataPtr); + } #if DEBUG_CLIENT_REFERENCES if (client->getStrongCount() == 1) { @@ -1161,7 +1207,8 @@ status_t CameraService::Client::sendCommand(int32_t cmd, int32_t arg1, int32_t a return mHardware->sendCommand(cmd, arg1, arg2); } -void CameraService::Client::copyFrameAndPostCopiedFrame(sp<IMemoryHeap> heap, size_t offset, size_t size) +void CameraService::Client::copyFrameAndPostCopiedFrame(const sp<ICameraClient>& client, + const sp<IMemoryHeap>& heap, size_t offset, size_t size) { LOGV("copyFrameAndPostCopiedFrame"); // It is necessary to copy out of pmem before sending this to @@ -1186,7 +1233,7 @@ void CameraService::Client::copyFrameAndPostCopiedFrame(sp<IMemoryHeap> heap, si LOGE("failed to allocate space for frame callback"); return; } - mCameraClient->dataCallback(CAMERA_MSG_PREVIEW_FRAME, frame); + client->dataCallback(CAMERA_MSG_PREVIEW_FRAME, frame); } status_t CameraService::dump(int fd, const Vector<String16>& args) diff --git a/camera/libcameraservice/CameraService.h b/camera/libcameraservice/CameraService.h index 2e3597f113fe..41c5d99faaaa 100644 --- a/camera/libcameraservice/CameraService.h +++ b/camera/libcameraservice/CameraService.h @@ -23,10 +23,9 @@ #include <ui/CameraHardwareInterface.h> #include <ui/Camera.h> -class android::MemoryHeapBase; - namespace android { +class MemoryHeapBase; class MediaPlayer; // ---------------------------------------------------------------------------- @@ -146,12 +145,13 @@ private: static sp<Client> getClientFromCookie(void* user); void handlePreviewData(const sp<IMemory>&); - void handleShutter(); + void handleShutter(image_rect_type *image); void handlePostview(const sp<IMemory>&); void handleRawPicture(const sp<IMemory>&); void handleCompressedPicture(const sp<IMemory>&); - void copyFrameAndPostCopiedFrame(sp<IMemoryHeap> heap, size_t offset, size_t size); + void copyFrameAndPostCopiedFrame(const sp<ICameraClient>& client, + const sp<IMemoryHeap>& heap, size_t offset, size_t size); // camera operation mode enum camera_mode { diff --git a/cmds/dumpstate/dumpstate.c b/cmds/dumpstate/dumpstate.c index ca8660c0ba92..642c943ffd36 100644 --- a/cmds/dumpstate/dumpstate.c +++ b/cmds/dumpstate/dumpstate.c @@ -86,9 +86,9 @@ static void dumpstate(int full) { DUMP("/proc/wakelocks"); PRINT(""); PRINT("------ PROCESSES ------"); - EXEC("ps"); + EXEC1("ps", "-P"); PRINT("------ PROCESSES AND THREADS ------"); - EXEC2("ps", "-t", "-p"); + EXEC3("ps", "-t", "-p", "-P"); PRINT("------ LIBRANK ------"); EXEC_XBIN("librank"); PRINT("------ BINDER FAILED TRANSACTION LOG ------"); @@ -362,4 +362,3 @@ static void dump_kernel_log(const char *path, const char *title) DUMP(path); } } - diff --git a/cmds/dumpstate/dumpstate.h b/cmds/dumpstate/dumpstate.h index 6862e5a3edb4..b99b6d792249 100644 --- a/cmds/dumpstate/dumpstate.h +++ b/cmds/dumpstate/dumpstate.h @@ -61,6 +61,15 @@ run_command(&c, TIMEOUT); \ } +#define EXEC1(cmd, a1) \ +{ \ + static struct Command c = { \ + "/system/bin/" cmd, \ + { cmd, a1, 0 } \ + }; \ + run_command(&c, TIMEOUT); \ +} + #define EXEC2(cmd, a1, a2) \ { \ static struct Command c = { \ @@ -70,6 +79,15 @@ run_command(&c, TIMEOUT); \ } +#define EXEC3(cmd, a1, a2, a3) \ +{ \ + static struct Command c = { \ + "/system/bin/" cmd, \ + { cmd, a1, a2, a3, 0 } \ + }; \ + run_command(&c, TIMEOUT); \ +} + #define EXEC4(cmd, a1, a2, a3, a4) \ { \ static struct Command c = { \ diff --git a/cmds/stagefright/stagefright.cpp b/cmds/stagefright/stagefright.cpp index 5397a697c0c6..4ffc8e437551 100644 --- a/cmds/stagefright/stagefright.cpp +++ b/cmds/stagefright/stagefright.cpp @@ -52,6 +52,13 @@ static int64_t getNowUs() { static void playSource(OMXClient *client, const sp<MediaSource> &source) { sp<MetaData> meta = source->getFormat(); + int32_t durationUnits; + int32_t timeScale; + CHECK(meta->findInt32(kKeyDuration, &durationUnits)); + CHECK(meta->findInt32(kKeyTimeScale, &timeScale)); + + int64_t durationUs = ((int64_t)durationUnits * 1000000) / timeScale; + sp<OMXCodec> decoder = OMXCodec::Create( client->interface(), meta, false /* createEncoder */, source); @@ -61,7 +68,7 @@ static void playSource(OMXClient *client, const sp<MediaSource> &source) { decoder->start(); - if (gReproduceBug == 3) { + if (gReproduceBug >= 3 && gReproduceBug <= 5) { status_t err; MediaBuffer *buffer; MediaSource::ReadOptions options; @@ -76,23 +83,31 @@ static void playSource(OMXClient *client, const sp<MediaSource> &source) { shouldSeek = true; } else { - int32_t units, scale; - CHECK(buffer->meta_data()->findInt32(kKeyTimeUnits, &units)); - CHECK(buffer->meta_data()->findInt32(kKeyTimeScale, &scale)); - int64_t timestamp = ((OMX_TICKS)units * 1000000) / scale; + int32_t timestampUnits; + CHECK(buffer->meta_data()->findInt32(kKeyTimeUnits, ×tampUnits)); + + int64_t timestampUs = ((int64_t)timestampUnits * 1000000) / timeScale; bool failed = false; + if (seekTimeUs >= 0) { - int64_t diff = timestamp - seekTimeUs; + int64_t diff = timestampUs - seekTimeUs; + if (diff < 0) { + diff = -diff; + } + + if ((gReproduceBug == 4 && diff > 500000) + || (gReproduceBug == 5 && timestampUs < 0)) { + printf("wanted: %.2f secs, got: %.2f secs\n", + seekTimeUs / 1E6, timestampUs / 1E6); - if (diff > 500000) { printf("ERROR: "); failed = true; } } printf("buffer has timestamp %lld us (%.2f secs)\n", - timestamp, timestamp / 1E6); + timestampUs, timestampUs / 1E6); buffer->release(); buffer = NULL; @@ -102,13 +117,16 @@ static void playSource(OMXClient *client, const sp<MediaSource> &source) { } shouldSeek = ((double)rand() / RAND_MAX) < 0.1; - shouldSeek = false; + + if (gReproduceBug == 3) { + shouldSeek = false; + } } seekTimeUs = -1; if (shouldSeek) { - seekTimeUs = (rand() * 30E6) / RAND_MAX; + seekTimeUs = (rand() * (float)durationUs) / RAND_MAX; options.setSeekTo(seekTimeUs); printf("seeking to %lld us (%.2f secs)\n", @@ -138,6 +156,7 @@ static void playSource(OMXClient *client, const sp<MediaSource> &source) { if (err != OK) { CHECK_EQ(buffer, NULL); + break; } @@ -264,7 +283,7 @@ int main(int argc, char **argv) { CHECK(service.get() != NULL); - sp<IOMX> omx = service->createOMX(); + sp<IOMX> omx = service->getOMX(); CHECK(omx.get() != NULL); const char *kMimeTypes[] = { @@ -310,11 +329,11 @@ int main(int argc, char **argv) { CHECK(service.get() != NULL); - sp<IOMX> omx = service->createOMX(); + sp<IOMX> omx = service->getOMX(); CHECK(omx.get() != NULL); List<String8> list; - omx->list_nodes(&list); + omx->listNodes(&list); for (List<String8>::iterator it = list.begin(); it != list.end(); ++it) { diff --git a/core/java/android/accounts/AbstractAccountAuthenticator.java b/core/java/android/accounts/AbstractAccountAuthenticator.java index ee6d748ac686..be2bdbefb59d 100644 --- a/core/java/android/accounts/AbstractAccountAuthenticator.java +++ b/core/java/android/accounts/AbstractAccountAuthenticator.java @@ -87,6 +87,9 @@ import android.Manifest; * the {@link AccountAuthenticatorResponse} as {@link AccountManager#KEY_ACCOUNT_MANAGER_RESPONSE}. * The activity must then call {@link AccountAuthenticatorResponse#onResult} or * {@link AccountAuthenticatorResponse#onError} when it is complete. + * <li> If the authenticator cannot synchronously process the request and return a result then it + * may choose to return null and then use the AccountManagerResponse to send the result + * when it has completed the request. * </ul> * <p> * The following descriptions of each of the abstract authenticator methods will not describe the @@ -111,44 +114,35 @@ public abstract class AbstractAccountAuthenticator { String authTokenType, String[] requiredFeatures, Bundle options) throws RemoteException { checkBinderPermission(); - final Bundle result; try { - result = AbstractAccountAuthenticator.this.addAccount( + final Bundle result = AbstractAccountAuthenticator.this.addAccount( new AccountAuthenticatorResponse(response), accountType, authTokenType, requiredFeatures, options); + if (result != null) { + response.onResult(result); + } } catch (NetworkErrorException e) { response.onError(AccountManager.ERROR_CODE_NETWORK_ERROR, e.getMessage()); - return; } catch (UnsupportedOperationException e) { response.onError(AccountManager.ERROR_CODE_UNSUPPORTED_OPERATION, "addAccount not supported"); - return; - } - if (result != null) { - response.onResult(result); - } else { - response.onError(AccountManager.ERROR_CODE_INVALID_RESPONSE, - "no response from the authenticator"); } } public void confirmCredentials(IAccountAuthenticatorResponse response, Account account, Bundle options) throws RemoteException { checkBinderPermission(); - final Bundle result; try { - result = AbstractAccountAuthenticator.this.confirmCredentials( + final Bundle result = AbstractAccountAuthenticator.this.confirmCredentials( new AccountAuthenticatorResponse(response), account, options); + if (result != null) { + response.onResult(result); + } + } catch (NetworkErrorException e) { + response.onError(AccountManager.ERROR_CODE_NETWORK_ERROR, e.getMessage()); } catch (UnsupportedOperationException e) { response.onError(AccountManager.ERROR_CODE_UNSUPPORTED_OPERATION, "confirmCredentials not supported"); - return; - } - if (result != null) { - response.onResult(result); - } else { - response.onError(AccountManager.ERROR_CODE_INVALID_RESPONSE, - "no response from the authenticator"); } } @@ -180,9 +174,6 @@ public abstract class AbstractAccountAuthenticator { authTokenType, loginOptions); if (result != null) { response.onResult(result); - } else { - response.onError(AccountManager.ERROR_CODE_INVALID_RESPONSE, - "no response from the authenticator"); } } catch (UnsupportedOperationException e) { response.onError(AccountManager.ERROR_CODE_UNSUPPORTED_OPERATION, @@ -195,64 +186,50 @@ public abstract class AbstractAccountAuthenticator { public void updateCredentials(IAccountAuthenticatorResponse response, Account account, String authTokenType, Bundle loginOptions) throws RemoteException { checkBinderPermission(); - final Bundle result; try { - result = AbstractAccountAuthenticator.this.updateCredentials( + final Bundle result = AbstractAccountAuthenticator.this.updateCredentials( new AccountAuthenticatorResponse(response), account, authTokenType, loginOptions); + if (result != null) { + response.onResult(result); + } + } catch (NetworkErrorException e) { + response.onError(AccountManager.ERROR_CODE_NETWORK_ERROR, e.getMessage()); } catch (UnsupportedOperationException e) { response.onError(AccountManager.ERROR_CODE_UNSUPPORTED_OPERATION, "updateCredentials not supported"); - return; - } - if (result != null) { - response.onResult(result); - } else { - response.onError(AccountManager.ERROR_CODE_INVALID_RESPONSE, - "no response from the authenticator"); } } public void editProperties(IAccountAuthenticatorResponse response, String accountType) throws RemoteException { checkBinderPermission(); - final Bundle result; try { - result = AbstractAccountAuthenticator.this.editProperties( + final Bundle result = AbstractAccountAuthenticator.this.editProperties( new AccountAuthenticatorResponse(response), accountType); + if (result != null) { + response.onResult(result); + } } catch (UnsupportedOperationException e) { response.onError(AccountManager.ERROR_CODE_UNSUPPORTED_OPERATION, "editProperties not supported"); - return; - } - if (result != null) { - response.onResult(result); - } else { - response.onError(AccountManager.ERROR_CODE_INVALID_RESPONSE, - "no response from the authenticator"); } } public void hasFeatures(IAccountAuthenticatorResponse response, Account account, String[] features) throws RemoteException { checkBinderPermission(); - final Bundle result; try { - result = AbstractAccountAuthenticator.this.hasFeatures( + final Bundle result = AbstractAccountAuthenticator.this.hasFeatures( new AccountAuthenticatorResponse(response), account, features); + if (result != null) { + response.onResult(result); + } } catch (UnsupportedOperationException e) { response.onError(AccountManager.ERROR_CODE_UNSUPPORTED_OPERATION, "hasFeatures not supported"); - return; } catch (NetworkErrorException e) { response.onError(AccountManager.ERROR_CODE_NETWORK_ERROR, e.getMessage()); - return; - } - if (result != null) { - response.onResult(result); - } else { - response.onError(AccountManager.ERROR_CODE_INVALID_RESPONSE, - "no response from the authenticator"); } } @@ -264,9 +241,6 @@ public abstract class AbstractAccountAuthenticator { new AccountAuthenticatorResponse(response), account); if (result != null) { response.onResult(result); - } else { - response.onError(AccountManager.ERROR_CODE_INVALID_RESPONSE, - "no response from the authenticator"); } } catch (UnsupportedOperationException e) { response.onError(AccountManager.ERROR_CODE_UNSUPPORTED_OPERATION, @@ -347,16 +321,18 @@ public abstract class AbstractAccountAuthenticator { * <li> {@link AccountManager#KEY_ERROR_CODE} and {@link AccountManager#KEY_ERROR_MESSAGE} to * indicate an error * </ul> + * @throws NetworkErrorException if the authenticator could not honor the request due to a + * network error */ public abstract Bundle confirmCredentials(AccountAuthenticatorResponse response, - Account account, Bundle options); - + Account account, Bundle options) + throws NetworkErrorException; /** * Gets the authtoken for an account. * @param response to send the result back to the AccountManager, will never be null * @param account the account whose credentials are to be retrieved, will never be null * @param authTokenType the type of auth token to retrieve, will never be null - * @param loginOptions a Bundle of authenticator-specific options, may be null + * @param options a Bundle of authenticator-specific options, may be null * @return a Bundle result or null if the result is to be returned via the response. The result * will contain either: * <ul> @@ -370,7 +346,7 @@ public abstract class AbstractAccountAuthenticator { * network error */ public abstract Bundle getAuthToken(AccountAuthenticatorResponse response, - Account account, String authTokenType, Bundle loginOptions) + Account account, String authTokenType, Bundle options) throws NetworkErrorException; /** @@ -386,7 +362,7 @@ public abstract class AbstractAccountAuthenticator { * @param account the account whose credentials are to be updated, will never be null * @param authTokenType the type of auth token to retrieve after updating the credentials, * may be null - * @param loginOptions a Bundle of authenticator-specific options, may be null + * @param options a Bundle of authenticator-specific options, may be null * @return a Bundle result or null if the result is to be returned via the response. The result * will contain either: * <ul> @@ -397,9 +373,11 @@ public abstract class AbstractAccountAuthenticator { * <li> {@link AccountManager#KEY_ERROR_CODE} and {@link AccountManager#KEY_ERROR_MESSAGE} to * indicate an error * </ul> + * @throws NetworkErrorException if the authenticator could not honor the request due to a + * network error */ public abstract Bundle updateCredentials(AccountAuthenticatorResponse response, - Account account, String authTokenType, Bundle loginOptions); + Account account, String authTokenType, Bundle options) throws NetworkErrorException; /** * Checks if the account supports all the specified authenticator specific features. diff --git a/core/java/android/accounts/AccountAuthenticatorActivity.java b/core/java/android/accounts/AccountAuthenticatorActivity.java index 3d7be481c75d..5cce6da6d0ca 100644 --- a/core/java/android/accounts/AccountAuthenticatorActivity.java +++ b/core/java/android/accounts/AccountAuthenticatorActivity.java @@ -56,14 +56,8 @@ public class AccountAuthenticatorActivity extends Activity { protected void onCreate(Bundle icicle) { super.onCreate(icicle); - if (icicle == null) { - Intent intent = getIntent(); - mAccountAuthenticatorResponse = - intent.getParcelableExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE); - } else { - mAccountAuthenticatorResponse = - icicle.getParcelable(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE); - } + mAccountAuthenticatorResponse = + getIntent().getParcelableExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE); if (mAccountAuthenticatorResponse != null) { mAccountAuthenticatorResponse.onRequestContinued(); @@ -71,16 +65,6 @@ public class AccountAuthenticatorActivity extends Activity { } /** - * Saves the AccountAuthenticatorResponse in the instance state. - * @param outState where to store any instance data - */ - protected void onSaveInstanceState(Bundle outState) { - outState.putParcelable(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE, - mAccountAuthenticatorResponse); - super.onSaveInstanceState(outState); - } - - /** * Sends the result or a Constants.ERROR_CODE_CANCELED error if a result isn't present. */ public void finish() { @@ -89,7 +73,8 @@ public class AccountAuthenticatorActivity extends Activity { if (mResultBundle != null) { mAccountAuthenticatorResponse.onResult(mResultBundle); } else { - mAccountAuthenticatorResponse.onError(AccountManager.ERROR_CODE_CANCELED, "canceled"); + mAccountAuthenticatorResponse.onError(AccountManager.ERROR_CODE_CANCELED, + "canceled"); } mAccountAuthenticatorResponse = null; } diff --git a/core/java/android/accounts/AccountManager.java b/core/java/android/accounts/AccountManager.java index 153d95f559b4..9765496762c0 100644 --- a/core/java/android/accounts/AccountManager.java +++ b/core/java/android/accounts/AccountManager.java @@ -237,13 +237,13 @@ public class AccountManager { * with the same UID as the Authenticator for the account. * @param account The account to add * @param password The password to associate with the account. May be null. - * @param extras A bundle of key/value pairs to set as the account's userdata. May be null. + * @param userdata A bundle of key/value pairs to set as the account's userdata. May be null. * @return true if the account was sucessfully added, false otherwise, for example, * if the account already exists or if the account is null */ - public boolean addAccountExplicitly(Account account, String password, Bundle extras) { + public boolean addAccountExplicitly(Account account, String password, Bundle userdata) { try { - return mService.addAccount(account, password, extras); + return mService.addAccount(account, password, userdata); } catch (RemoteException e) { // won't ever happen throw new RuntimeException(e); @@ -320,6 +320,13 @@ public class AccountManager { * AccountManager, null otherwise. */ public String peekAuthToken(final Account account, final String authTokenType) { + if (account == null) { + Log.e(TAG, "peekAuthToken: the account must not be null"); + return null; + } + if (authTokenType == null) { + return null; + } try { return mService.peekAuthToken(account, authTokenType); } catch (RemoteException e) { @@ -339,6 +346,10 @@ public class AccountManager { * @param password the password to set for the account. May be null. */ public void setPassword(final Account account, final String password) { + if (account == null) { + Log.e(TAG, "the account must not be null"); + return; + } try { mService.setPassword(account, password); } catch (RemoteException e) { @@ -355,6 +366,10 @@ public class AccountManager { * @param account the account whose password is to be cleared. Must not be null. */ public void clearPassword(final Account account) { + if (account == null) { + Log.e(TAG, "the account must not be null"); + return; + } try { mService.clearPassword(account); } catch (RemoteException e) { @@ -375,6 +390,14 @@ public class AccountManager { * @param value the value to set. May be null. */ public void setUserData(final Account account, final String key, final String value) { + if (account == null) { + Log.e(TAG, "the account must not be null"); + return; + } + if (key == null) { + Log.e(TAG, "the key must not be null"); + return; + } try { mService.setUserData(account, key, value); } catch (RemoteException e) { @@ -458,7 +481,7 @@ public class AccountManager { * @param account The account whose credentials are to be updated. * @param authTokenType the auth token to retrieve as part of updating the credentials. * May be null. - * @param loginOptions authenticator specific options for the request + * @param options authenticator specific options for the request * @param activity If the authenticator returns a {@link #KEY_INTENT} in the result then * the intent will be started with this activity. If activity is null then the result will * be returned as-is. @@ -474,7 +497,7 @@ public class AccountManager { * If the user presses "back" then the request will be canceled. */ public AccountManagerFuture<Bundle> getAuthToken( - final Account account, final String authTokenType, final Bundle loginOptions, + final Account account, final String authTokenType, final Bundle options, final Activity activity, AccountManagerCallback<Bundle> callback, Handler handler) { if (activity == null) throw new IllegalArgumentException("activity is null"); if (authTokenType == null) throw new IllegalArgumentException("authTokenType is null"); @@ -482,7 +505,7 @@ public class AccountManager { public void doWork() throws RemoteException { mService.getAuthToken(mResponse, account, authTokenType, false /* notifyOnAuthFailure */, true /* expectActivityLaunch */, - loginOptions); + options); } }.start(); } @@ -586,6 +609,12 @@ public class AccountManager { final Activity activity, AccountManagerCallback<Bundle> callback, Handler handler) { return new AmsTask(activity, handler, callback) { public void doWork() throws RemoteException { + if (accountType == null) { + Log.e(TAG, "the account must not be null"); + // to unblock caller waiting on Future.get() + set(new Bundle()); + return; + } mService.addAcount(mResponse, accountType, authTokenType, requiredFeatures, activity != null, addAccountOptions); } @@ -595,9 +624,13 @@ public class AccountManager { public AccountManagerFuture<Account[]> getAccountsByTypeAndFeatures( final String type, final String[] features, AccountManagerCallback<Account[]> callback, Handler handler) { - if (type == null) throw new IllegalArgumentException("type is null"); return new Future2Task<Account[]>(handler, callback) { public void doWork() throws RemoteException { + if (type == null) { + Log.e(TAG, "Type is null"); + set(new Account[0]); + return; + } mService.getAccountsByFeatures(mResponse, type, features); } public Account[] bundleToResult(Bundle bundle) throws AuthenticatorException { @@ -683,7 +716,7 @@ public class AccountManager { * @param account The account whose credentials are to be updated. * @param authTokenType the auth token to retrieve as part of updating the credentials. * May be null. - * @param loginOptions authenticator specific options for the request + * @param options authenticator specific options for the request * @param activity If the authenticator returns a {@link #KEY_INTENT} in the result then * the intent will be started with this activity. If activity is null then the result will * be returned as-is. @@ -702,13 +735,13 @@ public class AccountManager { */ public AccountManagerFuture<Bundle> updateCredentials(final Account account, final String authTokenType, - final Bundle loginOptions, final Activity activity, + final Bundle options, final Activity activity, final AccountManagerCallback<Bundle> callback, final Handler handler) { return new AmsTask(activity, handler, callback) { public void doWork() throws RemoteException { mService.updateCredentials(mResponse, account, authTokenType, activity != null, - loginOptions); + options); } }.start(); } @@ -764,7 +797,7 @@ public class AccountManager { //noinspection ThrowableInstanceNeverThrow // Log.e(TAG, "calling this from your main thread can lead to deadlock and/or ANRs", // new Exception()); - // TODO(fredq) remove the log and throw this exception when the callers are fixed + // TODO remove the log and throw this exception when the callers are fixed // throw new IllegalStateException( // "calling this from your main thread can lead to deadlock"); } @@ -1214,7 +1247,7 @@ public class AccountManager { * @param activityForPrompting The activity used to start any account management * activities that are required to fulfill this request. This may be null. * @param addAccountOptions authenticator-specific options used if an account needs to be added - * @param loginOptions authenticator-specific options passed to getAuthToken + * @param getAuthTokenOptions authenticator-specific options passed to getAuthToken * @param callback A callback to invoke when the request completes. If null then * no callback is invoked. * @param handler The {@link Handler} to use to invoke the callback. If null then the @@ -1232,13 +1265,13 @@ public class AccountManager { public AccountManagerFuture<Bundle> getAuthTokenByFeatures( final String accountType, final String authTokenType, final String[] features, final Activity activityForPrompting, final Bundle addAccountOptions, - final Bundle loginOptions, + final Bundle getAuthTokenOptions, final AccountManagerCallback<Bundle> callback, final Handler handler) { if (accountType == null) throw new IllegalArgumentException("account type is null"); if (authTokenType == null) throw new IllegalArgumentException("authTokenType is null"); final GetAuthTokenByTypeAndFeaturesTask task = new GetAuthTokenByTypeAndFeaturesTask(accountType, authTokenType, features, - activityForPrompting, addAccountOptions, loginOptions, callback, handler); + activityForPrompting, addAccountOptions, getAuthTokenOptions, callback, handler); task.start(); return task; } @@ -1317,11 +1350,13 @@ public class AccountManager { */ public void removeOnAccountsUpdatedListener(OnAccountsUpdateListener listener) { if (listener == null) { - throw new IllegalArgumentException("the listener is null"); + Log.e(TAG, "Missing listener"); + return; } synchronized (mAccountsUpdatedListeners) { if (!mAccountsUpdatedListeners.containsKey(listener)) { - throw new IllegalStateException("this listener was not previously added"); + Log.e(TAG, "Listener was not previously added"); + return; } mAccountsUpdatedListeners.remove(listener); if (mAccountsUpdatedListeners.isEmpty()) { diff --git a/core/java/android/accounts/AccountManagerResponse.java b/core/java/android/accounts/AccountManagerResponse.java index 25371fd9cbb5..1cd6a74973bd 100644 --- a/core/java/android/accounts/AccountManagerResponse.java +++ b/core/java/android/accounts/AccountManagerResponse.java @@ -22,16 +22,17 @@ import android.os.Parcelable; import android.os.RemoteException; /** - * Object that wraps calls to an {@link android.accounts.IAccountManagerResponse} object. - * @hide + * Used by Account Authenticators to return a response. */ public class AccountManagerResponse implements Parcelable { private IAccountManagerResponse mResponse; + /** @hide */ public AccountManagerResponse(IAccountManagerResponse response) { mResponse = response; } + /** @hide */ public AccountManagerResponse(Parcel parcel) { mResponse = IAccountManagerResponse.Stub.asInterface(parcel.readStrongBinder()); @@ -53,14 +54,17 @@ public class AccountManagerResponse implements Parcelable { } } + /** @hide */ public int describeContents() { return 0; } + /** @hide */ public void writeToParcel(Parcel dest, int flags) { dest.writeStrongBinder(mResponse.asBinder()); } + /** @hide */ public static final Creator<AccountManagerResponse> CREATOR = new Creator<AccountManagerResponse>() { public AccountManagerResponse createFromParcel(Parcel source) { @@ -71,4 +75,4 @@ public class AccountManagerResponse implements Parcelable { return new AccountManagerResponse[size]; } }; -}
\ No newline at end of file +} diff --git a/core/java/android/accounts/AccountManagerService.java b/core/java/android/accounts/AccountManagerService.java index 3a11cb337b37..4f59c4e67edd 100644 --- a/core/java/android/accounts/AccountManagerService.java +++ b/core/java/android/accounts/AccountManagerService.java @@ -154,6 +154,7 @@ public class AccountManagerService private static final boolean isDebuggableMonkeyBuild = SystemProperties.getBoolean("ro.monkey", false) && SystemProperties.getBoolean("ro.debuggable", false); + private static final Account[] EMPTY_ACCOUNT_ARRAY = new Account[]{}; static { ACCOUNTS_CHANGED_INTENT = new Intent(AccountManager.LOGIN_ACCOUNTS_CHANGED_ACTION); @@ -268,6 +269,10 @@ public class AccountManagerService } private String readPasswordFromDatabase(Account account) { + if (account == null) { + return null; + } + SQLiteDatabase db = mOpenHelper.getReadableDatabase(); Cursor cursor = db.query(TABLE_ACCOUNTS, new String[]{ACCOUNTS_PASSWORD}, ACCOUNTS_NAME + "=? AND " + ACCOUNTS_TYPE+ "=?", @@ -293,6 +298,10 @@ public class AccountManagerService } private String readUserDataFromDatabase(Account account, String key) { + if (account == null) { + return null; + } + SQLiteDatabase db = mOpenHelper.getReadableDatabase(); Cursor cursor = db.query(TABLE_EXTRAS, new String[]{EXTRAS_VALUE}, EXTRAS_ACCOUNTS_ID @@ -364,6 +373,9 @@ public class AccountManagerService SQLiteDatabase db = mOpenHelper.getWritableDatabase(); db.beginTransaction(); try { + if (account == null) { + return false; + } boolean noBroadcast = false; if (account.type.equals(GOOGLE_ACCOUNT_TYPE)) { // Look for the 'nobroadcast' flag and remove it since we don't want it to persist @@ -513,6 +525,9 @@ public class AccountManagerService } private boolean saveAuthTokenToDatabase(Account account, String type, String authToken) { + if (account == null || type == null) { + return false; + } cancelNotification(getSigninRequiredNotificationId(account)); SQLiteDatabase db = mOpenHelper.getWritableDatabase(); db.beginTransaction(); @@ -539,6 +554,9 @@ public class AccountManagerService } public String readAuthTokenFromDatabase(Account account, String authTokenType) { + if (account == null || authTokenType == null) { + return null; + } SQLiteDatabase db = mOpenHelper.getReadableDatabase(); Cursor cursor = db.query(TABLE_AUTHTOKENS, new String[]{AUTHTOKENS_AUTHTOKEN}, AUTHTOKENS_ACCOUNTS_ID + "=(select _id FROM accounts WHERE name=? AND type=?) AND " @@ -586,6 +604,9 @@ public class AccountManagerService } private void setPasswordInDB(Account account, String password) { + if (account == null) { + return; + } ContentValues values = new ContentValues(); values.put(ACCOUNTS_PASSWORD, password); mOpenHelper.getWritableDatabase().update(TABLE_ACCOUNTS, values, @@ -608,23 +629,12 @@ public class AccountManagerService } } - private void sendResult(IAccountManagerResponse response, Bundle bundle) { - if (response != null) { - try { - response.onResult(bundle); - } catch (RemoteException e) { - // if the caller is dead then there is no one to care about remote - // exceptions - if (Log.isLoggable(TAG, Log.VERBOSE)) { - Log.v(TAG, "failure while notifying response", e); - } - } - } - } - public void setUserData(Account account, String key, String value) { checkAuthenticateAccountsPermission(account); long identityToken = clearCallingIdentity(); + if (account == null) { + return; + } if (account.type.equals(GOOGLE_ACCOUNT_TYPE) && key.equals("broadcast")) { sendAccountsChangedBroadcast(); return; @@ -637,6 +647,9 @@ public class AccountManagerService } private void writeUserdataIntoDatabase(Account account, String key, String value) { + if (account == null || key == null) { + return; + } SQLiteDatabase db = mOpenHelper.getWritableDatabase(); db.beginTransaction(); try { @@ -1565,8 +1578,10 @@ public class AccountManagerService } private boolean permissionIsGranted(Account account, String authTokenType, int callerUid) { - final boolean fromAuthenticator = hasAuthenticatorUid(account.type, callerUid); - final boolean hasExplicitGrants = hasExplicitlyGrantedPermission(account, authTokenType); + final boolean fromAuthenticator = account != null + && hasAuthenticatorUid(account.type, callerUid); + final boolean hasExplicitGrants = account != null + && hasExplicitlyGrantedPermission(account, authTokenType); if (Log.isLoggable(TAG, Log.VERBOSE)) { Log.v(TAG, "checkGrantsOrCallingUidAgainstAuthenticator: caller uid " + callerUid + ", account " + account @@ -1610,7 +1625,7 @@ public class AccountManagerService private void checkCallingUidAgainstAuthenticator(Account account) { final int uid = Binder.getCallingUid(); - if (!hasAuthenticatorUid(account.type, uid)) { + if (account == null || !hasAuthenticatorUid(account.type, uid)) { String msg = "caller uid " + uid + " is different than the authenticator's uid"; Log.w(TAG, msg); throw new SecurityException(msg); @@ -1641,6 +1656,9 @@ public class AccountManagerService * @hide */ public void grantAppPermission(Account account, String authTokenType, int uid) { + if (account == null || authTokenType == null) { + return; + } SQLiteDatabase db = mOpenHelper.getWritableDatabase(); db.beginTransaction(); try { @@ -1668,6 +1686,9 @@ public class AccountManagerService * @hide */ public void revokeAppPermission(Account account, String authTokenType, int uid) { + if (account == null || authTokenType == null) { + return; + } SQLiteDatabase db = mOpenHelper.getWritableDatabase(); db.beginTransaction(); try { diff --git a/core/java/android/app/SearchDialog.java b/core/java/android/app/SearchDialog.java index 697ac7654f94..8faef59bab25 100644 --- a/core/java/android/app/SearchDialog.java +++ b/core/java/android/app/SearchDialog.java @@ -96,6 +96,10 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS // The extra key used in an intent to the speech recognizer for in-app voice search. private static final String EXTRA_CALLING_PACKAGE = "calling_package"; + + // The string used for privateImeOptions to identify to the IME that it should not show + // a microphone button since one already exists in the search dialog. + private static final String IME_OPTION_NO_MICROPHONE = "nm"; private static final int SEARCH_PLATE_LEFT_PADDING_GLOBAL = 12; private static final int SEARCH_PLATE_LEFT_PADDING_NON_GLOBAL = 7; @@ -543,6 +547,14 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS mSearchAutoComplete.setInputType(inputType); mSearchAutoCompleteImeOptions = mSearchable.getImeOptions(); mSearchAutoComplete.setImeOptions(mSearchAutoCompleteImeOptions); + + // If the search dialog is going to show a voice search button, then don't let + // the soft keyboard display a microphone button if it would have otherwise. + if (mSearchable.getVoiceSearchEnabled()) { + mSearchAutoComplete.setPrivateImeOptions(IME_OPTION_NO_MICROPHONE); + } else { + mSearchAutoComplete.setPrivateImeOptions(null); + } } } diff --git a/core/java/android/app/WallpaperInfo.java b/core/java/android/app/WallpaperInfo.java index 587e8f9bc656..34d3133bdf05 100644 --- a/core/java/android/app/WallpaperInfo.java +++ b/core/java/android/app/WallpaperInfo.java @@ -5,10 +5,10 @@ import org.xmlpull.v1.XmlPullParserException; import android.content.ComponentName; import android.content.Context; -import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.content.pm.ServiceInfo; +import android.content.res.Resources.NotFoundException; import android.content.res.TypedArray; import android.content.res.XmlResourceParser; import android.graphics.drawable.Drawable; @@ -23,7 +23,6 @@ import java.io.IOException; /** * This class is used to specify meta information of a wallpaper service. - * @hide Live Wallpaper */ public final class WallpaperInfo implements Parcelable { static final String TAG = "WallpaperInfo"; @@ -45,6 +44,16 @@ public final class WallpaperInfo implements Parcelable { final int mThumbnailResource; /** + * Resource identifier for a string indicating the author of the wallpaper. + */ + final int mAuthorResource; + + /** + * Resource identifier for a string containing a short description of the wallpaper. + */ + final int mDescriptionResource; + + /** * Constructor. * * @param context The Context in which we are parsing the wallpaper. @@ -59,6 +68,8 @@ public final class WallpaperInfo implements Parcelable { PackageManager pm = context.getPackageManager(); String settingsActivityComponent = null; int thumbnailRes = -1; + int authorRes = -1; + int descriptionRes = -1; XmlResourceParser parser = null; try { @@ -89,6 +100,12 @@ public final class WallpaperInfo implements Parcelable { thumbnailRes = sa.getResourceId( com.android.internal.R.styleable.Wallpaper_thumbnail, -1); + authorRes = sa.getResourceId( + com.android.internal.R.styleable.Wallpaper_wallpaperAuthor, + -1); + descriptionRes = sa.getResourceId( + com.android.internal.R.styleable.Wallpaper_wallpaperDescription, + -1); sa.recycle(); } finally { @@ -97,11 +114,15 @@ public final class WallpaperInfo implements Parcelable { mSettingsActivityName = settingsActivityComponent; mThumbnailResource = thumbnailRes; + mAuthorResource = authorRes; + mDescriptionResource = descriptionRes; } WallpaperInfo(Parcel source) { mSettingsActivityName = source.readString(); mThumbnailResource = source.readInt(); + mAuthorResource = source.readInt(); + mDescriptionResource = source.readInt(); mService = ResolveInfo.CREATOR.createFromParcel(source); } @@ -169,6 +190,32 @@ public final class WallpaperInfo implements Parcelable { mThumbnailResource, null); } + + /** + * Return a string indicating the author(s) of this wallpaper. + */ + public CharSequence loadAuthor(PackageManager pm) throws NotFoundException { + if (mAuthorResource <= 0) throw new NotFoundException(); + return pm.getText( + (mService.resolvePackageName != null) + ? mService.resolvePackageName + : getPackageName(), + mAuthorResource, + null); + } + + /** + * Return a brief summary of this wallpaper's behavior. + */ + public CharSequence loadDescription(PackageManager pm) throws NotFoundException { + if (mDescriptionResource <= 0) throw new NotFoundException(); + return pm.getText( + (mService.resolvePackageName != null) + ? mService.resolvePackageName + : getPackageName(), + mDescriptionResource, + null); + } /** * Return the class name of an activity that provides a settings UI for @@ -206,6 +253,8 @@ public final class WallpaperInfo implements Parcelable { public void writeToParcel(Parcel dest, int flags) { dest.writeString(mSettingsActivityName); dest.writeInt(mThumbnailResource); + dest.writeInt(mAuthorResource); + dest.writeInt(mDescriptionResource); mService.writeToParcel(dest, flags); } diff --git a/core/java/android/app/WallpaperManager.java b/core/java/android/app/WallpaperManager.java index 69c87ee48967..66a3396a4815 100644 --- a/core/java/android/app/WallpaperManager.java +++ b/core/java/android/app/WallpaperManager.java @@ -57,7 +57,6 @@ public class WallpaperManager { /** * Launch an activity for the user to pick the current global live * wallpaper. - * @hide Live Wallpaper */ public static final String ACTION_LIVE_WALLPAPER_CHOOSER = "android.service.wallpaper.LIVE_WALLPAPER_CHOOSER"; @@ -395,7 +394,6 @@ public class WallpaperManager { * If the current wallpaper is a live wallpaper component, return the * information about that wallpaper. Otherwise, if it is a static image, * simply return null. - * @hide Live Wallpaper */ public WallpaperInfo getWallpaperInfo() { try { @@ -592,6 +590,31 @@ public class WallpaperManager { } /** + * Send an arbitrary command to the current active wallpaper. + * + * @param windowToken The window who these offsets should be associated + * with, as returned by {@link android.view.View#getWindowToken() + * View.getWindowToken()}. + * @param action Name of the command to perform. This must be a scoped + * name to avoid collisions, such as "com.mycompany.wallpaper.DOIT". + * @param x Arbitrary integer argument based on command. + * @param y Arbitrary integer argument based on command. + * @param z Arbitrary integer argument based on command. + * @param extras Optional additional information for the command, or null. + */ + public void sendWallpaperCommand(IBinder windowToken, String action, + int x, int y, int z, Bundle extras) { + try { + //Log.v(TAG, "Sending new wallpaper offsets from app..."); + ViewRoot.getWindowSession(mContext.getMainLooper()).sendWallpaperCommand( + windowToken, action, x, y, z, extras, false); + //Log.v(TAG, "...app returning after sending offsets!"); + } catch (RemoteException e) { + // Ignore. + } + } + + /** * Clear the offsets previously associated with this window through * {@link #setWallpaperOffsets(IBinder, float, float)}. This reverts * the window to its default state, where it does not cause the wallpaper diff --git a/core/java/android/appwidget/AppWidgetHostView.java b/core/java/android/appwidget/AppWidgetHostView.java index a4c141ebfdf6..2f719f3c5bd7 100644 --- a/core/java/android/appwidget/AppWidgetHostView.java +++ b/core/java/android/appwidget/AppWidgetHostView.java @@ -123,7 +123,15 @@ public class AppWidgetHostView extends FrameLayout { @Override protected void dispatchRestoreInstanceState(SparseArray<Parcelable> container) { - final ParcelableSparseArray jail = (ParcelableSparseArray) container.get(generateId()); + final Parcelable parcelable = container.get(generateId()); + + ParcelableSparseArray jail = null; + if (parcelable != null && parcelable instanceof ParcelableSparseArray) { + jail = (ParcelableSparseArray) parcelable; + } + + if (jail == null) jail = new ParcelableSparseArray(); + super.dispatchRestoreInstanceState(jail); } @@ -139,7 +147,7 @@ public class AppWidgetHostView extends FrameLayout { /** * Process a set of {@link RemoteViews} coming in as an update from the - * AppWidget provider. Will animate into these new views as needed. + * AppWidget provider. Will animate into these new views as needed */ public void updateAppWidget(RemoteViews remoteViews) { if (LOGD) Log.d(TAG, "updateAppWidget called mOld=" + mOld); diff --git a/core/java/android/bluetooth/BluetoothAdapter.java b/core/java/android/bluetooth/BluetoothAdapter.java index ff48583a8030..3fc676b271f2 100644 --- a/core/java/android/bluetooth/BluetoothAdapter.java +++ b/core/java/android/bluetooth/BluetoothAdapter.java @@ -597,14 +597,6 @@ public final class BluetoothAdapter { /** * Picks RFCOMM channels until none are left. * Avoids reserved channels. - * Ideally we would pick random channels, but in the current implementation - * we start with the channel that is the hash of the UUID, and try every - * available channel from there. This means that in most cases a given - * uuid will use the same channel. This is a workaround for a Bluez SDP - * bug where we are not updating the cache when the channel changes for a - * uuid. - * TODO: Fix the Bluez SDP caching bug, and go back to random channel - * selection */ private static class RfcommChannelPicker { private static final int[] RESERVED_RFCOMM_CHANNELS = new int[] { @@ -637,19 +629,12 @@ public final class BluetoothAdapter { } mUuid = uuid; } - /* Returns next channel, or -1 if we're out */ + /* Returns next random channel, or -1 if we're out */ public int nextChannel() { - int channel = mUuid.hashCode(); // always pick the same channel to try first - Integer channelInt; - while (mChannels.size() > 0) { - channelInt = new Integer(channel); - if (mChannels.remove(channelInt)) { - return channel; - } - channel = (channel % BluetoothSocket.MAX_RFCOMM_CHANNEL) + 1; + if (mChannels.size() == 0) { + return -1; } - - return -1; + return mChannels.remove(sRandom.nextInt(mChannels.size())); } } diff --git a/core/java/android/content/ContentProviderOperation.java b/core/java/android/content/ContentProviderOperation.java index 60b406d36467..ca36df2fbebb 100644 --- a/core/java/android/content/ContentProviderOperation.java +++ b/core/java/android/content/ContentProviderOperation.java @@ -545,7 +545,12 @@ public class ContentProviderOperation implements Parcelable { "only updates, deletes, and asserts can have selections"); } mSelection = selection; - mSelectionArgs = selectionArgs; + if (selectionArgs == null) { + mSelectionArgs = null; + } else { + mSelectionArgs = new String[selectionArgs.length]; + System.arraycopy(selectionArgs, 0, mSelectionArgs, 0, selectionArgs.length); + } return this; } diff --git a/core/java/android/content/SyncManager.java b/core/java/android/content/SyncManager.java index 9757ef68bdaa..ba186159680d 100644 --- a/core/java/android/content/SyncManager.java +++ b/core/java/android/content/SyncManager.java @@ -2294,8 +2294,8 @@ class SyncManager implements OnAccountsUpdateListener { } if (!mSyncStorageEngine.deleteFromPending(operationToRemove.pendingOperation)) { - throw new IllegalStateException("unable to find pending row for " - + operationToRemove); + final String errorMessage = "unable to find pending row for " + operationToRemove; + Log.e(TAG, errorMessage, new IllegalStateException(errorMessage)); } if (DEBUG_CHECK_DATA_CONSISTENCY) debugCheckDataStructures(true /* check the DB */); @@ -2314,7 +2314,8 @@ class SyncManager implements OnAccountsUpdateListener { } if (!mSyncStorageEngine.deleteFromPending(operation.pendingOperation)) { - throw new IllegalStateException("unable to find pending row for " + operation); + final String errorMessage = "unable to find pending row for " + operation; + Log.e(TAG, errorMessage, new IllegalStateException(errorMessage)); } if (DEBUG_CHECK_DATA_CONSISTENCY) debugCheckDataStructures(true /* check the DB */); @@ -2336,8 +2337,8 @@ class SyncManager implements OnAccountsUpdateListener { } if (!mSyncStorageEngine.deleteFromPending(syncOperation.pendingOperation)) { - throw new IllegalStateException("unable to find pending row for " - + syncOperation); + final String errorMessage = "unable to find pending row for " + syncOperation; + Log.e(TAG, errorMessage, new IllegalStateException(errorMessage)); } if (DEBUG_CHECK_DATA_CONSISTENCY) debugCheckDataStructures(true /* check the DB */); diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java index 54015c970bb4..b798bde02338 100644 --- a/core/java/android/content/pm/PackageParser.java +++ b/core/java/android/content/pm/PackageParser.java @@ -201,11 +201,11 @@ public class PackageParser { } pi.activities = new ActivityInfo[num]; } - for (int i=0; i<N; i++) { + for (int i=0, j=0; i<N; i++) { final Activity activity = p.activities.get(i); if (activity.info.enabled || (flags&PackageManager.GET_DISABLED_COMPONENTS) != 0) { - pi.activities[i] = generateActivityInfo(p.activities.get(i), flags); + pi.activities[j++] = generateActivityInfo(p.activities.get(i), flags); } } } @@ -222,11 +222,11 @@ public class PackageParser { } pi.receivers = new ActivityInfo[num]; } - for (int i=0; i<N; i++) { + for (int i=0, j=0; i<N; i++) { final Activity activity = p.receivers.get(i); if (activity.info.enabled || (flags&PackageManager.GET_DISABLED_COMPONENTS) != 0) { - pi.receivers[i] = generateActivityInfo(p.receivers.get(i), flags); + pi.receivers[j++] = generateActivityInfo(p.receivers.get(i), flags); } } } @@ -243,11 +243,11 @@ public class PackageParser { } pi.services = new ServiceInfo[num]; } - for (int i=0; i<N; i++) { + for (int i=0, j=0; i<N; i++) { final Service service = p.services.get(i); if (service.info.enabled || (flags&PackageManager.GET_DISABLED_COMPONENTS) != 0) { - pi.services[i] = generateServiceInfo(p.services.get(i), flags); + pi.services[j++] = generateServiceInfo(p.services.get(i), flags); } } } @@ -264,11 +264,11 @@ public class PackageParser { } pi.providers = new ProviderInfo[num]; } - for (int i=0; i<N; i++) { + for (int i=0, j=0; i<N; i++) { final Provider provider = p.providers.get(i); if (provider.info.enabled || (flags&PackageManager.GET_DISABLED_COMPONENTS) != 0) { - pi.providers[i] = generateProviderInfo(p.providers.get(i), flags); + pi.providers[j++] = generateProviderInfo(p.providers.get(i), flags); } } } @@ -300,12 +300,10 @@ public class PackageParser { } } if ((flags&PackageManager.GET_SIGNATURES) != 0) { - if (p.mSignatures != null) { - int N = p.mSignatures.length; - if (N > 0) { - pi.signatures = new Signature[N]; - System.arraycopy(p.mSignatures, 0, pi.signatures, 0, N); - } + int N = (p.mSignatures != null) ? p.mSignatures.length : 0; + if (N > 0) { + pi.signatures = new Signature[N]; + System.arraycopy(p.mSignatures, 0, pi.signatures, 0, N); } } return pi; diff --git a/core/java/android/content/res/Resources.java b/core/java/android/content/res/Resources.java index 00ab7de10178..1c0ed3671d37 100644 --- a/core/java/android/content/res/Resources.java +++ b/core/java/android/content/res/Resources.java @@ -54,7 +54,7 @@ public class Resources { // Use the current SDK version code. If we are a development build, // also allow the previous SDK version + 1. private static final int sSdkVersion = Build.VERSION.SDK_INT - + ("REL".equals(Build.VERSION.CODENAME) ? 1 : 0); + + ("REL".equals(Build.VERSION.CODENAME) ? 0 : 1); private static final Object mSync = new Object(); private static Resources mSystem = null; diff --git a/core/java/android/hardware/Camera.java b/core/java/android/hardware/Camera.java index 0c1c7ec66698..4b733ef334db 100644 --- a/core/java/android/hardware/Camera.java +++ b/core/java/android/hardware/Camera.java @@ -81,6 +81,7 @@ public class Camera { private ZoomCallback mZoomCallback; private ErrorCallback mErrorCallback; private boolean mOneShot; + private boolean mWithBuffer; /** * Returns a new Camera object. @@ -229,9 +230,10 @@ public class Camera { public final void setPreviewCallback(PreviewCallback cb) { mPreviewCallback = cb; mOneShot = false; + mWithBuffer = false; // Always use one-shot mode. We fake camera preview mode by // doing one-shot preview continuously. - setHasPreviewCallback(cb != null, true); + setHasPreviewCallback(cb != null, false); } /** @@ -241,14 +243,48 @@ public class Camera { * @param cb A callback object that receives a copy of the preview frame. */ public final void setOneShotPreviewCallback(PreviewCallback cb) { - if (cb != null) { - mPreviewCallback = cb; - mOneShot = true; - setHasPreviewCallback(true, true); - } + mPreviewCallback = cb; + mOneShot = true; + mWithBuffer = false; + setHasPreviewCallback(cb != null, false); + } + + private native final void setHasPreviewCallback(boolean installed, boolean manualBuffer); + + /** + * Installs a callback which will get called as long as there are buffers in the + * preview buffer queue, which minimizes dynamic allocation of preview buffers. + * + * Apps must call addCallbackBuffer to explicitly register the buffers to use, or no callbacks + * will be received. addCallbackBuffer may be safely called before or after + * a call to setPreviewCallbackWithBuffer with a non-null callback parameter. + * + * The buffer queue will be cleared upon any calls to setOneShotPreviewCallback, + * setPreviewCallback, or to this method with a null callback parameter. + * + * @param cb A callback object that receives a copy of the preview frame. A null value will clear the queue. + * @hide + */ + public final void setPreviewCallbackWithBuffer(PreviewCallback cb) { + mPreviewCallback = cb; + mOneShot = false; + mWithBuffer = true; + setHasPreviewCallback(cb != null, true); } - private native final void setHasPreviewCallback(boolean installed, boolean oneshot); + /** + * Adds a pre-allocated buffer to the callback buffer queue. + * Preview width and height can be determined from getPreviewSize, and bitsPerPixel can be + * found from from {@link android.hardware.Camera.Parameters#getPreviewFormat()} and + * {@link android.graphics.PixelFormat#getPixelFormatInfo(int, PixelFormat)} + * + * Alternatively, a buffer from a previous callback may be passed in or used + * to determine the size of new preview frame buffers. + * + * @param callbackBuffer The buffer to register. Size should be width * height * bitsPerPixel / 8. + * @hide + */ + public native final void addCallbackBuffer(byte[] callbackBuffer); private class EventHandler extends Handler { @@ -288,11 +324,11 @@ public class Camera { // in case the app calls setPreviewCallback from // the callback function mPreviewCallback = null; - } else { + } else if (!mWithBuffer) { // We're faking the camera preview mode to prevent // the app from being flooded with preview frames. // Set to oneshot mode again. - setHasPreviewCallback(true, true); + setHasPreviewCallback(true, false); } cb.onPreviewFrame((byte[])msg.obj, mCamera); } diff --git a/core/java/android/hardware/Sensor.java b/core/java/android/hardware/Sensor.java index 0ce2f7bc8478..f5fed4f9031d 100644 --- a/core/java/android/hardware/Sensor.java +++ b/core/java/android/hardware/Sensor.java @@ -46,13 +46,21 @@ public class Sensor { /** A constant describing a gyroscope sensor type */ public static final int TYPE_GYROSCOPE = 4; - /** A constant describing a light sensor type */ + /** + * A constant describing an light sensor type. + * See {@link android.hardware.SensorEvent SensorEvent} + * for more details. + */ public static final int TYPE_LIGHT = 5; /** A constant describing a pressure sensor type */ public static final int TYPE_PRESSURE = 6; /** A constant describing a temperature sensor type */ public static final int TYPE_TEMPERATURE = 7; - /** A constant describing a proximity sensor type */ + /** + * A constant describing an proximity sensor type. + * See {@link android.hardware.SensorEvent SensorEvent} + * for more details. + */ public static final int TYPE_PROXIMITY = 8; diff --git a/core/java/android/hardware/SensorEvent.java b/core/java/android/hardware/SensorEvent.java index cf939c52a5e3..32d56910c365 100644 --- a/core/java/android/hardware/SensorEvent.java +++ b/core/java/android/hardware/SensorEvent.java @@ -115,8 +115,19 @@ public class SensorEvent { * <p>{@link android.hardware.Sensor#TYPE_MAGNETIC_FIELD Sensor.TYPE_MAGNETIC_FIELD}:<p> * All values are in micro-Tesla (uT) and measure the ambient magnetic * field in the X, Y and Z axis. - * - */ + * + * <p>{@link android.hardware.Sensor#TYPE_LIGHT Sensor.TYPE_LIGHT}:<p> + * + * <p>values[0]: Ambient light level in SI lux units + * + * <p>{@link android.hardware.Sensor#TYPE_PROXIMITY Sensor.TYPE_PROXIMITY}:<p> + * + * <p>values[0]: Proximity sensor distance measured in centimeters + * + * <p> Note that some proximity sensors only support a binary "close" or "far" measurement. + * In this case, the sensor should report its maxRange value in the "far" state and a value + * less than maxRange in the "near" state. + */ public final float[] values; /** diff --git a/core/java/android/inputmethodservice/KeyboardView.java b/core/java/android/inputmethodservice/KeyboardView.java index e59a98756f37..0f7ef22f93fb 100755 --- a/core/java/android/inputmethodservice/KeyboardView.java +++ b/core/java/android/inputmethodservice/KeyboardView.java @@ -191,6 +191,7 @@ public class KeyboardView extends View implements View.OnClickListener { private int mLastCodeX; private int mLastCodeY; private int mCurrentKey = NOT_A_KEY; + private int mDownKey = NOT_A_KEY; private long mLastKeyTime; private long mCurrentKeyTime; private int[] mKeyIndices = new int[12]; @@ -202,6 +203,10 @@ public class KeyboardView extends View implements View.OnClickListener { private boolean mAbortKey; private Key mInvalidatedKey; private Rect mClipRegion = new Rect(0, 0, 0, 0); + private boolean mPossiblePoly; + private SwipeTracker mSwipeTracker = new SwipeTracker(); + private int mSwipeThreshold; + private boolean mDisambiguateSwipe; // Variables for dealing with multiple pointers private int mOldPointerCount = 1; @@ -351,7 +356,10 @@ public class KeyboardView extends View implements View.OnClickListener { mPadding = new Rect(0, 0, 0, 0); mMiniKeyboardCache = new HashMap<Key,View>(); mKeyBackground.getPadding(mPadding); - + + mSwipeThreshold = (int) (500 * getResources().getDisplayMetrics().density); + mDisambiguateSwipe = getResources().getBoolean( + com.android.internal.R.bool.config_swipeDisambiguation); resetMultiTap(); initGestureDetector(); } @@ -361,22 +369,49 @@ public class KeyboardView extends View implements View.OnClickListener { @Override public boolean onFling(MotionEvent me1, MotionEvent me2, float velocityX, float velocityY) { + if (mPossiblePoly) return false; final float absX = Math.abs(velocityX); final float absY = Math.abs(velocityY); - if (velocityX > 500 && absY < absX) { - swipeRight(); - return true; - } else if (velocityX < -500 && absY < absX) { - swipeLeft(); - return true; - } else if (velocityY < -500 && absX < absY) { - swipeUp(); - return true; - } else if (velocityY > 500 && absX < 200) { - swipeDown(); - return true; - } else if (absX > 800 || absY > 800) { - return true; + float deltaX = me2.getX() - me1.getX(); + float deltaY = me2.getY() - me1.getY(); + int travelX = getWidth() / 2; // Half the keyboard width + int travelY = getHeight() / 2; // Half the keyboard height + mSwipeTracker.computeCurrentVelocity(1000); + final float endingVelocityX = mSwipeTracker.getXVelocity(); + final float endingVelocityY = mSwipeTracker.getYVelocity(); + boolean sendDownKey = false; + if (velocityX > mSwipeThreshold && absY < absX && deltaX > travelX) { + if (mDisambiguateSwipe && endingVelocityX < velocityX / 4) { + sendDownKey = true; + } else { + swipeRight(); + return true; + } + } else if (velocityX < -mSwipeThreshold && absY < absX && deltaX < -travelX) { + if (mDisambiguateSwipe && endingVelocityX > velocityX / 4) { + sendDownKey = true; + } else { + swipeLeft(); + return true; + } + } else if (velocityY < -mSwipeThreshold && absX < absY && deltaY < -travelY) { + if (mDisambiguateSwipe && endingVelocityY > velocityY / 4) { + sendDownKey = true; + } else { + swipeUp(); + return true; + } + } else if (velocityY > mSwipeThreshold && absX < absY / 2 && deltaY > travelY) { + if (mDisambiguateSwipe && endingVelocityY < velocityY / 4) { + sendDownKey = true; + } else { + swipeDown(); + return true; + } + } + + if (sendDownKey) { + detectAndSendKey(mDownKey, mStartX, mStartY, me1.getEventTime()); } return false; } @@ -743,8 +778,7 @@ public class KeyboardView extends View implements View.OnClickListener { return primaryIndex; } - private void detectAndSendKey(int x, int y, long eventTime) { - int index = mCurrentKey; + private void detectAndSendKey(int index, int x, int y, long eventTime) { if (index != NOT_A_KEY && index < mKeys.length) { final Key key = mKeys[index]; if (key.text != null) { @@ -1026,51 +1060,64 @@ public class KeyboardView extends View implements View.OnClickListener { return false; } + private long mOldEventTime; + private boolean mUsedVelocity; + @Override public boolean onTouchEvent(MotionEvent me) { // Convert multi-pointer up/down events to single up/down events to // deal with the typical multi-pointer behavior of two-thumb typing - int pointerCount = me.getPointerCount(); + final int pointerCount = me.getPointerCount(); + final int action = me.getAction(); boolean result = false; + final long now = me.getEventTime(); + if (pointerCount != mOldPointerCount) { - long now = me.getEventTime(); if (pointerCount == 1) { // Send a down event for the latest pointer MotionEvent down = MotionEvent.obtain(now, now, MotionEvent.ACTION_DOWN, me.getX(), me.getY(), me.getMetaState()); - result = onModifiedTouchEvent(down); + result = onModifiedTouchEvent(down, false); down.recycle(); // If it's an up action, then deliver the up as well. - if (me.getAction() == MotionEvent.ACTION_UP) { - result = onModifiedTouchEvent(me); + if (action == MotionEvent.ACTION_UP) { + result = onModifiedTouchEvent(me, true); } } else { // Send an up event for the last pointer MotionEvent up = MotionEvent.obtain(now, now, MotionEvent.ACTION_UP, mOldPointerX, mOldPointerY, me.getMetaState()); - result = onModifiedTouchEvent(up); + result = onModifiedTouchEvent(up, true); up.recycle(); } } else { if (pointerCount == 1) { + result = onModifiedTouchEvent(me, false); mOldPointerX = me.getX(); mOldPointerY = me.getY(); - result = onModifiedTouchEvent(me); } else { // Don't do anything when 2 pointers are down and moving. result = true; } } mOldPointerCount = pointerCount; + return result; } - private boolean onModifiedTouchEvent(MotionEvent me) { + private boolean onModifiedTouchEvent(MotionEvent me, boolean possiblePoly) { int touchX = (int) me.getX() - mPaddingLeft; int touchY = (int) me.getY() + mVerticalCorrection - mPaddingTop; - int action = me.getAction(); - long eventTime = me.getEventTime(); + final int action = me.getAction(); + final long eventTime = me.getEventTime(); + mOldEventTime = eventTime; int keyIndex = getKeyIndices(touchX, touchY, null); + mPossiblePoly = possiblePoly; + + // Track the last few movements to look for spurious swipes. + if (action == MotionEvent.ACTION_DOWN) mSwipeTracker.clear(); + mSwipeTracker.addMovement(me); + if (mGestureDetector.onTouchEvent(me)) { showPreview(NOT_A_KEY); mHandler.removeMessages(MSG_REPEAT); @@ -1095,6 +1142,7 @@ public class KeyboardView extends View implements View.OnClickListener { mCurrentKeyTime = 0; mLastKey = NOT_A_KEY; mCurrentKey = keyIndex; + mDownKey = keyIndex; mDownTime = me.getEventTime(); mLastMoveTime = mDownTime; checkMultiTap(eventTime, keyIndex); @@ -1167,11 +1215,17 @@ public class KeyboardView extends View implements View.OnClickListener { Arrays.fill(mKeyIndices, NOT_A_KEY); // If we're not on a repeating key (which sends on a DOWN event) if (mRepeatKeyIndex == NOT_A_KEY && !mMiniKeyboardOnScreen && !mAbortKey) { - detectAndSendKey(touchX, touchY, eventTime); + detectAndSendKey(mCurrentKey, touchX, touchY, eventTime); } invalidateKey(keyIndex); mRepeatKeyIndex = NOT_A_KEY; break; + case MotionEvent.ACTION_CANCEL: + removeMessages(); + mAbortKey = true; + showPreview(NOT_A_KEY); + invalidateKey(mCurrentKey); + break; } mLastX = touchX; mLastY = touchY; @@ -1180,7 +1234,7 @@ public class KeyboardView extends View implements View.OnClickListener { private boolean repeatKey() { Key key = mKeys[mRepeatKeyIndex]; - detectAndSendKey(key.x, key.y, mLastTapTime); + detectAndSendKey(mCurrentKey, key.x, key.y, mLastTapTime); return true; } @@ -1265,4 +1319,114 @@ public class KeyboardView extends View implements View.OnClickListener { resetMultiTap(); } } + + private static class SwipeTracker { + + static final int NUM_PAST = 4; + static final int LONGEST_PAST_TIME = 200; + + final float mPastX[] = new float[NUM_PAST]; + final float mPastY[] = new float[NUM_PAST]; + final long mPastTime[] = new long[NUM_PAST]; + + float mYVelocity; + float mXVelocity; + + public void clear() { + mPastTime[0] = 0; + } + + public void addMovement(MotionEvent ev) { + long time = ev.getEventTime(); + final int N = ev.getHistorySize(); + for (int i=0; i<N; i++) { + addPoint(ev.getHistoricalX(i), ev.getHistoricalY(i), + ev.getHistoricalEventTime(i)); + } + addPoint(ev.getX(), ev.getY(), time); + } + + private void addPoint(float x, float y, long time) { + int drop = -1; + int i; + final long[] pastTime = mPastTime; + for (i=0; i<NUM_PAST; i++) { + if (pastTime[i] == 0) { + break; + } else if (pastTime[i] < time-LONGEST_PAST_TIME) { + drop = i; + } + } + if (i == NUM_PAST && drop < 0) { + drop = 0; + } + if (drop == i) drop--; + final float[] pastX = mPastX; + final float[] pastY = mPastY; + if (drop >= 0) { + final int start = drop+1; + final int count = NUM_PAST-drop-1; + System.arraycopy(pastX, start, pastX, 0, count); + System.arraycopy(pastY, start, pastY, 0, count); + System.arraycopy(pastTime, start, pastTime, 0, count); + i -= (drop+1); + } + pastX[i] = x; + pastY[i] = y; + pastTime[i] = time; + i++; + if (i < NUM_PAST) { + pastTime[i] = 0; + } + } + + public void computeCurrentVelocity(int units) { + computeCurrentVelocity(units, Float.MAX_VALUE); + } + + public void computeCurrentVelocity(int units, float maxVelocity) { + final float[] pastX = mPastX; + final float[] pastY = mPastY; + final long[] pastTime = mPastTime; + + final float oldestX = pastX[0]; + final float oldestY = pastY[0]; + final long oldestTime = pastTime[0]; + float accumX = 0; + float accumY = 0; + int N=0; + while (N < NUM_PAST) { + if (pastTime[N] == 0) { + break; + } + N++; + } + + for (int i=1; i < N; i++) { + final int dur = (int)(pastTime[i] - oldestTime); + if (dur == 0) continue; + float dist = pastX[i] - oldestX; + float vel = (dist/dur) * units; // pixels/frame. + if (accumX == 0) accumX = vel; + else accumX = (accumX + vel) * .5f; + + dist = pastY[i] - oldestY; + vel = (dist/dur) * units; // pixels/frame. + if (accumY == 0) accumY = vel; + else accumY = (accumY + vel) * .5f; + } + mXVelocity = accumX < 0.0f ? Math.max(accumX, -maxVelocity) + : Math.min(accumX, maxVelocity); + mYVelocity = accumY < 0.0f ? Math.max(accumY, -maxVelocity) + : Math.min(accumY, maxVelocity); + } + + public float getXVelocity() { + return mXVelocity; + } + + public float getYVelocity() { + return mYVelocity; + } + } } diff --git a/core/java/android/os/BatteryStats.java b/core/java/android/os/BatteryStats.java index a49a27a06368..b706c5c1cae4 100644 --- a/core/java/android/os/BatteryStats.java +++ b/core/java/android/os/BatteryStats.java @@ -130,6 +130,7 @@ public abstract class BatteryStats implements Parcelable { private static final String MISC_DATA = "m"; private static final String SCREEN_BRIGHTNESS_DATA = "br"; private static final String SIGNAL_STRENGTH_TIME_DATA = "sgt"; + private static final String SIGNAL_SCANNING_TIME_DATA = "sst"; private static final String SIGNAL_STRENGTH_COUNT_DATA = "sgc"; private static final String DATA_CONNECTION_TIME_DATA = "dct"; private static final String DATA_CONNECTION_COUNT_DATA = "dcc"; @@ -440,6 +441,15 @@ public abstract class BatteryStats implements Parcelable { long batteryRealtime, int which); /** + * Returns the time in microseconds that the phone has been trying to + * acquire a signal. + * + * {@hide} + */ + public abstract long getPhoneSignalScanningTime( + long batteryRealtime, int which); + + /** * Returns the number of times the phone has entered the given signal strength. * * {@hide} @@ -823,6 +833,8 @@ public abstract class BatteryStats implements Parcelable { args[i] = getPhoneSignalStrengthTime(i, batteryRealtime, which) / 1000; } dumpLine(pw, 0 /* uid */, category, SIGNAL_STRENGTH_TIME_DATA, args); + dumpLine(pw, 0 /* uid */, category, SIGNAL_SCANNING_TIME_DATA, + getPhoneSignalScanningTime(batteryRealtime, which) / 1000); for (int i=0; i<NUM_SIGNAL_STRENGTH_BINS; i++) { args[i] = getPhoneSignalStrengthCount(i, which); } @@ -1130,7 +1142,13 @@ public abstract class BatteryStats implements Parcelable { } if (!didOne) sb.append("No activity"); pw.println(sb.toString()); - + + sb.setLength(0); + sb.append(prefix); + sb.append(" Signal scanning time: "); + formatTimeMs(sb, getPhoneSignalScanningTime(batteryRealtime, which) / 1000); + pw.println(sb.toString()); + sb.setLength(0); sb.append(prefix); sb.append(" Radio types: "); diff --git a/core/java/android/os/Build.java b/core/java/android/os/Build.java index 0f8bc083980e..d4aaba3cf570 100644 --- a/core/java/android/os/Build.java +++ b/core/java/android/os/Build.java @@ -103,16 +103,19 @@ public class Build { * October 2008: The original, first, version of Android. Yay! */ public static final int BASE = 1; + /** * February 2009: First Android update, officially called 1.1. */ public static final int BASE_1_1 = 2; + /** * May 2009: Android 1.5. */ public static final int CUPCAKE = 3; + /** - * Current work on "Donut" development branch. + * September 2009: Android 1.6. * * <p>Applications targeting this or a later release will get these * new changes in behavior:</p> @@ -133,8 +136,9 @@ public class Build { * </ul> */ public static final int DONUT = 4; + /** - * Current work on "Eclair" development branch. + * November 2009: Android 2.0 * * <p>Applications targeting this or a later release will get these * new changes in behavior:</p> @@ -152,6 +156,11 @@ public class Build { * </ul> */ public static final int ECLAIR = 5; + + /** + * Current work on Eclair MR1. + */ + public static final int ECLAIR_MR1 = 6; } /** The type of build, like "user" or "eng". */ diff --git a/core/java/android/os/IHardwareService.aidl b/core/java/android/os/IHardwareService.aidl index 594c0e89b936..34f30a7d3304 100755 --- a/core/java/android/os/IHardwareService.aidl +++ b/core/java/android/os/IHardwareService.aidl @@ -1,16 +1,16 @@ /** * Copyright (c) 2007, 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 + * 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 + * 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 + * 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. */ @@ -23,13 +23,13 @@ interface IHardwareService void vibrate(long milliseconds, IBinder token); void vibratePattern(in long[] pattern, int repeat, IBinder token); void cancelVibrate(IBinder token); - + // flashlight support boolean getFlashlightEnabled(); void setFlashlightEnabled(boolean on); void enableCameraFlash(int milliseconds); // for the phone - void setAttentionLight(boolean on); + void setAttentionLight(boolean on, int color); } diff --git a/core/java/android/os/IPowerManager.aidl b/core/java/android/os/IPowerManager.aidl index 189335ef1e86..5ac543d81058 100644 --- a/core/java/android/os/IPowerManager.aidl +++ b/core/java/android/os/IPowerManager.aidl @@ -34,7 +34,4 @@ interface IPowerManager // sets the brightness of the backlights (screen, keyboard, button) 0-255 void setBacklightBrightness(int brightness); - - // enables or disables automatic brightness mode - void setAutoBrightness(boolean on); } diff --git a/core/java/android/os/PerformanceCollector.java b/core/java/android/os/PerformanceCollector.java index 4ca1f32bc0f5..be1cf6df6b92 100644 --- a/core/java/android/os/PerformanceCollector.java +++ b/core/java/android/os/PerformanceCollector.java @@ -107,6 +107,36 @@ public class PerformanceCollector { * @see PerformanceCollector#stopTiming(String) */ public void writeStopTiming(Bundle results); + + /** + * Callback invoked as last action in + * {@link PerformanceCollector#addMeasurement(String, long)} for + * reporting an integer type measurement. + * + * @param label short description of the metric that was measured + * @param value long value of the measurement + */ + public void writeMeasurement(String label, long value); + + /** + * Callback invoked as last action in + * {@link PerformanceCollector#addMeasurement(String, float)} for + * reporting a float type measurement. + * + * @param label short description of the metric that was measured + * @param value float value of the measurement + */ + public void writeMeasurement(String label, float value); + + /** + * Callback invoked as last action in + * {@link PerformanceCollector#addMeasurement(String, String)} for + * reporting a string field. + * + * @param label short description of the metric that was measured + * @param value string summary of the measurement + */ + public void writeMeasurement(String label, String value); } /** @@ -385,6 +415,39 @@ public class PerformanceCollector { return mPerfMeasurement; } + /** + * Add an integer type measurement to the collector. + * + * @param label short description of the metric that was measured + * @param value long value of the measurement + */ + public void addMeasurement(String label, long value) { + if (mPerfWriter != null) + mPerfWriter.writeMeasurement(label, value); + } + + /** + * Add a float type measurement to the collector. + * + * @param label short description of the metric that was measured + * @param value float value of the measurement + */ + public void addMeasurement(String label, float value) { + if (mPerfWriter != null) + mPerfWriter.writeMeasurement(label, value); + } + + /** + * Add a string field to the collector. + * + * @param label short description of the metric that was measured + * @param value string summary of the measurement + */ + public void addMeasurement(String label, String value) { + if (mPerfWriter != null) + mPerfWriter.writeMeasurement(label, value); + } + /* * Starts tracking memory usage, binder transactions, and real & cpu timing. */ diff --git a/core/java/android/pim/vcard/VCardComposer.java b/core/java/android/pim/vcard/VCardComposer.java index c4711f820d5a..9638262faee0 100644 --- a/core/java/android/pim/vcard/VCardComposer.java +++ b/core/java/android/pim/vcard/VCardComposer.java @@ -313,6 +313,8 @@ public class VCardComposer { private boolean mIsCallLogComposer = false; + private boolean mNeedPhotoForVCard = true; + private static final String[] sContactsProjection = new String[] { Contacts._ID, }; @@ -332,17 +334,17 @@ public class VCardComposer { private static final String FLAG_TIMEZONE_UTC = "Z"; public VCardComposer(Context context) { - this(context, VCardConfig.VCARD_TYPE_DEFAULT, true, false); + this(context, VCardConfig.VCARD_TYPE_DEFAULT, true, false, true); } public VCardComposer(Context context, String vcardTypeStr, boolean careHandlerErrors) { this(context, VCardConfig.getVCardTypeFromString(vcardTypeStr), - careHandlerErrors, false); + careHandlerErrors, false, true); } public VCardComposer(Context context, int vcardType, boolean careHandlerErrors) { - this(context, vcardType, careHandlerErrors, false); + this(context, vcardType, careHandlerErrors, false, true); } /** @@ -351,11 +353,12 @@ public class VCardComposer { * @param isCallLogComposer true if this composer is for creating Call Log vCard. */ public VCardComposer(Context context, int vcardType, boolean careHandlerErrors, - boolean isCallLogComposer) { + boolean isCallLogComposer, boolean needPhotoInVCard) { mContext = context; mVCardType = vcardType; mCareHandlerErrors = careHandlerErrors; mIsCallLogComposer = isCallLogComposer; + mNeedPhotoForVCard = needPhotoInVCard; mContentResolver = context.getContentResolver(); mIsV30 = VCardConfig.isV30(vcardType); @@ -679,7 +682,9 @@ public class VCardComposer { appendWebsites(builder, contentValuesListMap); appendBirthday(builder, contentValuesListMap); appendOrganizations(builder, contentValuesListMap); - appendPhotos(builder, contentValuesListMap); + if (mNeedPhotoForVCard) { + appendPhotos(builder, contentValuesListMap); + } appendNotes(builder, contentValuesListMap); // TODO: GroupMembership diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index 8c9581d0e1cc..cb3dc166f7a4 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -1081,6 +1081,18 @@ public final class Settings { public static final String SCREEN_BRIGHTNESS_MODE = "screen_brightness_mode"; /** + * SCREEN_BRIGHTNESS_MODE value for manual mode. + * @hide + */ + public static final int SCREEN_BRIGHTNESS_MODE_MANUAL = 0; + + /** + * SCREEN_BRIGHTNESS_MODE value for manual mode. + * @hide + */ + public static final int SCREEN_BRIGHTNESS_MODE_AUTOMATIC = 1; + + /** * Control whether the process CPU usage meter should be shown. */ public static final String SHOW_PROCESSES = "show_processes"; diff --git a/core/java/android/provider/Telephony.java b/core/java/android/provider/Telephony.java index 042c75e25e7a..d8c5a53771a7 100644 --- a/core/java/android/provider/Telephony.java +++ b/core/java/android/provider/Telephony.java @@ -1669,6 +1669,8 @@ public final class Telephony { public static final String NUMERIC = "numeric"; + public static final String AUTH_TYPE = "authtype"; + public static final String TYPE = "type"; public static final String CURRENT = "current"; diff --git a/core/java/android/server/BluetoothA2dpService.java b/core/java/android/server/BluetoothA2dpService.java index 9a2d6d94a934..ec3b2ff7b2c8 100644 --- a/core/java/android/server/BluetoothA2dpService.java +++ b/core/java/android/server/BluetoothA2dpService.java @@ -72,8 +72,7 @@ public class BluetoothA2dpService extends IBluetoothA2dp.Stub { private final AudioManager mAudioManager; private final BluetoothService mBluetoothService; private final BluetoothAdapter mAdapter; - private boolean mSuspending; - private boolean mResuming; + private int mTargetA2dpState; private final BroadcastReceiver mReceiver = new BroadcastReceiver() { @Override @@ -151,8 +150,7 @@ public class BluetoothA2dpService extends IBluetoothA2dp.Stub { if (mBluetoothService.isEnabled()) onBluetoothEnable(); - mSuspending = false; - mResuming = false; + mTargetA2dpState = -1; } @Override @@ -341,10 +339,7 @@ public class BluetoothA2dpService extends IBluetoothA2dp.Stub { public synchronized boolean suspendSink(BluetoothDevice device) { mContext.enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM, "Need BLUETOOTH_ADMIN permission"); - if (DBG) log("suspendSink(" + device + "), mSuspending: "+mSuspending+", mResuming: "+mResuming); - if (mSuspending) { - return true; - } + if (DBG) log("suspendSink(" + device + "), mTargetA2dpState: "+mTargetA2dpState); if (device == null || mAudioDevices == null) { return false; } @@ -353,28 +348,15 @@ public class BluetoothA2dpService extends IBluetoothA2dp.Stub { if (path == null || state == null) { return false; } - switch (state.intValue()) { - case BluetoothA2dp.STATE_CONNECTED: - if (mResuming) { - mSuspending = true; - } - return true; - case BluetoothA2dp.STATE_PLAYING: - mAudioManager.setParameters("A2dpSuspended=true"); - mSuspending = suspendSinkNative(path); - return mSuspending; - default: - return false; - } + + mTargetA2dpState = BluetoothA2dp.STATE_CONNECTED; + return checkSinkSuspendState(state.intValue()); } public synchronized boolean resumeSink(BluetoothDevice device) { mContext.enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM, "Need BLUETOOTH_ADMIN permission"); - if (DBG) log("resumeSink(" + device + "), mResuming: "+mResuming+", mSuspending: "+mSuspending); - if (mResuming) { - return true; - } + if (DBG) log("resumeSink(" + device + "), mTargetA2dpState: "+mTargetA2dpState); if (device == null || mAudioDevices == null) { return false; } @@ -383,19 +365,8 @@ public class BluetoothA2dpService extends IBluetoothA2dp.Stub { if (path == null || state == null) { return false; } - switch (state.intValue()) { - case BluetoothA2dp.STATE_PLAYING: - if (mSuspending) { - mResuming = true; - } - return true; - case BluetoothA2dp.STATE_CONNECTED: - mResuming = resumeSinkNative(path); - mAudioManager.setParameters("A2dpSuspended=false"); - return mResuming; - default: - return false; - } + mTargetA2dpState = BluetoothA2dp.STATE_PLAYING; + return checkSinkSuspendState(state.intValue()); } public synchronized BluetoothDevice[] getConnectedSinks() { @@ -458,10 +429,6 @@ public class BluetoothA2dpService extends IBluetoothA2dp.Stub { } private void handleSinkStateChange(BluetoothDevice device, int prevState, int state) { - if (state == BluetoothA2dp.STATE_DISCONNECTED) { - mSuspending = false; - mResuming = false; - } if (state != prevState) { if (state == BluetoothA2dp.STATE_DISCONNECTED || state == BluetoothA2dp.STATE_DISCONNECTING) { @@ -477,28 +444,11 @@ public class BluetoothA2dpService extends IBluetoothA2dp.Stub { } mAudioDevices.put(device, state); - if (state == BluetoothA2dp.STATE_CONNECTED && prevState == BluetoothA2dp.STATE_PLAYING) { - if (DBG) log("handleSinkStateChange() STATE_PLAYING -> STATE_CONNECTED: mSuspending: " - +mSuspending+", mResuming: "+mResuming); - if (mSuspending) { - mSuspending = false; - if (mResuming) { - mResuming = false; - resumeSink(device); - } - } - } - if (state == BluetoothA2dp.STATE_PLAYING && prevState == BluetoothA2dp.STATE_CONNECTED) { - if (DBG) log("handleSinkStateChange() STATE_CONNECTED -> STATE_PLAYING: mSuspending: " - +mSuspending+", mResuming: "+mResuming); - - if (mResuming) { - mResuming = false; - if (mSuspending) { - mSuspending = false; - suspendSink(device); - } - } + checkSinkSuspendState(state); + mTargetA2dpState = -1; + + if (state == BluetoothA2dp.STATE_CONNECTING) { + mAudioManager.setParameters("A2dpSuspended=false"); } Intent intent = new Intent(BluetoothA2dp.ACTION_SINK_STATE_CHANGED); intent.putExtra(BluetoothDevice.EXTRA_DEVICE, device); @@ -527,6 +477,23 @@ public class BluetoothA2dpService extends IBluetoothA2dp.Stub { return sinks; } + private boolean checkSinkSuspendState(int state) { + boolean result = true; + + if (state != mTargetA2dpState) { + if (state == BluetoothA2dp.STATE_PLAYING && + mTargetA2dpState == BluetoothA2dp.STATE_CONNECTED) { + mAudioManager.setParameters("A2dpSuspended=true"); + } else if (state == BluetoothA2dp.STATE_CONNECTED && + mTargetA2dpState == BluetoothA2dp.STATE_PLAYING) { + mAudioManager.setParameters("A2dpSuspended=false"); + } else { + result = false; + } + } + return result; + } + @Override protected synchronized void dump(FileDescriptor fd, PrintWriter pw, String[] args) { if (mAudioDevices.isEmpty()) return; diff --git a/core/java/android/server/BluetoothService.java b/core/java/android/server/BluetoothService.java index 67b30a9b0b90..d1dd3110286b 100644 --- a/core/java/android/server/BluetoothService.java +++ b/core/java/android/server/BluetoothService.java @@ -489,14 +489,15 @@ public class BluetoothService extends IBluetooth.Stub { // Parrot, Zhongshan General K-mate Electronics, Great Well // Electronics, Flaircomm Electronics, Jatty Electronics, Delphi, // Clarion, Novero, Denso (Lexus, Toyota), Johnson Controls (Acura), - // Continental Automotive, Harman/Becker, Panasonic/Kyushu Ten + // Continental Automotive, Harman/Becker, Panasonic/Kyushu Ten, + // BMW (Motorola PCS) private final ArrayList<String> mAutoPairingAddressBlacklist = new ArrayList<String>(Arrays.asList( "00:02:C7", "00:16:FE", "00:19:C1", "00:1B:FB", "00:1E:3D", "00:21:4F", "00:23:06", "00:24:33", "00:A0:79", "00:0E:6D", "00:13:E0", "00:21:E8", "00:60:57", "00:0E:9F", "00:12:1C", "00:18:91", "00:18:96", "00:13:04", "00:16:FD", "00:22:A0", "00:0B:4C", "00:60:6F", "00:23:3D", "00:C0:59", - "00:0A:30", "00:1E:AE", "00:1C:D7", "00:80:F0" + "00:0A:30", "00:1E:AE", "00:1C:D7", "00:80:F0", "00:12:8A" )); // List of names of Bluetooth devices for which auto pairing should be diff --git a/core/java/android/service/wallpaper/WallpaperService.java b/core/java/android/service/wallpaper/WallpaperService.java index da8d62c062fa..573be1e7009f 100644 --- a/core/java/android/service/wallpaper/WallpaperService.java +++ b/core/java/android/service/wallpaper/WallpaperService.java @@ -27,6 +27,7 @@ import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.graphics.Rect; +import android.os.Bundle; import android.os.IBinder; import android.os.Looper; import android.os.Message; @@ -46,7 +47,6 @@ import android.view.WindowManagerImpl; /** * A wallpaper service is responsible for showing a live wallpaper behind * applications that would like to sit on top of it. - * @hide Live Wallpaper */ public abstract class WallpaperService extends Service { /** @@ -73,11 +73,21 @@ public abstract class WallpaperService extends Service { private static final int MSG_UPDATE_SURFACE = 10000; private static final int MSG_VISIBILITY_CHANGED = 10010; private static final int MSG_WALLPAPER_OFFSETS = 10020; + private static final int MSG_WALLPAPER_COMMAND = 10025; private static final int MSG_WINDOW_RESIZED = 10030; private static final int MSG_TOUCH_EVENT = 10040; private Looper mCallbackLooper; + static final class WallpaperCommand { + String action; + int x; + int y; + int z; + Bundle extras; + boolean sync; + } + /** * The actual implementation of a wallpaper. A wallpaper service may * have multiple instances running (for example as a real wallpaper @@ -233,6 +243,22 @@ public abstract class WallpaperService extends Service { } } + public void dispatchWallpaperCommand(String action, int x, int y, + int z, Bundle extras, boolean sync) { + synchronized (mLock) { + if (DEBUG) Log.v(TAG, "Dispatch wallpaper command: " + x + ", " + y); + WallpaperCommand cmd = new WallpaperCommand(); + cmd.action = action; + cmd.x = x; + cmd.y = y; + cmd.z = z; + cmd.extras = extras; + cmd.sync = sync; + Message msg = mCaller.obtainMessage(MSG_WALLPAPER_COMMAND); + msg.obj = cmd; + mCaller.sendMessage(msg); + } + } }; /** @@ -338,6 +364,28 @@ public abstract class WallpaperService extends Service { } /** + * Process a command that was sent to the wallpaper with + * {@link WallpaperManager#sendWallpaperCommand}. + * The default implementation does nothing, and always returns null + * as the result. + * + * @param action The name of the command to perform. This tells you + * what to do and how to interpret the rest of the arguments. + * @param x Generic integer parameter. + * @param y Generic integer parameter. + * @param z Generic integer parameter. + * @param extras Any additional parameters. + * @param resultRequested If true, the caller is requesting that + * a result, appropriate for the command, be returned back. + * @return If returning a result, create a Bundle and place the + * result data in to it. Otherwise return null. + */ + public Bundle onCommand(String action, int x, int y, int z, + Bundle extras, boolean resultRequested) { + return null; + } + + /** * Called when an application has changed the desired virtual size of * the wallpaper. */ @@ -585,6 +633,23 @@ public abstract class WallpaperService extends Service { } } + void doCommand(WallpaperCommand cmd) { + Bundle result; + if (!mDestroyed) { + result = onCommand(cmd.action, cmd.x, cmd.y, cmd.z, + cmd.extras, cmd.sync); + } else { + result = null; + } + if (cmd.sync) { + try { + if (DEBUG) Log.v(TAG, "Reporting command complete"); + mSession.wallpaperCommandComplete(mWindow.asBinder(), result); + } catch (RemoteException e) { + } + } + } + void detach() { mDestroyed = true; @@ -709,6 +774,10 @@ public abstract class WallpaperService extends Service { case MSG_WALLPAPER_OFFSETS: { mEngine.doOffsetsChanged(); } break; + case MSG_WALLPAPER_COMMAND: { + WallpaperCommand cmd = (WallpaperCommand)message.obj; + mEngine.doCommand(cmd); + } break; case MSG_WINDOW_RESIZED: { final boolean reportDraw = message.arg1 != 0; mEngine.updateSurface(true, false); diff --git a/core/java/android/view/IWindow.aidl b/core/java/android/view/IWindow.aidl index 797757880de5..6bfc8b58dedb 100644 --- a/core/java/android/view/IWindow.aidl +++ b/core/java/android/view/IWindow.aidl @@ -18,11 +18,11 @@ package android.view; import android.graphics.Rect; +import android.os.Bundle; +import android.os.ParcelFileDescriptor; import android.view.KeyEvent; import android.view.MotionEvent; -import android.os.ParcelFileDescriptor; - /** * API back to a client window that the Window Manager uses to inform it of * interesting things happening. @@ -63,4 +63,7 @@ oneway interface IWindow { * Called for wallpaper windows when their offsets change. */ void dispatchWallpaperOffsets(float x, float y, boolean sync); + + void dispatchWallpaperCommand(String action, int x, int y, + int z, in Bundle extras, boolean sync); } diff --git a/core/java/android/view/IWindowSession.aidl b/core/java/android/view/IWindowSession.aidl index 9b8b6d474af7..7e7a38fd7fc4 100644 --- a/core/java/android/view/IWindowSession.aidl +++ b/core/java/android/view/IWindowSession.aidl @@ -19,6 +19,7 @@ package android.view; import android.graphics.Rect; import android.graphics.Region; +import android.os.Bundle; import android.view.IWindow; import android.view.MotionEvent; import android.view.WindowManager; @@ -116,4 +117,9 @@ interface IWindowSession { void setWallpaperPosition(IBinder windowToken, float x, float y); void wallpaperOffsetsComplete(IBinder window); + + Bundle sendWallpaperCommand(IBinder window, String action, int x, int y, + int z, in Bundle extras, boolean sync); + + void wallpaperCommandComplete(IBinder window, in Bundle result); } diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index eb3e52398825..0b8753659087 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -4956,8 +4956,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility * invalidate/draw passes. * * @return True if this View is guaranteed to be fully opaque, false otherwise. - * - * @hide Pending API council approval */ @ViewDebug.ExportedProperty public boolean isOpaque() { @@ -5551,7 +5549,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility * * @see #awakenScrollBars(int) */ - private void onDrawScrollBars(Canvas canvas) { + protected final void onDrawScrollBars(Canvas canvas) { // scrollbars are drawn only when the animation is running final ScrollabilityCache cache = mScrollCache; if (cache != null) { diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java index f7b7f029df82..e2f15c7b9e40 100644 --- a/core/java/android/view/ViewGroup.java +++ b/core/java/android/view/ViewGroup.java @@ -150,6 +150,8 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager /** * When set, the drawing method will call {@link #getChildDrawingOrder(int, int)} * to get the index of the child to draw for that iteration. + * + * @hide */ protected static final int FLAG_USE_CHILD_DRAWING_ORDER = 0x400; @@ -1307,11 +1309,14 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager * if you want to change the drawing order of children. By default, it * returns i. * <p> - * NOTE: In order for this method to be called, the - * {@link #FLAG_USE_CHILD_DRAWING_ORDER} must be set. + * NOTE: In order for this method to be called, you must enable child ordering + * first by calling {@link #setChildrenDrawingOrderEnabled(boolean)}. * * @param i The current iteration. * @return The index of the child to draw this iteration. + * + * @see #setChildrenDrawingOrderEnabled(boolean) + * @see #isChildrenDrawingOrderEnabled() */ protected int getChildDrawingOrder(int childCount, int i) { return i; @@ -2706,6 +2711,35 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager setBooleanFlag(FLAG_CHILDREN_DRAWN_WITH_CACHE, enabled); } + /** + * Indicates whether the ViewGroup is drawing its children in the order defined by + * {@link #getChildDrawingOrder(int, int)}. + * + * @return true if children drawing order is defined by {@link #getChildDrawingOrder(int, int)}, + * false otherwise + * + * @see #setChildrenDrawingOrderEnabled(boolean) + * @see #getChildDrawingOrder(int, int) + */ + @ViewDebug.ExportedProperty + protected boolean isChildrenDrawingOrderEnabled() { + return (mGroupFlags & FLAG_USE_CHILD_DRAWING_ORDER) == FLAG_USE_CHILD_DRAWING_ORDER; + } + + /** + * Tells the ViewGroup whether to draw its children in the order defined by the method + * {@link #getChildDrawingOrder(int, int)}. + * + * @param enabled true if the order of the children when drawing is determined by + * {@link #getChildDrawingOrder(int, int)}, false otherwise + * + * @see #isChildrenDrawingOrderEnabled() + * @see #getChildDrawingOrder(int, int) + */ + protected void setChildrenDrawingOrderEnabled(boolean enabled) { + setBooleanFlag(FLAG_USE_CHILD_DRAWING_ORDER, enabled); + } + private void setBooleanFlag(int flag, boolean value) { if (value) { mGroupFlags |= flag; diff --git a/core/java/android/view/ViewRoot.java b/core/java/android/view/ViewRoot.java index a6d644be201e..f4593f53715e 100644 --- a/core/java/android/view/ViewRoot.java +++ b/core/java/android/view/ViewRoot.java @@ -898,6 +898,7 @@ public final class ViewRoot extends Handler implements ViewParent, // all at once. newSurface = true; fullRedrawNeeded = true; + mPreviousTransparentRegion.setEmpty(); if (mGlWanted && !mUseGL) { initializeGL(); @@ -2902,6 +2903,16 @@ public final class ViewRoot extends Handler implements ViewParent, } } } + + public void dispatchWallpaperCommand(String action, int x, int y, + int z, Bundle extras, boolean sync) { + if (sync) { + try { + sWindowSession.wallpaperCommandComplete(asBinder(), null); + } catch (RemoteException e) { + } + } + } } /** diff --git a/core/java/android/view/WindowManagerPolicy.java b/core/java/android/view/WindowManagerPolicy.java index 916fc2d78cb5..1ab46fc0a6ab 100644 --- a/core/java/android/view/WindowManagerPolicy.java +++ b/core/java/android/view/WindowManagerPolicy.java @@ -868,4 +868,9 @@ public interface WindowManagerPolicy { * requesting this is no longer visible. */ public void screenOnStoppedLw(); + + /** + * Return false to disable key repeat events from being generated. + */ + public boolean allowKeyRepeat(); } diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index 4bc1a0e37b23..fe912295562d 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -2926,12 +2926,12 @@ public class WebView extends AbsoluteLayout animateScroll); if (mNativeClass == 0) return; - if (mShiftIsPressed) { + if (mShiftIsPressed && !animateZoom) { if (mTouchSelection) { nativeDrawSelectionRegion(canvas); } else { - nativeDrawSelection(canvas, mSelectX, mSelectY, - mExtendSelection); + nativeDrawSelection(canvas, mInvActualScale, getTitleHeight(), + mSelectX, mSelectY, mExtendSelection); } } else if (drawCursorRing) { if (mTouchMode == TOUCH_SHORTPRESS_START_MODE) { @@ -3410,6 +3410,7 @@ public class WebView extends AbsoluteLayout } if (isTextInput) { rebuildWebTextView(); + displaySoftKeyboard(true); } return true; } @@ -4065,6 +4066,9 @@ public class WebView extends AbsoluteLayout return true; } if (ev.getAction() == MotionEvent.ACTION_DOWN) { + if (mShiftIsPressed) { + return true; // discard press if copy in progress + } mTrackballDown = true; if (mNativeClass == 0) { return false; @@ -4093,6 +4097,7 @@ public class WebView extends AbsoluteLayout } else { mExtendSelection = true; } + return true; // discard press if copy in progress } if (DebugFlags.WEB_VIEW) { Log.v(LOGTAG, "onTrackballEvent up ev=" + ev @@ -5600,8 +5605,8 @@ public class WebView extends AbsoluteLayout private native void nativeDestroy(); private native void nativeDrawCursorRing(Canvas content); private native void nativeDrawMatches(Canvas canvas); - private native void nativeDrawSelection(Canvas content - , int x, int y, boolean extendSelection); + private native void nativeDrawSelection(Canvas content, float scale, + int offset, int x, int y, boolean extendSelection); private native void nativeDrawSelectionRegion(Canvas content); private native void nativeDumpDisplayTree(String urlOrNull); private native int nativeFindAll(String findLower, String findUpper); diff --git a/core/java/android/webkit/WebViewCore.java b/core/java/android/webkit/WebViewCore.java index 86685fb41fd1..a5a48527a389 100644 --- a/core/java/android/webkit/WebViewCore.java +++ b/core/java/android/webkit/WebViewCore.java @@ -1643,8 +1643,6 @@ final class WebViewCore { final DrawFilter mZoomFilter = new PaintFlagsDrawFilter(ZOOM_BITS, Paint.LINEAR_TEXT_FLAG); - final DrawFilter mScrollFilter = - new PaintFlagsDrawFilter(SCROLL_BITS, 0); /* package */ void drawContentPicture(Canvas canvas, int color, boolean animatingZoom, @@ -1653,7 +1651,7 @@ final class WebViewCore { if (animatingZoom) { df = mZoomFilter; } else if (animatingScroll) { - df = mScrollFilter; + df = null; } canvas.setDrawFilter(df); boolean tookTooLong = nativeDrawContent(canvas, color); diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index bf3d26e075ed..596fd98e1338 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -3964,8 +3964,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener mHighlightPath = new Path(); if (selStart == selEnd) { - if ((SystemClock.uptimeMillis() - mShowCursor) % (2 * BLINK) - < BLINK) { + if ((SystemClock.uptimeMillis() - mShowCursor) % (2 * BLINK) < BLINK) { if (mHighlightPathBogus) { mHighlightPath.reset(); mLayout.getCursorPath(selStart, mHighlightPath, mText); @@ -5344,21 +5343,24 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener * will happen at measure). */ makeNewLayout(want, hintWant, UNKNOWN_BORING, UNKNOWN_BORING, - mRight - mLeft - getCompoundPaddingLeft() - getCompoundPaddingRight(), false); + mRight - mLeft - getCompoundPaddingLeft() - getCompoundPaddingRight(), + false); - // In a fixed-height view, so use our new text layout. - if (mLayoutParams.height != LayoutParams.WRAP_CONTENT && - mLayoutParams.height != LayoutParams.FILL_PARENT) { - invalidate(); - return; - } - - // Dynamic height, but height has stayed the same, - // so use our new text layout. - if (mLayout.getHeight() == oldht && - (mHintLayout == null || mHintLayout.getHeight() == oldht)) { - invalidate(); - return; + if (mEllipsize != TextUtils.TruncateAt.MARQUEE) { + // In a fixed-height view, so use our new text layout. + if (mLayoutParams.height != LayoutParams.WRAP_CONTENT && + mLayoutParams.height != LayoutParams.FILL_PARENT) { + invalidate(); + return; + } + + // Dynamic height, but height has stayed the same, + // so use our new text layout. + if (mLayout.getHeight() == oldht && + (mHintLayout == null || mHintLayout.getHeight() == oldht)) { + invalidate(); + return; + } } // We lose: the height has changed and we have a dynamic height. diff --git a/core/java/com/android/internal/app/IBatteryStats.aidl b/core/java/com/android/internal/app/IBatteryStats.aidl index 4bac5933d7ed..d5ccdeb3bfeb 100644 --- a/core/java/com/android/internal/app/IBatteryStats.aidl +++ b/core/java/com/android/internal/app/IBatteryStats.aidl @@ -37,7 +37,7 @@ interface IBatteryStats { void notePhoneOff(); void notePhoneSignalStrength(in SignalStrength signalStrength); void notePhoneDataConnectionState(int dataType, boolean hasData); - void noteAirplaneMode(boolean isAirplaneMode); + void notePhoneState(int phoneState); void noteWifiOn(int uid); void noteWifiOff(int uid); void noteWifiRunning(); diff --git a/core/java/com/android/internal/os/BatteryStatsImpl.java b/core/java/com/android/internal/os/BatteryStatsImpl.java index 4b26b8f5552f..8698cb7c818b 100644 --- a/core/java/com/android/internal/os/BatteryStatsImpl.java +++ b/core/java/com/android/internal/os/BatteryStatsImpl.java @@ -24,6 +24,7 @@ import android.os.ParcelFormatException; import android.os.Parcelable; import android.os.Process; import android.os.SystemClock; +import android.telephony.ServiceState; import android.telephony.SignalStrength; import android.telephony.TelephonyManager; import android.util.Log; @@ -56,7 +57,7 @@ public final class BatteryStatsImpl extends BatteryStats { private static final int MAGIC = 0xBA757475; // 'BATSTATS' // Current on-disk Parcel version - private static final int VERSION = 40; + private static final int VERSION = 41; private static int sNumSpeedSteps; @@ -117,7 +118,9 @@ public final class BatteryStatsImpl extends BatteryStats { int mPhoneSignalStrengthBin = -1; final StopwatchTimer[] mPhoneSignalStrengthsTimer = new StopwatchTimer[NUM_SIGNAL_STRENGTH_BINS]; - + + StopwatchTimer mPhoneSignalScanningTimer; + int mPhoneDataConnectionType = -1; final StopwatchTimer[] mPhoneDataConnectionsTimer = new StopwatchTimer[NUM_DATA_CONNECTION_TYPES]; @@ -169,6 +172,8 @@ public final class BatteryStatsImpl extends BatteryStats { private int mBluetoothPingCount; private int mBluetoothPingStart = -1; + private int mPhoneServiceState = -1; + /* * Holds a SamplingTimer associated with each kernel wakelock name being tracked. */ @@ -681,6 +686,8 @@ public final class BatteryStatsImpl extends BatteryStats { */ long mAcquireTime; + long mTimeout; + StopwatchTimer(int type, ArrayList<StopwatchTimer> timerPool, ArrayList<Unpluggable> unpluggables, Parcel in) { super(type, unpluggables, in); @@ -694,6 +701,10 @@ public final class BatteryStatsImpl extends BatteryStats { mTimerPool = timerPool; } + void setTimeout(long timeout) { + mTimeout = timeout; + } + public void writeToParcel(Parcel out, long batteryRealtime) { super.writeToParcel(out, batteryRealtime); out.writeLong(mUpdateTime); @@ -797,6 +808,9 @@ public final class BatteryStatsImpl extends BatteryStats { @Override protected long computeRunTimeLocked(long curBatteryRealtime) { + if (mTimeout > 0 && curBatteryRealtime > mUpdateTime + mTimeout) { + curBatteryRealtime = mUpdateTime + mTimeout; + } return mTotalTime + (mNesting > 0 ? (curBatteryRealtime - mUpdateTime) / (mTimerPool != null ? mTimerPool.size() : 1) @@ -1123,34 +1137,59 @@ public final class BatteryStatsImpl extends BatteryStats { } } - public void noteAirplaneModeLocked(boolean isAirplaneMode) { - final int bin = mPhoneSignalStrengthBin; - if (bin >= 0) { - if (!isAirplaneMode) { - if (!mPhoneSignalStrengthsTimer[bin].isRunningLocked()) { - mPhoneSignalStrengthsTimer[bin].startRunningLocked(this); - } - } else { - for (int i = 0; i < NUM_SIGNAL_STRENGTH_BINS; i++) { - while (mPhoneSignalStrengthsTimer[i].isRunningLocked()) { - mPhoneSignalStrengthsTimer[i].stopRunningLocked(this); - } + /** + * Telephony stack updates the phone state. + * @param state phone state from ServiceState.getState() + */ + public void notePhoneStateLocked(int state) { + int bin = mPhoneSignalStrengthBin; + boolean isAirplaneMode = state == ServiceState.STATE_POWER_OFF; + // Stop all timers + if (isAirplaneMode || state == ServiceState.STATE_OUT_OF_SERVICE) { + for (int i = 0; i < NUM_SIGNAL_STRENGTH_BINS; i++) { + while (mPhoneSignalStrengthsTimer[i].isRunningLocked()) { + mPhoneSignalStrengthsTimer[i].stopRunningLocked(this); } } } + // Stop Signal Scanning timer, in case we're going into service + while (mPhoneSignalScanningTimer.isRunningLocked()) { + mPhoneSignalScanningTimer.stopRunningLocked(this); + } + + // If we're back in service or continuing in service, restart the old timer. + if (state == ServiceState.STATE_IN_SERVICE) { + if (bin == -1) bin = SIGNAL_STRENGTH_NONE_OR_UNKNOWN; + if (!mPhoneSignalStrengthsTimer[bin].isRunningLocked()) { + mPhoneSignalStrengthsTimer[bin].startRunningLocked(this); + } + } else if (state == ServiceState.STATE_OUT_OF_SERVICE) { + mPhoneSignalStrengthBin = SIGNAL_STRENGTH_NONE_OR_UNKNOWN; + if (!mPhoneSignalStrengthsTimer[mPhoneSignalStrengthBin].isRunningLocked()) { + mPhoneSignalStrengthsTimer[mPhoneSignalStrengthBin].startRunningLocked(this); + } + if (!mPhoneSignalScanningTimer.isRunningLocked()) { + mPhoneSignalScanningTimer.startRunningLocked(this); + } + } + mPhoneServiceState = state; } public void notePhoneSignalStrengthLocked(SignalStrength signalStrength) { // Bin the strength. int bin; - + if (mPhoneServiceState == ServiceState.STATE_POWER_OFF + || mPhoneServiceState == ServiceState.STATE_OUT_OF_SERVICE) { + // Ignore any signal strength changes when radio was turned off or out of service. + return; + } if (!signalStrength.isGsm()) { int dBm = signalStrength.getCdmaDbm(); - if (dBm >= -75) bin = SIGNAL_STRENGTH_NONE_OR_UNKNOWN; - else if (dBm >= -85) bin = SIGNAL_STRENGTH_GREAT; - else if (dBm >= -95) bin = SIGNAL_STRENGTH_GOOD; - else if (dBm >= -100) bin = SIGNAL_STRENGTH_MODERATE; - else bin = SIGNAL_STRENGTH_POOR; + if (dBm >= -75) bin = SIGNAL_STRENGTH_GREAT; + else if (dBm >= -85) bin = SIGNAL_STRENGTH_GOOD; + else if (dBm >= -95) bin = SIGNAL_STRENGTH_MODERATE; + else if (dBm >= -100) bin = SIGNAL_STRENGTH_POOR; + else bin = SIGNAL_STRENGTH_NONE_OR_UNKNOWN; } else { int asu = signalStrength.getGsmSignalStrength(); if (asu < 0 || asu >= 99) bin = SIGNAL_STRENGTH_NONE_OR_UNKNOWN; @@ -1328,7 +1367,13 @@ public final class BatteryStatsImpl extends BatteryStats { return mPhoneSignalStrengthsTimer[strengthBin].getTotalTimeLocked( batteryRealtime, which); } - + + @Override public long getPhoneSignalScanningTime( + long batteryRealtime, int which) { + return mPhoneSignalScanningTimer.getTotalTimeLocked( + batteryRealtime, which); + } + @Override public int getPhoneSignalStrengthCount(int dataType, int which) { return mPhoneDataConnectionsTimer[dataType].getCountLocked(which); } @@ -2653,6 +2698,7 @@ public final class BatteryStatsImpl extends BatteryStats { for (int i=0; i<NUM_SIGNAL_STRENGTH_BINS; i++) { mPhoneSignalStrengthsTimer[i] = new StopwatchTimer(-200-i, null, mUnpluggables); } + mPhoneSignalScanningTimer = new StopwatchTimer(-200+1, null, mUnpluggables); for (int i=0; i<NUM_DATA_CONNECTION_TYPES; i++) { mPhoneDataConnectionsTimer[i] = new StopwatchTimer(-300-i, null, mUnpluggables); } @@ -2679,6 +2725,12 @@ public final class BatteryStatsImpl extends BatteryStats { if (sNumSpeedSteps == 0) sNumSpeedSteps = steps; } + public void setRadioScanningTimeout(long timeout) { + if (mPhoneSignalScanningTimer != null) { + mPhoneSignalScanningTimer.setTimeout(timeout); + } + } + @Override public int getStartCount() { return mStartCount; @@ -3114,6 +3166,7 @@ public final class BatteryStatsImpl extends BatteryStats { for (int i=0; i<NUM_SIGNAL_STRENGTH_BINS; i++) { mPhoneSignalStrengthsTimer[i].readSummaryFromParcelLocked(in); } + mPhoneSignalScanningTimer.readSummaryFromParcelLocked(in); for (int i=0; i<NUM_DATA_CONNECTION_TYPES; i++) { mPhoneDataConnectionsTimer[i].readSummaryFromParcelLocked(in); } @@ -3257,6 +3310,7 @@ public final class BatteryStatsImpl extends BatteryStats { for (int i=0; i<NUM_SIGNAL_STRENGTH_BINS; i++) { mPhoneSignalStrengthsTimer[i].writeSummaryFromParcelLocked(out, NOWREAL); } + mPhoneSignalScanningTimer.writeSummaryFromParcelLocked(out, NOWREAL); for (int i=0; i<NUM_DATA_CONNECTION_TYPES; i++) { mPhoneDataConnectionsTimer[i].writeSummaryFromParcelLocked(out, NOWREAL); } @@ -3418,6 +3472,7 @@ public final class BatteryStatsImpl extends BatteryStats { for (int i=0; i<NUM_SIGNAL_STRENGTH_BINS; i++) { mPhoneSignalStrengthsTimer[i] = new StopwatchTimer(-200-i, null, mUnpluggables, in); } + mPhoneSignalScanningTimer = new StopwatchTimer(-200+1, null, mUnpluggables, in); for (int i=0; i<NUM_DATA_CONNECTION_TYPES; i++) { mPhoneDataConnectionsTimer[i] = new StopwatchTimer(-300-i, null, mUnpluggables, in); } @@ -3513,6 +3568,7 @@ public final class BatteryStatsImpl extends BatteryStats { for (int i=0; i<NUM_SIGNAL_STRENGTH_BINS; i++) { mPhoneSignalStrengthsTimer[i].writeToParcel(out, batteryRealtime); } + mPhoneSignalScanningTimer.writeToParcel(out, batteryRealtime); for (int i=0; i<NUM_DATA_CONNECTION_TYPES; i++) { mPhoneDataConnectionsTimer[i].writeToParcel(out, batteryRealtime); } @@ -3598,6 +3654,8 @@ public final class BatteryStatsImpl extends BatteryStats { pr.println("*** Signal strength #" + i + ":"); mPhoneSignalStrengthsTimer[i].logState(pr, " "); } + pr.println("*** Signal scanning :"); + mPhoneSignalScanningTimer.logState(pr, " "); for (int i=0; i<NUM_DATA_CONNECTION_TYPES; i++) { pr.println("*** Data connection type #" + i + ":"); mPhoneDataConnectionsTimer[i].logState(pr, " "); diff --git a/core/java/com/android/internal/os/PowerProfile.java b/core/java/com/android/internal/os/PowerProfile.java index 4b4b71782552..2369d25bd472 100644 --- a/core/java/com/android/internal/os/PowerProfile.java +++ b/core/java/com/android/internal/os/PowerProfile.java @@ -97,6 +97,11 @@ public class PowerProfile { public static final String POWER_RADIO_ON = "radio.on"; /** + * Power consumption when cell radio is hunting for a signal. + */ + public static final String POWER_RADIO_SCANNING = "radio.scanning"; + + /** * Power consumption when talking on the phone. */ public static final String POWER_RADIO_ACTIVE = "radio.active"; diff --git a/core/java/com/android/internal/view/BaseIWindow.java b/core/java/com/android/internal/view/BaseIWindow.java index 38ef0c293f20..2674262c9546 100644 --- a/core/java/com/android/internal/view/BaseIWindow.java +++ b/core/java/com/android/internal/view/BaseIWindow.java @@ -1,6 +1,7 @@ package com.android.internal.view; import android.graphics.Rect; +import android.os.Bundle; import android.os.ParcelFileDescriptor; import android.os.RemoteException; import android.view.IWindow; @@ -101,4 +102,14 @@ public class BaseIWindow extends IWindow.Stub { } } } + + public void dispatchWallpaperCommand(String action, int x, int y, + int z, Bundle extras, boolean sync) { + if (sync) { + try { + mSession.wallpaperCommandComplete(asBinder(), null); + } catch (RemoteException e) { + } + } + } } diff --git a/core/java/com/android/internal/widget/ContactHeaderWidget.java b/core/java/com/android/internal/widget/ContactHeaderWidget.java index b98794b55fd8..d4411552948c 100644 --- a/core/java/com/android/internal/widget/ContactHeaderWidget.java +++ b/core/java/com/android/internal/widget/ContactHeaderWidget.java @@ -408,6 +408,17 @@ public class ContactHeaderWidget extends FrameLayout implements View.OnClickList PHONE_LOOKUP_PROJECTION, null, null, null); } + /** + * Method to force this widget to forget everything it knows about the contact. + * The widget isn't automatically updated or redrawn. + * + */ + public void wipeClean() { + setPhoto(null); + mContactUri = null; + mExcludeMimes = null; + } + private void startContactQuery(Uri contactUri) { mQueryHandler.startQuery(TOKEN_CONTACT_INFO, null, contactUri, ContactQuery.COLUMNS, null, null, null); diff --git a/core/jni/android/graphics/MaskFilter.cpp b/core/jni/android/graphics/MaskFilter.cpp index 0f8dff121055..455449e5349d 100644 --- a/core/jni/android/graphics/MaskFilter.cpp +++ b/core/jni/android/graphics/MaskFilter.cpp @@ -1,6 +1,7 @@ #include "GraphicsJNI.h" #include "SkMaskFilter.h" #include "SkBlurMaskFilter.h" +#include "SkTableMaskFilter.h" #include <jni.h> @@ -39,6 +40,19 @@ public: ThrowIAE_IfNull(env, filter); return filter; } + + static SkMaskFilter* createTable(JNIEnv* env, jobject, jbyteArray jtable) { + AutoJavaByteArray autoTable(env, jtable, 256); + return new SkTableMaskFilter((const uint8_t*)autoTable.ptr()); + } + + static SkMaskFilter* createClipTable(JNIEnv* env, jobject, int min, int max) { + return SkTableMaskFilter::CreateClip(min, max); + } + + static SkMaskFilter* createGammaTable(JNIEnv* env, jobject, float gamma) { + return SkTableMaskFilter::CreateGamma(gamma); + } }; static JNINativeMethod gMaskFilterMethods[] = { @@ -53,6 +67,12 @@ static JNINativeMethod gEmbossMaskFilterMethods[] = { { "nativeConstructor", "([FFFF)I", (void*)SkMaskFilterGlue::createEmboss } }; +static JNINativeMethod gTableMaskFilterMethods[] = { + { "nativeNewTable", "([B)I", (void*)SkMaskFilterGlue::createTable }, + { "nativeNewClip", "(II)I", (void*)SkMaskFilterGlue::createClipTable }, + { "nativeNewGamma", "(F)I", (void*)SkMaskFilterGlue::createGammaTable } +}; + #include <android_runtime/AndroidRuntime.h> #define REG(env, name, array) \ @@ -67,6 +87,7 @@ int register_android_graphics_MaskFilter(JNIEnv* env) REG(env, "android/graphics/MaskFilter", gMaskFilterMethods); REG(env, "android/graphics/BlurMaskFilter", gBlurMaskFilterMethods); REG(env, "android/graphics/EmbossMaskFilter", gEmbossMaskFilterMethods); + REG(env, "android/graphics/TableMaskFilter", gTableMaskFilterMethods); return 0; } diff --git a/core/jni/android_hardware_Camera.cpp b/core/jni/android_hardware_Camera.cpp index 5b6bd356a920..d57e52678906 100644 --- a/core/jni/android_hardware_Camera.cpp +++ b/core/jni/android_hardware_Camera.cpp @@ -23,6 +23,8 @@ #include "JNIHelp.h" #include "android_runtime/AndroidRuntime.h" +#include <utils/Vector.h> + #include <ui/Surface.h> #include <ui/Camera.h> #include <binder/IMemory.h> @@ -47,16 +49,23 @@ public: virtual void notify(int32_t msgType, int32_t ext1, int32_t ext2); virtual void postData(int32_t msgType, const sp<IMemory>& dataPtr); virtual void postDataTimestamp(nsecs_t timestamp, int32_t msgType, const sp<IMemory>& dataPtr); + void addCallbackBuffer(JNIEnv *env, jbyteArray cbb); + void setCallbackMode(JNIEnv *env, bool installed, bool manualMode); sp<Camera> getCamera() { Mutex::Autolock _l(mLock); return mCamera; } void release(); private: void copyAndPost(JNIEnv* env, const sp<IMemory>& dataPtr, int msgType); + void clearCallbackBuffers_l(JNIEnv *env); jobject mCameraJObjectWeak; // weak reference to java object jclass mCameraJClass; // strong reference to java class sp<Camera> mCamera; // strong reference to native object Mutex mLock; + + Vector<jbyteArray> mCallbackBuffers; // Global reference application managed byte[] + bool mManualBufferMode; // Whether to use application managed buffers. + bool mManualCameraCallbackSet; // Whether the callback has been set, used to reduce unnecessary calls to set the callback. }; sp<Camera> get_native_camera(JNIEnv *env, jobject thiz, JNICameraContext** pContext) @@ -81,6 +90,9 @@ JNICameraContext::JNICameraContext(JNIEnv* env, jobject weak_this, jclass clazz, mCameraJObjectWeak = env->NewGlobalRef(weak_this); mCameraJClass = (jclass)env->NewGlobalRef(clazz); mCamera = camera; + + mManualBufferMode = false; + mManualCameraCallbackSet = false; } void JNICameraContext::release() @@ -97,6 +109,7 @@ void JNICameraContext::release() env->DeleteGlobalRef(mCameraJClass); mCameraJClass = NULL; } + clearCallbackBuffers_l(env); mCamera.clear(); } @@ -129,7 +142,42 @@ void JNICameraContext::copyAndPost(JNIEnv* env, const sp<IMemory>& dataPtr, int if (heapBase != NULL) { const jbyte* data = reinterpret_cast<const jbyte*>(heapBase + offset); - obj = env->NewByteArray(size); + + if (!mManualBufferMode) { + LOGV("Allocating callback buffer"); + obj = env->NewByteArray(size); + } else { + // Vector access should be protected by lock in postData() + if(!mCallbackBuffers.isEmpty()) { + LOGV("Using callback buffer from queue of length %d", mCallbackBuffers.size()); + jbyteArray globalBuffer = mCallbackBuffers.itemAt(0); + mCallbackBuffers.removeAt(0); + + obj = (jbyteArray)env->NewLocalRef(globalBuffer); + env->DeleteGlobalRef(globalBuffer); + + if (obj != NULL) { + jsize bufferLength = env->GetArrayLength(obj); + if ((int)bufferLength < (int)size) { + LOGE("Manually set buffer was too small! Expected %d bytes, but got %d!", + size, bufferLength); + env->DeleteLocalRef(obj); + return; + } + } + } + + if(mCallbackBuffers.isEmpty()) { + LOGW("Out of buffers, clearing callback!"); + mCamera->setPreviewCallbackFlags(FRAME_CALLBACK_FLAG_NOOP); + mManualCameraCallbackSet = false; + + if (obj == NULL) { + return; + } + } + } + if (obj == NULL) { LOGE("Couldn't allocate byte array for JPEG data"); env->ExceptionClear(); @@ -184,6 +232,62 @@ void JNICameraContext::postDataTimestamp(nsecs_t timestamp, int32_t msgType, con postData(msgType, dataPtr); } +void JNICameraContext::setCallbackMode(JNIEnv *env, bool installed, bool manualMode) +{ + Mutex::Autolock _l(mLock); + mManualBufferMode = manualMode; + mManualCameraCallbackSet = false; + + // In order to limit the over usage of binder threads, all non-manual buffer + // callbacks use FRAME_CALLBACK_FLAG_BARCODE_SCANNER mode now. + // + // Continuous callbacks will have the callback re-registered from handleMessage. + // Manual buffer mode will operate as fast as possible, relying on the finite supply + // of buffers for throttling. + + if (!installed) { + mCamera->setPreviewCallbackFlags(FRAME_CALLBACK_FLAG_NOOP); + clearCallbackBuffers_l(env); + } else if (mManualBufferMode) { + if (!mCallbackBuffers.isEmpty()) { + mCamera->setPreviewCallbackFlags(FRAME_CALLBACK_FLAG_CAMERA); + mManualCameraCallbackSet = true; + } + } else { + mCamera->setPreviewCallbackFlags(FRAME_CALLBACK_FLAG_BARCODE_SCANNER); + clearCallbackBuffers_l(env); + } +} + +void JNICameraContext::addCallbackBuffer(JNIEnv *env, jbyteArray cbb) +{ + if (cbb != NULL) { + Mutex::Autolock _l(mLock); + jbyteArray callbackBuffer = (jbyteArray)env->NewGlobalRef(cbb); + mCallbackBuffers.push(cbb); + + LOGV("Adding callback buffer to queue, %d total", mCallbackBuffers.size()); + + // We want to make sure the camera knows we're ready for the next frame. + // This may have come unset had we not had a callbackbuffer ready for it last time. + if (mManualBufferMode && !mManualCameraCallbackSet) { + mCamera->setPreviewCallbackFlags(FRAME_CALLBACK_FLAG_CAMERA); + mManualCameraCallbackSet = true; + } + } else { + LOGE("Null byte array!"); + } +} + +void JNICameraContext::clearCallbackBuffers_l(JNIEnv *env) +{ + LOGV("Clearing callback buffers, %d remained", mCallbackBuffers.size()); + while(!mCallbackBuffers.isEmpty()) { + env->DeleteGlobalRef(mCallbackBuffers.top()); + mCallbackBuffers.pop(); + } +} + // connect to camera service static void android_hardware_Camera_native_setup(JNIEnv *env, jobject thiz, jobject weak_this) { @@ -297,8 +401,9 @@ static bool android_hardware_Camera_previewEnabled(JNIEnv *env, jobject thiz) return c->previewEnabled(); } -static void android_hardware_Camera_setHasPreviewCallback(JNIEnv *env, jobject thiz, jboolean installed, jboolean oneshot) +static void android_hardware_Camera_setHasPreviewCallback(JNIEnv *env, jobject thiz, jboolean installed, jboolean manualBuffer) { + LOGV("setHasPreviewCallback: installed:%d, manualBuffer:%d", (int)installed, (int)manualBuffer); // Important: Only install preview_callback if the Java code has called // setPreviewCallback() with a non-null value, otherwise we'd pay to memcpy // each preview frame for nothing. @@ -306,13 +411,19 @@ static void android_hardware_Camera_setHasPreviewCallback(JNIEnv *env, jobject t sp<Camera> camera = get_native_camera(env, thiz, &context); if (camera == 0) return; - int callback_flag; - if (installed) { - callback_flag = oneshot ? FRAME_CALLBACK_FLAG_BARCODE_SCANNER : FRAME_CALLBACK_FLAG_CAMERA; - } else { - callback_flag = FRAME_CALLBACK_FLAG_NOOP; + // setCallbackMode will take care of setting the context flags and calling + // camera->setPreviewCallbackFlags within a mutex for us. + context->setCallbackMode(env, installed, manualBuffer); +} + +static void android_hardware_Camera_addCallbackBuffer(JNIEnv *env, jobject thiz, jbyteArray bytes) { + LOGV("addCallbackBuffer"); + + JNICameraContext* context = reinterpret_cast<JNICameraContext*>(env->GetIntField(thiz, fields.context)); + + if (context != NULL) { + context->addCallbackBuffer(env, bytes); } - camera->setPreviewCallbackFlags(callback_flag); } static void android_hardware_Camera_autoFocus(JNIEnv *env, jobject thiz) @@ -459,6 +570,9 @@ static JNINativeMethod camMethods[] = { { "setHasPreviewCallback", "(ZZ)V", (void *)android_hardware_Camera_setHasPreviewCallback }, + { "addCallbackBuffer", + "([B)V", + (void *)android_hardware_Camera_addCallbackBuffer }, { "native_autoFocus", "()V", (void *)android_hardware_Camera_autoFocus }, diff --git a/core/jni/android_location_GpsLocationProvider.cpp b/core/jni/android_location_GpsLocationProvider.cpp index 4aed277d2a19..f84587818ecc 100755 --- a/core/jni/android_location_GpsLocationProvider.cpp +++ b/core/jni/android_location_GpsLocationProvider.cpp @@ -266,7 +266,9 @@ static void android_location_GpsLocationProvider_delete_aiding_data(JNIEnv* env, static void android_location_GpsLocationProvider_wait_for_event(JNIEnv* env, jobject obj) { pthread_mutex_lock(&sEventMutex); - pthread_cond_wait(&sEventCond, &sEventMutex); + while (sPendingCallbacks == 0) { + pthread_cond_wait(&sEventCond, &sEventMutex); + } // copy and clear the callback flags int pendingCallbacks = sPendingCallbacks; diff --git a/core/jni/android_media_ToneGenerator.cpp b/core/jni/android_media_ToneGenerator.cpp index 07bb1abafd32..50aa967df38e 100644 --- a/core/jni/android_media_ToneGenerator.cpp +++ b/core/jni/android_media_ToneGenerator.cpp @@ -79,7 +79,7 @@ static void android_media_ToneGenerator_release(JNIEnv *env, jobject thiz) { static void android_media_ToneGenerator_native_setup(JNIEnv *env, jobject thiz, jint streamType, jint volume) { - ToneGenerator *lpToneGen = new ToneGenerator(streamType, AudioSystem::linearToLog(volume)); + ToneGenerator *lpToneGen = new ToneGenerator(streamType, AudioSystem::linearToLog(volume), true); env->SetIntField(thiz, fields.context, 0); diff --git a/core/jni/android_opengl_GLES11.cpp b/core/jni/android_opengl_GLES11.cpp index ed8dfc8b955d..44213ed1cc5a 100644 --- a/core/jni/android_opengl_GLES11.cpp +++ b/core/jni/android_opengl_GLES11.cpp @@ -144,6 +144,10 @@ android_glBufferData__IILjava_nio_Buffer_2I if (data_buf) { data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining); + if (_remaining < size) { + _env->ThrowNew(IAEClass, "remaining() < size"); + goto exit; + } } glBufferData( (GLenum)target, @@ -151,6 +155,8 @@ android_glBufferData__IILjava_nio_Buffer_2I (GLvoid *)data, (GLenum)usage ); + +exit: if (_array) { releasePointer(_env, _array, data, JNI_FALSE); } @@ -165,12 +171,18 @@ android_glBufferSubData__IIILjava_nio_Buffer_2 GLvoid *data = (GLvoid *) 0; data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining); + if (_remaining < size) { + _env->ThrowNew(IAEClass, "remaining() < size"); + goto exit; + } glBufferSubData( (GLenum)target, (GLintptr)offset, (GLsizeiptr)size, (GLvoid *)data ); + +exit: if (_array) { releasePointer(_env, _array, data, JNI_FALSE); } diff --git a/core/jni/android_text_format_Time.cpp b/core/jni/android_text_format_Time.cpp index 98f4e035c0c9..fde6ca6e2b2a 100644 --- a/core/jni/android_text_format_Time.cpp +++ b/core/jni/android_text_format_Time.cpp @@ -367,10 +367,12 @@ static int get_char(JNIEnv* env, const jchar *s, int spos, int mul, if (c >= '0' && c <= '9') { return (c - '0') * mul; } else { - char msg[100]; - sprintf(msg, "Parse error at pos=%d", spos); - jniThrowException(env, "android/util/TimeFormatException", msg); - *thrown = true; + if (!*thrown) { + char msg[100]; + sprintf(msg, "Parse error at pos=%d", spos); + jniThrowException(env, "android/util/TimeFormatException", msg); + *thrown = true; + } return 0; } } diff --git a/core/jni/android_util_Process.cpp b/core/jni/android_util_Process.cpp index 5b6c7ea13e8a..d8c2234943e3 100644 --- a/core/jni/android_util_Process.cpp +++ b/core/jni/android_util_Process.cpp @@ -51,6 +51,8 @@ pid_t gettid() { return syscall(__NR_gettid);} #undef __KERNEL__ #endif +#define POLICY_DEBUG 0 + using namespace android; static void signalExceptionForPriorityError(JNIEnv* env, jobject obj, int err) @@ -212,6 +214,26 @@ void android_os_Process_setProcessGroup(JNIEnv* env, jobject clazz, int pid, jin return; } +#if POLICY_DEBUG + char cmdline[32]; + int fd; + + strcpy(cmdline, "unknown"); + + sprintf(proc_path, "/proc/%d/cmdline", pid); + fd = open(proc_path, O_RDONLY); + if (fd >= 0) { + int rc = read(fd, cmdline, sizeof(cmdline)-1); + cmdline[rc] = 0; + close(fd); + } + + if (grp == ANDROID_TGROUP_BG_NONINTERACT) { + LOGD("setProcessGroup: vvv pid %d (%s)", pid, cmdline); + } else { + LOGD("setProcessGroup: ^^^ pid %d (%s)", pid, cmdline); + } +#endif sprintf(proc_path, "/proc/%d/task", pid); if (!(d = opendir(proc_path))) { // If the process exited on us, don't generate an exception diff --git a/core/jni/com_google_android_gles_jni_GLImpl.cpp b/core/jni/com_google_android_gles_jni_GLImpl.cpp index 89b1f96879e5..3e0aea5a9b0f 100644 --- a/core/jni/com_google_android_gles_jni_GLImpl.cpp +++ b/core/jni/com_google_android_gles_jni_GLImpl.cpp @@ -3593,6 +3593,10 @@ android_glBufferData__IILjava_nio_Buffer_2I if (data_buf) { data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining); + if (_remaining < size) { + _env->ThrowNew(IAEClass, "remaining() < size"); + goto exit; + } } glBufferData( (GLenum)target, @@ -3600,6 +3604,8 @@ android_glBufferData__IILjava_nio_Buffer_2I (GLvoid *)data, (GLenum)usage ); + +exit: if (_array) { releasePointer(_env, _array, data, JNI_FALSE); } @@ -3614,12 +3620,18 @@ android_glBufferSubData__IIILjava_nio_Buffer_2 GLvoid *data = (GLvoid *) 0; data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining); + if (_remaining < size) { + _env->ThrowNew(IAEClass, "remaining() < size"); + goto exit; + } glBufferSubData( (GLenum)target, (GLintptr)offset, (GLsizeiptr)size, (GLvoid *)data ); + +exit: if (_array) { releasePointer(_env, _array, data, JNI_FALSE); } diff --git a/core/res/res/layout/media_controller.xml b/core/res/res/layout/media_controller.xml index c49835d2917a..32db60ac8299 100644 --- a/core/res/res/layout/media_controller.xml +++ b/core/res/res/layout/media_controller.xml @@ -59,7 +59,7 @@ style="?android:attr/progressBarStyleHorizontal" android:layout_width="0dip" android:layout_weight="1" - android:layout_height="30px" + android:layout_height="30dip" android:layout_alignParentLeft="true" android:layout_alignParentRight="true" /> diff --git a/core/res/res/values-cs/strings.xml b/core/res/res/values-cs/strings.xml index fba6c084408a..f93fb017324d 100644 --- a/core/res/res/values-cs/strings.xml +++ b/core/res/res/values-cs/strings.xml @@ -111,8 +111,7 @@ <string name="httpErrorFile" msgid="8250549644091165175">"K souboru nelze získat přístup."</string> <string name="httpErrorFileNotFound" msgid="5588380756326017105">"Požadovaný soubor nebyl nalezen."</string> <string name="httpErrorTooManyRequests" msgid="1235396927087188253">"Je zpracováváno příliš mnoho požadavků. Opakujte akci později."</string> - <!-- no translation found for notification_title (1259940370369187045) --> - <skip /> + <string name="notification_title" msgid="1259940370369187045">"Chyba přihlášení k účtu <xliff:g id="ACCOUNT">%1$s</xliff:g>"</string> <string name="contentServiceSync" msgid="8353523060269335667">"Synchronizace"</string> <string name="contentServiceSyncNotificationTitle" msgid="397743349191901458">"Synchronizace"</string> <string name="contentServiceTooManyDeletesNotificationDesc" msgid="8100981435080696431">"Příliš mnoho smazaných položek služby <xliff:g id="CONTENT_TYPE">%s</xliff:g>."</string> @@ -148,8 +147,8 @@ <string name="permgroupdesc_location" msgid="2430258821648348660">"Sleduje vaši fyzickou polohu"</string> <string name="permgrouplab_network" msgid="5808983377727109831">"Síťová komunikace"</string> <string name="permgroupdesc_network" msgid="5035763698958415998">"Umožňuje aplikacím získat přístup k různým funkcím sítě."</string> - <string name="permgrouplab_accounts" msgid="7140261692496314430">"Vaše účty Google"</string> - <string name="permgroupdesc_accounts" msgid="6735915929704895193">"Přístup k dostupným účtům Google."</string> + <string name="permgrouplab_accounts" msgid="3359646291125325519">"Vaše účty"</string> + <string name="permgroupdesc_accounts" msgid="4948732641827091312">"Přístup k dostupným účtům."</string> <string name="permgrouplab_hardwareControls" msgid="7998214968791599326">"Řízení hardwaru"</string> <string name="permgroupdesc_hardwareControls" msgid="4357057861225462702">"Přímý přístup k hardwaru telefonu."</string> <string name="permgrouplab_phoneCalls" msgid="9067173988325865923">"Telefonní hovory"</string> @@ -317,7 +316,7 @@ <string name="permlab_callPrivileged" msgid="4198349211108497879">"přímé volání na libovolná telefonní čísla"</string> <string name="permdesc_callPrivileged" msgid="244405067160028452">"Umožňuje aplikaci bez vašeho zásahu vytočit jakékoli telefonní číslo, včetně čísel tísňového volání. Škodlivé aplikace mohou provádět zbytečná a nezákonná volání na tísňové linky."</string> <string name="permlab_performCdmaProvisioning" msgid="5604848095315421425">"přímo spustit nastavení telefonu CDMA"</string> - <string name="permdesc_performCdmaProvisioning" msgid="6457447676108355905">"Umožňuje aplikaci zahájit zřizování CDMA. Škodlivé aplikace mohou zřizování CDMA zahájit samovolně."</string> + <string name="permdesc_performCdmaProvisioning" msgid="6457447676108355905">"Umožňuje aplikaci zahájit poskytování CDMA. Škodlivé aplikace mohou poskytování CDMA zahájit samovolně."</string> <string name="permlab_locationUpdates" msgid="7785408253364335740">"ovládání oznámení o aktualizaci polohy"</string> <string name="permdesc_locationUpdates" msgid="2300018303720930256">"Umožňuje povolit či zakázat aktualizace polohy prostřednictvím bezdrátového připojení. Aplikace toto nastavení obvykle nepoužívají."</string> <string name="permlab_checkinProperties" msgid="7855259461268734914">"přístup k vlastnostem Checkin"</string> @@ -433,6 +432,58 @@ <item msgid="2506857312718630823">"ICQ"</item> <item msgid="1648797903785279353">"Jabber"</item> </string-array> + <string name="phoneTypeCustom" msgid="1644738059053355820">"Vlastní"</string> + <string name="phoneTypeHome" msgid="2570923463033985887">"Domů"</string> + <string name="phoneTypeMobile" msgid="6501463557754751037">"Mobil"</string> + <string name="phoneTypeWork" msgid="8863939667059911633">"Práce"</string> + <string name="phoneTypeFaxWork" msgid="3517792160008890912">"Pracovní fax"</string> + <string name="phoneTypeFaxHome" msgid="2067265972322971467">"Domácí fax"</string> + <string name="phoneTypePager" msgid="7582359955394921732">"Pager"</string> + <string name="phoneTypeOther" msgid="1544425847868765990">"Jiné"</string> + <string name="phoneTypeCallback" msgid="2712175203065678206">"Zpětné volání"</string> + <string name="phoneTypeCar" msgid="8738360689616716982">"Auto"</string> + <string name="phoneTypeCompanyMain" msgid="540434356461478916">"Firma (hlavní)"</string> + <string name="phoneTypeIsdn" msgid="8022453193171370337">"ISDN"</string> + <string name="phoneTypeMain" msgid="6766137010628326916">"Hlavní"</string> + <string name="phoneTypeOtherFax" msgid="8587657145072446565">"Jiný fax"</string> + <string name="phoneTypeRadio" msgid="4093738079908667513">"Radiotelefon"</string> + <string name="phoneTypeTelex" msgid="3367879952476250512">"Telex"</string> + <string name="phoneTypeTtyTdd" msgid="8606514378585000044">"Telefon pro sluchově postižené (TTY/TDD)"</string> + <string name="phoneTypeWorkMobile" msgid="1311426989184065709">"Pracovní mobil"</string> + <string name="phoneTypeWorkPager" msgid="649938731231157056">"Pracovní pager"</string> + <string name="phoneTypeAssistant" msgid="5596772636128562884">"Asistent"</string> + <string name="phoneTypeMms" msgid="7254492275502768992">"MMS"</string> + <string name="eventTypeBirthday" msgid="2813379844211390740">"Narozeniny"</string> + <string name="eventTypeAnniversary" msgid="3876779744518284000">"Výročí"</string> + <string name="eventTypeOther" msgid="5834288791948564594">"Událost"</string> + <string name="emailTypeCustom" msgid="8525960257804213846">"Vlastní"</string> + <string name="emailTypeHome" msgid="449227236140433919">"Domů"</string> + <string name="emailTypeWork" msgid="3548058059601149973">"Práce"</string> + <string name="emailTypeOther" msgid="2923008695272639549">"Jiné"</string> + <string name="emailTypeMobile" msgid="119919005321166205">"Mobil"</string> + <string name="postalTypeCustom" msgid="8903206903060479902">"Vlastní"</string> + <string name="postalTypeHome" msgid="8165756977184483097">"Domů"</string> + <string name="postalTypeWork" msgid="5268172772387694495">"Práce"</string> + <string name="postalTypeOther" msgid="2726111966623584341">"Jiné"</string> + <string name="imTypeCustom" msgid="2074028755527826046">"Vlastní"</string> + <string name="imTypeHome" msgid="6241181032954263892">"Domů"</string> + <string name="imTypeWork" msgid="1371489290242433090">"Práce"</string> + <string name="imTypeOther" msgid="5377007495735915478">"Jiné"</string> + <string name="imProtocolCustom" msgid="6919453836618749992">"Vlastní"</string> + <string name="imProtocolAim" msgid="7050360612368383417">"AIM"</string> + <string name="imProtocolMsn" msgid="144556545420769442">"Windows Live"</string> + <string name="imProtocolYahoo" msgid="8271439408469021273">"Yahoo"</string> + <string name="imProtocolSkype" msgid="9019296744622832951">"Skype"</string> + <string name="imProtocolQq" msgid="8887484379494111884">"QQ"</string> + <string name="imProtocolGoogleTalk" msgid="3808393979157698766">"Google Talk"</string> + <string name="imProtocolIcq" msgid="1574870433606517315">"ICQ"</string> + <string name="imProtocolJabber" msgid="2279917630875771722">"Jabber"</string> + <string name="imProtocolNetMeeting" msgid="8287625655986827971">"NetMeeting"</string> + <string name="orgTypeWork" msgid="29268870505363872">"Práce"</string> + <string name="orgTypeOther" msgid="3951781131570124082">"Jiné"</string> + <string name="orgTypeCustom" msgid="225523415372088322">"Vlastní"</string> + <string name="contact_status_update_attribution" msgid="5112589886094402795">"pomocí <xliff:g id="SOURCE">%1$s</xliff:g>"</string> + <string name="contact_status_update_attribution_with_date" msgid="5945386376369979909">"<xliff:g id="DATE">%1$s</xliff:g> pomocí <xliff:g id="SOURCE">%2$s</xliff:g>"</string> <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Zadejte kód PIN"</string> <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Nesprávný kód PIN"</string> <string name="keyguard_label_text" msgid="861796461028298424">"Chcete-li telefon odemknout, stiskněte Menu a poté 0."</string> @@ -447,6 +498,7 @@ <string name="lockscreen_pattern_wrong" msgid="4817583279053112312">"Zkuste to prosím znovu"</string> <string name="lockscreen_plugged_in" msgid="613343852842944435">"Nabíjení (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string> <string name="lockscreen_charged" msgid="4938930459620989972">"Nabito."</string> + <string name="lockscreen_battery_short" msgid="3617549178603354656">"<xliff:g id="NUMBER">%d</xliff:g> <xliff:g id="PERCENT">%%</xliff:g>"</string> <string name="lockscreen_low_battery" msgid="1482873981919249740">"Připojte dobíjecí zařízení."</string> <string name="lockscreen_missing_sim_message_short" msgid="7381499217732227295">"Není vložena SIM karta."</string> <string name="lockscreen_missing_sim_message" msgid="2186920585695169078">"V telefonu není žádná karta SIM."</string> @@ -478,7 +530,7 @@ <string name="battery_status_charging" msgid="756617993998772213">"Nabíjení..."</string> <string name="battery_low_title" msgid="7923774589611311406">"Prosím připojte dobíjecí zařízení"</string> <string name="battery_low_subtitle" msgid="7388781709819722764">"Baterie je vybitá:"</string> - <string name="battery_low_percent_format" msgid="6564958083485073855">"zbývá méně než <xliff:g id="NUMBER">%d%%</xliff:g>."</string> + <string name="battery_low_percent_format" msgid="696154104579022959">"Zbývá <xliff:g id="NUMBER">%d%%</xliff:g> nebo méně."</string> <string name="battery_low_why" msgid="7279169609518386372">"Využití baterie"</string> <string name="factorytest_failed" msgid="5410270329114212041">"Test továrního nastavení se nezdařil"</string> <string name="factorytest_not_system" msgid="4435201656767276723">"Test FACTORY_TEST lze provést pouze u balíčků nainstalovaných ve složce /system/app."</string> @@ -488,6 +540,7 @@ <string name="js_dialog_title_default" msgid="6961903213729667573">"JavaScript"</string> <string name="js_dialog_before_unload" msgid="1901675448179653089">"Chcete opustit tuto stránku?"\n\n"<xliff:g id="MESSAGE">%s</xliff:g>"\n\n"Vyberte OK, chcete-li pokračovat, nebo Zrušit, chcete-li na stránce zůstat."</string> <string name="save_password_label" msgid="6860261758665825069">"Potvrdit"</string> + <string name="double_tap_toast" msgid="1068216937244567247">"Tip: Dvojitým klepnutím můžete zobrazení přiblížit nebo oddálit."</string> <string name="permlab_readHistoryBookmarks" msgid="1284843728203412135">"čtení historie a záložek Prohlížeče"</string> <string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"Umožňuje aplikaci číst všechny navštívené adresy URL a záložky Prohlížeče."</string> <string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"zápis do historie a záložek Prohlížeče"</string> @@ -692,10 +745,8 @@ <string name="extmedia_format_message" msgid="3621369962433523619">"Opravdu chcete kartu SD naformátovat? Všechna data na kartě budou ztracena."</string> <string name="extmedia_format_button_format" msgid="4131064560127478695">"Formátovat"</string> <string name="adb_active_notification_title" msgid="6729044778949189918">"Ladění přes rozhraní USB připojeno"</string> - <!-- no translation found for adb_active_notification_message (8470296818270110396) --> - <skip /> - <!-- no translation found for select_input_method (6865512749462072765) --> - <skip /> + <string name="adb_active_notification_message" msgid="8470296818270110396">"Vyberte, chcete-li zakázat ladění USB."</string> + <string name="select_input_method" msgid="6865512749462072765">"Výběr metody zadávání dat"</string> <string name="fast_scroll_alphabet" msgid="5433275485499039199">" AÁBCČDĎEÉĚFGHCHIÍJKLMNŇOÓPQRŘSŠTŤUÚVWXYÝZŽ"</string> <string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789AÁBCČDĎEÉĚFGHCHIÍJKLMNŇOÓPQRŘSŠTŤUÚVWXYÝZŽ"</string> <string name="candidates_style" msgid="4333913089637062257"><u>"kandidáti"</u></string> @@ -731,11 +782,14 @@ <string name="allow" msgid="7225948811296386551">"Povolit"</string> <string name="deny" msgid="2081879885755434506">"Odepřít"</string> <string name="permission_request_notification_title" msgid="5390555465778213840">"Požadováno oprávnění"</string> - <!-- no translation found for permission_request_notification_with_subtitle (4325409589686688000) --> - <skip /> + <string name="permission_request_notification_with_subtitle" msgid="4325409589686688000">"Požadováno oprávnění"\n"pro účet <xliff:g id="ACCOUNT">%s</xliff:g>"</string> <string name="input_method_binding_label" msgid="1283557179944992649">"Metoda zadávání dat"</string> <string name="sync_binding_label" msgid="3687969138375092423">"Synchronizace"</string> <string name="accessibility_binding_label" msgid="4148120742096474641">"Usnadnění"</string> <string name="wallpaper_binding_label" msgid="1240087844304687662">"Tapeta"</string> <string name="chooser_wallpaper" msgid="7873476199295190279">"Změnit tapetu"</string> + <string name="pptp_vpn_description" msgid="2688045385181439401">"Protokol PPTP (Point-to-Point Tunneling Protocol)"</string> + <string name="l2tp_vpn_description" msgid="3750692169378923304">"Protokol L2TP (Layer 2 Tunneling Protocol)"</string> + <string name="l2tp_ipsec_psk_vpn_description" msgid="3945043564008303239">"Síť VPN L2TP/IPSec s předsdíleným klíčem"</string> + <string name="l2tp_ipsec_crt_vpn_description" msgid="5382714073103653577">"Síť VPN L2TP/IPSec s certifikátem"</string> </resources> diff --git a/core/res/res/values-da/strings.xml b/core/res/res/values-da/strings.xml index 99f8ec9259be..fa89feaaf7a7 100644 --- a/core/res/res/values-da/strings.xml +++ b/core/res/res/values-da/strings.xml @@ -111,8 +111,7 @@ <string name="httpErrorFile" msgid="8250549644091165175">"Der kunne ikke oprettes adgang til filen."</string> <string name="httpErrorFileNotFound" msgid="5588380756326017105">"Den anmodede fil blev ikke fundet."</string> <string name="httpErrorTooManyRequests" msgid="1235396927087188253">"Der behandles for mange anmodninger. Prøv igen senere."</string> - <!-- no translation found for notification_title (1259940370369187045) --> - <skip /> + <string name="notification_title" msgid="1259940370369187045">"Loginfejl for <xliff:g id="ACCOUNT">%1$s</xliff:g>"</string> <string name="contentServiceSync" msgid="8353523060269335667">"Synkroniser"</string> <string name="contentServiceSyncNotificationTitle" msgid="397743349191901458">"Synkroniser"</string> <string name="contentServiceTooManyDeletesNotificationDesc" msgid="8100981435080696431">"For mange <xliff:g id="CONTENT_TYPE">%s</xliff:g> sletninger"</string> @@ -148,8 +147,8 @@ <string name="permgroupdesc_location" msgid="2430258821648348660">"Overvåg din fysiske placering"</string> <string name="permgrouplab_network" msgid="5808983377727109831">"Netværkskommunikation"</string> <string name="permgroupdesc_network" msgid="5035763698958415998">"Tillader programmer at få adgang til forskellige netværksfunktioner."</string> - <string name="permgrouplab_accounts" msgid="7140261692496314430">"Dine Google-konti"</string> - <string name="permgroupdesc_accounts" msgid="6735915929704895193">"Få adgang til tilgængelige Google-konti."</string> + <string name="permgrouplab_accounts" msgid="3359646291125325519">"Dine konti"</string> + <string name="permgroupdesc_accounts" msgid="4948732641827091312">"Få adgang til de tilgængelige konti."</string> <string name="permgrouplab_hardwareControls" msgid="7998214968791599326">"Hardwarekontroller"</string> <string name="permgroupdesc_hardwareControls" msgid="4357057861225462702">"Direkte adgang til hardware på håndsættet."</string> <string name="permgrouplab_phoneCalls" msgid="9067173988325865923">"Telefonopkald"</string> @@ -213,7 +212,7 @@ <string name="permlab_backup" msgid="470013022865453920">"kontroller sikkerhedskopiering af system, og gendan"</string> <string name="permdesc_backup" msgid="4837493065154256525">"Tillader et program at kontrollere systemets sikkerhedskopierings- og gendannelsesmekanisme. Ikke til brug til normale programmer."</string> <string name="permlab_backup_data" msgid="4057625941707926463">"Sikkerhedskopier og gendan programmets data"</string> - <string name="permdesc_backup_data" msgid="8274426305151227766">"Tillader et program at kontrollere systemets sikkerhedskopierings- og gendannelsesmekanisme."</string> + <string name="permdesc_backup_data" msgid="8274426305151227766">"Tillader et program at deltage i systemets sikkerhedskopierings- og gendannelsesmekanisme."</string> <string name="permlab_internalSystemWindow" msgid="2148563628140193231">"vis uautoriserede vinduer"</string> <string name="permdesc_internalSystemWindow" msgid="5895082268284998469">"Tillader oprettelse af vinduer, der er beregnet til at blive brugt af den interne systembrugergrænseflade. Ikke til brug for normale programmer."</string> <string name="permlab_systemAlertWindow" msgid="3372321942941168324">"vis underretninger på systemniveau"</string> @@ -317,7 +316,7 @@ <string name="permlab_callPrivileged" msgid="4198349211108497879">"ring direkte op til alle telefonnumre"</string> <string name="permdesc_callPrivileged" msgid="244405067160028452">"Tillader programmet at ringe til alle telefonnumre inklusive nødnumre uden din indgriben. Ondsindede programmer kan eventuelt foretage unødvendige og ulovlige opkald til nødtjenester."</string> <string name="permlab_performCdmaProvisioning" msgid="5604848095315421425">"start CDMA-telefonopsætning direkte"</string> - <string name="permdesc_performCdmaProvisioning" msgid="6457447676108355905">"Tillader, at programmet starter CDMA-levering. Onsindede programmer kan starte unødvendig CDMA-levering"</string> + <string name="permdesc_performCdmaProvisioning" msgid="6457447676108355905">"Tillader, at programmet starter CDMA-levering. Ondsindede programmer kan starte unødvendig CDMA-levering"</string> <string name="permlab_locationUpdates" msgid="7785408253364335740">"kontroller meddelelser om placeringsopdatering"</string> <string name="permdesc_locationUpdates" msgid="2300018303720930256">"Tillader aktivering/deaktivering af placeringsdata fra radioen. Ikke til brug til normale programmer."</string> <string name="permlab_checkinProperties" msgid="7855259461268734914">"egenskaber for adgangskontrol"</string> @@ -433,6 +432,58 @@ <item msgid="2506857312718630823">"ICQ"</item> <item msgid="1648797903785279353">"Jabber"</item> </string-array> + <string name="phoneTypeCustom" msgid="1644738059053355820">"Tilpasset"</string> + <string name="phoneTypeHome" msgid="2570923463033985887">"Start"</string> + <string name="phoneTypeMobile" msgid="6501463557754751037">"Mobil"</string> + <string name="phoneTypeWork" msgid="8863939667059911633">"Arbejde"</string> + <string name="phoneTypeFaxWork" msgid="3517792160008890912">"Arbejdsfax"</string> + <string name="phoneTypeFaxHome" msgid="2067265972322971467">"Hjemmefax"</string> + <string name="phoneTypePager" msgid="7582359955394921732">"Personsøger"</string> + <string name="phoneTypeOther" msgid="1544425847868765990">"Andre"</string> + <string name="phoneTypeCallback" msgid="2712175203065678206">"Tilbagekald"</string> + <string name="phoneTypeCar" msgid="8738360689616716982">"Bil"</string> + <string name="phoneTypeCompanyMain" msgid="540434356461478916">"Virksomhed (hovednummer)"</string> + <string name="phoneTypeIsdn" msgid="8022453193171370337">"ISDN"</string> + <string name="phoneTypeMain" msgid="6766137010628326916">"Hoved"</string> + <string name="phoneTypeOtherFax" msgid="8587657145072446565">"Andre faxmeddelelser"</string> + <string name="phoneTypeRadio" msgid="4093738079908667513">"Radio"</string> + <string name="phoneTypeTelex" msgid="3367879952476250512">"Telex"</string> + <string name="phoneTypeTtyTdd" msgid="8606514378585000044">"TTY TDD"</string> + <string name="phoneTypeWorkMobile" msgid="1311426989184065709">"Arbejdsmobiltelefon"</string> + <string name="phoneTypeWorkPager" msgid="649938731231157056">"Personsøger"</string> + <string name="phoneTypeAssistant" msgid="5596772636128562884">"Assistent"</string> + <string name="phoneTypeMms" msgid="7254492275502768992">"MMS"</string> + <string name="eventTypeBirthday" msgid="2813379844211390740">"Fødselsdato"</string> + <string name="eventTypeAnniversary" msgid="3876779744518284000">"Årsdag"</string> + <string name="eventTypeOther" msgid="5834288791948564594">"Begivenhed"</string> + <string name="emailTypeCustom" msgid="8525960257804213846">"Tilpasset"</string> + <string name="emailTypeHome" msgid="449227236140433919">"Start"</string> + <string name="emailTypeWork" msgid="3548058059601149973">"Arbejde"</string> + <string name="emailTypeOther" msgid="2923008695272639549">"Andre"</string> + <string name="emailTypeMobile" msgid="119919005321166205">"Mobil"</string> + <string name="postalTypeCustom" msgid="8903206903060479902">"Tilpasset"</string> + <string name="postalTypeHome" msgid="8165756977184483097">"Start"</string> + <string name="postalTypeWork" msgid="5268172772387694495">"Arbejde"</string> + <string name="postalTypeOther" msgid="2726111966623584341">"Andre"</string> + <string name="imTypeCustom" msgid="2074028755527826046">"Tilpasset"</string> + <string name="imTypeHome" msgid="6241181032954263892">"Start"</string> + <string name="imTypeWork" msgid="1371489290242433090">"Arbejde"</string> + <string name="imTypeOther" msgid="5377007495735915478">"Andre"</string> + <string name="imProtocolCustom" msgid="6919453836618749992">"Tilpasset"</string> + <string name="imProtocolAim" msgid="7050360612368383417">"AIM"</string> + <string name="imProtocolMsn" msgid="144556545420769442">"Windows Live"</string> + <string name="imProtocolYahoo" msgid="8271439408469021273">"Yahoo"</string> + <string name="imProtocolSkype" msgid="9019296744622832951">"Skype"</string> + <string name="imProtocolQq" msgid="8887484379494111884">"QQ"</string> + <string name="imProtocolGoogleTalk" msgid="3808393979157698766">"Google Talk"</string> + <string name="imProtocolIcq" msgid="1574870433606517315">"ICQ"</string> + <string name="imProtocolJabber" msgid="2279917630875771722">"Jabber"</string> + <string name="imProtocolNetMeeting" msgid="8287625655986827971">"NetMeeting"</string> + <string name="orgTypeWork" msgid="29268870505363872">"Arbejde"</string> + <string name="orgTypeOther" msgid="3951781131570124082">"Andre"</string> + <string name="orgTypeCustom" msgid="225523415372088322">"Tilpasset"</string> + <string name="contact_status_update_attribution" msgid="5112589886094402795">"via <xliff:g id="SOURCE">%1$s</xliff:g>"</string> + <string name="contact_status_update_attribution_with_date" msgid="5945386376369979909">"<xliff:g id="DATE">%1$s</xliff:g> via <xliff:g id="SOURCE">%2$s</xliff:g>"</string> <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Indtast PIN-kode"</string> <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Forkert PIN-kode!"</string> <string name="keyguard_label_text" msgid="861796461028298424">"Tryk på Menu og dernæst på 0 for at låse op."</string> @@ -447,6 +498,7 @@ <string name="lockscreen_pattern_wrong" msgid="4817583279053112312">"Beklager! Prøv igen"</string> <string name="lockscreen_plugged_in" msgid="613343852842944435">"Oplader (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string> <string name="lockscreen_charged" msgid="4938930459620989972">"Opladt."</string> + <string name="lockscreen_battery_short" msgid="3617549178603354656">"<xliff:g id="NUMBER">%d</xliff:g> <xliff:g id="PERCENT">%%</xliff:g>"</string> <string name="lockscreen_low_battery" msgid="1482873981919249740">"Tilslut din oplader."</string> <string name="lockscreen_missing_sim_message_short" msgid="7381499217732227295">"Der er ikke noget SIM-kort."</string> <string name="lockscreen_missing_sim_message" msgid="2186920585695169078">"Der er ikke noget SIM-kort i telefonen."</string> @@ -478,7 +530,7 @@ <string name="battery_status_charging" msgid="756617993998772213">"Oplader ..."</string> <string name="battery_low_title" msgid="7923774589611311406">"Forbind oplader"</string> <string name="battery_low_subtitle" msgid="7388781709819722764">"Batteriet er ved at blive tomt:"</string> - <string name="battery_low_percent_format" msgid="6564958083485073855">"mindre end <xliff:g id="NUMBER">%d%%</xliff:g> tilbage."</string> + <string name="battery_low_percent_format" msgid="696154104579022959">"<xliff:g id="NUMBER">%d%%</xliff:g> eller mindre tilbage."</string> <string name="battery_low_why" msgid="7279169609518386372">"Batteriforbrug"</string> <string name="factorytest_failed" msgid="5410270329114212041">"Fabrikstest mislykkedes"</string> <string name="factorytest_not_system" msgid="4435201656767276723">"Handlingen FACTORY_TEST understøttes kun af pakker installeret i /system/app."</string> @@ -488,6 +540,7 @@ <string name="js_dialog_title_default" msgid="6961903213729667573">"Javascript"</string> <string name="js_dialog_before_unload" msgid="1901675448179653089">"Naviger væk fra denne side?"\n\n"<xliff:g id="MESSAGE">%s</xliff:g>"\n\n" Vælg OK for at fortsætte eller Annuller for at blive på den aktuelle side."</string> <string name="save_password_label" msgid="6860261758665825069">"Bekræft"</string> + <string name="double_tap_toast" msgid="1068216937244567247">"Tip: Dobbeltklik for at zoome ind eller ud."</string> <string name="permlab_readHistoryBookmarks" msgid="1284843728203412135">"læs browserens oversigt og bogmærker"</string> <string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"Tillader programmet at læse alle de webadresser, browseren har besøgt, og alle browserens bogmærker."</string> <string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"skriv browserens oversigt og bogmærker"</string> @@ -570,7 +623,7 @@ <item quantity="one" msgid="2178576254385739855">"i morgen"</item> <item quantity="other" msgid="2973062968038355991">"om <xliff:g id="COUNT">%d</xliff:g> dage"</item> </plurals> - <string name="preposition_for_date" msgid="9093949757757445117">"til <xliff:g id="DATE">%s</xliff:g>"</string> + <string name="preposition_for_date" msgid="9093949757757445117">"den <xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"kl. <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"i <xliff:g id="YEAR">%s</xliff:g>"</string> <string name="day" msgid="8144195776058119424">"dag"</string> @@ -692,10 +745,8 @@ <string name="extmedia_format_message" msgid="3621369962433523619">"Er du sikker på, du ønsker at formatere SD-kortet? Alle data på kortet mistes."</string> <string name="extmedia_format_button_format" msgid="4131064560127478695">"Formater"</string> <string name="adb_active_notification_title" msgid="6729044778949189918">"USB-fejlretning forbundet"</string> - <!-- no translation found for adb_active_notification_message (8470296818270110396) --> - <skip /> - <!-- no translation found for select_input_method (6865512749462072765) --> - <skip /> + <string name="adb_active_notification_message" msgid="8470296818270110396">"Vælg for at deaktivere USB-fejlretning."</string> + <string name="select_input_method" msgid="6865512749462072765">"Vælg indtastningsmetode"</string> <string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string> <string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string> <string name="candidates_style" msgid="4333913089637062257"><u>"kandidater"</u></string> @@ -731,11 +782,14 @@ <string name="allow" msgid="7225948811296386551">"Tillad"</string> <string name="deny" msgid="2081879885755434506">"Afvis"</string> <string name="permission_request_notification_title" msgid="5390555465778213840">"Der er anmodet om tilladelse"</string> - <!-- no translation found for permission_request_notification_with_subtitle (4325409589686688000) --> - <skip /> + <string name="permission_request_notification_with_subtitle" msgid="4325409589686688000">"Der er anmodet om tilladelse"\n"til kontoen <xliff:g id="ACCOUNT">%s</xliff:g>"</string> <string name="input_method_binding_label" msgid="1283557179944992649">"Inputmetode"</string> <string name="sync_binding_label" msgid="3687969138375092423">"Synkroniser"</string> <string name="accessibility_binding_label" msgid="4148120742096474641">"Tilgængelighed"</string> <string name="wallpaper_binding_label" msgid="1240087844304687662">"Tapet"</string> <string name="chooser_wallpaper" msgid="7873476199295190279">"Skift tapet"</string> + <string name="pptp_vpn_description" msgid="2688045385181439401">"Point-to-Point Tunneling Protocol"</string> + <string name="l2tp_vpn_description" msgid="3750692169378923304">"Layer 2 Tunneling Protocol"</string> + <string name="l2tp_ipsec_psk_vpn_description" msgid="3945043564008303239">"L2TP/IPSec VPN baseret på forhåndsdelt nøglekodning"</string> + <string name="l2tp_ipsec_crt_vpn_description" msgid="5382714073103653577">"Certifikatbaseret L2TP/IPSec VPN"</string> </resources> diff --git a/core/res/res/values-de/strings.xml b/core/res/res/values-de/strings.xml index 02f685a1c136..ebf3b66aff47 100644 --- a/core/res/res/values-de/strings.xml +++ b/core/res/res/values-de/strings.xml @@ -111,8 +111,7 @@ <string name="httpErrorFile" msgid="8250549644091165175">"Auf die Datei konnte nicht zugegriffen werden."</string> <string name="httpErrorFileNotFound" msgid="5588380756326017105">"Die angeforderte Datei wurde nicht gefunden."</string> <string name="httpErrorTooManyRequests" msgid="1235396927087188253">"Es werden zurzeit zu viele Anfragen verarbeitet. Versuchen Sie es später erneut."</string> - <!-- no translation found for notification_title (1259940370369187045) --> - <skip /> + <string name="notification_title" msgid="1259940370369187045">"Fehler bei Anmeldung für <xliff:g id="ACCOUNT">%1$s</xliff:g>"</string> <string name="contentServiceSync" msgid="8353523060269335667">"Synchronisieren"</string> <string name="contentServiceSyncNotificationTitle" msgid="397743349191901458">"Synchronisieren"</string> <string name="contentServiceTooManyDeletesNotificationDesc" msgid="8100981435080696431">"Zu viele <xliff:g id="CONTENT_TYPE">%s</xliff:g> gelöscht."</string> @@ -148,8 +147,8 @@ <string name="permgroupdesc_location" msgid="2430258821648348660">"Ihren physischen Standort überwachen"</string> <string name="permgrouplab_network" msgid="5808983377727109831">"Netzwerkkommunikation"</string> <string name="permgroupdesc_network" msgid="5035763698958415998">"Ermöglicht Anwendungen den Zugriff auf verschiedene Netzwerkfunktionen."</string> - <string name="permgrouplab_accounts" msgid="7140261692496314430">"Ihre Google-Konten"</string> - <string name="permgroupdesc_accounts" msgid="6735915929704895193">"Greift auf verfügbare Google-Konten zu."</string> + <string name="permgrouplab_accounts" msgid="3359646291125325519">"Ihre Konten"</string> + <string name="permgroupdesc_accounts" msgid="4948732641827091312">"Zugriff auf verfügbare Konten"</string> <string name="permgrouplab_hardwareControls" msgid="7998214968791599326">"Hardware-Steuerelemente"</string> <string name="permgroupdesc_hardwareControls" msgid="4357057861225462702">"Direkter Zugriff auf Hardware über Headset"</string> <string name="permgrouplab_phoneCalls" msgid="9067173988325865923">"Anrufe"</string> @@ -433,6 +432,58 @@ <item msgid="2506857312718630823">"ICQ"</item> <item msgid="1648797903785279353">"Jabber"</item> </string-array> + <string name="phoneTypeCustom" msgid="1644738059053355820">"Benutzerdefiniert"</string> + <string name="phoneTypeHome" msgid="2570923463033985887">"Privat"</string> + <string name="phoneTypeMobile" msgid="6501463557754751037">"Mobil"</string> + <string name="phoneTypeWork" msgid="8863939667059911633">"Arbeit"</string> + <string name="phoneTypeFaxWork" msgid="3517792160008890912">"Fax (Beruflich)"</string> + <string name="phoneTypeFaxHome" msgid="2067265972322971467">"Fax (privat)"</string> + <string name="phoneTypePager" msgid="7582359955394921732">"Pager"</string> + <string name="phoneTypeOther" msgid="1544425847868765990">"Andere"</string> + <string name="phoneTypeCallback" msgid="2712175203065678206">"Rückruf"</string> + <string name="phoneTypeCar" msgid="8738360689616716982">"Auto"</string> + <string name="phoneTypeCompanyMain" msgid="540434356461478916">"Firma (Hauptnummer)"</string> + <string name="phoneTypeIsdn" msgid="8022453193171370337">"ISDN"</string> + <string name="phoneTypeMain" msgid="6766137010628326916">"Hauptnummer"</string> + <string name="phoneTypeOtherFax" msgid="8587657145072446565">"Weitere Faxnummer"</string> + <string name="phoneTypeRadio" msgid="4093738079908667513">"Radio"</string> + <string name="phoneTypeTelex" msgid="3367879952476250512">"Telex"</string> + <string name="phoneTypeTtyTdd" msgid="8606514378585000044">"TTY/TDD"</string> + <string name="phoneTypeWorkMobile" msgid="1311426989184065709">"Handy (geschäftlich)"</string> + <string name="phoneTypeWorkPager" msgid="649938731231157056">"Pager (beruflich)"</string> + <string name="phoneTypeAssistant" msgid="5596772636128562884">"Zweite Nummer"</string> + <string name="phoneTypeMms" msgid="7254492275502768992">"MMS"</string> + <string name="eventTypeBirthday" msgid="2813379844211390740">"Geburtstag"</string> + <string name="eventTypeAnniversary" msgid="3876779744518284000">"Jahrestag"</string> + <string name="eventTypeOther" msgid="5834288791948564594">"Termin"</string> + <string name="emailTypeCustom" msgid="8525960257804213846">"Benutzerdefiniert"</string> + <string name="emailTypeHome" msgid="449227236140433919">"Privat"</string> + <string name="emailTypeWork" msgid="3548058059601149973">"Beruflich"</string> + <string name="emailTypeOther" msgid="2923008695272639549">"Andere"</string> + <string name="emailTypeMobile" msgid="119919005321166205">"Mobil"</string> + <string name="postalTypeCustom" msgid="8903206903060479902">"Benutzerdefiniert"</string> + <string name="postalTypeHome" msgid="8165756977184483097">"Privat"</string> + <string name="postalTypeWork" msgid="5268172772387694495">"Beruflich"</string> + <string name="postalTypeOther" msgid="2726111966623584341">"Andere"</string> + <string name="imTypeCustom" msgid="2074028755527826046">"Benutzerdefiniert"</string> + <string name="imTypeHome" msgid="6241181032954263892">"Privat"</string> + <string name="imTypeWork" msgid="1371489290242433090">"Beruflich"</string> + <string name="imTypeOther" msgid="5377007495735915478">"Andere"</string> + <string name="imProtocolCustom" msgid="6919453836618749992">"Benutzerdefiniert"</string> + <string name="imProtocolAim" msgid="7050360612368383417">"AIM"</string> + <string name="imProtocolMsn" msgid="144556545420769442">"Windows Live"</string> + <string name="imProtocolYahoo" msgid="8271439408469021273">"Yahoo"</string> + <string name="imProtocolSkype" msgid="9019296744622832951">"Skype"</string> + <string name="imProtocolQq" msgid="8887484379494111884">"QQ"</string> + <string name="imProtocolGoogleTalk" msgid="3808393979157698766">"Google Talk"</string> + <string name="imProtocolIcq" msgid="1574870433606517315">"ICQ"</string> + <string name="imProtocolJabber" msgid="2279917630875771722">"Jabber"</string> + <string name="imProtocolNetMeeting" msgid="8287625655986827971">"NetMeeting"</string> + <string name="orgTypeWork" msgid="29268870505363872">"Beruflich"</string> + <string name="orgTypeOther" msgid="3951781131570124082">"Andere"</string> + <string name="orgTypeCustom" msgid="225523415372088322">"Benutzerdefiniert"</string> + <string name="contact_status_update_attribution" msgid="5112589886094402795">"über <xliff:g id="SOURCE">%1$s</xliff:g>"</string> + <string name="contact_status_update_attribution_with_date" msgid="5945386376369979909">"<xliff:g id="DATE">%1$s</xliff:g> über <xliff:g id="SOURCE">%2$s</xliff:g>"</string> <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"PIN-Code eingeben"</string> <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Falscher PIN-Code!"</string> <string name="keyguard_label_text" msgid="861796461028298424">"Drücken Sie zum Entsperren die Menütaste und dann auf \"0\"."</string> @@ -447,6 +498,7 @@ <string name="lockscreen_pattern_wrong" msgid="4817583279053112312">"Tut uns leid. Versuchen Sie es noch einmal."</string> <string name="lockscreen_plugged_in" msgid="613343852842944435">"Wird geladen (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string> <string name="lockscreen_charged" msgid="4938930459620989972">"Aufgeladen"</string> + <string name="lockscreen_battery_short" msgid="3617549178603354656">"<xliff:g id="NUMBER">%d</xliff:g> <xliff:g id="PERCENT">%%</xliff:g>"</string> <string name="lockscreen_low_battery" msgid="1482873981919249740">"Bitte Ladegerät anschließen"</string> <string name="lockscreen_missing_sim_message_short" msgid="7381499217732227295">"Keine SIM-Karte."</string> <string name="lockscreen_missing_sim_message" msgid="2186920585695169078">"Keine SIM-Karte im Telefon."</string> @@ -478,7 +530,7 @@ <string name="battery_status_charging" msgid="756617993998772213">"Wird aufgeladen..."</string> <string name="battery_low_title" msgid="7923774589611311406">"Ladegerät anschließen"</string> <string name="battery_low_subtitle" msgid="7388781709819722764">"Akku ist fast leer."</string> - <string name="battery_low_percent_format" msgid="6564958083485073855">"Nur noch weniger als <xliff:g id="NUMBER">%d%%</xliff:g> vorhanden."</string> + <string name="battery_low_percent_format" msgid="696154104579022959">"<xliff:g id="NUMBER">%d%%</xliff:g> oder weniger verbleiben."</string> <string name="battery_low_why" msgid="7279169609518386372">"Akkuverbrauch"</string> <string name="factorytest_failed" msgid="5410270329114212041">"Werkstest fehlgeschlagen"</string> <string name="factorytest_not_system" msgid="4435201656767276723">"Die Aktion FACTORY_TEST wird nur für unter \"/system/app\" gespeicherte Pakete unterstützt."</string> @@ -488,6 +540,7 @@ <string name="js_dialog_title_default" msgid="6961903213729667573">"JavaScript"</string> <string name="js_dialog_before_unload" msgid="1901675448179653089">"Von dieser Seite navigieren?"\n\n"<xliff:g id="MESSAGE">%s</xliff:g>"\n\n"Wählen Sie \"OK\", um fortzufahren, oder wählen Sie \"Abbrechen\", um auf der aktuellen Seite zu bleiben."</string> <string name="save_password_label" msgid="6860261758665825069">"Bestätigen"</string> + <string name="double_tap_toast" msgid="1068216937244567247">"Tipp: Zum Heranzoomen und Vergrößern zweimal tippen"</string> <string name="permlab_readHistoryBookmarks" msgid="1284843728203412135">"Browserverlauf und Lesezeichen lesen"</string> <string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"Ermöglicht der Anwendung, alle URLs, die mit dem Browser besucht wurden, sowie alle Lesezeichen des Browsers zu lesen."</string> <string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"Browserverlauf und Lesezeichen schreiben"</string> @@ -692,10 +745,8 @@ <string name="extmedia_format_message" msgid="3621369962433523619">"Möchten Sie die SD-Karte wirklich formatieren? Alle Daten auf Ihrer Karte gehen dann verloren."</string> <string name="extmedia_format_button_format" msgid="4131064560127478695">"Format"</string> <string name="adb_active_notification_title" msgid="6729044778949189918">"USB-Debugging verbunden"</string> - <!-- no translation found for adb_active_notification_message (8470296818270110396) --> - <skip /> - <!-- no translation found for select_input_method (6865512749462072765) --> - <skip /> + <string name="adb_active_notification_message" msgid="8470296818270110396">"Zum Deaktivieren des USB-Debugging auswählen"</string> + <string name="select_input_method" msgid="6865512749462072765">"Eingabemethode auswählen"</string> <string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string> <string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string> <string name="candidates_style" msgid="4333913089637062257"><u>"Kandidaten"</u></string> @@ -731,11 +782,14 @@ <string name="allow" msgid="7225948811296386551">"Zulassen"</string> <string name="deny" msgid="2081879885755434506">"Ablehnen"</string> <string name="permission_request_notification_title" msgid="5390555465778213840">"Berechtigung angefordert"</string> - <!-- no translation found for permission_request_notification_with_subtitle (4325409589686688000) --> - <skip /> + <string name="permission_request_notification_with_subtitle" msgid="4325409589686688000">"Berechtigung erforderlich"\n"für Konto <xliff:g id="ACCOUNT">%s</xliff:g>"</string> <string name="input_method_binding_label" msgid="1283557179944992649">"Eingabemethode"</string> <string name="sync_binding_label" msgid="3687969138375092423">"Synchronisieren"</string> <string name="accessibility_binding_label" msgid="4148120742096474641">"Eingabehilfen"</string> <string name="wallpaper_binding_label" msgid="1240087844304687662">"Hintergrund"</string> <string name="chooser_wallpaper" msgid="7873476199295190279">"Hintergrundbild ändern"</string> + <string name="pptp_vpn_description" msgid="2688045385181439401">"Point-to-Point-Tunneling-Protokoll"</string> + <string name="l2tp_vpn_description" msgid="3750692169378923304">"Layer-2-Tunneling-Protokoll"</string> + <string name="l2tp_ipsec_psk_vpn_description" msgid="3945043564008303239">"L2TP/IPSec-VPN mit vorinstalliertem Schlüssel"</string> + <string name="l2tp_ipsec_crt_vpn_description" msgid="5382714073103653577">"Zertifikat mit vorinstalliertem Schlüssel"</string> </resources> diff --git a/core/res/res/values-el/strings.xml b/core/res/res/values-el/strings.xml index 23c6565b29d8..062658dd2874 100644 --- a/core/res/res/values-el/strings.xml +++ b/core/res/res/values-el/strings.xml @@ -111,8 +111,7 @@ <string name="httpErrorFile" msgid="8250549644091165175">"Η πρόσβαση στο αρχείο δεν ήταν δυνατή."</string> <string name="httpErrorFileNotFound" msgid="5588380756326017105">"Το αρχείο που ζητήθηκε δεν βρέθηκε."</string> <string name="httpErrorTooManyRequests" msgid="1235396927087188253">"Πραγματοποιείται επεξεργασία πάρα πολλών αιτημάτων. Προσπαθήστε ξανά αργότερα."</string> - <!-- no translation found for notification_title (1259940370369187045) --> - <skip /> + <string name="notification_title" msgid="1259940370369187045">"Σφάλμα σύνδεσης για <xliff:g id="ACCOUNT">%1$s</xliff:g>"</string> <string name="contentServiceSync" msgid="8353523060269335667">"Συγχρονισμός"</string> <string name="contentServiceSyncNotificationTitle" msgid="397743349191901458">"Συγχρονισμός"</string> <string name="contentServiceTooManyDeletesNotificationDesc" msgid="8100981435080696431">"Πάρα πολλές <xliff:g id="CONTENT_TYPE">%s</xliff:g> διαγραφές."</string> @@ -148,8 +147,8 @@ <string name="permgroupdesc_location" msgid="2430258821648348660">"Παρακολούθηση της φυσικής τοποθεσίας σας"</string> <string name="permgrouplab_network" msgid="5808983377727109831">"Επικοινωνία δικτύου"</string> <string name="permgroupdesc_network" msgid="5035763698958415998">"Επιτρέπει σε εφαρμογές να αποκτήσουν πρόσβαση σε διάφορες λειτουργίες δικτύου."</string> - <string name="permgrouplab_accounts" msgid="7140261692496314430">"Οι λογαριασμοί σας Google"</string> - <string name="permgroupdesc_accounts" msgid="6735915929704895193">"Πρόσβαση στους διαθέσιμους λογαριασμούς Google."</string> + <string name="permgrouplab_accounts" msgid="3359646291125325519">"Οι λογαριασμοί σας"</string> + <string name="permgroupdesc_accounts" msgid="4948732641827091312">"Πρόσβαση στους διαθέσιμους λογαριασμούς."</string> <string name="permgrouplab_hardwareControls" msgid="7998214968791599326">"Στοιχεία ελέγχου υλικού"</string> <string name="permgroupdesc_hardwareControls" msgid="4357057861225462702">"Άμεση πρόσβαση στο υλικό της συσκευής τηλεφώνου."</string> <string name="permgrouplab_phoneCalls" msgid="9067173988325865923">"Τηλεφωνικές κλήσεις"</string> @@ -433,6 +432,58 @@ <item msgid="2506857312718630823">"ICQ"</item> <item msgid="1648797903785279353">"Jabber"</item> </string-array> + <string name="phoneTypeCustom" msgid="1644738059053355820">"Προσαρμοσμένο"</string> + <string name="phoneTypeHome" msgid="2570923463033985887">"Οικία"</string> + <string name="phoneTypeMobile" msgid="6501463557754751037">"Κινητό"</string> + <string name="phoneTypeWork" msgid="8863939667059911633">"Εργασία"</string> + <string name="phoneTypeFaxWork" msgid="3517792160008890912">"Φαξ εργασίας"</string> + <string name="phoneTypeFaxHome" msgid="2067265972322971467">"Φαξ οικίας"</string> + <string name="phoneTypePager" msgid="7582359955394921732">"Βομβητής"</string> + <string name="phoneTypeOther" msgid="1544425847868765990">"Άλλο"</string> + <string name="phoneTypeCallback" msgid="2712175203065678206">"Επανάκληση"</string> + <string name="phoneTypeCar" msgid="8738360689616716982">"Αυτοκίνητο"</string> + <string name="phoneTypeCompanyMain" msgid="540434356461478916">"Κύρια εταιρική γραμμή"</string> + <string name="phoneTypeIsdn" msgid="8022453193171370337">"ISDN"</string> + <string name="phoneTypeMain" msgid="6766137010628326916">"Κύριος"</string> + <string name="phoneTypeOtherFax" msgid="8587657145072446565">"Άλλο fax"</string> + <string name="phoneTypeRadio" msgid="4093738079908667513">"Πομπός"</string> + <string name="phoneTypeTelex" msgid="3367879952476250512">"Τέλεξ"</string> + <string name="phoneTypeTtyTdd" msgid="8606514378585000044">"Τηλέφωνο TTY/TDD"</string> + <string name="phoneTypeWorkMobile" msgid="1311426989184065709">"Κινητό τηλέφωνο εργασίας"</string> + <string name="phoneTypeWorkPager" msgid="649938731231157056">"Βομβητής εργασίας"</string> + <string name="phoneTypeAssistant" msgid="5596772636128562884">"Βοηθός"</string> + <string name="phoneTypeMms" msgid="7254492275502768992">"MMS"</string> + <string name="eventTypeBirthday" msgid="2813379844211390740">"Γενέθλια"</string> + <string name="eventTypeAnniversary" msgid="3876779744518284000">"Επέτειος"</string> + <string name="eventTypeOther" msgid="5834288791948564594">"Συμβάν"</string> + <string name="emailTypeCustom" msgid="8525960257804213846">"Προσαρμοσμένο"</string> + <string name="emailTypeHome" msgid="449227236140433919">"Οικία"</string> + <string name="emailTypeWork" msgid="3548058059601149973">"Εργασία"</string> + <string name="emailTypeOther" msgid="2923008695272639549">"Άλλο"</string> + <string name="emailTypeMobile" msgid="119919005321166205">"Κινητό"</string> + <string name="postalTypeCustom" msgid="8903206903060479902">"Προσαρμοσμένο"</string> + <string name="postalTypeHome" msgid="8165756977184483097">"Οικία"</string> + <string name="postalTypeWork" msgid="5268172772387694495">"Εργασία"</string> + <string name="postalTypeOther" msgid="2726111966623584341">"Άλλο"</string> + <string name="imTypeCustom" msgid="2074028755527826046">"Προσαρμοσμένο"</string> + <string name="imTypeHome" msgid="6241181032954263892">"Οικία"</string> + <string name="imTypeWork" msgid="1371489290242433090">"Εργασία"</string> + <string name="imTypeOther" msgid="5377007495735915478">"Άλλο"</string> + <string name="imProtocolCustom" msgid="6919453836618749992">"Προσαρμοσμένο"</string> + <string name="imProtocolAim" msgid="7050360612368383417">"AIM"</string> + <string name="imProtocolMsn" msgid="144556545420769442">"Windows Live"</string> + <string name="imProtocolYahoo" msgid="8271439408469021273">"Yahoo"</string> + <string name="imProtocolSkype" msgid="9019296744622832951">"Skype"</string> + <string name="imProtocolQq" msgid="8887484379494111884">"QQ"</string> + <string name="imProtocolGoogleTalk" msgid="3808393979157698766">"Google Talk"</string> + <string name="imProtocolIcq" msgid="1574870433606517315">"ICQ"</string> + <string name="imProtocolJabber" msgid="2279917630875771722">"Jabber"</string> + <string name="imProtocolNetMeeting" msgid="8287625655986827971">"NetMeeting"</string> + <string name="orgTypeWork" msgid="29268870505363872">"Εργασία"</string> + <string name="orgTypeOther" msgid="3951781131570124082">"Άλλο"</string> + <string name="orgTypeCustom" msgid="225523415372088322">"Προσαρμοσμένο"</string> + <string name="contact_status_update_attribution" msgid="5112589886094402795">"μέσω <xliff:g id="SOURCE">%1$s</xliff:g>"</string> + <string name="contact_status_update_attribution_with_date" msgid="5945386376369979909">"<xliff:g id="DATE">%1$s</xliff:g> μέσω <xliff:g id="SOURCE">%2$s</xliff:g>"</string> <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Πληκτρολογήστε τον κωδικό αριθμό PIN"</string> <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Εσφαλμένος κωδικός αριθμός PIN!"</string> <string name="keyguard_label_text" msgid="861796461028298424">"Για ξεκλείδωμα, πατήστε το πλήκτρο Menu και, στη συνέχεια, το πλήκτρο 0."</string> @@ -447,6 +498,7 @@ <string name="lockscreen_pattern_wrong" msgid="4817583279053112312">"Προσπαθήστε αργότερα"</string> <string name="lockscreen_plugged_in" msgid="613343852842944435">"Φόρτιση (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string> <string name="lockscreen_charged" msgid="4938930459620989972">"Φορτίστηκε."</string> + <string name="lockscreen_battery_short" msgid="3617549178603354656">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string> <string name="lockscreen_low_battery" msgid="1482873981919249740">"Συνδέστε τον φορτιστή."</string> <string name="lockscreen_missing_sim_message_short" msgid="7381499217732227295">"Δεν υπάρχει κάρτα SIM."</string> <string name="lockscreen_missing_sim_message" msgid="2186920585695169078">"Δεν υπάρχει κάρτα SIM στο τηλέφωνο."</string> @@ -478,7 +530,7 @@ <string name="battery_status_charging" msgid="756617993998772213">"Φόρτιση..."</string> <string name="battery_low_title" msgid="7923774589611311406">"Συνδέστε τον φορτιστή"</string> <string name="battery_low_subtitle" msgid="7388781709819722764">"Η στάθμη της μπαταρίας είναι χαμηλή:"</string> - <string name="battery_low_percent_format" msgid="6564958083485073855">"απομένουν λιγότερο από <xliff:g id="NUMBER">%d%%</xliff:g>."</string> + <string name="battery_low_percent_format" msgid="696154104579022959">"Απομένει <xliff:g id="NUMBER">%d%%</xliff:g> ή λιγότερο."</string> <string name="battery_low_why" msgid="7279169609518386372">"Χρήση μπαταρίας"</string> <string name="factorytest_failed" msgid="5410270329114212041">"Η εργοστασιακή δοκιμή απέτυχε"</string> <string name="factorytest_not_system" msgid="4435201656767276723">"Η ενέργεια FACTORY_TEST υποστηρίζεται μόνο για πακέτα που είναι εγκατεστημένα στον κατάλογο /system/app."</string> @@ -488,6 +540,7 @@ <string name="js_dialog_title_default" msgid="6961903213729667573">"JavaScript"</string> <string name="js_dialog_before_unload" msgid="1901675448179653089">"Απομάκρυνση από αυτή τη σελίδα;"\n\n"<xliff:g id="MESSAGE">%s</xliff:g>"\n\n"Επιλέξτε OK για συνέχεια, ή Ακύρωση για παραμονή στην τρέχουσα σελίδα."</string> <string name="save_password_label" msgid="6860261758665825069">"Επιβεβαίωση"</string> + <string name="double_tap_toast" msgid="1068216937244567247">"Συμβουλή: διπλό άγγιγμα για μεγέθυνση και σμίκρυνση."</string> <string name="permlab_readHistoryBookmarks" msgid="1284843728203412135">"ανάγνωση ιστορικού και σελιδοδεικτών προγράμματος περιήγησης"</string> <string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"Επιτρέπει στην εφαρμογή την ανάγνωση όλων των διευθύνσεων URL που το πρόγραμμα περιήγησης έχει επισκεφθεί και όλων των σελιδοδεικτών του προγράμματος περιήγησης."</string> <string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"εγγραφή ιστορικού και σελιδοδεικτών προγράμματος περιήγησης"</string> @@ -692,10 +745,8 @@ <string name="extmedia_format_message" msgid="3621369962433523619">"Είστε βέβαιοι ότι θέλετε να διαμορφώσετε την κάρτα SD; Όλα τα δεδομένα στην κάρτα σας θα χαθούν."</string> <string name="extmedia_format_button_format" msgid="4131064560127478695">"Διαμόρφωση"</string> <string name="adb_active_notification_title" msgid="6729044778949189918">"Συνδέθηκε ο εντοπισμός σφαλμάτων USB"</string> - <!-- no translation found for adb_active_notification_message (8470296818270110396) --> - <skip /> - <!-- no translation found for select_input_method (6865512749462072765) --> - <skip /> + <string name="adb_active_notification_message" msgid="8470296818270110396">"Επιλογή για απενεργοποίηση του εντοπισμού σφαλμάτων USB."</string> + <string name="select_input_method" msgid="6865512749462072765">"Επιλογή μεθόδου εισόδου"</string> <string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string> <string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string> <string name="candidates_style" msgid="4333913089637062257"><u>"υποψήφιοι"</u></string> @@ -731,11 +782,14 @@ <string name="allow" msgid="7225948811296386551">"Να επιτρέπεται"</string> <string name="deny" msgid="2081879885755434506">"Άρνηση"</string> <string name="permission_request_notification_title" msgid="5390555465778213840">"Απαιτείται άδεια"</string> - <!-- no translation found for permission_request_notification_with_subtitle (4325409589686688000) --> - <skip /> + <string name="permission_request_notification_with_subtitle" msgid="4325409589686688000">"Ζητήθηκε άδεια"\n"για τον λογαριασμό <xliff:g id="ACCOUNT">%s</xliff:g>"</string> <string name="input_method_binding_label" msgid="1283557179944992649">"Μέθοδος εισόδου"</string> <string name="sync_binding_label" msgid="3687969138375092423">"Συγχρονισμός"</string> <string name="accessibility_binding_label" msgid="4148120742096474641">"Προσβασιμότητα"</string> <string name="wallpaper_binding_label" msgid="1240087844304687662">"Ταπετσαρία"</string> <string name="chooser_wallpaper" msgid="7873476199295190279">"Αλλαγή ταπετσαρίας"</string> + <string name="pptp_vpn_description" msgid="2688045385181439401">"Πρωτόκολλο Point-to-Point Tunneling Protocol (PPTP)"</string> + <string name="l2tp_vpn_description" msgid="3750692169378923304">"Πρωτόκολλο Layer 2 Tunneling Protocol (L2TP)"</string> + <string name="l2tp_ipsec_psk_vpn_description" msgid="3945043564008303239">"Κλειδί pre-shared βάσει L2TP/IPSec VPN"</string> + <string name="l2tp_ipsec_crt_vpn_description" msgid="5382714073103653577">"Πιστοποιητικό βάσει L2TP/IPSec VPN"</string> </resources> diff --git a/core/res/res/values-es/strings.xml b/core/res/res/values-es/strings.xml index 74f7e1117970..27579787dfb3 100644 --- a/core/res/res/values-es/strings.xml +++ b/core/res/res/values-es/strings.xml @@ -111,8 +111,7 @@ <string name="httpErrorFile" msgid="8250549644091165175">"No se ha podido acceder al archivo."</string> <string name="httpErrorFileNotFound" msgid="5588380756326017105">"No se ha encontrado el archivo solicitado."</string> <string name="httpErrorTooManyRequests" msgid="1235396927087188253">"Se están procesando demasiadas solicitudes. Vuelve a intentarlo más tarde."</string> - <!-- no translation found for notification_title (1259940370369187045) --> - <skip /> + <string name="notification_title" msgid="1259940370369187045">"Error de acceso a la cuenta <xliff:g id="ACCOUNT">%1$s</xliff:g>"</string> <string name="contentServiceSync" msgid="8353523060269335667">"Sincronización"</string> <string name="contentServiceSyncNotificationTitle" msgid="397743349191901458">"Sincronización"</string> <string name="contentServiceTooManyDeletesNotificationDesc" msgid="8100981435080696431">"Demasiadas eliminaciones de <xliff:g id="CONTENT_TYPE">%s</xliff:g>"</string> @@ -148,8 +147,8 @@ <string name="permgroupdesc_location" msgid="2430258821648348660">"Controlar su ubicación física"</string> <string name="permgrouplab_network" msgid="5808983377727109831">"Comunicación de red"</string> <string name="permgroupdesc_network" msgid="5035763698958415998">"Permite que las aplicaciones accedan a distintas funciones de red."</string> - <string name="permgrouplab_accounts" msgid="7140261692496314430">"Tus cuentas de Google"</string> - <string name="permgroupdesc_accounts" msgid="6735915929704895193">"Acceder a las cuentas de Google disponibles"</string> + <string name="permgrouplab_accounts" msgid="3359646291125325519">"Tus cuentas"</string> + <string name="permgroupdesc_accounts" msgid="4948732641827091312">"Acceder a las cuentas disponibles"</string> <string name="permgrouplab_hardwareControls" msgid="7998214968791599326">"Controles de hardware"</string> <string name="permgroupdesc_hardwareControls" msgid="4357057861225462702">"Acceso directo al hardware del móvil"</string> <string name="permgrouplab_phoneCalls" msgid="9067173988325865923">"Llamadas de teléfono"</string> @@ -433,6 +432,58 @@ <item msgid="2506857312718630823">"ICQ"</item> <item msgid="1648797903785279353">"Jabber"</item> </string-array> + <string name="phoneTypeCustom" msgid="1644738059053355820">"Personalizado"</string> + <string name="phoneTypeHome" msgid="2570923463033985887">"Casa"</string> + <string name="phoneTypeMobile" msgid="6501463557754751037">"Móvil"</string> + <string name="phoneTypeWork" msgid="8863939667059911633">"Trabajo"</string> + <string name="phoneTypeFaxWork" msgid="3517792160008890912">"Fax del trabajo"</string> + <string name="phoneTypeFaxHome" msgid="2067265972322971467">"Fax de casa"</string> + <string name="phoneTypePager" msgid="7582359955394921732">"Buscapersonas"</string> + <string name="phoneTypeOther" msgid="1544425847868765990">"Otro"</string> + <string name="phoneTypeCallback" msgid="2712175203065678206">"Devolución de llamada"</string> + <string name="phoneTypeCar" msgid="8738360689616716982">"Coche"</string> + <string name="phoneTypeCompanyMain" msgid="540434356461478916">"Teléfono principal de la empresa"</string> + <string name="phoneTypeIsdn" msgid="8022453193171370337">"RDSI"</string> + <string name="phoneTypeMain" msgid="6766137010628326916">"Principal"</string> + <string name="phoneTypeOtherFax" msgid="8587657145072446565">"Otro fax"</string> + <string name="phoneTypeRadio" msgid="4093738079908667513">"Radio"</string> + <string name="phoneTypeTelex" msgid="3367879952476250512">"Télex"</string> + <string name="phoneTypeTtyTdd" msgid="8606514378585000044">"TTY TDD"</string> + <string name="phoneTypeWorkMobile" msgid="1311426989184065709">"Móvil del trabajo"</string> + <string name="phoneTypeWorkPager" msgid="649938731231157056">"Buscapersonas del trabajo"</string> + <string name="phoneTypeAssistant" msgid="5596772636128562884">"Asistente"</string> + <string name="phoneTypeMms" msgid="7254492275502768992">"MMS"</string> + <string name="eventTypeBirthday" msgid="2813379844211390740">"Cumpleaños"</string> + <string name="eventTypeAnniversary" msgid="3876779744518284000">"Aniversario"</string> + <string name="eventTypeOther" msgid="5834288791948564594">"Evento"</string> + <string name="emailTypeCustom" msgid="8525960257804213846">"Personalizado"</string> + <string name="emailTypeHome" msgid="449227236140433919">"Casa"</string> + <string name="emailTypeWork" msgid="3548058059601149973">"Trabajo"</string> + <string name="emailTypeOther" msgid="2923008695272639549">"Otro"</string> + <string name="emailTypeMobile" msgid="119919005321166205">"Móvil"</string> + <string name="postalTypeCustom" msgid="8903206903060479902">"Personalizada"</string> + <string name="postalTypeHome" msgid="8165756977184483097">"Casa"</string> + <string name="postalTypeWork" msgid="5268172772387694495">"Trabajo"</string> + <string name="postalTypeOther" msgid="2726111966623584341">"Otro"</string> + <string name="imTypeCustom" msgid="2074028755527826046">"Personalizada"</string> + <string name="imTypeHome" msgid="6241181032954263892">"Casa"</string> + <string name="imTypeWork" msgid="1371489290242433090">"Trabajo"</string> + <string name="imTypeOther" msgid="5377007495735915478">"Otro"</string> + <string name="imProtocolCustom" msgid="6919453836618749992">"Personalizada"</string> + <string name="imProtocolAim" msgid="7050360612368383417">"AIM"</string> + <string name="imProtocolMsn" msgid="144556545420769442">"Windows Live"</string> + <string name="imProtocolYahoo" msgid="8271439408469021273">"Yahoo!"</string> + <string name="imProtocolSkype" msgid="9019296744622832951">"Skype"</string> + <string name="imProtocolQq" msgid="8887484379494111884">"QQ"</string> + <string name="imProtocolGoogleTalk" msgid="3808393979157698766">"Google Talk"</string> + <string name="imProtocolIcq" msgid="1574870433606517315">"ICQ"</string> + <string name="imProtocolJabber" msgid="2279917630875771722">"Jabber"</string> + <string name="imProtocolNetMeeting" msgid="8287625655986827971">"NetMeeting"</string> + <string name="orgTypeWork" msgid="29268870505363872">"Trabajo"</string> + <string name="orgTypeOther" msgid="3951781131570124082">"Otra"</string> + <string name="orgTypeCustom" msgid="225523415372088322">"Personalizada"</string> + <string name="contact_status_update_attribution" msgid="5112589886094402795">"a través de <xliff:g id="SOURCE">%1$s</xliff:g>"</string> + <string name="contact_status_update_attribution_with_date" msgid="5945386376369979909">"<xliff:g id="DATE">%1$s</xliff:g> a través de <xliff:g id="SOURCE">%2$s</xliff:g>"</string> <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Introduce el código PIN"</string> <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"El código PIN es incorrecto."</string> <string name="keyguard_label_text" msgid="861796461028298424">"Para desbloquear el teléfono, pulsa la tecla de menú y, a continuación, pulsa 0."</string> @@ -447,6 +498,7 @@ <string name="lockscreen_pattern_wrong" msgid="4817583279053112312">"Inténtalo de nuevo"</string> <string name="lockscreen_plugged_in" msgid="613343852842944435">"Cargando (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string> <string name="lockscreen_charged" msgid="4938930459620989972">"Cargado"</string> + <string name="lockscreen_battery_short" msgid="3617549178603354656">"<xliff:g id="NUMBER">%d</xliff:g> <xliff:g id="PERCENT">%%</xliff:g>"</string> <string name="lockscreen_low_battery" msgid="1482873981919249740">"Conecta el cargador"</string> <string name="lockscreen_missing_sim_message_short" msgid="7381499217732227295">"Falta la tarjeta SIM"</string> <string name="lockscreen_missing_sim_message" msgid="2186920585695169078">"No se ha insertado ninguna tarjeta SIM en el teléfono."</string> @@ -478,7 +530,7 @@ <string name="battery_status_charging" msgid="756617993998772213">"Cargando..."</string> <string name="battery_low_title" msgid="7923774589611311406">"Conecta el cargador"</string> <string name="battery_low_subtitle" msgid="7388781709819722764">"Se está agotando la batería:"</string> - <string name="battery_low_percent_format" msgid="6564958083485073855">"menos del <xliff:g id="NUMBER">%d%%</xliff:g> disponible."</string> + <string name="battery_low_percent_format" msgid="696154104579022959">"<xliff:g id="NUMBER">%d%%</xliff:g> o menos disponible"</string> <string name="battery_low_why" msgid="7279169609518386372">"Uso de la batería"</string> <string name="factorytest_failed" msgid="5410270329114212041">"Fallo en la prueba de fábrica"</string> <string name="factorytest_not_system" msgid="4435201656767276723">"La acción FACTORY_TEST sólo es compatible con los paquetes instalados en /system/app."</string> @@ -488,6 +540,7 @@ <string name="js_dialog_title_default" msgid="6961903213729667573">"JavaScript"</string> <string name="js_dialog_before_unload" msgid="1901675448179653089">"¿Quieres salir de esta página?"\n\n"<xliff:g id="MESSAGE">%s</xliff:g>"\n\n"Selecciona \"Aceptar\" para continuar o \"Cancelar\" para permanecer en la página actual."</string> <string name="save_password_label" msgid="6860261758665825069">"Confirmar"</string> + <string name="double_tap_toast" msgid="1068216937244567247">"Sugerencia: toca dos veces para ampliar o reducir."</string> <string name="permlab_readHistoryBookmarks" msgid="1284843728203412135">"leer información de marcadores y del historial del navegador"</string> <string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"Permite que la aplicación lea todas las URL que ha visitado el navegador y todos sus marcadores."</string> <string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"escribir en marcadores y en el historial del navegador"</string> @@ -571,7 +624,7 @@ <item quantity="other" msgid="2973062968038355991">"dentro de <xliff:g id="COUNT">%d</xliff:g> días"</item> </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"el <xliff:g id="DATE">%s</xliff:g>"</string> - <string name="preposition_for_time" msgid="5506831244263083793">"a las <xliff:g id="TIME">%s</xliff:g>"</string> + <string name="preposition_for_time" msgid="5506831244263083793">"a la(s) <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"en <xliff:g id="YEAR">%s</xliff:g>"</string> <string name="day" msgid="8144195776058119424">"día"</string> <string name="days" msgid="4774547661021344602">"días"</string> @@ -692,10 +745,8 @@ <string name="extmedia_format_message" msgid="3621369962433523619">"¿Estás seguro de que quieres formatear la tarjeta SD? Se perderán todos los datos de la tarjeta."</string> <string name="extmedia_format_button_format" msgid="4131064560127478695">"Formato"</string> <string name="adb_active_notification_title" msgid="6729044778949189918">"Dispositivo de depuración USB conectado"</string> - <!-- no translation found for adb_active_notification_message (8470296818270110396) --> - <skip /> - <!-- no translation found for select_input_method (6865512749462072765) --> - <skip /> + <string name="adb_active_notification_message" msgid="8470296818270110396">"Seleccionar para inhabilitar la depuración USB"</string> + <string name="select_input_method" msgid="6865512749462072765">"Seleccionar método de introducción de texto"</string> <string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string> <string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string> <string name="candidates_style" msgid="4333913089637062257"><u>"candidatos"</u></string> @@ -731,11 +782,14 @@ <string name="allow" msgid="7225948811296386551">"Permitir"</string> <string name="deny" msgid="2081879885755434506">"Denegar"</string> <string name="permission_request_notification_title" msgid="5390555465778213840">"Permiso solicitado"</string> - <!-- no translation found for permission_request_notification_with_subtitle (4325409589686688000) --> - <skip /> + <string name="permission_request_notification_with_subtitle" msgid="4325409589686688000">"Permiso solicitado"\n"para la cuenta <xliff:g id="ACCOUNT">%s</xliff:g>"</string> <string name="input_method_binding_label" msgid="1283557179944992649">"Método de introducción de texto"</string> <string name="sync_binding_label" msgid="3687969138375092423">"Sincronización"</string> <string name="accessibility_binding_label" msgid="4148120742096474641">"Accesibilidad"</string> <string name="wallpaper_binding_label" msgid="1240087844304687662">"Fondo de pantalla"</string> <string name="chooser_wallpaper" msgid="7873476199295190279">"Cambiar fondo de pantalla"</string> + <string name="pptp_vpn_description" msgid="2688045385181439401">"Protocolo de túnel punto a punto"</string> + <string name="l2tp_vpn_description" msgid="3750692169378923304">"Protocolo de túnel de nivel 2"</string> + <string name="l2tp_ipsec_psk_vpn_description" msgid="3945043564008303239">"Red privada virtual L2TP/IPSec basada en clave compartida previamente"</string> + <string name="l2tp_ipsec_crt_vpn_description" msgid="5382714073103653577">"Red privada virtual L2TP/IPSec basada en certificado"</string> </resources> diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml index c0f59f2adb88..7a07a7cd6728 100644 --- a/core/res/res/values-fr/strings.xml +++ b/core/res/res/values-fr/strings.xml @@ -111,8 +111,7 @@ <string name="httpErrorFile" msgid="8250549644091165175">"Impossible d\'accéder au fichier."</string> <string name="httpErrorFileNotFound" msgid="5588380756326017105">"Le fichier demandé est introuvable."</string> <string name="httpErrorTooManyRequests" msgid="1235396927087188253">"Trop de requêtes sont en cours de traitement. Veuillez réessayer ultérieurement."</string> - <!-- no translation found for notification_title (1259940370369187045) --> - <skip /> + <string name="notification_title" msgid="1259940370369187045">"Erreur de connexion au compte <xliff:g id="ACCOUNT">%1$s</xliff:g>"</string> <string name="contentServiceSync" msgid="8353523060269335667">"Synchroniser"</string> <string name="contentServiceSyncNotificationTitle" msgid="397743349191901458">"Synchronisation"</string> <string name="contentServiceTooManyDeletesNotificationDesc" msgid="8100981435080696431">"Trop de contenus supprimés (<xliff:g id="CONTENT_TYPE">%s</xliff:g>)."</string> @@ -148,8 +147,8 @@ <string name="permgroupdesc_location" msgid="2430258821648348660">"Suivre votre position géographique"</string> <string name="permgrouplab_network" msgid="5808983377727109831">"Communications réseau"</string> <string name="permgroupdesc_network" msgid="5035763698958415998">"Permet à des applications d\'accéder à différentes fonctionnalités du réseau."</string> - <string name="permgrouplab_accounts" msgid="7140261692496314430">"Vos comptes Google"</string> - <string name="permgroupdesc_accounts" msgid="6735915929704895193">"Accédez aux comptes Google disponibles."</string> + <string name="permgrouplab_accounts" msgid="3359646291125325519">"Vos comptes"</string> + <string name="permgroupdesc_accounts" msgid="4948732641827091312">"Accéder aux comptes disponibles"</string> <string name="permgrouplab_hardwareControls" msgid="7998214968791599326">"Commandes du matériel"</string> <string name="permgroupdesc_hardwareControls" msgid="4357057861225462702">"Permet d\'accéder directement au matériel de l\'appareil."</string> <string name="permgrouplab_phoneCalls" msgid="9067173988325865923">"Appels"</string> @@ -433,6 +432,58 @@ <item msgid="2506857312718630823">"ICQ"</item> <item msgid="1648797903785279353">"Jabber"</item> </string-array> + <string name="phoneTypeCustom" msgid="1644738059053355820">"Personnalisé"</string> + <string name="phoneTypeHome" msgid="2570923463033985887">"Domicile"</string> + <string name="phoneTypeMobile" msgid="6501463557754751037">"Mobile"</string> + <string name="phoneTypeWork" msgid="8863939667059911633">"Bureau"</string> + <string name="phoneTypeFaxWork" msgid="3517792160008890912">"Télécopie bureau"</string> + <string name="phoneTypeFaxHome" msgid="2067265972322971467">"Télécopie domicile"</string> + <string name="phoneTypePager" msgid="7582359955394921732">"Téléavertisseur"</string> + <string name="phoneTypeOther" msgid="1544425847868765990">"Autre"</string> + <string name="phoneTypeCallback" msgid="2712175203065678206">"Rappel"</string> + <string name="phoneTypeCar" msgid="8738360689616716982">"Voiture"</string> + <string name="phoneTypeCompanyMain" msgid="540434356461478916">"Société (principal)"</string> + <string name="phoneTypeIsdn" msgid="8022453193171370337">"RNIS"</string> + <string name="phoneTypeMain" msgid="6766137010628326916">"Principal"</string> + <string name="phoneTypeOtherFax" msgid="8587657145072446565">"Autre télécopie"</string> + <string name="phoneTypeRadio" msgid="4093738079908667513">"Radio"</string> + <string name="phoneTypeTelex" msgid="3367879952476250512">"Télex"</string> + <string name="phoneTypeTtyTdd" msgid="8606514378585000044">"TTY/TTD (malentendants)"</string> + <string name="phoneTypeWorkMobile" msgid="1311426989184065709">"Mobile (professionnel)"</string> + <string name="phoneTypeWorkPager" msgid="649938731231157056">"Téléavertisseur (professionnel)"</string> + <string name="phoneTypeAssistant" msgid="5596772636128562884">"Assistant"</string> + <string name="phoneTypeMms" msgid="7254492275502768992">"MMS"</string> + <string name="eventTypeBirthday" msgid="2813379844211390740">"Anniversaire"</string> + <string name="eventTypeAnniversary" msgid="3876779744518284000">"Fête"</string> + <string name="eventTypeOther" msgid="5834288791948564594">"Événement"</string> + <string name="emailTypeCustom" msgid="8525960257804213846">"Personnalisé"</string> + <string name="emailTypeHome" msgid="449227236140433919">"Domicile"</string> + <string name="emailTypeWork" msgid="3548058059601149973">"Bureau"</string> + <string name="emailTypeOther" msgid="2923008695272639549">"Autre"</string> + <string name="emailTypeMobile" msgid="119919005321166205">"Mobile"</string> + <string name="postalTypeCustom" msgid="8903206903060479902">"Personnalisée"</string> + <string name="postalTypeHome" msgid="8165756977184483097">"Domicile"</string> + <string name="postalTypeWork" msgid="5268172772387694495">"Bureau"</string> + <string name="postalTypeOther" msgid="2726111966623584341">"Autre"</string> + <string name="imTypeCustom" msgid="2074028755527826046">"Personnalisée"</string> + <string name="imTypeHome" msgid="6241181032954263892">"Domicile"</string> + <string name="imTypeWork" msgid="1371489290242433090">"Bureau"</string> + <string name="imTypeOther" msgid="5377007495735915478">"Autre"</string> + <string name="imProtocolCustom" msgid="6919453836618749992">"Personnalisée"</string> + <string name="imProtocolAim" msgid="7050360612368383417">"AIM"</string> + <string name="imProtocolMsn" msgid="144556545420769442">"Windows Live"</string> + <string name="imProtocolYahoo" msgid="8271439408469021273">"Yahoo"</string> + <string name="imProtocolSkype" msgid="9019296744622832951">"Skype"</string> + <string name="imProtocolQq" msgid="8887484379494111884">"QQ"</string> + <string name="imProtocolGoogleTalk" msgid="3808393979157698766">"Google Talk"</string> + <string name="imProtocolIcq" msgid="1574870433606517315">"ICQ"</string> + <string name="imProtocolJabber" msgid="2279917630875771722">"Jabber"</string> + <string name="imProtocolNetMeeting" msgid="8287625655986827971">"NetMeeting"</string> + <string name="orgTypeWork" msgid="29268870505363872">"Bureau"</string> + <string name="orgTypeOther" msgid="3951781131570124082">"Autre"</string> + <string name="orgTypeCustom" msgid="225523415372088322">"Personnalisée"</string> + <string name="contact_status_update_attribution" msgid="5112589886094402795">"via <xliff:g id="SOURCE">%1$s</xliff:g>"</string> + <string name="contact_status_update_attribution_with_date" msgid="5945386376369979909">"<xliff:g id="DATE">%1$s</xliff:g> via <xliff:g id="SOURCE">%2$s</xliff:g>"</string> <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Saisissez le code PIN"</string> <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Le code PIN est incorrect !"</string> <string name="keyguard_label_text" msgid="861796461028298424">"Pour débloquer le clavier, appuyez sur \"Menu\" puis sur 0."</string> @@ -447,6 +498,7 @@ <string name="lockscreen_pattern_wrong" msgid="4817583279053112312">"Désolé. Merci de réessayer."</string> <string name="lockscreen_plugged_in" msgid="613343852842944435">"Chargement (<xliff:g id="NUMBER">%d</xliff:g> <xliff:g id="PERCENT">%%</xliff:g>)"</string> <string name="lockscreen_charged" msgid="4938930459620989972">"Chargé"</string> + <string name="lockscreen_battery_short" msgid="3617549178603354656">"<xliff:g id="NUMBER">%d</xliff:g> <xliff:g id="PERCENT">%%</xliff:g>"</string> <string name="lockscreen_low_battery" msgid="1482873981919249740">"Branchez votre chargeur."</string> <string name="lockscreen_missing_sim_message_short" msgid="7381499217732227295">"Aucune carte SIM n\'a été trouvée."</string> <string name="lockscreen_missing_sim_message" msgid="2186920585695169078">"Aucune carte SIM n\'est insérée dans le téléphone."</string> @@ -478,7 +530,7 @@ <string name="battery_status_charging" msgid="756617993998772213">"Chargement..."</string> <string name="battery_low_title" msgid="7923774589611311406">"Branchez le chargeur"</string> <string name="battery_low_subtitle" msgid="7388781709819722764">"Le niveau de la batterie est bas :"</string> - <string name="battery_low_percent_format" msgid="6564958083485073855">"Batterie restante inférieure à <xliff:g id="NUMBER">%d%%</xliff:g>."</string> + <string name="battery_low_percent_format" msgid="696154104579022959">"Maximum <xliff:g id="NUMBER">%d%%</xliff:g> restants."</string> <string name="battery_low_why" msgid="7279169609518386372">"Utilisation de la batterie"</string> <string name="factorytest_failed" msgid="5410270329114212041">"Échec du test usine"</string> <string name="factorytest_not_system" msgid="4435201656767276723">"L\'action FACTORY_TEST est uniquement prise en charge pour les paquets de données installés dans in/system/app."</string> @@ -488,6 +540,7 @@ <string name="js_dialog_title_default" msgid="6961903213729667573">"JavaScript"</string> <string name="js_dialog_before_unload" msgid="1901675448179653089">"Vous souhaitez quitter cette page ?"\n\n"<xliff:g id="MESSAGE">%s</xliff:g>"\n\n"Sélectionnez OK pour continuer ou Annuler pour rester sur la page actuelle."</string> <string name="save_password_label" msgid="6860261758665825069">"Confirmer"</string> + <string name="double_tap_toast" msgid="1068216937244567247">"Conseil : Appuyez deux fois pour effectuer un zoom avant ou arrière."</string> <string name="permlab_readHistoryBookmarks" msgid="1284843728203412135">"lire l\'historique et les favoris du navigateur"</string> <string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"Autorise l\'application à lire toutes les URL auxquelles le navigateur a accédé et tous ses favoris."</string> <string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"écrire dans l\'historique et les favoris du navigateur"</string> @@ -692,10 +745,8 @@ <string name="extmedia_format_message" msgid="3621369962433523619">"Voulez-vous vraiment formater la carte SD ? Toutes les données de cette carte seront perdues."</string> <string name="extmedia_format_button_format" msgid="4131064560127478695">"Format"</string> <string name="adb_active_notification_title" msgid="6729044778949189918">"Débogage USB connecté"</string> - <!-- no translation found for adb_active_notification_message (8470296818270110396) --> - <skip /> - <!-- no translation found for select_input_method (6865512749462072765) --> - <skip /> + <string name="adb_active_notification_message" msgid="8470296818270110396">"Sélectionnez cette option pour désactiver le débogage USB."</string> + <string name="select_input_method" msgid="6865512749462072765">"Sélectionner un mode de saisie"</string> <string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string> <string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string> <string name="candidates_style" msgid="4333913089637062257"><u>"candidats"</u></string> @@ -731,11 +782,14 @@ <string name="allow" msgid="7225948811296386551">"Autoriser"</string> <string name="deny" msgid="2081879885755434506">"Refuser"</string> <string name="permission_request_notification_title" msgid="5390555465778213840">"Autorisation demandée"</string> - <!-- no translation found for permission_request_notification_with_subtitle (4325409589686688000) --> - <skip /> + <string name="permission_request_notification_with_subtitle" msgid="4325409589686688000">"Autorisation demandée"\n"pour le compte <xliff:g id="ACCOUNT">%s</xliff:g>"</string> <string name="input_method_binding_label" msgid="1283557179944992649">"Mode de saisie"</string> <string name="sync_binding_label" msgid="3687969138375092423">"Synchronisation"</string> <string name="accessibility_binding_label" msgid="4148120742096474641">"Accessibilité"</string> <string name="wallpaper_binding_label" msgid="1240087844304687662">"Fond d\'écran"</string> <string name="chooser_wallpaper" msgid="7873476199295190279">"Changer de fond d\'écran"</string> + <string name="pptp_vpn_description" msgid="2688045385181439401">"Protocole de tunnelisation point-à-point"</string> + <string name="l2tp_vpn_description" msgid="3750692169378923304">"Protocole de tunnelisation de niveau 2"</string> + <string name="l2tp_ipsec_psk_vpn_description" msgid="3945043564008303239">"Clé pré-partagée basée sur L2TP/IPSec VPN"</string> + <string name="l2tp_ipsec_crt_vpn_description" msgid="5382714073103653577">"Certificat basé sur L2TP/IPSec VPN"</string> </resources> diff --git a/core/res/res/values-it/strings.xml b/core/res/res/values-it/strings.xml index d62625fa5569..8d2aefafba8a 100644 --- a/core/res/res/values-it/strings.xml +++ b/core/res/res/values-it/strings.xml @@ -111,8 +111,7 @@ <string name="httpErrorFile" msgid="8250549644091165175">"Impossibile accedere al file."</string> <string name="httpErrorFileNotFound" msgid="5588380756326017105">"Impossibile trovare il file richiesto."</string> <string name="httpErrorTooManyRequests" msgid="1235396927087188253">"Troppe richieste in fase di elaborazione. Riprova più tardi."</string> - <!-- no translation found for notification_title (1259940370369187045) --> - <skip /> + <string name="notification_title" msgid="1259940370369187045">"Errore di accesso per <xliff:g id="ACCOUNT">%1$s</xliff:g>"</string> <string name="contentServiceSync" msgid="8353523060269335667">"Sinc"</string> <string name="contentServiceSyncNotificationTitle" msgid="397743349191901458">"Sincronizzazione"</string> <string name="contentServiceTooManyDeletesNotificationDesc" msgid="8100981435080696431">"Troppe eliminazioni di <xliff:g id="CONTENT_TYPE">%s</xliff:g>."</string> @@ -133,7 +132,7 @@ <string name="global_action_toggle_silent_mode" msgid="8219525344246810925">"Modalità silenziosa"</string> <string name="global_action_silent_mode_on_status" msgid="3289841937003758806">"Audio non attivo"</string> <string name="global_action_silent_mode_off_status" msgid="1506046579177066419">"Audio attivo"</string> - <string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Modalità aereo attiva"</string> + <string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Modalità aereo"</string> <string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Modalità aereo attiva"</string> <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Modalità aereo non attiva"</string> <string name="safeMode" msgid="2788228061547930246">"Modalità provvisoria"</string> @@ -148,8 +147,8 @@ <string name="permgroupdesc_location" msgid="2430258821648348660">"Monitorare la posizione fisica dell\'utente"</string> <string name="permgrouplab_network" msgid="5808983377727109831">"Comunicazione di rete"</string> <string name="permgroupdesc_network" msgid="5035763698958415998">"Consentono l\'accesso delle applicazioni a varie funzionalità di rete."</string> - <string name="permgrouplab_accounts" msgid="7140261692496314430">"I tuoi account Google"</string> - <string name="permgroupdesc_accounts" msgid="6735915929704895193">"Accedere agli account Google disponibili."</string> + <string name="permgrouplab_accounts" msgid="3359646291125325519">"I tuoi account"</string> + <string name="permgroupdesc_accounts" msgid="4948732641827091312">"Accedere agli account disponibili."</string> <string name="permgrouplab_hardwareControls" msgid="7998214968791599326">"Controlli hardware"</string> <string name="permgroupdesc_hardwareControls" msgid="4357057861225462702">"Accedere direttamente all\'hardware del ricevitore."</string> <string name="permgrouplab_phoneCalls" msgid="9067173988325865923">"Telefonate"</string> @@ -317,7 +316,7 @@ <string name="permlab_callPrivileged" msgid="4198349211108497879">"chiamata diretta di tutti i n. telefono"</string> <string name="permdesc_callPrivileged" msgid="244405067160028452">"Consente all\'applicazione di chiamare qualsiasi numero, compresi quelli di emergenza, automaticamente. Le applicazioni dannose potrebbero effettuare chiamate non necessarie e illegali a servizi di emergenza."</string> <string name="permlab_performCdmaProvisioning" msgid="5604848095315421425">"avviare direttamente la configurazione del telefono CDMA"</string> - <string name="permdesc_performCdmaProvisioning" msgid="6457447676108355905">"Consente all\'applicazione di avviare il servizio di CDMA provisioning. Le applicazioni dannose potrebbero avviare il servizio di CDMA provisioning quando non è necessario"</string> + <string name="permdesc_performCdmaProvisioning" msgid="6457447676108355905">"Consente all\'applicazione di avviare il servizio di provisioning CDMA. Le applicazioni dannose potrebbero avviare il servizio di provisioning CDMA quando non è necessario"</string> <string name="permlab_locationUpdates" msgid="7785408253364335740">"controllo notifiche aggiornamento posizione"</string> <string name="permdesc_locationUpdates" msgid="2300018303720930256">"Consente l\'attivazione/disattivazione delle notifiche di aggiornamento della posizione dal segnale cellulare. Da non usare per normali applicazioni."</string> <string name="permlab_checkinProperties" msgid="7855259461268734914">"accesso a proprietà di archiviazione"</string> @@ -433,6 +432,58 @@ <item msgid="2506857312718630823">"ICQ"</item> <item msgid="1648797903785279353">"Jabber"</item> </string-array> + <string name="phoneTypeCustom" msgid="1644738059053355820">"Personalizzato"</string> + <string name="phoneTypeHome" msgid="2570923463033985887">"Casa"</string> + <string name="phoneTypeMobile" msgid="6501463557754751037">"Cellulare"</string> + <string name="phoneTypeWork" msgid="8863939667059911633">"Ufficio"</string> + <string name="phoneTypeFaxWork" msgid="3517792160008890912">"Fax ufficio"</string> + <string name="phoneTypeFaxHome" msgid="2067265972322971467">"Fax casa"</string> + <string name="phoneTypePager" msgid="7582359955394921732">"Cercapersone"</string> + <string name="phoneTypeOther" msgid="1544425847868765990">"Altro"</string> + <string name="phoneTypeCallback" msgid="2712175203065678206">"Callback"</string> + <string name="phoneTypeCar" msgid="8738360689616716982">"Automobile"</string> + <string name="phoneTypeCompanyMain" msgid="540434356461478916">"Azienda, principale"</string> + <string name="phoneTypeIsdn" msgid="8022453193171370337">"ISDN"</string> + <string name="phoneTypeMain" msgid="6766137010628326916">"Principale"</string> + <string name="phoneTypeOtherFax" msgid="8587657145072446565">"Altro fax"</string> + <string name="phoneTypeRadio" msgid="4093738079908667513">"Segnale cellulare"</string> + <string name="phoneTypeTelex" msgid="3367879952476250512">"Telex"</string> + <string name="phoneTypeTtyTdd" msgid="8606514378585000044">"TTY TDD"</string> + <string name="phoneTypeWorkMobile" msgid="1311426989184065709">"Cellulare ufficio"</string> + <string name="phoneTypeWorkPager" msgid="649938731231157056">"Cercapersone ufficio"</string> + <string name="phoneTypeAssistant" msgid="5596772636128562884">"Assistente"</string> + <string name="phoneTypeMms" msgid="7254492275502768992">"MMS"</string> + <string name="eventTypeBirthday" msgid="2813379844211390740">"Compleanno"</string> + <string name="eventTypeAnniversary" msgid="3876779744518284000">"Anniversario"</string> + <string name="eventTypeOther" msgid="5834288791948564594">"Evento"</string> + <string name="emailTypeCustom" msgid="8525960257804213846">"Personalizzato"</string> + <string name="emailTypeHome" msgid="449227236140433919">"Casa"</string> + <string name="emailTypeWork" msgid="3548058059601149973">"Ufficio"</string> + <string name="emailTypeOther" msgid="2923008695272639549">"Altro"</string> + <string name="emailTypeMobile" msgid="119919005321166205">"Cellulare"</string> + <string name="postalTypeCustom" msgid="8903206903060479902">"Personalizzato"</string> + <string name="postalTypeHome" msgid="8165756977184483097">"Casa"</string> + <string name="postalTypeWork" msgid="5268172772387694495">"Ufficio"</string> + <string name="postalTypeOther" msgid="2726111966623584341">"Altro"</string> + <string name="imTypeCustom" msgid="2074028755527826046">"Personalizzato"</string> + <string name="imTypeHome" msgid="6241181032954263892">"Casa"</string> + <string name="imTypeWork" msgid="1371489290242433090">"Ufficio"</string> + <string name="imTypeOther" msgid="5377007495735915478">"Altro"</string> + <string name="imProtocolCustom" msgid="6919453836618749992">"Personalizzato"</string> + <string name="imProtocolAim" msgid="7050360612368383417">"AIM"</string> + <string name="imProtocolMsn" msgid="144556545420769442">"Windows Live"</string> + <string name="imProtocolYahoo" msgid="8271439408469021273">"Yahoo"</string> + <string name="imProtocolSkype" msgid="9019296744622832951">"Skype"</string> + <string name="imProtocolQq" msgid="8887484379494111884">"QQ"</string> + <string name="imProtocolGoogleTalk" msgid="3808393979157698766">"Google Talk"</string> + <string name="imProtocolIcq" msgid="1574870433606517315">"ICQ"</string> + <string name="imProtocolJabber" msgid="2279917630875771722">"Jabber"</string> + <string name="imProtocolNetMeeting" msgid="8287625655986827971">"NetMeeting"</string> + <string name="orgTypeWork" msgid="29268870505363872">"Ufficio"</string> + <string name="orgTypeOther" msgid="3951781131570124082">"Altro"</string> + <string name="orgTypeCustom" msgid="225523415372088322">"Personalizzato"</string> + <string name="contact_status_update_attribution" msgid="5112589886094402795">"tramite <xliff:g id="SOURCE">%1$s</xliff:g>"</string> + <string name="contact_status_update_attribution_with_date" msgid="5945386376369979909">"<xliff:g id="DATE">%1$s</xliff:g> tramite <xliff:g id="SOURCE">%2$s</xliff:g>"</string> <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Inserisci il PIN"</string> <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Codice PIN errato."</string> <string name="keyguard_label_text" msgid="861796461028298424">"Per sbloccare, premi Menu, poi 0."</string> @@ -447,6 +498,7 @@ <string name="lockscreen_pattern_wrong" msgid="4817583279053112312">"Riprova"</string> <string name="lockscreen_plugged_in" msgid="613343852842944435">"In carica (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string> <string name="lockscreen_charged" msgid="4938930459620989972">"Carico."</string> + <string name="lockscreen_battery_short" msgid="3617549178603354656">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string> <string name="lockscreen_low_battery" msgid="1482873981919249740">"Collegare il caricabatterie."</string> <string name="lockscreen_missing_sim_message_short" msgid="7381499217732227295">"Nessuna SIM presente."</string> <string name="lockscreen_missing_sim_message" msgid="2186920585695169078">"Nessuna SIM presente nel telefono."</string> @@ -478,7 +530,7 @@ <string name="battery_status_charging" msgid="756617993998772213">"In carica..."</string> <string name="battery_low_title" msgid="7923774589611311406">"Collegare il caricabatterie"</string> <string name="battery_low_subtitle" msgid="7388781709819722764">"Batteria quasi scarica:"</string> - <string name="battery_low_percent_format" msgid="6564958083485073855">"energia residua inferiore a <xliff:g id="NUMBER">%d%%</xliff:g>."</string> + <string name="battery_low_percent_format" msgid="696154104579022959">"<xliff:g id="NUMBER">%d%%</xliff:g> rimanente o meno."</string> <string name="battery_low_why" msgid="7279169609518386372">"Utilizzo batteria"</string> <string name="factorytest_failed" msgid="5410270329114212041">"Test di fabbrica non riuscito"</string> <string name="factorytest_not_system" msgid="4435201656767276723">"L\'azione FACTORY_TEST è supportata soltanto per i pacchetti installati in /system/app."</string> @@ -488,6 +540,7 @@ <string name="js_dialog_title_default" msgid="6961903213729667573">"JavaScript"</string> <string name="js_dialog_before_unload" msgid="1901675448179653089">"Uscire da questa pagina?"\n\n"<xliff:g id="MESSAGE">%s</xliff:g>"\n\n"Seleziona OK per continuare o Annulla per rimanere nella pagina corrente."</string> <string name="save_password_label" msgid="6860261758665825069">"Conferma"</string> + <string name="double_tap_toast" msgid="1068216937244567247">"Suggerimento. Tocca due volte per aumentare/ridurre lo zoom."</string> <string name="permlab_readHistoryBookmarks" msgid="1284843728203412135">"lettura cronologia e segnalibri del browser"</string> <string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"Consente all\'applicazione di leggere tutti gli URL visitati e tutti i segnalibri del browser."</string> <string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"creazione cronologia e segnalibri del browser"</string> @@ -692,10 +745,8 @@ <string name="extmedia_format_message" msgid="3621369962433523619">"Formattare la scheda SD? Tutti i dati sulla scheda verranno persi."</string> <string name="extmedia_format_button_format" msgid="4131064560127478695">"Formatta"</string> <string name="adb_active_notification_title" msgid="6729044778949189918">"Debug USB collegato"</string> - <!-- no translation found for adb_active_notification_message (8470296818270110396) --> - <skip /> - <!-- no translation found for select_input_method (6865512749462072765) --> - <skip /> + <string name="adb_active_notification_message" msgid="8470296818270110396">"Seleziona per disattivare il debug USB."</string> + <string name="select_input_method" msgid="6865512749462072765">"Seleziona metodo di inserimento"</string> <string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string> <string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string> <string name="candidates_style" msgid="4333913089637062257"><u>"candidati"</u></string> @@ -731,11 +782,14 @@ <string name="allow" msgid="7225948811296386551">"Consenti"</string> <string name="deny" msgid="2081879885755434506">"Nega"</string> <string name="permission_request_notification_title" msgid="5390555465778213840">"Autorizzazione richiesta"</string> - <!-- no translation found for permission_request_notification_with_subtitle (4325409589686688000) --> - <skip /> + <string name="permission_request_notification_with_subtitle" msgid="4325409589686688000">"Autorizzazione richiesta"\n"per l\'account <xliff:g id="ACCOUNT">%s</xliff:g>"</string> <string name="input_method_binding_label" msgid="1283557179944992649">"Metodo inserimento"</string> <string name="sync_binding_label" msgid="3687969138375092423">"Sinc"</string> <string name="accessibility_binding_label" msgid="4148120742096474641">"Accesso facilitato"</string> <string name="wallpaper_binding_label" msgid="1240087844304687662">"Sfondo"</string> <string name="chooser_wallpaper" msgid="7873476199295190279">"Cambia sfondo"</string> + <string name="pptp_vpn_description" msgid="2688045385181439401">"Protocollo di tunneling Point-to-Point"</string> + <string name="l2tp_vpn_description" msgid="3750692169378923304">"Protocollo di tunneling livello 2"</string> + <string name="l2tp_ipsec_psk_vpn_description" msgid="3945043564008303239">"VPN L2TP/IPSec basata su chiave precondivisa"</string> + <string name="l2tp_ipsec_crt_vpn_description" msgid="5382714073103653577">"VPN L2TP/IPSec basata su certificato"</string> </resources> diff --git a/core/res/res/values-ja/strings.xml b/core/res/res/values-ja/strings.xml index 55e6b5059736..8c3836cf90f2 100644 --- a/core/res/res/values-ja/strings.xml +++ b/core/res/res/values-ja/strings.xml @@ -111,8 +111,7 @@ <string name="httpErrorFile" msgid="8250549644091165175">"ファイルにアクセスできませんでした。"</string> <string name="httpErrorFileNotFound" msgid="5588380756326017105">"要求されたファイルが見つかりませんでした。"</string> <string name="httpErrorTooManyRequests" msgid="1235396927087188253">"処理中のリクエストが多すぎます。しばらくしてからもう一度試してください。"</string> - <!-- no translation found for notification_title (1259940370369187045) --> - <skip /> + <string name="notification_title" msgid="1259940370369187045">"ログインエラー: <xliff:g id="ACCOUNT">%1$s</xliff:g>"</string> <string name="contentServiceSync" msgid="8353523060269335667">"同期"</string> <string name="contentServiceSyncNotificationTitle" msgid="397743349191901458">"同期"</string> <string name="contentServiceTooManyDeletesNotificationDesc" msgid="8100981435080696431">"<xliff:g id="CONTENT_TYPE">%s</xliff:g>での削除が多すぎます。"</string> @@ -148,8 +147,8 @@ <string name="permgroupdesc_location" msgid="2430258821648348660">"現在地を追跡"</string> <string name="permgrouplab_network" msgid="5808983377727109831">"ネットワーク通信"</string> <string name="permgroupdesc_network" msgid="5035763698958415998">"ネットワークのさまざまな機能へのアクセスをアプリケーションに許可します。"</string> - <string name="permgrouplab_accounts" msgid="7140261692496314430">"Googleアカウント"</string> - <string name="permgroupdesc_accounts" msgid="6735915929704895193">"利用可能なGoogleアカウントへのアクセス"</string> + <string name="permgrouplab_accounts" msgid="3359646291125325519">"アカウント"</string> + <string name="permgroupdesc_accounts" msgid="4948732641827091312">"利用可能なアカウントにアクセスします。"</string> <string name="permgrouplab_hardwareControls" msgid="7998214968791599326">"ハードウェアの制御"</string> <string name="permgroupdesc_hardwareControls" msgid="4357057861225462702">"携帯電話のハードウェアに直接アクセスします。"</string> <string name="permgrouplab_phoneCalls" msgid="9067173988325865923">"電話/通話"</string> @@ -433,6 +432,58 @@ <item msgid="2506857312718630823">"ICQ"</item> <item msgid="1648797903785279353">"Jabber"</item> </string-array> + <string name="phoneTypeCustom" msgid="1644738059053355820">"カスタム"</string> + <string name="phoneTypeHome" msgid="2570923463033985887">"自宅"</string> + <string name="phoneTypeMobile" msgid="6501463557754751037">"携帯"</string> + <string name="phoneTypeWork" msgid="8863939667059911633">"勤務先"</string> + <string name="phoneTypeFaxWork" msgid="3517792160008890912">"FAX(勤務先)"</string> + <string name="phoneTypeFaxHome" msgid="2067265972322971467">"FAX(自宅)"</string> + <string name="phoneTypePager" msgid="7582359955394921732">"ポケベル"</string> + <string name="phoneTypeOther" msgid="1544425847868765990">"その他"</string> + <string name="phoneTypeCallback" msgid="2712175203065678206">"コールバック"</string> + <string name="phoneTypeCar" msgid="8738360689616716982">"クルマ"</string> + <string name="phoneTypeCompanyMain" msgid="540434356461478916">"会社代表番号"</string> + <string name="phoneTypeIsdn" msgid="8022453193171370337">"ISDN"</string> + <string name="phoneTypeMain" msgid="6766137010628326916">"メイン"</string> + <string name="phoneTypeOtherFax" msgid="8587657145072446565">"FAX(その他)"</string> + <string name="phoneTypeRadio" msgid="4093738079908667513">"無線"</string> + <string name="phoneTypeTelex" msgid="3367879952476250512">"テレックス"</string> + <string name="phoneTypeTtyTdd" msgid="8606514378585000044">"TTY TDD"</string> + <string name="phoneTypeWorkMobile" msgid="1311426989184065709">"携帯電話(勤務先)"</string> + <string name="phoneTypeWorkPager" msgid="649938731231157056">"ポケベル(勤務先)"</string> + <string name="phoneTypeAssistant" msgid="5596772636128562884">"アシスタント"</string> + <string name="phoneTypeMms" msgid="7254492275502768992">"MMS"</string> + <string name="eventTypeBirthday" msgid="2813379844211390740">"誕生日"</string> + <string name="eventTypeAnniversary" msgid="3876779744518284000">"記念日"</string> + <string name="eventTypeOther" msgid="5834288791948564594">"予定"</string> + <string name="emailTypeCustom" msgid="8525960257804213846">"カスタム"</string> + <string name="emailTypeHome" msgid="449227236140433919">"自宅"</string> + <string name="emailTypeWork" msgid="3548058059601149973">"勤務先"</string> + <string name="emailTypeOther" msgid="2923008695272639549">"その他"</string> + <string name="emailTypeMobile" msgid="119919005321166205">"携帯"</string> + <string name="postalTypeCustom" msgid="8903206903060479902">"カスタム"</string> + <string name="postalTypeHome" msgid="8165756977184483097">"自宅"</string> + <string name="postalTypeWork" msgid="5268172772387694495">"勤務先"</string> + <string name="postalTypeOther" msgid="2726111966623584341">"その他"</string> + <string name="imTypeCustom" msgid="2074028755527826046">"カスタム"</string> + <string name="imTypeHome" msgid="6241181032954263892">"自宅"</string> + <string name="imTypeWork" msgid="1371489290242433090">"勤務先"</string> + <string name="imTypeOther" msgid="5377007495735915478">"その他"</string> + <string name="imProtocolCustom" msgid="6919453836618749992">"カスタム"</string> + <string name="imProtocolAim" msgid="7050360612368383417">"AIM"</string> + <string name="imProtocolMsn" msgid="144556545420769442">"Windows Live"</string> + <string name="imProtocolYahoo" msgid="8271439408469021273">"Yahoo"</string> + <string name="imProtocolSkype" msgid="9019296744622832951">"Skype"</string> + <string name="imProtocolQq" msgid="8887484379494111884">"QQ"</string> + <string name="imProtocolGoogleTalk" msgid="3808393979157698766">"Googleトーク"</string> + <string name="imProtocolIcq" msgid="1574870433606517315">"ICQ"</string> + <string name="imProtocolJabber" msgid="2279917630875771722">"Jabber"</string> + <string name="imProtocolNetMeeting" msgid="8287625655986827971">"NetMeeting"</string> + <string name="orgTypeWork" msgid="29268870505363872">"勤務先"</string> + <string name="orgTypeOther" msgid="3951781131570124082">"その他"</string> + <string name="orgTypeCustom" msgid="225523415372088322">"カスタム"</string> + <string name="contact_status_update_attribution" msgid="5112589886094402795">"<xliff:g id="SOURCE">%1$s</xliff:g>経由"</string> + <string name="contact_status_update_attribution_with_date" msgid="5945386376369979909">"<xliff:g id="DATE">%1$s</xliff:g>、更新元: <xliff:g id="SOURCE">%2$s</xliff:g>"</string> <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"PINコードを入力"</string> <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"PINコードが正しくありません。"</string> <string name="keyguard_label_text" msgid="861796461028298424">"MENU、0キーでロック解除"</string> @@ -447,6 +498,7 @@ <string name="lockscreen_pattern_wrong" msgid="4817583279053112312">"やり直してください"</string> <string name="lockscreen_plugged_in" msgid="613343852842944435">"充電中(<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string> <string name="lockscreen_charged" msgid="4938930459620989972">"充電完了。"</string> + <string name="lockscreen_battery_short" msgid="3617549178603354656">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string> <string name="lockscreen_low_battery" msgid="1482873981919249740">"充電してください。"</string> <string name="lockscreen_missing_sim_message_short" msgid="7381499217732227295">"SIMカードが挿入されていません"</string> <string name="lockscreen_missing_sim_message" msgid="2186920585695169078">"SIMカードが挿入されていません"</string> @@ -478,7 +530,7 @@ <string name="battery_status_charging" msgid="756617993998772213">"充電中..."</string> <string name="battery_low_title" msgid="7923774589611311406">"充電してください"</string> <string name="battery_low_subtitle" msgid="7388781709819722764">"電池が残り少なくなっています:"</string> - <string name="battery_low_percent_format" msgid="6564958083485073855">"残量<xliff:g id="NUMBER">%d%%</xliff:g>以下"</string> + <string name="battery_low_percent_format" msgid="696154104579022959">"残り<xliff:g id="NUMBER">%d%%</xliff:g>未満です。"</string> <string name="battery_low_why" msgid="7279169609518386372">"電池使用量"</string> <string name="factorytest_failed" msgid="5410270329114212041">"出荷時試験が失敗"</string> <string name="factorytest_not_system" msgid="4435201656767276723">"FACTORY_TEST操作は、/system/appにインストールされたパッケージのみが対象です。"</string> @@ -488,6 +540,7 @@ <string name="js_dialog_title_default" msgid="6961903213729667573">"JavaScript"</string> <string name="js_dialog_before_unload" msgid="1901675448179653089">"このページから移動しますか?"\n\n"<xliff:g id="MESSAGE">%s</xliff:g>"\n\n"移動する場合は[OK]、今のページに残る場合は[キャンセル]を選択してください。"</string> <string name="save_password_label" msgid="6860261758665825069">"確認"</string> + <string name="double_tap_toast" msgid="1068216937244567247">"ヒント: ダブルタップで拡大/縮小できます。"</string> <string name="permlab_readHistoryBookmarks" msgid="1284843728203412135">"ブラウザの履歴とブックマークを読み取る"</string> <string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"ブラウザでアクセスしたすべてのURLおよびブラウザのすべてのブックマークの読み取りをアプリケーションに許可します。"</string> <string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"ブラウザの履歴とブックマークを書き込む"</string> @@ -692,10 +745,8 @@ <string name="extmedia_format_message" msgid="3621369962433523619">"SDカードをフォーマットしてもよろしいですか?カード内のすべてのデータが失われます。"</string> <string name="extmedia_format_button_format" msgid="4131064560127478695">"フォーマット"</string> <string name="adb_active_notification_title" msgid="6729044778949189918">"USBデバッグが接続されました"</string> - <!-- no translation found for adb_active_notification_message (8470296818270110396) --> - <skip /> - <!-- no translation found for select_input_method (6865512749462072765) --> - <skip /> + <string name="adb_active_notification_message" msgid="8470296818270110396">"USBデバッグを無効にする場合に選択します。"</string> + <string name="select_input_method" msgid="6865512749462072765">"入力方法の選択"</string> <string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string> <string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string> <string name="candidates_style" msgid="4333913089637062257"><u>"候補"</u></string> @@ -731,11 +782,14 @@ <string name="allow" msgid="7225948811296386551">"許可"</string> <string name="deny" msgid="2081879885755434506">"拒否"</string> <string name="permission_request_notification_title" msgid="5390555465778213840">"リクエスト済み権限"</string> - <!-- no translation found for permission_request_notification_with_subtitle (4325409589686688000) --> - <skip /> + <string name="permission_request_notification_with_subtitle" msgid="4325409589686688000">"次のアカウントにアクセスする権限が"\n"リクエストされました:<xliff:g id="ACCOUNT">%s</xliff:g>"</string> <string name="input_method_binding_label" msgid="1283557179944992649">"入力方法"</string> <string name="sync_binding_label" msgid="3687969138375092423">"同期"</string> - <string name="accessibility_binding_label" msgid="4148120742096474641">"アクセシビリティ"</string> + <string name="accessibility_binding_label" msgid="4148120742096474641">"ユーザー補助"</string> <string name="wallpaper_binding_label" msgid="1240087844304687662">"壁紙"</string> <string name="chooser_wallpaper" msgid="7873476199295190279">"壁紙を変更"</string> + <string name="pptp_vpn_description" msgid="2688045385181439401">"ポイントツーポイントトンネリングプロトコル"</string> + <string name="l2tp_vpn_description" msgid="3750692169378923304">"レイヤー2トンネリングプロトコル"</string> + <string name="l2tp_ipsec_psk_vpn_description" msgid="3945043564008303239">"L2TP/IPSec VPNベースの事前共有鍵"</string> + <string name="l2tp_ipsec_crt_vpn_description" msgid="5382714073103653577">"L2TP/IPSec VPNベースの証明書"</string> </resources> diff --git a/core/res/res/values-ko/strings.xml b/core/res/res/values-ko/strings.xml index 3db36fc2e682..840fa998871e 100644 --- a/core/res/res/values-ko/strings.xml +++ b/core/res/res/values-ko/strings.xml @@ -111,8 +111,7 @@ <string name="httpErrorFile" msgid="8250549644091165175">"파일에 액세스할 수 없습니다."</string> <string name="httpErrorFileNotFound" msgid="5588380756326017105">"요청한 파일을 찾을 수 없습니다."</string> <string name="httpErrorTooManyRequests" msgid="1235396927087188253">"처리 중인 요청이 너무 많습니다. 잠시 후에 다시 시도해 주세요."</string> - <!-- no translation found for notification_title (1259940370369187045) --> - <skip /> + <string name="notification_title" msgid="1259940370369187045">"<xliff:g id="ACCOUNT">%1$s</xliff:g>에 로그인 오류 발생"</string> <string name="contentServiceSync" msgid="8353523060269335667">"동기화"</string> <string name="contentServiceSyncNotificationTitle" msgid="397743349191901458">"동기화"</string> <string name="contentServiceTooManyDeletesNotificationDesc" msgid="8100981435080696431">"<xliff:g id="CONTENT_TYPE">%s</xliff:g> 삭제가 너무 많습니다."</string> @@ -148,8 +147,8 @@ <string name="permgroupdesc_location" msgid="2430258821648348660">"실제 위치 모니터링"</string> <string name="permgrouplab_network" msgid="5808983377727109831">"네트워크 통신"</string> <string name="permgroupdesc_network" msgid="5035763698958415998">"응용프로그램이 다양한 네트워크 기능에 액세스할 수 있도록 합니다."</string> - <string name="permgrouplab_accounts" msgid="7140261692496314430">"Google 계정"</string> - <string name="permgroupdesc_accounts" msgid="6735915929704895193">"사용 가능한 Google 계정에 액세스합니다."</string> + <string name="permgrouplab_accounts" msgid="3359646291125325519">"계정"</string> + <string name="permgroupdesc_accounts" msgid="4948732641827091312">"사용 가능한 계정에 액세스합니다."</string> <string name="permgrouplab_hardwareControls" msgid="7998214968791599326">"하드웨어 제어"</string> <string name="permgroupdesc_hardwareControls" msgid="4357057861225462702">"휴대전화의 하드웨어에 직접 액세스합니다."</string> <string name="permgrouplab_phoneCalls" msgid="9067173988325865923">"전화 통화"</string> @@ -433,6 +432,58 @@ <item msgid="2506857312718630823">"ICQ"</item> <item msgid="1648797903785279353">"Jabber"</item> </string-array> + <string name="phoneTypeCustom" msgid="1644738059053355820">"맞춤설정"</string> + <string name="phoneTypeHome" msgid="2570923463033985887">"집"</string> + <string name="phoneTypeMobile" msgid="6501463557754751037">"휴대전화"</string> + <string name="phoneTypeWork" msgid="8863939667059911633">"직장"</string> + <string name="phoneTypeFaxWork" msgid="3517792160008890912">"직장 팩스"</string> + <string name="phoneTypeFaxHome" msgid="2067265972322971467">"집(팩스)"</string> + <string name="phoneTypePager" msgid="7582359955394921732">"호출기"</string> + <string name="phoneTypeOther" msgid="1544425847868765990">"기타"</string> + <string name="phoneTypeCallback" msgid="2712175203065678206">"콜백"</string> + <string name="phoneTypeCar" msgid="8738360689616716982">"카폰"</string> + <string name="phoneTypeCompanyMain" msgid="540434356461478916">"회사 기본전화"</string> + <string name="phoneTypeIsdn" msgid="8022453193171370337">"ISDN"</string> + <string name="phoneTypeMain" msgid="6766137010628326916">"기본"</string> + <string name="phoneTypeOtherFax" msgid="8587657145072446565">"기타 팩스"</string> + <string name="phoneTypeRadio" msgid="4093738079908667513">"무선통신"</string> + <string name="phoneTypeTelex" msgid="3367879952476250512">"텔렉스"</string> + <string name="phoneTypeTtyTdd" msgid="8606514378585000044">"TTY TDD"</string> + <string name="phoneTypeWorkMobile" msgid="1311426989184065709">"직장 휴대전화"</string> + <string name="phoneTypeWorkPager" msgid="649938731231157056">"직장 호출기"</string> + <string name="phoneTypeAssistant" msgid="5596772636128562884">"비서"</string> + <string name="phoneTypeMms" msgid="7254492275502768992">"MMS"</string> + <string name="eventTypeBirthday" msgid="2813379844211390740">"생일"</string> + <string name="eventTypeAnniversary" msgid="3876779744518284000">"기념일"</string> + <string name="eventTypeOther" msgid="5834288791948564594">"일정"</string> + <string name="emailTypeCustom" msgid="8525960257804213846">"맞춤설정"</string> + <string name="emailTypeHome" msgid="449227236140433919">"집"</string> + <string name="emailTypeWork" msgid="3548058059601149973">"직장"</string> + <string name="emailTypeOther" msgid="2923008695272639549">"기타"</string> + <string name="emailTypeMobile" msgid="119919005321166205">"모바일"</string> + <string name="postalTypeCustom" msgid="8903206903060479902">"맞춤설정"</string> + <string name="postalTypeHome" msgid="8165756977184483097">"집"</string> + <string name="postalTypeWork" msgid="5268172772387694495">"직장"</string> + <string name="postalTypeOther" msgid="2726111966623584341">"기타"</string> + <string name="imTypeCustom" msgid="2074028755527826046">"맞춤설정"</string> + <string name="imTypeHome" msgid="6241181032954263892">"집"</string> + <string name="imTypeWork" msgid="1371489290242433090">"직장"</string> + <string name="imTypeOther" msgid="5377007495735915478">"기타"</string> + <string name="imProtocolCustom" msgid="6919453836618749992">"맞춤설정"</string> + <string name="imProtocolAim" msgid="7050360612368383417">"AIM"</string> + <string name="imProtocolMsn" msgid="144556545420769442">"Windows Live"</string> + <string name="imProtocolYahoo" msgid="8271439408469021273">"Yahoo"</string> + <string name="imProtocolSkype" msgid="9019296744622832951">"Skype"</string> + <string name="imProtocolQq" msgid="8887484379494111884">"QQ"</string> + <string name="imProtocolGoogleTalk" msgid="3808393979157698766">"Google 토크"</string> + <string name="imProtocolIcq" msgid="1574870433606517315">"ICQ"</string> + <string name="imProtocolJabber" msgid="2279917630875771722">"Jabber"</string> + <string name="imProtocolNetMeeting" msgid="8287625655986827971">"NetMeeting"</string> + <string name="orgTypeWork" msgid="29268870505363872">"직장"</string> + <string name="orgTypeOther" msgid="3951781131570124082">"기타"</string> + <string name="orgTypeCustom" msgid="225523415372088322">"맞춤설정"</string> + <string name="contact_status_update_attribution" msgid="5112589886094402795">"<xliff:g id="SOURCE">%1$s</xliff:g>을(를) 통해"</string> + <string name="contact_status_update_attribution_with_date" msgid="5945386376369979909">"<xliff:g id="DATE">%1$s</xliff:g>(<xliff:g id="SOURCE">%2$s</xliff:g> 사용)"</string> <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"PIN 코드 입력"</string> <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"PIN 코드가 잘못되었습니다."</string> <string name="keyguard_label_text" msgid="861796461028298424">"잠금해제하려면 메뉴를 누른 다음 0을 누릅니다."</string> @@ -447,6 +498,7 @@ <string name="lockscreen_pattern_wrong" msgid="4817583279053112312">"죄송합니다. 다시 시도하세요."</string> <string name="lockscreen_plugged_in" msgid="613343852842944435">"충전 중(<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string> <string name="lockscreen_charged" msgid="4938930459620989972">"충전되었습니다."</string> + <string name="lockscreen_battery_short" msgid="3617549178603354656">"<xliff:g id="NUMBER">%d</xliff:g> <xliff:g id="PERCENT">%%</xliff:g>"</string> <string name="lockscreen_low_battery" msgid="1482873981919249740">"충전기를 연결하세요."</string> <string name="lockscreen_missing_sim_message_short" msgid="7381499217732227295">"SIM 카드가 없습니다."</string> <string name="lockscreen_missing_sim_message" msgid="2186920585695169078">"휴대전화에 SIM 카드가 없습니다."</string> @@ -478,7 +530,7 @@ <string name="battery_status_charging" msgid="756617993998772213">"충전 중..."</string> <string name="battery_low_title" msgid="7923774589611311406">"충전기를 연결하세요."</string> <string name="battery_low_subtitle" msgid="7388781709819722764">"배터리 전원이 부족합니다."</string> - <string name="battery_low_percent_format" msgid="6564958083485073855">"<xliff:g id="NUMBER">%d%%</xliff:g> 미만 남음"</string> + <string name="battery_low_percent_format" msgid="696154104579022959">"잔여 배터리가 <xliff:g id="NUMBER">%d%%</xliff:g> 이하입니다."</string> <string name="battery_low_why" msgid="7279169609518386372">"배터리 사용"</string> <string name="factorytest_failed" msgid="5410270329114212041">"출고 테스트 불합격"</string> <string name="factorytest_not_system" msgid="4435201656767276723">"FACTORY_TEST 작업은 /system/app 디렉토리에 설치된 패키지에 대해서만 지원됩니다."</string> @@ -488,6 +540,7 @@ <string name="js_dialog_title_default" msgid="6961903213729667573">"자바스크립트"</string> <string name="js_dialog_before_unload" msgid="1901675448179653089">"다른 페이지를 탐색하시겠습니까?"\n\n"<xliff:g id="MESSAGE">%s</xliff:g>"\n\n"계속하려면 \'확인\'을 선택하고 현재 페이지에 그대로 있으려면 \'취소\'를 선택하세요."</string> <string name="save_password_label" msgid="6860261758665825069">"확인"</string> + <string name="double_tap_toast" msgid="1068216937244567247">"도움말: 축소/확대하려면 두 번 누릅니다."</string> <string name="permlab_readHistoryBookmarks" msgid="1284843728203412135">"브라우저의 기록 및 북마크 읽기"</string> <string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"응용프로그램이 브라우저로 방문한 모든 URL과 브라우저의 모든 북마크를 읽도록 허용합니다."</string> <string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"브라우저의 기록 및 북마크 쓰기"</string> @@ -687,15 +740,13 @@ <string name="usb_storage_stop_message" msgid="2390958966725232848">"USB 저장소를 끄기 전에 반드시 USB 호스트에서 마운트 해제하세요. USB 저장소를 끄려면 \'끄기\'를 선택하세요."</string> <string name="usb_storage_stop_button_mount" msgid="1181858854166273345">"USB 저장소 끄기"</string> <string name="usb_storage_stop_button_unmount" msgid="3774611918660582898">"취소"</string> - <string name="usb_storage_stop_error_message" msgid="3746037090369246731">"USB 저장소를 끄는 동안 문제가 발생했습니다. USB 호스트를 마운트 해제했는지 확인한 다음 다시 시도하세요."</string> + <string name="usb_storage_stop_error_message" msgid="3746037090369246731">"USB 저장소를 끄는 동안 문제가 발생했습니다. USB 호스트와 연결을 해제했는지 확인한 다음 다시 시도하세요."</string> <string name="extmedia_format_title" msgid="8663247929551095854">"SD 카드 포맷"</string> <string name="extmedia_format_message" msgid="3621369962433523619">"SD 카드를 포맷하시겠습니까? 포맷하면 카드의 모든 데이터를 잃게 됩니다."</string> <string name="extmedia_format_button_format" msgid="4131064560127478695">"포맷"</string> <string name="adb_active_notification_title" msgid="6729044778949189918">"USB 디버깅 연결됨"</string> - <!-- no translation found for adb_active_notification_message (8470296818270110396) --> - <skip /> - <!-- no translation found for select_input_method (6865512749462072765) --> - <skip /> + <string name="adb_active_notification_message" msgid="8470296818270110396">"USB 디버깅을 사용하지 않으려면 선택합니다."</string> + <string name="select_input_method" msgid="6865512749462072765">"입력 방법 선택"</string> <string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string> <string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string> <string name="candidates_style" msgid="4333913089637062257"><u>"가능한 원인"</u></string> @@ -731,11 +782,14 @@ <string name="allow" msgid="7225948811296386551">"허용"</string> <string name="deny" msgid="2081879885755434506">"거부"</string> <string name="permission_request_notification_title" msgid="5390555465778213840">"권한 요청"</string> - <!-- no translation found for permission_request_notification_with_subtitle (4325409589686688000) --> - <skip /> + <string name="permission_request_notification_with_subtitle" msgid="4325409589686688000">"<xliff:g id="ACCOUNT">%s</xliff:g> 계정에 대해"\n"권한 요청"</string> <string name="input_method_binding_label" msgid="1283557179944992649">"입력 방법"</string> <string name="sync_binding_label" msgid="3687969138375092423">"동기화"</string> <string name="accessibility_binding_label" msgid="4148120742096474641">"접근성"</string> <string name="wallpaper_binding_label" msgid="1240087844304687662">"배경화면"</string> <string name="chooser_wallpaper" msgid="7873476199295190279">"배경화면 변경"</string> + <string name="pptp_vpn_description" msgid="2688045385181439401">"PPTP(Point-to-Point Tunneling Protocol)"</string> + <string name="l2tp_vpn_description" msgid="3750692169378923304">"L2TP(Layer 2 Tunneling Protocol)"</string> + <string name="l2tp_ipsec_psk_vpn_description" msgid="3945043564008303239">"사전 공유 키 기반 L2TP/IPSec VPN"</string> + <string name="l2tp_ipsec_crt_vpn_description" msgid="5382714073103653577">"인증서 기반 L2TP/IPSec VPN"</string> </resources> diff --git a/core/res/res/values-nb/strings.xml b/core/res/res/values-nb/strings.xml index 19524d81c8ed..ced4f16a6ceb 100644 --- a/core/res/res/values-nb/strings.xml +++ b/core/res/res/values-nb/strings.xml @@ -111,8 +111,7 @@ <string name="httpErrorFile" msgid="8250549644091165175">"Kunne ikke åpne filen."</string> <string name="httpErrorFileNotFound" msgid="5588380756326017105">"Fant ikke den forespurte filen."</string> <string name="httpErrorTooManyRequests" msgid="1235396927087188253">"For mange forespørsler blir behandlet. Prøv igjen senere."</string> - <!-- no translation found for notification_title (1259940370369187045) --> - <skip /> + <string name="notification_title" msgid="1259940370369187045">"Innloggingsfeil for <xliff:g id="ACCOUNT">%1$s</xliff:g>"</string> <string name="contentServiceSync" msgid="8353523060269335667">"Synkronisering"</string> <string name="contentServiceSyncNotificationTitle" msgid="397743349191901458">"Synkronisering"</string> <string name="contentServiceTooManyDeletesNotificationDesc" msgid="8100981435080696431">"For mange slettinger av <xliff:g id="CONTENT_TYPE">%s</xliff:g>."</string> @@ -148,8 +147,8 @@ <string name="permgroupdesc_location" msgid="2430258821648348660">"Overvåking av telefonens fysiske plassering"</string> <string name="permgrouplab_network" msgid="5808983377727109831">"Nettverkstilgang"</string> <string name="permgroupdesc_network" msgid="5035763698958415998">"Gir applikasjoner tilgang til diverse nettverksfunksjoner."</string> - <string name="permgrouplab_accounts" msgid="7140261692496314430">"Google-kontoer"</string> - <string name="permgroupdesc_accounts" msgid="6735915929704895193">"Tilgang til tilgjengelige Google-kontoer."</string> + <string name="permgrouplab_accounts" msgid="3359646291125325519">"Google-kontoer"</string> + <string name="permgroupdesc_accounts" msgid="4948732641827091312">"Tilgang til tilgjengelige Google-kontoer."</string> <string name="permgrouplab_hardwareControls" msgid="7998214968791599326">"Maskinvarekontroll"</string> <string name="permgroupdesc_hardwareControls" msgid="4357057861225462702">"Direkte tilgang til maskinvaren på telefonen."</string> <string name="permgrouplab_phoneCalls" msgid="9067173988325865923">"Telefonsamtaler"</string> @@ -211,9 +210,9 @@ <string name="permlab_batteryStats" msgid="7863923071360031652">"endre batteristatistikk"</string> <string name="permdesc_batteryStats" msgid="5847319823772230560">"Lar applikasjonen endre på innsamlet batteristatistikk. Ikke ment for vanlige applikasjoner."</string> <string name="permlab_backup" msgid="470013022865453920">"kontrollere backup og gjenoppretting"</string> - <string name="permdesc_backup" msgid="4837493065154256525">"Gir programmet tillatelse til å kontrollere systemets mekanismer for sikkerhetskopiering gjenoppretting. Ikke beregnet på vanlige programmer."</string> - <string name="permlab_backup_data" msgid="4057625941707926463">"sikkerhetskopier og gjenopprett programmets data"</string> - <string name="permdesc_backup_data" msgid="8274426305151227766">"Gir programmet tillatelse til å ta del i systemets mekanismer for sikkerhetskopiering og gjenoppretting."</string> + <string name="permdesc_backup" msgid="4837493065154256525">"Lar applikasjonen kontrollere systemets backup- og gjenopprettingsmekanisme. Ikke ment for vanlige applikasjoner."</string> + <string name="permlab_backup_data" msgid="4057625941707926463">"foreta backup og gjenoppretting av applikasjonens data"</string> + <string name="permdesc_backup_data" msgid="8274426305151227766">"Lar applikasjonen delta i systemets backup- og gjenopprettingsmekanisme."</string> <string name="permlab_internalSystemWindow" msgid="2148563628140193231">"vis uautoriserte vinduer"</string> <string name="permdesc_internalSystemWindow" msgid="5895082268284998469">"Tillater at det opprettes vinduer ment for bruk av systemets interne brukergrensesnitt. Ikke ment for vanlige applikasjoner."</string> <string name="permlab_systemAlertWindow" msgid="3372321942941168324">"vise advarsler på systemnivå"</string> @@ -259,7 +258,7 @@ <string name="permlab_writeSettings" msgid="1365523497395143704">"endre globale systeminnstillinger"</string> <string name="permdesc_writeSettings" msgid="838789419871034696">"Lar applikasjonen endre systemets innstillingsdata. Ondsinnede applikasjoner kan skade systemets innstillinger."</string> <string name="permlab_writeSecureSettings" msgid="204676251876718288">"endre sikre systeminnstillinger"</string> - <string name="permdesc_writeSecureSettings" msgid="5497873143539034724">"Gir programmet tillatelse til å endre systemets data for sikkerhetsinnstilling. Ikke beregnet på vanlige programmer."</string> + <string name="permdesc_writeSecureSettings" msgid="5497873143539034724">"Gir programmet tillatelse til å endre systemets data for sikkerhetsinnstilling. Ikke ment for vanlige programmer."</string> <string name="permlab_writeGservices" msgid="2149426664226152185">"redigere Google-tjenestekartet"</string> <string name="permdesc_writeGservices" msgid="6602362746516676175">"Lar applikasjonen redigere Google-tjenestekartet. Ikke ment for bruk av vanlige applikasjoner."</string> <string name="permlab_receiveBootCompleted" msgid="7776779842866993377">"starte automatisk sammen med systemet"</string> @@ -316,8 +315,8 @@ <string name="permdesc_callPhone" msgid="3369867353692722456">"Lar applikasjonen ringe telefonnummer uten inngripen fra brukeren. Ondsinnede applikasjoner kan forårsake uventede oppringinger på telefonregningen. Merk at dette ikke gir applikasjonen lov til å ringe nødnummer."</string> <string name="permlab_callPrivileged" msgid="4198349211108497879">"ringe vilkårlige telefonnummer direkte"</string> <string name="permdesc_callPrivileged" msgid="244405067160028452">"Lar applikasjonen ringe hvilket som helst telefonnummer, inkludert nødnummer, uten inngripen fra brukeren. Ondsinnede applikasjoner kan forårsake unødvendige og ulovlige samtaler til nødtjenester."</string> - <string name="permlab_performCdmaProvisioning" msgid="5604848095315421425">"start CDMA-telefonoppsett direkte"</string> - <string name="permdesc_performCdmaProvisioning" msgid="6457447676108355905">"Gir programmet tillatelse til å starte klargjøring av CDMA. Skadelige programmer kan starte klargjøring av CDMA uten grunn"</string> + <string name="permlab_performCdmaProvisioning" msgid="5604848095315421425">"begynne CDMA-telefonoppsett direkte"</string> + <string name="permdesc_performCdmaProvisioning" msgid="6457447676108355905">"Lar applikasjonen begynne CDMA-oppsett. Ondsinnede applikasjoner kan bruke dette til å starte CDMA-oppsett uten grunn."</string> <string name="permlab_locationUpdates" msgid="7785408253364335740">"kontrollere varsling for plasseringsendring"</string> <string name="permdesc_locationUpdates" msgid="2300018303720930256">"Lar applikasjonen slå av/på varsling om plasseringsendringer fra radioen. Ikke ment for vanlige applikasjoner."</string> <string name="permlab_checkinProperties" msgid="7855259461268734914">"få tilgang til egenskaper for innsjekking"</string> @@ -433,6 +432,58 @@ <item msgid="2506857312718630823">"ICQ"</item> <item msgid="1648797903785279353">"Jabber"</item> </string-array> + <string name="phoneTypeCustom" msgid="1644738059053355820">"Egendefinert"</string> + <string name="phoneTypeHome" msgid="2570923463033985887">"Hjemme"</string> + <string name="phoneTypeMobile" msgid="6501463557754751037">"Mobil"</string> + <string name="phoneTypeWork" msgid="8863939667059911633">"Arbeid"</string> + <string name="phoneTypeFaxWork" msgid="3517792160008890912">"Faks arbeid"</string> + <string name="phoneTypeFaxHome" msgid="2067265972322971467">"Faks hjemme"</string> + <string name="phoneTypePager" msgid="7582359955394921732">"Personsøker"</string> + <string name="phoneTypeOther" msgid="1544425847868765990">"Annen"</string> + <string name="phoneTypeCallback" msgid="2712175203065678206">"Tilbakering"</string> + <string name="phoneTypeCar" msgid="8738360689616716982">"Bil"</string> + <string name="phoneTypeCompanyMain" msgid="540434356461478916">"Firma hoved"</string> + <string name="phoneTypeIsdn" msgid="8022453193171370337">"ISDN"</string> + <string name="phoneTypeMain" msgid="6766137010628326916">"Hoved"</string> + <string name="phoneTypeOtherFax" msgid="8587657145072446565">"Faks annen"</string> + <string name="phoneTypeRadio" msgid="4093738079908667513">"Radio"</string> + <string name="phoneTypeTelex" msgid="3367879952476250512">"Teleks"</string> + <string name="phoneTypeTtyTdd" msgid="8606514378585000044">"Teksttelefon"</string> + <string name="phoneTypeWorkMobile" msgid="1311426989184065709">"Mobil arbeid"</string> + <string name="phoneTypeWorkPager" msgid="649938731231157056">"Personsøker arbeid"</string> + <string name="phoneTypeAssistant" msgid="5596772636128562884">"Assistent"</string> + <string name="phoneTypeMms" msgid="7254492275502768992">"MMS"</string> + <string name="eventTypeBirthday" msgid="2813379844211390740">"Bursdag"</string> + <string name="eventTypeAnniversary" msgid="3876779744518284000">"Jubileum"</string> + <string name="eventTypeOther" msgid="5834288791948564594">"Akivitet"</string> + <string name="emailTypeCustom" msgid="8525960257804213846">"Egendefinert"</string> + <string name="emailTypeHome" msgid="449227236140433919">"Hjemme"</string> + <string name="emailTypeWork" msgid="3548058059601149973">"Arbeid"</string> + <string name="emailTypeOther" msgid="2923008695272639549">"Annen"</string> + <string name="emailTypeMobile" msgid="119919005321166205">"Mobil"</string> + <string name="postalTypeCustom" msgid="8903206903060479902">"Egendefinert"</string> + <string name="postalTypeHome" msgid="8165756977184483097">"Hjemme"</string> + <string name="postalTypeWork" msgid="5268172772387694495">"Arbeid"</string> + <string name="postalTypeOther" msgid="2726111966623584341">"Annen"</string> + <string name="imTypeCustom" msgid="2074028755527826046">"Egendefinert"</string> + <string name="imTypeHome" msgid="6241181032954263892">"Hjemme"</string> + <string name="imTypeWork" msgid="1371489290242433090">"Arbeid"</string> + <string name="imTypeOther" msgid="5377007495735915478">"Annen"</string> + <string name="imProtocolCustom" msgid="6919453836618749992">"Egendefinert"</string> + <string name="imProtocolAim" msgid="7050360612368383417">"AIM"</string> + <string name="imProtocolMsn" msgid="144556545420769442">"Windows Live"</string> + <string name="imProtocolYahoo" msgid="8271439408469021273">"Yahoo"</string> + <string name="imProtocolSkype" msgid="9019296744622832951">"Skype"</string> + <string name="imProtocolQq" msgid="8887484379494111884">"OQ"</string> + <string name="imProtocolGoogleTalk" msgid="3808393979157698766">"Google Talk"</string> + <string name="imProtocolIcq" msgid="1574870433606517315">"ICQ"</string> + <string name="imProtocolJabber" msgid="2279917630875771722">"Jabber"</string> + <string name="imProtocolNetMeeting" msgid="8287625655986827971">"NetMeeting"</string> + <string name="orgTypeWork" msgid="29268870505363872">"Arbeid"</string> + <string name="orgTypeOther" msgid="3951781131570124082">"Annen"</string> + <string name="orgTypeCustom" msgid="225523415372088322">"Egendefinert"</string> + <string name="contact_status_update_attribution" msgid="5112589886094402795">"via <xliff:g id="SOURCE">%1$s</xliff:g>"</string> + <string name="contact_status_update_attribution_with_date" msgid="5945386376369979909">"<xliff:g id="DATE">%1$s</xliff:g> via <xliff:g id="SOURCE">%2$s</xliff:g>"</string> <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Skriv inn PIN-kode:"</string> <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Gal PIN-kode!"</string> <string name="keyguard_label_text" msgid="861796461028298424">"For å låse opp, trykk på menyknappen og deretter 0."</string> @@ -447,6 +498,7 @@ <string name="lockscreen_pattern_wrong" msgid="4817583279053112312">"Beklager, prøv igjen:"</string> <string name="lockscreen_plugged_in" msgid="613343852842944435">"Lader (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string> <string name="lockscreen_charged" msgid="4938930459620989972">"Fullt ladet"</string> + <string name="lockscreen_battery_short" msgid="3617549178603354656">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string> <string name="lockscreen_low_battery" msgid="1482873981919249740">"Koble til en batterilader."</string> <string name="lockscreen_missing_sim_message_short" msgid="7381499217732227295">"Mangler SIM-kort."</string> <string name="lockscreen_missing_sim_message" msgid="2186920585695169078">"Ikke noe SIM-kort i telefonen."</string> @@ -478,16 +530,17 @@ <string name="battery_status_charging" msgid="756617993998772213">"Lader…"</string> <string name="battery_low_title" msgid="7923774589611311406">"Koble til en lader"</string> <string name="battery_low_subtitle" msgid="7388781709819722764">"Batteriet er nesten tomt:"</string> - <string name="battery_low_percent_format" msgid="6564958083485073855">"mindre enn <xliff:g id="NUMBER">%d%%</xliff:g> igjen."</string> + <string name="battery_low_percent_format" msgid="696154104579022959">"mindre enn <xliff:g id="NUMBER">%d%%</xliff:g> igjen."</string> <string name="battery_low_why" msgid="7279169609518386372">"Batteribruk"</string> - <string name="factorytest_failed" msgid="5410270329114212041">"Factory test failed"</string> + <string name="factorytest_failed" msgid="5410270329114212041">"Fabrikktesten feilet"</string> <string name="factorytest_not_system" msgid="4435201656767276723">"The FACTORY_TEST action is only supported for packages installed in /system/app."</string> <string name="factorytest_no_action" msgid="872991874799998561">"No package was found that provides the FACTORY_TEST action."</string> - <string name="factorytest_reboot" msgid="6320168203050791643">"Reboot"</string> + <string name="factorytest_reboot" msgid="6320168203050791643">"Omstart"</string> <string name="js_dialog_title" msgid="8143918455087008109">"Siden \'<xliff:g id="TITLE">%s</xliff:g> sier:"</string> <string name="js_dialog_title_default" msgid="6961903213729667573">"JavaScript"</string> <string name="js_dialog_before_unload" msgid="1901675448179653089">"Naviger bort fra denne siden?"\n\n"<xliff:g id="MESSAGE">%s</xliff:g>"\n\n"Velg OK for å fortsette, eller Avbryt for å forbli på denne siden."</string> <string name="save_password_label" msgid="6860261758665825069">"Bekreft"</string> + <string name="double_tap_toast" msgid="1068216937244567247">"Dobbelttrykk for å zoome inn og ut."</string> <string name="permlab_readHistoryBookmarks" msgid="1284843728203412135">"lese nettleserens logg og bokmerker"</string> <string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"Lar applikasjonen lese alle adresser nettleseren har besøkt, og alle nettleserens bokmerker."</string> <string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"skrive til nettleserens logg og bokmerker"</string> @@ -570,7 +623,7 @@ <item quantity="one" msgid="2178576254385739855">"i morgen"</item> <item quantity="other" msgid="2973062968038355991">"om <xliff:g id="COUNT">%d</xliff:g> d"</item> </plurals> - <string name="preposition_for_date" msgid="9093949757757445117">"den <xliff:g id="DATE">%s</xliff:g>"</string> + <string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g>"</string> <string name="preposition_for_time" msgid="5506831244263083793">"kl. <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"i <xliff:g id="YEAR">%s</xliff:g>"</string> <string name="day" msgid="8144195776058119424">"dag"</string> @@ -622,24 +675,24 @@ <string name="dialog_alert_title" msgid="2049658708609043103">"Merk"</string> <string name="capital_on" msgid="1544682755514494298">"På"</string> <string name="capital_off" msgid="6815870386972805832">"Av"</string> - <string name="whichApplication" msgid="4533185947064773386">"Complete action using"</string> - <string name="alwaysUse" msgid="4583018368000610438">"Use by default for this action."</string> - <string name="clearDefaultHintMsg" msgid="4815455344600932173">"Clear default in Home Settings > Applications > Manage applications."</string> - <string name="chooseActivity" msgid="1009246475582238425">"Select an action"</string> - <string name="noApplications" msgid="1691104391758345586">"No applications can perform this action."</string> - <string name="aerr_title" msgid="653922989522758100">"Sorry!"</string> - <string name="aerr_application" msgid="4683614104336409186">"The application <xliff:g id="APPLICATION">%1$s</xliff:g> (process <xliff:g id="PROCESS">%2$s</xliff:g>) has stopped unexpectedly. Please try again."</string> - <string name="aerr_process" msgid="1551785535966089511">"The process <xliff:g id="PROCESS">%1$s</xliff:g> has stopped unexpectedly. Please try again."</string> - <string name="anr_title" msgid="3100070910664756057">"Sorry!"</string> - <string name="anr_activity_application" msgid="3538242413112507636">"Activity <xliff:g id="ACTIVITY">%1$s</xliff:g> (in application <xliff:g id="APPLICATION">%2$s</xliff:g>) is not responding."</string> - <string name="anr_activity_process" msgid="5420826626009561014">"Activity <xliff:g id="ACTIVITY">%1$s</xliff:g> (in process <xliff:g id="PROCESS">%2$s</xliff:g>) is not responding."</string> - <string name="anr_application_process" msgid="4185842666452210193">"Application <xliff:g id="APPLICATION">%1$s</xliff:g> (in process <xliff:g id="PROCESS">%2$s</xliff:g>) is not responding."</string> - <string name="anr_process" msgid="1246866008169975783">"Process <xliff:g id="PROCESS">%1$s</xliff:g> is not responding."</string> - <string name="force_close" msgid="3653416315450806396">"Force close"</string> + <string name="whichApplication" msgid="4533185947064773386">"Fullfør med"</string> + <string name="alwaysUse" msgid="4583018368000610438">"Bruk som standardvalg."</string> + <string name="clearDefaultHintMsg" msgid="4815455344600932173">"Fjern standardvalg i Innstillinger > Applikasjoner > Installerte applikasjoner."</string> + <string name="chooseActivity" msgid="1009246475582238425">"Velg en aktivitet"</string> + <string name="noApplications" msgid="1691104391758345586">"Ingen applikasjoner kan gjøre dette."</string> + <string name="aerr_title" msgid="653922989522758100">"Beklager!"</string> + <string name="aerr_application" msgid="4683614104336409186">"Applikasjonen <xliff:g id="APPLICATION">%1$s</xliff:g> (prosess <xliff:g id="PROCESS">%2$s</xliff:g>) stoppet uventet. Prøv igjen."</string> + <string name="aerr_process" msgid="1551785535966089511">"Prosessen <xliff:g id="PROCESS">%1$s</xliff:g> stoppet uventet. Prøv igjen."</string> + <string name="anr_title" msgid="3100070910664756057">"Beklager!"</string> + <string name="anr_activity_application" msgid="3538242413112507636">"Aktiviteten <xliff:g id="ACTIVITY">%1$s</xliff:g> (i applikasjonen <xliff:g id="APPLICATION">%2$s</xliff:g>) svarer ikke."</string> + <string name="anr_activity_process" msgid="5420826626009561014">"Aktiviteten <xliff:g id="ACTIVITY">%1$s</xliff:g> (i prosessen <xliff:g id="PROCESS">%2$s</xliff:g>) svarer ikke."</string> + <string name="anr_application_process" msgid="4185842666452210193">"Applikasjonen <xliff:g id="APPLICATION">%1$s</xliff:g> (i prosessen <xliff:g id="PROCESS">%2$s</xliff:g>) svarer ikke."</string> + <string name="anr_process" msgid="1246866008169975783">"Prosessen <xliff:g id="PROCESS">%1$s</xliff:g> svarer ikke."</string> + <string name="force_close" msgid="3653416315450806396">"Tving avslutning"</string> <string name="report" msgid="4060218260984795706">"Rapportér"</string> - <string name="wait" msgid="7147118217226317732">"Wait"</string> + <string name="wait" msgid="7147118217226317732">"Vent"</string> <string name="debug" msgid="9103374629678531849">"Debug"</string> - <string name="sendText" msgid="5132506121645618310">"Select an action for text"</string> + <string name="sendText" msgid="5132506121645618310">"Velg mål for tekst"</string> <string name="volume_ringtone" msgid="6885421406845734650">"Ringetonevolum"</string> <string name="volume_music" msgid="5421651157138628171">"Medievolum"</string> <string name="volume_music_hint_playing_through_bluetooth" msgid="9165984379394601533">"Spiller over Bluetooth"</string> @@ -690,12 +743,10 @@ <string name="usb_storage_stop_error_message" msgid="3746037090369246731">"Det har oppstått et problem ved deaktiveringen av USB-lagring. Kontroller at du har demontert USB-verten, og prøv igjen."</string> <string name="extmedia_format_title" msgid="8663247929551095854">"Formatere minnekort"</string> <string name="extmedia_format_message" msgid="3621369962433523619">"Er du sikker på at du ønsker å formatere minnekortet? Alle data på kortet vil gå tapt."</string> - <string name="extmedia_format_button_format" msgid="4131064560127478695">"Format"</string> + <string name="extmedia_format_button_format" msgid="4131064560127478695">"Formatér"</string> <string name="adb_active_notification_title" msgid="6729044778949189918">"USB-debugging tilkoblet"</string> - <!-- no translation found for adb_active_notification_message (8470296818270110396) --> - <skip /> - <!-- no translation found for select_input_method (6865512749462072765) --> - <skip /> + <string name="adb_active_notification_message" msgid="8470296818270110396">"Velg for å deaktivere USB-debugging."</string> + <string name="select_input_method" msgid="6865512749462072765">"Velg inndatametode"</string> <string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZÆØÅ"</string> <string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZÆØÅ"</string> <string name="candidates_style" msgid="4333913089637062257">"TAG_FONT"<u>"kandidater"</u>"CLOSE_FONT"</string> @@ -731,11 +782,14 @@ <string name="allow" msgid="7225948811296386551">"Tillat"</string> <string name="deny" msgid="2081879885755434506">"Avslå"</string> <string name="permission_request_notification_title" msgid="5390555465778213840">"Tillatelse forespurt"</string> - <!-- no translation found for permission_request_notification_with_subtitle (4325409589686688000) --> - <skip /> + <string name="permission_request_notification_with_subtitle" msgid="4325409589686688000">"Trenger tillatelse"\n"for konto <xliff:g id="ACCOUNT">%s</xliff:g>"</string> <string name="input_method_binding_label" msgid="1283557179944992649">"Inndatametode"</string> <string name="sync_binding_label" msgid="3687969138375092423">"Synkronisering"</string> <string name="accessibility_binding_label" msgid="4148120742096474641">"Tilgjengelighet"</string> <string name="wallpaper_binding_label" msgid="1240087844304687662">"Bakgrunnsbilde"</string> - <string name="chooser_wallpaper" msgid="7873476199295190279">"Endre bakgrunnsbilde"</string> + <string name="chooser_wallpaper" msgid="7873476199295190279">"Velg bakgrunnsbilde"</string> + <string name="pptp_vpn_description" msgid="2688045385181439401">"Punkt-til-punkt-tunneleringsprotokoll"</string> + <string name="l2tp_vpn_description" msgid="3750692169378923304">"Lag 2-tunneleringsprotokoll"</string> + <string name="l2tp_ipsec_psk_vpn_description" msgid="3945043564008303239">"Passordbasert L2TP/IPSec-VPN"</string> + <string name="l2tp_ipsec_crt_vpn_description" msgid="5382714073103653577">"Sertifikatbasert L2TP/IPSec-VPN"</string> </resources> diff --git a/core/res/res/values-nl/strings.xml b/core/res/res/values-nl/strings.xml index 085a99c4ef41..c5f5a4b60984 100644 --- a/core/res/res/values-nl/strings.xml +++ b/core/res/res/values-nl/strings.xml @@ -111,8 +111,7 @@ <string name="httpErrorFile" msgid="8250549644091165175">"Het bestand kan niet worden geopend."</string> <string name="httpErrorFileNotFound" msgid="5588380756326017105">"Het opgevraagde bestand is niet gevonden."</string> <string name="httpErrorTooManyRequests" msgid="1235396927087188253">"Er worden te veel aanvragen verwerkt. Probeer het later opnieuw."</string> - <!-- no translation found for notification_title (1259940370369187045) --> - <skip /> + <string name="notification_title" msgid="1259940370369187045">"Fout bij aanmelding voor \'<xliff:g id="ACCOUNT">%1$s</xliff:g>\'"</string> <string name="contentServiceSync" msgid="8353523060269335667">"Synchroniseren"</string> <string name="contentServiceSyncNotificationTitle" msgid="397743349191901458">"Synchroniseren"</string> <string name="contentServiceTooManyDeletesNotificationDesc" msgid="8100981435080696431">"Te veel verwijderen voor <xliff:g id="CONTENT_TYPE">%s</xliff:g>."</string> @@ -148,8 +147,10 @@ <string name="permgroupdesc_location" msgid="2430258821648348660">"Uw fysieke locatie bijhouden"</string> <string name="permgrouplab_network" msgid="5808983377727109831">"Netwerkcommunicatie"</string> <string name="permgroupdesc_network" msgid="5035763698958415998">"Toepassingen toestaan verschillende netwerkfuncties te openen."</string> - <string name="permgrouplab_accounts" msgid="7140261692496314430">"Uw Google-accounts"</string> - <string name="permgroupdesc_accounts" msgid="6735915929704895193">"Toegang tot de beschikbare Google-accounts."</string> + <!-- no translation found for permgrouplab_accounts (3359646291125325519) --> + <skip /> + <!-- no translation found for permgroupdesc_accounts (4948732641827091312) --> + <skip /> <string name="permgrouplab_hardwareControls" msgid="7998214968791599326">"Bedieningselementen hardware"</string> <string name="permgroupdesc_hardwareControls" msgid="4357057861225462702">"Rechtstreekse toegang tot hardware op de handset."</string> <string name="permgrouplab_phoneCalls" msgid="9067173988325865923">"Telefoonoproepen"</string> @@ -433,6 +434,61 @@ <item msgid="2506857312718630823">"ICQ"</item> <item msgid="1648797903785279353">"Jabber"</item> </string-array> + <string name="phoneTypeCustom" msgid="1644738059053355820">"Aangepast"</string> + <string name="phoneTypeHome" msgid="2570923463033985887">"Thuis"</string> + <string name="phoneTypeMobile" msgid="6501463557754751037">"Mobiel"</string> + <string name="phoneTypeWork" msgid="8863939667059911633">"Werk"</string> + <string name="phoneTypeFaxWork" msgid="3517792160008890912">"Fax werk"</string> + <string name="phoneTypeFaxHome" msgid="2067265972322971467">"Fax thuis"</string> + <string name="phoneTypePager" msgid="7582359955394921732">"Pager"</string> + <string name="phoneTypeOther" msgid="1544425847868765990">"Overig"</string> + <string name="phoneTypeCallback" msgid="2712175203065678206">"Terugbelnummer"</string> + <string name="phoneTypeCar" msgid="8738360689616716982">"Auto"</string> + <string name="phoneTypeCompanyMain" msgid="540434356461478916">"Bedrijf, algemeen"</string> + <string name="phoneTypeIsdn" msgid="8022453193171370337">"ISDN"</string> + <string name="phoneTypeMain" msgid="6766137010628326916">"Algemeen"</string> + <string name="phoneTypeOtherFax" msgid="8587657145072446565">"Andere fax"</string> + <string name="phoneTypeRadio" msgid="4093738079908667513">"Radio"</string> + <string name="phoneTypeTelex" msgid="3367879952476250512">"Telex"</string> + <string name="phoneTypeTtyTdd" msgid="8606514378585000044">"Teksttelefoon"</string> + <string name="phoneTypeWorkMobile" msgid="1311426989184065709">"Mobiel werk"</string> + <string name="phoneTypeWorkPager" msgid="649938731231157056">"Pager werk"</string> + <string name="phoneTypeAssistant" msgid="5596772636128562884">"Assistent"</string> + <string name="phoneTypeMms" msgid="7254492275502768992">"MMS"</string> + <!-- no translation found for eventTypeBirthday (2813379844211390740) --> + <skip /> + <!-- no translation found for eventTypeAnniversary (3876779744518284000) --> + <skip /> + <!-- no translation found for eventTypeOther (5834288791948564594) --> + <skip /> + <string name="emailTypeCustom" msgid="8525960257804213846">"Aangepast"</string> + <string name="emailTypeHome" msgid="449227236140433919">"Thuis"</string> + <string name="emailTypeWork" msgid="3548058059601149973">"Werk"</string> + <string name="emailTypeOther" msgid="2923008695272639549">"Overig"</string> + <string name="emailTypeMobile" msgid="119919005321166205">"Mobiel"</string> + <string name="postalTypeCustom" msgid="8903206903060479902">"Aangepast"</string> + <string name="postalTypeHome" msgid="8165756977184483097">"Thuis"</string> + <string name="postalTypeWork" msgid="5268172772387694495">"Werk"</string> + <string name="postalTypeOther" msgid="2726111966623584341">"Overig"</string> + <string name="imTypeCustom" msgid="2074028755527826046">"Aangepast"</string> + <string name="imTypeHome" msgid="6241181032954263892">"Thuis"</string> + <string name="imTypeWork" msgid="1371489290242433090">"Werk"</string> + <string name="imTypeOther" msgid="5377007495735915478">"Overig"</string> + <string name="imProtocolCustom" msgid="6919453836618749992">"Aangepast"</string> + <string name="imProtocolAim" msgid="7050360612368383417">"AIM"</string> + <string name="imProtocolMsn" msgid="144556545420769442">"Windows Live"</string> + <string name="imProtocolYahoo" msgid="8271439408469021273">"Yahoo"</string> + <string name="imProtocolSkype" msgid="9019296744622832951">"Skype"</string> + <string name="imProtocolQq" msgid="8887484379494111884">"QQ"</string> + <string name="imProtocolGoogleTalk" msgid="3808393979157698766">"Google Talk"</string> + <string name="imProtocolIcq" msgid="1574870433606517315">"ICQ"</string> + <string name="imProtocolJabber" msgid="2279917630875771722">"Jabber"</string> + <string name="imProtocolNetMeeting" msgid="8287625655986827971">"NetMeeting"</string> + <string name="orgTypeWork" msgid="29268870505363872">"Werk"</string> + <string name="orgTypeOther" msgid="3951781131570124082">"Overig"</string> + <string name="orgTypeCustom" msgid="225523415372088322">"Aangepast"</string> + <string name="contact_status_update_attribution" msgid="5112589886094402795">"via <xliff:g id="SOURCE">%1$s</xliff:g>"</string> + <string name="contact_status_update_attribution_with_date" msgid="5945386376369979909">"<xliff:g id="DATE">%1$s</xliff:g> via <xliff:g id="SOURCE">%2$s</xliff:g>"</string> <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"PIN-code invoeren"</string> <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Onjuiste PIN-code!"</string> <string name="keyguard_label_text" msgid="861796461028298424">"Druk op \'Menu\' en vervolgens op 0 om te ontgrendelen."</string> @@ -447,6 +503,7 @@ <string name="lockscreen_pattern_wrong" msgid="4817583279053112312">"Probeer het opnieuw"</string> <string name="lockscreen_plugged_in" msgid="613343852842944435">"Opladen (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string> <string name="lockscreen_charged" msgid="4938930459620989972">"Opgeladen."</string> + <string name="lockscreen_battery_short" msgid="3617549178603354656">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string> <string name="lockscreen_low_battery" msgid="1482873981919249740">"Sluit de oplader aan."</string> <string name="lockscreen_missing_sim_message_short" msgid="7381499217732227295">"Geen SIM-kaart."</string> <string name="lockscreen_missing_sim_message" msgid="2186920585695169078">"Geen SIM-kaart in telefoon."</string> @@ -478,7 +535,7 @@ <string name="battery_status_charging" msgid="756617993998772213">"Opladen..."</string> <string name="battery_low_title" msgid="7923774589611311406">"Sluit de oplader aan"</string> <string name="battery_low_subtitle" msgid="7388781709819722764">"De accu raakt op:"</string> - <string name="battery_low_percent_format" msgid="6564958083485073855">"minder dan <xliff:g id="NUMBER">%d%%</xliff:g> resterend."</string> + <string name="battery_low_percent_format" msgid="696154104579022959">"<xliff:g id="NUMBER">%d%%</xliff:g> of minder resterend."</string> <string name="battery_low_why" msgid="7279169609518386372">"Accugebruik"</string> <string name="factorytest_failed" msgid="5410270329114212041">"Fabriekstest mislukt"</string> <string name="factorytest_not_system" msgid="4435201656767276723">"De actie FACTORY_TEST wordt alleen ondersteund voor pakketten die zijn geïnstalleerd in /system/app."</string> @@ -488,6 +545,7 @@ <string name="js_dialog_title_default" msgid="6961903213729667573">"JavaScript"</string> <string name="js_dialog_before_unload" msgid="1901675448179653089">"Wilt u deze pagina verlaten?"\n\n"<xliff:g id="MESSAGE">%s</xliff:g>"\n\n"Kies OK om door te gaan of Annuleren om op de huidige pagina te blijven."</string> <string name="save_password_label" msgid="6860261758665825069">"Bevestigen"</string> + <string name="double_tap_toast" msgid="1068216937244567247">"Tip: tik tweemaal om in of uit te zoomen."</string> <string name="permlab_readHistoryBookmarks" msgid="1284843728203412135">"browsergeschiedenis en bladwijzers lezen"</string> <string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"Hiermee kan een toepassing de URL\'s lezen die u via de browser heeft bezocht, evenals alle bladwijzers van de browser."</string> <string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"browsergeschiedenis en bladwijzers schrijven"</string> @@ -611,7 +669,7 @@ <string name="paste" msgid="5629880836805036433">"Plakken"</string> <string name="copyUrl" msgid="2538211579596067402">"URL kopiëren"</string> <string name="inputMethod" msgid="1653630062304567879">"Invoermethode"</string> - <string name="addToDictionary" msgid="8793624991686948709">"\' <xliff:g id="WORD">%s</xliff:g>\' toevoegen aan woordenboek"</string> + <string name="addToDictionary" msgid="8793624991686948709">"\'<xliff:g id="WORD">%s</xliff:g>\' toevoegen aan woordenboek"</string> <string name="editTextMenuTitle" msgid="1672989176958581452">"Tekst bewerken"</string> <string name="low_internal_storage_view_title" msgid="1399732408701697546">"Weinig ruimte"</string> <string name="low_internal_storage_view_text" msgid="635106544616378836">"Opslagruimte van telefoon raakt op."</string> @@ -692,10 +750,8 @@ <string name="extmedia_format_message" msgid="3621369962433523619">"Weet u zeker dat u de SD-kaart wilt formatteren? Alle gegevens op uw kaart gaan dan verloren."</string> <string name="extmedia_format_button_format" msgid="4131064560127478695">"Formatteren"</string> <string name="adb_active_notification_title" msgid="6729044778949189918">"USB-foutopsporing verbonden"</string> - <!-- no translation found for adb_active_notification_message (8470296818270110396) --> - <skip /> - <!-- no translation found for select_input_method (6865512749462072765) --> - <skip /> + <string name="adb_active_notification_message" msgid="8470296818270110396">"Selecteer deze optie om USB-foutopsporing uit te schakelen."</string> + <string name="select_input_method" msgid="6865512749462072765">"Invoermethode selecteren"</string> <string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string> <string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string> <string name="candidates_style" msgid="4333913089637062257"><u>"kandidaten"</u></string> @@ -731,11 +787,18 @@ <string name="allow" msgid="7225948811296386551">"Toestaan"</string> <string name="deny" msgid="2081879885755434506">"Weigeren"</string> <string name="permission_request_notification_title" msgid="5390555465778213840">"Toestemming gevraagd"</string> - <!-- no translation found for permission_request_notification_with_subtitle (4325409589686688000) --> - <skip /> + <string name="permission_request_notification_with_subtitle" msgid="4325409589686688000">"Toestemming gevraagd"\n"voor account \'<xliff:g id="ACCOUNT">%s</xliff:g>\'"</string> <string name="input_method_binding_label" msgid="1283557179944992649">"Invoermethode"</string> <string name="sync_binding_label" msgid="3687969138375092423">"Synchroniseren"</string> <string name="accessibility_binding_label" msgid="4148120742096474641">"Toegankelijkheid"</string> <string name="wallpaper_binding_label" msgid="1240087844304687662">"Achtergrond"</string> <string name="chooser_wallpaper" msgid="7873476199295190279">"Achtergrond wijzigen"</string> + <!-- no translation found for pptp_vpn_description (2688045385181439401) --> + <skip /> + <!-- no translation found for l2tp_vpn_description (3750692169378923304) --> + <skip /> + <!-- no translation found for l2tp_ipsec_psk_vpn_description (3945043564008303239) --> + <skip /> + <!-- no translation found for l2tp_ipsec_crt_vpn_description (5382714073103653577) --> + <skip /> </resources> diff --git a/core/res/res/values-pl/strings.xml b/core/res/res/values-pl/strings.xml index 145deda7cae1..388a9e7783ac 100644 --- a/core/res/res/values-pl/strings.xml +++ b/core/res/res/values-pl/strings.xml @@ -111,8 +111,7 @@ <string name="httpErrorFile" msgid="8250549644091165175">"Nie można uzyskać dostępu do pliku."</string> <string name="httpErrorFileNotFound" msgid="5588380756326017105">"Nie znaleziono żądanego pliku."</string> <string name="httpErrorTooManyRequests" msgid="1235396927087188253">"Zbyt wiele żądań jest przetwarzanych. Spróbuj ponownie później."</string> - <!-- no translation found for notification_title (1259940370369187045) --> - <skip /> + <string name="notification_title" msgid="1259940370369187045">"Błąd logowania na konto <xliff:g id="ACCOUNT">%1$s</xliff:g>"</string> <string name="contentServiceSync" msgid="8353523060269335667">"Synchronizacja"</string> <string name="contentServiceSyncNotificationTitle" msgid="397743349191901458">"Synchronizuj"</string> <string name="contentServiceTooManyDeletesNotificationDesc" msgid="8100981435080696431">"Zbyt wiele usuwanych <xliff:g id="CONTENT_TYPE">%s</xliff:g>."</string> @@ -148,8 +147,8 @@ <string name="permgroupdesc_location" msgid="2430258821648348660">"Monitorowanie fizycznej lokalizacji"</string> <string name="permgrouplab_network" msgid="5808983377727109831">"Połączenia sieciowe"</string> <string name="permgroupdesc_network" msgid="5035763698958415998">"Pozwól aplikacjom na dostęp do różnych funkcji sieci."</string> - <string name="permgrouplab_accounts" msgid="7140261692496314430">"Twoje konta Google"</string> - <string name="permgroupdesc_accounts" msgid="6735915929704895193">"Uzyskaj dostęp do dostępnych kont Google."</string> + <string name="permgrouplab_accounts" msgid="3359646291125325519">"Twoje konta"</string> + <string name="permgroupdesc_accounts" msgid="4948732641827091312">"Dostęp do udostępnionych kont."</string> <string name="permgrouplab_hardwareControls" msgid="7998214968791599326">"Sterowanie sprzętowe"</string> <string name="permgroupdesc_hardwareControls" msgid="4357057861225462702">"Bezpośredni dostęp do elementów sprzętowych telefonu."</string> <string name="permgrouplab_phoneCalls" msgid="9067173988325865923">"Połączenia telefoniczne"</string> @@ -433,6 +432,58 @@ <item msgid="2506857312718630823">"ICQ"</item> <item msgid="1648797903785279353">"Jabber"</item> </string-array> + <string name="phoneTypeCustom" msgid="1644738059053355820">"Niestandardowy"</string> + <string name="phoneTypeHome" msgid="2570923463033985887">"Domowy"</string> + <string name="phoneTypeMobile" msgid="6501463557754751037">"Komórkowy"</string> + <string name="phoneTypeWork" msgid="8863939667059911633">"Służbowy"</string> + <string name="phoneTypeFaxWork" msgid="3517792160008890912">"Faks służbowy"</string> + <string name="phoneTypeFaxHome" msgid="2067265972322971467">"Faks domowy"</string> + <string name="phoneTypePager" msgid="7582359955394921732">"Pager"</string> + <string name="phoneTypeOther" msgid="1544425847868765990">"Inny"</string> + <string name="phoneTypeCallback" msgid="2712175203065678206">"Połączenie zwrotne"</string> + <string name="phoneTypeCar" msgid="8738360689616716982">"Samochód"</string> + <string name="phoneTypeCompanyMain" msgid="540434356461478916">"Firmowy główny"</string> + <string name="phoneTypeIsdn" msgid="8022453193171370337">"ISDN"</string> + <string name="phoneTypeMain" msgid="6766137010628326916">"Główny"</string> + <string name="phoneTypeOtherFax" msgid="8587657145072446565">"Inny faks"</string> + <string name="phoneTypeRadio" msgid="4093738079908667513">"Radio"</string> + <string name="phoneTypeTelex" msgid="3367879952476250512">"Teleks"</string> + <string name="phoneTypeTtyTdd" msgid="8606514378585000044">"TTY TDD"</string> + <string name="phoneTypeWorkMobile" msgid="1311426989184065709">"Służbowy komórkowy"</string> + <string name="phoneTypeWorkPager" msgid="649938731231157056">"Pager służbowy"</string> + <string name="phoneTypeAssistant" msgid="5596772636128562884">"Asystent"</string> + <string name="phoneTypeMms" msgid="7254492275502768992">"Wiadomość MMS"</string> + <string name="eventTypeBirthday" msgid="2813379844211390740">"Urodziny"</string> + <string name="eventTypeAnniversary" msgid="3876779744518284000">"Rocznica"</string> + <string name="eventTypeOther" msgid="5834288791948564594">"Wydarzenie"</string> + <string name="emailTypeCustom" msgid="8525960257804213846">"Niestandardowy"</string> + <string name="emailTypeHome" msgid="449227236140433919">"Domowy"</string> + <string name="emailTypeWork" msgid="3548058059601149973">"Służbowy"</string> + <string name="emailTypeOther" msgid="2923008695272639549">"Inny"</string> + <string name="emailTypeMobile" msgid="119919005321166205">"Komórkowy"</string> + <string name="postalTypeCustom" msgid="8903206903060479902">"Niestandardowy"</string> + <string name="postalTypeHome" msgid="8165756977184483097">"Domowy"</string> + <string name="postalTypeWork" msgid="5268172772387694495">"Służbowy"</string> + <string name="postalTypeOther" msgid="2726111966623584341">"Inny"</string> + <string name="imTypeCustom" msgid="2074028755527826046">"Niestandardowy"</string> + <string name="imTypeHome" msgid="6241181032954263892">"Domowy"</string> + <string name="imTypeWork" msgid="1371489290242433090">"Służbowy"</string> + <string name="imTypeOther" msgid="5377007495735915478">"Inny"</string> + <string name="imProtocolCustom" msgid="6919453836618749992">"Niestandardowy"</string> + <string name="imProtocolAim" msgid="7050360612368383417">"AIM"</string> + <string name="imProtocolMsn" msgid="144556545420769442">"Windows Live"</string> + <string name="imProtocolYahoo" msgid="8271439408469021273">"Yahoo"</string> + <string name="imProtocolSkype" msgid="9019296744622832951">"Skype"</string> + <string name="imProtocolQq" msgid="8887484379494111884">"QQ"</string> + <string name="imProtocolGoogleTalk" msgid="3808393979157698766">"Google Talk"</string> + <string name="imProtocolIcq" msgid="1574870433606517315">"ICQ"</string> + <string name="imProtocolJabber" msgid="2279917630875771722">"Jabber"</string> + <string name="imProtocolNetMeeting" msgid="8287625655986827971">"NetMeeting"</string> + <string name="orgTypeWork" msgid="29268870505363872">"Służbowy"</string> + <string name="orgTypeOther" msgid="3951781131570124082">"Inny"</string> + <string name="orgTypeCustom" msgid="225523415372088322">"Niestandardowy"</string> + <string name="contact_status_update_attribution" msgid="5112589886094402795">"przez <xliff:g id="SOURCE">%1$s</xliff:g>"</string> + <string name="contact_status_update_attribution_with_date" msgid="5945386376369979909">"<xliff:g id="DATE">%1$s</xliff:g> za pośrednictwem: <xliff:g id="SOURCE">%2$s</xliff:g>"</string> <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Wprowadź kod PIN"</string> <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Błędny kod PIN!"</string> <string name="keyguard_label_text" msgid="861796461028298424">"Aby odblokować, naciśnij Menu, a następnie 0."</string> @@ -447,6 +498,7 @@ <string name="lockscreen_pattern_wrong" msgid="4817583279053112312">"Niestety, spróbuj ponownie"</string> <string name="lockscreen_plugged_in" msgid="613343852842944435">"Ładowanie (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string> <string name="lockscreen_charged" msgid="4938930459620989972">"Naładowany."</string> + <string name="lockscreen_battery_short" msgid="3617549178603354656">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string> <string name="lockscreen_low_battery" msgid="1482873981919249740">"Podłącz ładowarkę."</string> <string name="lockscreen_missing_sim_message_short" msgid="7381499217732227295">"Brak karty SIM."</string> <string name="lockscreen_missing_sim_message" msgid="2186920585695169078">"Brak karty SIM w telefonie."</string> @@ -478,7 +530,7 @@ <string name="battery_status_charging" msgid="756617993998772213">"Ładowanie..."</string> <string name="battery_low_title" msgid="7923774589611311406">"Podłącz ładowarkę"</string> <string name="battery_low_subtitle" msgid="7388781709819722764">"Bateria się rozładowuje:"</string> - <string name="battery_low_percent_format" msgid="6564958083485073855">"pozostało mniej niż <xliff:g id="NUMBER">%d%%</xliff:g>."</string> + <string name="battery_low_percent_format" msgid="696154104579022959">"Pozostało: <xliff:g id="NUMBER">%d%%</xliff:g> lub mniej."</string> <string name="battery_low_why" msgid="7279169609518386372">"Użycie baterii"</string> <string name="factorytest_failed" msgid="5410270329114212041">"Nieudany test fabryczny"</string> <string name="factorytest_not_system" msgid="4435201656767276723">"Czynność FACTORY_TEST jest obsługiwana tylko dla pakietów zainstalowanych w katalogu /system/app."</string> @@ -488,6 +540,7 @@ <string name="js_dialog_title_default" msgid="6961903213729667573">"JavaScript"</string> <string name="js_dialog_before_unload" msgid="1901675448179653089">"Czy opuścić tę stronę?"\n\n"<xliff:g id="MESSAGE">%s</xliff:g>"\n\n"Wybierz opcję OK, aby kontynuować, lub opcję Anuluj, aby pozostać na tej stronie."</string> <string name="save_password_label" msgid="6860261758665825069">"Potwierdź"</string> + <string name="double_tap_toast" msgid="1068216937244567247">"Wskazówka: dotknij dwukrotnie, aby powiększyć lub pomniejszyć."</string> <string name="permlab_readHistoryBookmarks" msgid="1284843728203412135">"odczyt historii i zakładek przeglądarki"</string> <string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"Umożliwia aplikacji odczyt wszystkich adresów URL odwiedzonych przez przeglądarkę, a także wszystkich zakładek przeglądarki."</string> <string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"zapis historii i zakładek przeglądarki"</string> @@ -692,10 +745,8 @@ <string name="extmedia_format_message" msgid="3621369962433523619">"Czy na pewno sformatować kartę SD? Wszystkie dane na karcie zostaną utracone."</string> <string name="extmedia_format_button_format" msgid="4131064560127478695">"Formatuj"</string> <string name="adb_active_notification_title" msgid="6729044778949189918">"Podłączono moduł debugowania USB"</string> - <!-- no translation found for adb_active_notification_message (8470296818270110396) --> - <skip /> - <!-- no translation found for select_input_method (6865512749462072765) --> - <skip /> + <string name="adb_active_notification_message" msgid="8470296818270110396">"Wybierz, aby wyłączyć debugowanie USB."</string> + <string name="select_input_method" msgid="6865512749462072765">"Wybierz metodę wprowadzania"</string> <string name="fast_scroll_alphabet" msgid="5433275485499039199">" AĄBCĆDEĘFGHIJKLŁMNŃOÓPQRSŚTUVWXYZŹŻ"</string> <string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string> <string name="candidates_style" msgid="4333913089637062257"><u>"kandydaci"</u></string> @@ -731,11 +782,14 @@ <string name="allow" msgid="7225948811296386551">"Zezwól"</string> <string name="deny" msgid="2081879885755434506">"Odmów"</string> <string name="permission_request_notification_title" msgid="5390555465778213840">"Żądane pozwolenie"</string> - <!-- no translation found for permission_request_notification_with_subtitle (4325409589686688000) --> - <skip /> + <string name="permission_request_notification_with_subtitle" msgid="4325409589686688000">"Prośba o pozwolenie"\n"dotyczące konta <xliff:g id="ACCOUNT">%s</xliff:g>"</string> <string name="input_method_binding_label" msgid="1283557179944992649">"Metoda wprowadzania"</string> <string name="sync_binding_label" msgid="3687969138375092423">"Synchronizacja"</string> <string name="accessibility_binding_label" msgid="4148120742096474641">"Ułatwienia dostępu"</string> <string name="wallpaper_binding_label" msgid="1240087844304687662">"Tapeta"</string> <string name="chooser_wallpaper" msgid="7873476199295190279">"Zmień tapetę"</string> + <string name="pptp_vpn_description" msgid="2688045385181439401">"Protokół PPTP"</string> + <string name="l2tp_vpn_description" msgid="3750692169378923304">"Protokół L2TP"</string> + <string name="l2tp_ipsec_psk_vpn_description" msgid="3945043564008303239">"Sieć VPN L2TP/IPSec z kluczem PSK"</string> + <string name="l2tp_ipsec_crt_vpn_description" msgid="5382714073103653577">"Sieć VPN L2TP/IPSec z certyfikatem"</string> </resources> diff --git a/core/res/res/values-pt-rPT/strings.xml b/core/res/res/values-pt-rPT/strings.xml index 4e9a0a88f740..b2edaae3c597 100644 --- a/core/res/res/values-pt-rPT/strings.xml +++ b/core/res/res/values-pt-rPT/strings.xml @@ -111,8 +111,7 @@ <string name="httpErrorFile" msgid="8250549644091165175">"Não foi possível aceder ao ficheiro."</string> <string name="httpErrorFileNotFound" msgid="5588380756326017105">"Não foi possível localizar o ficheiro pedido."</string> <string name="httpErrorTooManyRequests" msgid="1235396927087188253">"Existem demasiados pedidos em processamento. Tente novamente mais tarde."</string> - <!-- no translation found for notification_title (1259940370369187045) --> - <skip /> + <string name="notification_title" msgid="1259940370369187045">"Erro de início de sessão para <xliff:g id="ACCOUNT">%1$s</xliff:g>"</string> <string name="contentServiceSync" msgid="8353523060269335667">"Sincronização"</string> <string name="contentServiceSyncNotificationTitle" msgid="397743349191901458">"Sincronização"</string> <string name="contentServiceTooManyDeletesNotificationDesc" msgid="8100981435080696431">"Demasiadas eliminações de <xliff:g id="CONTENT_TYPE">%s</xliff:g>."</string> @@ -148,8 +147,8 @@ <string name="permgroupdesc_location" msgid="2430258821648348660">"Monitorizar a sua localização física"</string> <string name="permgrouplab_network" msgid="5808983377727109831">"Comunicação de rede"</string> <string name="permgroupdesc_network" msgid="5035763698958415998">"Permite o acesso de aplicações a várias funcionalidades de rede."</string> - <string name="permgrouplab_accounts" msgid="7140261692496314430">"As suas Contas Google"</string> - <string name="permgroupdesc_accounts" msgid="6735915929704895193">"Aceda às Contas Google disponíveis."</string> + <string name="permgrouplab_accounts" msgid="3359646291125325519">"As suas contas"</string> + <string name="permgroupdesc_accounts" msgid="4948732641827091312">"Aceda às contas disponíveis."</string> <string name="permgrouplab_hardwareControls" msgid="7998214968791599326">"Controlos de hardware"</string> <string name="permgroupdesc_hardwareControls" msgid="4357057861225462702">"Aceda directamente ao hardware no telefone."</string> <string name="permgrouplab_phoneCalls" msgid="9067173988325865923">"Chamadas"</string> @@ -433,6 +432,58 @@ <item msgid="2506857312718630823">"ICQ"</item> <item msgid="1648797903785279353">"Jabber"</item> </string-array> + <string name="phoneTypeCustom" msgid="1644738059053355820">"Personalizado"</string> + <string name="phoneTypeHome" msgid="2570923463033985887">"Residência"</string> + <string name="phoneTypeMobile" msgid="6501463557754751037">"Telemóvel"</string> + <string name="phoneTypeWork" msgid="8863939667059911633">"Emprego"</string> + <string name="phoneTypeFaxWork" msgid="3517792160008890912">"Fax do emprego"</string> + <string name="phoneTypeFaxHome" msgid="2067265972322971467">"Fax da residência"</string> + <string name="phoneTypePager" msgid="7582359955394921732">"Pager"</string> + <string name="phoneTypeOther" msgid="1544425847868765990">"Outro"</string> + <string name="phoneTypeCallback" msgid="2712175203065678206">"Rechamada"</string> + <string name="phoneTypeCar" msgid="8738360689616716982">"Automóvel"</string> + <string name="phoneTypeCompanyMain" msgid="540434356461478916">"Telefone principal da empresa"</string> + <string name="phoneTypeIsdn" msgid="8022453193171370337">"RDIS"</string> + <string name="phoneTypeMain" msgid="6766137010628326916">"Principal"</string> + <string name="phoneTypeOtherFax" msgid="8587657145072446565">"Outro fax"</string> + <string name="phoneTypeRadio" msgid="4093738079908667513">"Rádio"</string> + <string name="phoneTypeTelex" msgid="3367879952476250512">"Telex"</string> + <string name="phoneTypeTtyTdd" msgid="8606514378585000044">"TTY TDD"</string> + <string name="phoneTypeWorkMobile" msgid="1311426989184065709">"Telemóvel do emprego"</string> + <string name="phoneTypeWorkPager" msgid="649938731231157056">"Pager do trabalho"</string> + <string name="phoneTypeAssistant" msgid="5596772636128562884">"Assistente"</string> + <string name="phoneTypeMms" msgid="7254492275502768992">"MMS"</string> + <string name="eventTypeBirthday" msgid="2813379844211390740">"Data de nascimento"</string> + <string name="eventTypeAnniversary" msgid="3876779744518284000">"Aniversário"</string> + <string name="eventTypeOther" msgid="5834288791948564594">"Evento"</string> + <string name="emailTypeCustom" msgid="8525960257804213846">"Personalizado"</string> + <string name="emailTypeHome" msgid="449227236140433919">"Residência"</string> + <string name="emailTypeWork" msgid="3548058059601149973">"Emprego"</string> + <string name="emailTypeOther" msgid="2923008695272639549">"Outro"</string> + <string name="emailTypeMobile" msgid="119919005321166205">"Telemóvel"</string> + <string name="postalTypeCustom" msgid="8903206903060479902">"Personalizado"</string> + <string name="postalTypeHome" msgid="8165756977184483097">"Residência"</string> + <string name="postalTypeWork" msgid="5268172772387694495">"Emprego"</string> + <string name="postalTypeOther" msgid="2726111966623584341">"Outro"</string> + <string name="imTypeCustom" msgid="2074028755527826046">"Personalizado"</string> + <string name="imTypeHome" msgid="6241181032954263892">"Residência"</string> + <string name="imTypeWork" msgid="1371489290242433090">"Emprego"</string> + <string name="imTypeOther" msgid="5377007495735915478">"Outro"</string> + <string name="imProtocolCustom" msgid="6919453836618749992">"Personalizado"</string> + <string name="imProtocolAim" msgid="7050360612368383417">"AIM"</string> + <string name="imProtocolMsn" msgid="144556545420769442">"Windows Live"</string> + <string name="imProtocolYahoo" msgid="8271439408469021273">"Yahoo"</string> + <string name="imProtocolSkype" msgid="9019296744622832951">"Skype"</string> + <string name="imProtocolQq" msgid="8887484379494111884">"QQ"</string> + <string name="imProtocolGoogleTalk" msgid="3808393979157698766">"Google Talk"</string> + <string name="imProtocolIcq" msgid="1574870433606517315">"ICQ"</string> + <string name="imProtocolJabber" msgid="2279917630875771722">"Jabber"</string> + <string name="imProtocolNetMeeting" msgid="8287625655986827971">"NetMeeting"</string> + <string name="orgTypeWork" msgid="29268870505363872">"Emprego"</string> + <string name="orgTypeOther" msgid="3951781131570124082">"Outro"</string> + <string name="orgTypeCustom" msgid="225523415372088322">"Personalizado"</string> + <string name="contact_status_update_attribution" msgid="5112589886094402795">"através do <xliff:g id="SOURCE">%1$s</xliff:g>"</string> + <string name="contact_status_update_attribution_with_date" msgid="5945386376369979909">"<xliff:g id="DATE">%1$s</xliff:g> através de <xliff:g id="SOURCE">%2$s</xliff:g>"</string> <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Introduzir código PIN"</string> <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Código PIN incorrecto!"</string> <string name="keyguard_label_text" msgid="861796461028298424">"Para desbloquear, prima Menu e, em seguida, 0."</string> @@ -447,6 +498,7 @@ <string name="lockscreen_pattern_wrong" msgid="4817583279053112312">"Lamentamos, tente novamente"</string> <string name="lockscreen_plugged_in" msgid="613343852842944435">"A carregar (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string> <string name="lockscreen_charged" msgid="4938930459620989972">"Carregado."</string> + <string name="lockscreen_battery_short" msgid="3617549178603354656">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string> <string name="lockscreen_low_battery" msgid="1482873981919249740">"Ligue o carregador."</string> <string name="lockscreen_missing_sim_message_short" msgid="7381499217732227295">"Nenhum cartão SIM."</string> <string name="lockscreen_missing_sim_message" msgid="2186920585695169078">"Nenhum cartão SIM no telefone."</string> @@ -478,7 +530,7 @@ <string name="battery_status_charging" msgid="756617993998772213">"A carregar..."</string> <string name="battery_low_title" msgid="7923774589611311406">"Ligue o carregador"</string> <string name="battery_low_subtitle" msgid="7388781709819722764">"A bateria está a ficar fraca:"</string> - <string name="battery_low_percent_format" msgid="6564958083485073855">"resta menos de <xliff:g id="NUMBER">%d%%</xliff:g>."</string> + <string name="battery_low_percent_format" msgid="696154104579022959">"Restam <xliff:g id="NUMBER">%d%%</xliff:g> ou menos."</string> <string name="battery_low_why" msgid="7279169609518386372">"Utilização da bateria"</string> <string name="factorytest_failed" msgid="5410270329114212041">"O teste de fábrica falhou"</string> <string name="factorytest_not_system" msgid="4435201656767276723">"A acção FACTORY_TEST apenas é suportada para pacotes instalados em /system/app."</string> @@ -488,6 +540,7 @@ <string name="js_dialog_title_default" msgid="6961903213729667573">"JavaScript"</string> <string name="js_dialog_before_unload" msgid="1901675448179653089">"Navegar para outra página?"\n\n"<xliff:g id="MESSAGE">%s</xliff:g>"\n\n"Seleccione OK para continuar ou Cancelar para permanecer na página actual."</string> <string name="save_password_label" msgid="6860261758665825069">"Confirmar"</string> + <string name="double_tap_toast" msgid="1068216937244567247">"Sugestão: toque duas vezes para aumentar ou diminuir o zoom."</string> <string name="permlab_readHistoryBookmarks" msgid="1284843728203412135">"ler histórico e marcadores do browser"</string> <string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"Permite que a aplicação leia todos os URLs visitados pelo browser e todos os marcadores do browser."</string> <string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"gravar histórico e marcadores do browser"</string> @@ -692,10 +745,8 @@ <string name="extmedia_format_message" msgid="3621369962433523619">"Tem a certeza de que pretende formatar o cartão SD? Perder-se-ão todos os dados no cartão."</string> <string name="extmedia_format_button_format" msgid="4131064560127478695">"Formatar"</string> <string name="adb_active_notification_title" msgid="6729044778949189918">"Depuração USB ligada"</string> - <!-- no translation found for adb_active_notification_message (8470296818270110396) --> - <skip /> - <!-- no translation found for select_input_method (6865512749462072765) --> - <skip /> + <string name="adb_active_notification_message" msgid="8470296818270110396">"Seleccione para desactivar depuração USB."</string> + <string name="select_input_method" msgid="6865512749462072765">"Seleccionar método de entrada"</string> <string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string> <string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string> <string name="candidates_style" msgid="4333913089637062257"><u>"candidatos"</u></string> @@ -726,16 +777,19 @@ <string name="create_contact_using" msgid="4947405226788104538">"Criar contacto"\n"utilizando <xliff:g id="NUMBER">%s</xliff:g>"</string> <string name="accessibility_compound_button_selected" msgid="5612776946036285686">"verificado"</string> <string name="accessibility_compound_button_unselected" msgid="8864512895673924091">"não verificado"</string> - <string name="grant_credentials_permission_message_desc" msgid="6883276587034335667">"As aplicações listadas estão a pedir autorização para aceder às credenciais de início de sessão da conta <xliff:g id="ACCOUNT">%1$s</xliff:g> a partir de <xliff:g id="APPLICATION">%2$s</xliff:g>. Pretende conceder esta autorização? Em caso afirmativo, a sua resposta será memorizada e não lhe será solicitado que responda novamente."</string> - <string name="grant_credentials_permission_message_with_authtokenlabel_desc" msgid="3159007601893584687">"As aplicações listadas estão a pedir autorização para aceder às credenciais de início de sessão <xliff:g id="TYPE">%1$s</xliff:g> para a conta <xliff:g id="ACCOUNT">%2$s</xliff:g> a partir de <xliff:g id="APPLICATION">%3$s</xliff:g>. Pretende conceder esta autorização? Em caso afirmativo, a sua resposta será memorizada e não lhe será solicitado que responda novamente."</string> + <string name="grant_credentials_permission_message_desc" msgid="6883276587034335667">"As aplicações listadas estão a pedir autorização para aceder às credenciais de início de sessão da conta <xliff:g id="ACCOUNT">%1$s</xliff:g> a partir de <xliff:g id="APPLICATION">%2$s</xliff:g>. Pretende conceder esta autorização? Em caso afirmativo, a sua resposta será memorizada e não terá de responder a esta questão novamente."</string> + <string name="grant_credentials_permission_message_with_authtokenlabel_desc" msgid="3159007601893584687">"As aplicações listadas estão a pedir autorização para aceder às credenciais de início de sessão <xliff:g id="TYPE">%1$s</xliff:g> para a conta <xliff:g id="ACCOUNT">%2$s</xliff:g> a partir de <xliff:g id="APPLICATION">%3$s</xliff:g>. Pretende conceder esta autorização? Em caso afirmativo, a sua resposta será memorizada e não terá de responder a esta questão novamente."</string> <string name="allow" msgid="7225948811296386551">"Permitir"</string> <string name="deny" msgid="2081879885755434506">"Recusar"</string> <string name="permission_request_notification_title" msgid="5390555465778213840">"Autorização Solicitada"</string> - <!-- no translation found for permission_request_notification_with_subtitle (4325409589686688000) --> - <skip /> + <string name="permission_request_notification_with_subtitle" msgid="4325409589686688000">"Autorização solicitada"\n"para a conta <xliff:g id="ACCOUNT">%s</xliff:g>"</string> <string name="input_method_binding_label" msgid="1283557179944992649">"Método de entrada"</string> <string name="sync_binding_label" msgid="3687969138375092423">"Sincronização"</string> <string name="accessibility_binding_label" msgid="4148120742096474641">"Acessibilidade"</string> <string name="wallpaper_binding_label" msgid="1240087844304687662">"Imagem de fundo"</string> <string name="chooser_wallpaper" msgid="7873476199295190279">"Alterar imagem de fundo"</string> + <string name="pptp_vpn_description" msgid="2688045385181439401">"Protocolo de túnel ponto a ponto (PPTP)"</string> + <string name="l2tp_vpn_description" msgid="3750692169378923304">"Protocolo de túnel de camada 2 (L2TP)"</string> + <string name="l2tp_ipsec_psk_vpn_description" msgid="3945043564008303239">"VPN L2TP/IPSec baseada em chave pré- partilhada"</string> + <string name="l2tp_ipsec_crt_vpn_description" msgid="5382714073103653577">"VPN L2TP/IPSec baseada em certificado"</string> </resources> diff --git a/core/res/res/values-pt/strings.xml b/core/res/res/values-pt/strings.xml index 72990a1ab0d1..725053c70610 100644 --- a/core/res/res/values-pt/strings.xml +++ b/core/res/res/values-pt/strings.xml @@ -111,8 +111,7 @@ <string name="httpErrorFile" msgid="8250549644091165175">"Não foi possível acessar o arquivo."</string> <string name="httpErrorFileNotFound" msgid="5588380756326017105">"O arquivo solicitado não foi encontrado."</string> <string name="httpErrorTooManyRequests" msgid="1235396927087188253">"Há muitas solicitações sendo processadas. Tente novamente mais tarde."</string> - <!-- no translation found for notification_title (1259940370369187045) --> - <skip /> + <string name="notification_title" msgid="1259940370369187045">"Erro de login para <xliff:g id="ACCOUNT">%1$s</xliff:g>"</string> <string name="contentServiceSync" msgid="8353523060269335667">"Sincronizar"</string> <string name="contentServiceSyncNotificationTitle" msgid="397743349191901458">"Sincronizar"</string> <string name="contentServiceTooManyDeletesNotificationDesc" msgid="8100981435080696431">"Muitas exclusões de <xliff:g id="CONTENT_TYPE">%s</xliff:g>."</string> @@ -148,8 +147,8 @@ <string name="permgroupdesc_location" msgid="2430258821648348660">"Monitora o seu local físico."</string> <string name="permgrouplab_network" msgid="5808983377727109831">"Comunicação da rede"</string> <string name="permgroupdesc_network" msgid="5035763698958415998">"Permite que os aplicativos acessem diversos recursos de rede."</string> - <string name="permgrouplab_accounts" msgid="7140261692496314430">"Suas Contas do Google"</string> - <string name="permgroupdesc_accounts" msgid="6735915929704895193">"Acessar as Contas do Google disponíveis."</string> + <string name="permgrouplab_accounts" msgid="3359646291125325519">"Suas contas"</string> + <string name="permgroupdesc_accounts" msgid="4948732641827091312">"Acessar as contas disponíveis."</string> <string name="permgrouplab_hardwareControls" msgid="7998214968791599326">"Controles de hardware"</string> <string name="permgroupdesc_hardwareControls" msgid="4357057861225462702">"Acessa o hardware diretamente no aparelho."</string> <string name="permgrouplab_phoneCalls" msgid="9067173988325865923">"Chamadas telefônicas"</string> @@ -433,6 +432,58 @@ <item msgid="2506857312718630823">"ICQ"</item> <item msgid="1648797903785279353">"Jabber"</item> </string-array> + <string name="phoneTypeCustom" msgid="1644738059053355820">"Personalizado"</string> + <string name="phoneTypeHome" msgid="2570923463033985887">"Página inicial"</string> + <string name="phoneTypeMobile" msgid="6501463557754751037">"Celular"</string> + <string name="phoneTypeWork" msgid="8863939667059911633">"Comercial"</string> + <string name="phoneTypeFaxWork" msgid="3517792160008890912">"Fax comercial"</string> + <string name="phoneTypeFaxHome" msgid="2067265972322971467">"Fax residencial"</string> + <string name="phoneTypePager" msgid="7582359955394921732">"Pager"</string> + <string name="phoneTypeOther" msgid="1544425847868765990">"Outros"</string> + <string name="phoneTypeCallback" msgid="2712175203065678206">"Retorno de chamada"</string> + <string name="phoneTypeCar" msgid="8738360689616716982">"Carro"</string> + <string name="phoneTypeCompanyMain" msgid="540434356461478916">"Empresa (principal)"</string> + <string name="phoneTypeIsdn" msgid="8022453193171370337">"ISDN"</string> + <string name="phoneTypeMain" msgid="6766137010628326916">"Principal"</string> + <string name="phoneTypeOtherFax" msgid="8587657145072446565">"Outro fax"</string> + <string name="phoneTypeRadio" msgid="4093738079908667513">"Rádio"</string> + <string name="phoneTypeTelex" msgid="3367879952476250512">"Telex"</string> + <string name="phoneTypeTtyTdd" msgid="8606514378585000044">"TTY TDD"</string> + <string name="phoneTypeWorkMobile" msgid="1311426989184065709">"Celular comercial"</string> + <string name="phoneTypeWorkPager" msgid="649938731231157056">"Pager comercial"</string> + <string name="phoneTypeAssistant" msgid="5596772636128562884">"Assistente"</string> + <string name="phoneTypeMms" msgid="7254492275502768992">"MMS"</string> + <string name="eventTypeBirthday" msgid="2813379844211390740">"Aniversário"</string> + <string name="eventTypeAnniversary" msgid="3876779744518284000">"Data comemorativa"</string> + <string name="eventTypeOther" msgid="5834288791948564594">"Evento"</string> + <string name="emailTypeCustom" msgid="8525960257804213846">"Personalizado"</string> + <string name="emailTypeHome" msgid="449227236140433919">"Página inicial"</string> + <string name="emailTypeWork" msgid="3548058059601149973">"Comercial"</string> + <string name="emailTypeOther" msgid="2923008695272639549">"Outros"</string> + <string name="emailTypeMobile" msgid="119919005321166205">"Celular"</string> + <string name="postalTypeCustom" msgid="8903206903060479902">"Personalizado"</string> + <string name="postalTypeHome" msgid="8165756977184483097">"Página inicial"</string> + <string name="postalTypeWork" msgid="5268172772387694495">"Comercial"</string> + <string name="postalTypeOther" msgid="2726111966623584341">"Outros"</string> + <string name="imTypeCustom" msgid="2074028755527826046">"Personalizado"</string> + <string name="imTypeHome" msgid="6241181032954263892">"Página inicial"</string> + <string name="imTypeWork" msgid="1371489290242433090">"Comercial"</string> + <string name="imTypeOther" msgid="5377007495735915478">"Outros"</string> + <string name="imProtocolCustom" msgid="6919453836618749992">"Personalizado"</string> + <string name="imProtocolAim" msgid="7050360612368383417">"AIM"</string> + <string name="imProtocolMsn" msgid="144556545420769442">"Windows Live"</string> + <string name="imProtocolYahoo" msgid="8271439408469021273">"Yahoo"</string> + <string name="imProtocolSkype" msgid="9019296744622832951">"Skype"</string> + <string name="imProtocolQq" msgid="8887484379494111884">"QQ"</string> + <string name="imProtocolGoogleTalk" msgid="3808393979157698766">"Google Talk"</string> + <string name="imProtocolIcq" msgid="1574870433606517315">"ICQ"</string> + <string name="imProtocolJabber" msgid="2279917630875771722">"Jabber"</string> + <string name="imProtocolNetMeeting" msgid="8287625655986827971">"NetMeeting"</string> + <string name="orgTypeWork" msgid="29268870505363872">"Comercial"</string> + <string name="orgTypeOther" msgid="3951781131570124082">"Outros"</string> + <string name="orgTypeCustom" msgid="225523415372088322">"Personalizado"</string> + <string name="contact_status_update_attribution" msgid="5112589886094402795">"por meio de <xliff:g id="SOURCE">%1$s</xliff:g>"</string> + <string name="contact_status_update_attribution_with_date" msgid="5945386376369979909">"<xliff:g id="DATE">%1$s</xliff:g> via <xliff:g id="SOURCE">%2$s</xliff:g>"</string> <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Digite o código PIN"</string> <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Código PIN incorreto!"</string> <string name="keyguard_label_text" msgid="861796461028298424">"Para desbloquear, pressione Menu e, em seguida, 0."</string> @@ -447,6 +498,7 @@ <string name="lockscreen_pattern_wrong" msgid="4817583279053112312">"Tente novamente"</string> <string name="lockscreen_plugged_in" msgid="613343852842944435">"Carregando (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string> <string name="lockscreen_charged" msgid="4938930459620989972">"Carregado."</string> + <string name="lockscreen_battery_short" msgid="3617549178603354656">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string> <string name="lockscreen_low_battery" msgid="1482873981919249740">"Conecte o seu carregador."</string> <string name="lockscreen_missing_sim_message_short" msgid="7381499217732227295">"Sem cartão SIM."</string> <string name="lockscreen_missing_sim_message" msgid="2186920585695169078">"Não há um cartão SIM no telefone."</string> @@ -478,7 +530,7 @@ <string name="battery_status_charging" msgid="756617993998772213">"Carregando..."</string> <string name="battery_low_title" msgid="7923774589611311406">"Conecte o carregador"</string> <string name="battery_low_subtitle" msgid="7388781709819722764">"A bateria está ficando baixa:"</string> - <string name="battery_low_percent_format" msgid="6564958083485073855">"menos de <xliff:g id="NUMBER">%d%%</xliff:g> restantes."</string> + <string name="battery_low_percent_format" msgid="696154104579022959">"<xliff:g id="NUMBER">%d%%</xliff:g> ou menos restante(s)."</string> <string name="battery_low_why" msgid="7279169609518386372">"Uso da bateria"</string> <string name="factorytest_failed" msgid="5410270329114212041">"Falha no teste de fábrica"</string> <string name="factorytest_not_system" msgid="4435201656767276723">"A ação FACTORY_TEST é suportada apenas para pacotes instalados em /system/app."</string> @@ -488,6 +540,7 @@ <string name="js_dialog_title_default" msgid="6961903213729667573">"JavaScript"</string> <string name="js_dialog_before_unload" msgid="1901675448179653089">"Deseja sair desta página?"\n\n"<xliff:g id="MESSAGE">%s</xliff:g>"\n\n"Selecione OK para continuar ou Cancelar para permanecer na página atual."</string> <string name="save_password_label" msgid="6860261758665825069">"Confirmar"</string> + <string name="double_tap_toast" msgid="1068216937244567247">"Dica: toque duas vezes para aumentar e diminuir o zoom."</string> <string name="permlab_readHistoryBookmarks" msgid="1284843728203412135">"ler histórico e favoritos do Navegador"</string> <string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"Permite que o aplicativo leia todos os URLs visitados pelo Navegador e todos os favoritos do Navegador."</string> <string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"gravar histórico e favoritos do Navegador"</string> @@ -585,7 +638,7 @@ <string name="weeks" msgid="6509623834583944518">"semanas"</string> <string name="year" msgid="4001118221013892076">"ano"</string> <string name="years" msgid="6881577717993213522">"anos"</string> - <string name="every_weekday" msgid="8777593878457748503">"Todos os dias da semana (de segunda a sexta)"</string> + <string name="every_weekday" msgid="8777593878457748503">"De segunda a sexta-feira"</string> <string name="daily" msgid="5738949095624133403">"Diariamente"</string> <string name="weekly" msgid="983428358394268344">"Semanalmente na <xliff:g id="DAY">%s</xliff:g>"</string> <string name="monthly" msgid="2667202947170988834">"Mensalmente"</string> @@ -692,10 +745,8 @@ <string name="extmedia_format_message" msgid="3621369962433523619">"Tem certeza de que deseja formatar o cartão SD? Todos os dados no seu cartão serão perdidos."</string> <string name="extmedia_format_button_format" msgid="4131064560127478695">"Formatar"</string> <string name="adb_active_notification_title" msgid="6729044778949189918">"Depuração USB conectada"</string> - <!-- no translation found for adb_active_notification_message (8470296818270110396) --> - <skip /> - <!-- no translation found for select_input_method (6865512749462072765) --> - <skip /> + <string name="adb_active_notification_message" msgid="8470296818270110396">"Selecione para desativar a depuração USB."</string> + <string name="select_input_method" msgid="6865512749462072765">"Selecionar método de entrada"</string> <string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string> <string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string> <string name="candidates_style" msgid="4333913089637062257"><u>"candidatos"</u></string> @@ -719,23 +770,26 @@ <string name="ime_action_go" msgid="8320845651737369027">"Ir"</string> <string name="ime_action_search" msgid="658110271822807811">"Pesquisar"</string> <string name="ime_action_send" msgid="2316166556349314424">"Enviar"</string> - <string name="ime_action_next" msgid="3138843904009813834">"Próximo"</string> + <string name="ime_action_next" msgid="3138843904009813834">"Avançar"</string> <string name="ime_action_done" msgid="8971516117910934605">"Concluído"</string> <string name="ime_action_default" msgid="2840921885558045721">"Executar"</string> <string name="dial_number_using" msgid="5789176425167573586">"Discar número"\n"usando <xliff:g id="NUMBER">%s</xliff:g>"</string> <string name="create_contact_using" msgid="4947405226788104538">"Criar contato "\n"usando <xliff:g id="NUMBER">%s</xliff:g>"</string> <string name="accessibility_compound_button_selected" msgid="5612776946036285686">"selecionado"</string> <string name="accessibility_compound_button_unselected" msgid="8864512895673924091">"não selecionado"</string> - <string name="grant_credentials_permission_message_desc" msgid="6883276587034335667">"Os aplicativos listados estão solicitando autorização para acessar as credenciais de login para a conta <xliff:g id="ACCOUNT">%1$s</xliff:g> de <xliff:g id="APPLICATION">%2$s</xliff:g>. Deseja conceder essa autorização? Em caso afirmativo, sua resposta será lembrada e essa pergunta não será feita novamente."</string> - <string name="grant_credentials_permission_message_with_authtokenlabel_desc" msgid="3159007601893584687">"Os aplicativos listados estão solicitando autorização para acessar as credenciais de login <xliff:g id="TYPE">%1$s</xliff:g> para a conta <xliff:g id="ACCOUNT">%2$s</xliff:g> de <xliff:g id="APPLICATION">%3$s</xliff:g>. Deseja conceder essa autorização? Em caso afirmativo, sua resposta será lembrada e essa pergunta não será feita novamente."</string> + <string name="grant_credentials_permission_message_desc" msgid="6883276587034335667">"Os aplicativos listados estão solicitando autorização para acessar as credenciais de login para a conta <xliff:g id="ACCOUNT">%1$s</xliff:g> do <xliff:g id="APPLICATION">%2$s</xliff:g>. Deseja conceder essa autorização? Em caso afirmativo, sua resposta será lembrada e essa pergunta não será feita novamente."</string> + <string name="grant_credentials_permission_message_with_authtokenlabel_desc" msgid="3159007601893584687">"Os aplicativos listados estão solicitando autorização para acessar as credenciais de login <xliff:g id="TYPE">%1$s</xliff:g> para a conta <xliff:g id="ACCOUNT">%2$s</xliff:g> do <xliff:g id="APPLICATION">%3$s</xliff:g>. Deseja conceder essa autorização? Em caso afirmativo, sua resposta será lembrada e essa pergunta não será feita novamente."</string> <string name="allow" msgid="7225948811296386551">"Permitir"</string> <string name="deny" msgid="2081879885755434506">"Negar"</string> <string name="permission_request_notification_title" msgid="5390555465778213840">"Autorização solicitada"</string> - <!-- no translation found for permission_request_notification_with_subtitle (4325409589686688000) --> - <skip /> + <string name="permission_request_notification_with_subtitle" msgid="4325409589686688000">"Solicitada a permissão"\n"para a conta <xliff:g id="ACCOUNT">%s</xliff:g>"</string> <string name="input_method_binding_label" msgid="1283557179944992649">"Método de entrada"</string> <string name="sync_binding_label" msgid="3687969138375092423">"Sincronizar"</string> <string name="accessibility_binding_label" msgid="4148120742096474641">"Acessibilidade"</string> <string name="wallpaper_binding_label" msgid="1240087844304687662">"Papel de parede"</string> <string name="chooser_wallpaper" msgid="7873476199295190279">"Alterar papel de parede"</string> + <string name="pptp_vpn_description" msgid="2688045385181439401">"Protocolo de encapsulamento ponto a ponto"</string> + <string name="l2tp_vpn_description" msgid="3750692169378923304">"Protocolo de encapsulamento de camada 2"</string> + <string name="l2tp_ipsec_psk_vpn_description" msgid="3945043564008303239">"VPN L2TP/IPSec com base em chave pré-compartilhada"</string> + <string name="l2tp_ipsec_crt_vpn_description" msgid="5382714073103653577">"VPN L2TP/IPSec com base em certificado"</string> </resources> diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml index a286312038a0..1e1500b9ee62 100644 --- a/core/res/res/values-ru/strings.xml +++ b/core/res/res/values-ru/strings.xml @@ -111,8 +111,7 @@ <string name="httpErrorFile" msgid="8250549644091165175">"Не удается получить доступ к файлу."</string> <string name="httpErrorFileNotFound" msgid="5588380756326017105">"Не удалось найти указанные файлы."</string> <string name="httpErrorTooManyRequests" msgid="1235396927087188253">"Обрабатывается слишком много запросов. Повторите попытку позднее."</string> - <!-- no translation found for notification_title (1259940370369187045) --> - <skip /> + <string name="notification_title" msgid="1259940370369187045">"Ошибка входа (<xliff:g id="ACCOUNT">%1$s</xliff:g>)"</string> <string name="contentServiceSync" msgid="8353523060269335667">"Синхр."</string> <string name="contentServiceSyncNotificationTitle" msgid="397743349191901458">"Синхр."</string> <string name="contentServiceTooManyDeletesNotificationDesc" msgid="8100981435080696431">"Слишком много удалений <xliff:g id="CONTENT_TYPE">%s</xliff:g>."</string> @@ -148,8 +147,8 @@ <string name="permgroupdesc_location" msgid="2430258821648348660">"Отслеживание физического местоположения"</string> <string name="permgrouplab_network" msgid="5808983377727109831">"Сетевой обмен данными"</string> <string name="permgroupdesc_network" msgid="5035763698958415998">"Позволяет приложениям получать доступ к различным сетевым функциям."</string> - <string name="permgrouplab_accounts" msgid="7140261692496314430">"Ваши аккаунты Google"</string> - <string name="permgroupdesc_accounts" msgid="6735915929704895193">"Входить в доступные аккаунты Google."</string> + <string name="permgrouplab_accounts" msgid="3359646291125325519">"Ваши аккаунты"</string> + <string name="permgroupdesc_accounts" msgid="4948732641827091312">"Доступ к имеющимся аккаунтам."</string> <string name="permgrouplab_hardwareControls" msgid="7998214968791599326">"Элементы управления аппаратным обеспечением"</string> <string name="permgroupdesc_hardwareControls" msgid="4357057861225462702">"Прямой доступ к аппаратному обеспечению телефона."</string> <string name="permgrouplab_phoneCalls" msgid="9067173988325865923">"Телефонные вызовы"</string> @@ -388,7 +387,7 @@ <string name="permdesc_readDictionary" msgid="1082972603576360690">"Позволяет приложению считывать любые слова, имена и фразы личного пользования, которые могут храниться в пользовательском словаре."</string> <string name="permlab_writeDictionary" msgid="6703109511836343341">"записывать в пользовательский словарь"</string> <string name="permdesc_writeDictionary" msgid="2241256206524082880">"Позволяет приложению записывать новые слова в пользовательский словарь."</string> - <string name="permlab_sdcardWrite" msgid="8079403759001777291">"изменить/удалить содержание SD-карты"</string> + <string name="permlab_sdcardWrite" msgid="8079403759001777291">"изменять/удалять содержание SD-карты"</string> <string name="permdesc_sdcardWrite" msgid="6643963204976471878">"Разрешает приложению запись на SD-карту"</string> <string-array name="phoneTypes"> <item msgid="8901098336658710359">"Домашний"</item> @@ -433,6 +432,58 @@ <item msgid="2506857312718630823">"ICQ"</item> <item msgid="1648797903785279353">"Jabber"</item> </string-array> + <string name="phoneTypeCustom" msgid="1644738059053355820">"Особый"</string> + <string name="phoneTypeHome" msgid="2570923463033985887">"Дом"</string> + <string name="phoneTypeMobile" msgid="6501463557754751037">"Моб."</string> + <string name="phoneTypeWork" msgid="8863939667059911633">"Раб."</string> + <string name="phoneTypeFaxWork" msgid="3517792160008890912">"Раб. факс"</string> + <string name="phoneTypeFaxHome" msgid="2067265972322971467">"Дом. факс"</string> + <string name="phoneTypePager" msgid="7582359955394921732">"Пейджер"</string> + <string name="phoneTypeOther" msgid="1544425847868765990">"Другой"</string> + <string name="phoneTypeCallback" msgid="2712175203065678206">"Обр. вызов"</string> + <string name="phoneTypeCar" msgid="8738360689616716982">"В авто"</string> + <string name="phoneTypeCompanyMain" msgid="540434356461478916">"Раб., осн."</string> + <string name="phoneTypeIsdn" msgid="8022453193171370337">"ISDN"</string> + <string name="phoneTypeMain" msgid="6766137010628326916">"Основной"</string> + <string name="phoneTypeOtherFax" msgid="8587657145072446565">"Доп. факс"</string> + <string name="phoneTypeRadio" msgid="4093738079908667513">"Радио"</string> + <string name="phoneTypeTelex" msgid="3367879952476250512">"Телекс"</string> + <string name="phoneTypeTtyTdd" msgid="8606514378585000044">"Телетайп"</string> + <string name="phoneTypeWorkMobile" msgid="1311426989184065709">"Раб. моб."</string> + <string name="phoneTypeWorkPager" msgid="649938731231157056">"Рабочий пейджер"</string> + <string name="phoneTypeAssistant" msgid="5596772636128562884">"Секретарь"</string> + <string name="phoneTypeMms" msgid="7254492275502768992">"MMS"</string> + <string name="eventTypeBirthday" msgid="2813379844211390740">"День рождения"</string> + <string name="eventTypeAnniversary" msgid="3876779744518284000">"Юбилей"</string> + <string name="eventTypeOther" msgid="5834288791948564594">"Мероприятие"</string> + <string name="emailTypeCustom" msgid="8525960257804213846">"Особый"</string> + <string name="emailTypeHome" msgid="449227236140433919">"Дом"</string> + <string name="emailTypeWork" msgid="3548058059601149973">"Раб."</string> + <string name="emailTypeOther" msgid="2923008695272639549">"Другой"</string> + <string name="emailTypeMobile" msgid="119919005321166205">"Моб."</string> + <string name="postalTypeCustom" msgid="8903206903060479902">"Особый"</string> + <string name="postalTypeHome" msgid="8165756977184483097">"Дом"</string> + <string name="postalTypeWork" msgid="5268172772387694495">"Раб."</string> + <string name="postalTypeOther" msgid="2726111966623584341">"Другой"</string> + <string name="imTypeCustom" msgid="2074028755527826046">"Особый"</string> + <string name="imTypeHome" msgid="6241181032954263892">"Дом"</string> + <string name="imTypeWork" msgid="1371489290242433090">"Раб."</string> + <string name="imTypeOther" msgid="5377007495735915478">"Другой"</string> + <string name="imProtocolCustom" msgid="6919453836618749992">"Особый"</string> + <string name="imProtocolAim" msgid="7050360612368383417">"AIM"</string> + <string name="imProtocolMsn" msgid="144556545420769442">"Windows Live"</string> + <string name="imProtocolYahoo" msgid="8271439408469021273">"Yahoo"</string> + <string name="imProtocolSkype" msgid="9019296744622832951">"Skype"</string> + <string name="imProtocolQq" msgid="8887484379494111884">"QQ"</string> + <string name="imProtocolGoogleTalk" msgid="3808393979157698766">"Google Talk"</string> + <string name="imProtocolIcq" msgid="1574870433606517315">"ICQ"</string> + <string name="imProtocolJabber" msgid="2279917630875771722">"Jabber"</string> + <string name="imProtocolNetMeeting" msgid="8287625655986827971">"NetMeeting"</string> + <string name="orgTypeWork" msgid="29268870505363872">"Раб."</string> + <string name="orgTypeOther" msgid="3951781131570124082">"Другой"</string> + <string name="orgTypeCustom" msgid="225523415372088322">"Особый"</string> + <string name="contact_status_update_attribution" msgid="5112589886094402795">"с помощью <xliff:g id="SOURCE">%1$s</xliff:g>"</string> + <string name="contact_status_update_attribution_with_date" msgid="5945386376369979909">"<xliff:g id="DATE">%1$s</xliff:g> с помощью <xliff:g id="SOURCE">%2$s</xliff:g>"</string> <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Введите PIN-код"</string> <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Неверный PIN-код!"</string> <string name="keyguard_label_text" msgid="861796461028298424">"Для разблокировки нажмите \"Меню\", а затем 0."</string> @@ -447,6 +498,7 @@ <string name="lockscreen_pattern_wrong" msgid="4817583279053112312">"Повторите попытку"</string> <string name="lockscreen_plugged_in" msgid="613343852842944435">"Идет зарядка (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string> <string name="lockscreen_charged" msgid="4938930459620989972">"Заряжена."</string> + <string name="lockscreen_battery_short" msgid="3617549178603354656">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string> <string name="lockscreen_low_battery" msgid="1482873981919249740">"Подключите зарядное устройство."</string> <string name="lockscreen_missing_sim_message_short" msgid="7381499217732227295">"Нет SIM-карты."</string> <string name="lockscreen_missing_sim_message" msgid="2186920585695169078">"SIM-карта не установлена."</string> @@ -478,7 +530,7 @@ <string name="battery_status_charging" msgid="756617993998772213">"Идет зарядка..."</string> <string name="battery_low_title" msgid="7923774589611311406">"Подключите зарядное устройство"</string> <string name="battery_low_subtitle" msgid="7388781709819722764">"Батарея разряжена:"</string> - <string name="battery_low_percent_format" msgid="6564958083485073855">"осталось менее <xliff:g id="NUMBER">%d%%</xliff:g>"</string> + <string name="battery_low_percent_format" msgid="696154104579022959">"Осталось <xliff:g id="NUMBER">%d%%</xliff:g> или меньше."</string> <string name="battery_low_why" msgid="7279169609518386372">"Расход заряда батареи"</string> <string name="factorytest_failed" msgid="5410270329114212041">"Не удалось провести стандартный тест"</string> <string name="factorytest_not_system" msgid="4435201656767276723">"Действие FACTORY_TEST поддерживается только для пакетов, установленных в /system/app."</string> @@ -488,6 +540,7 @@ <string name="js_dialog_title_default" msgid="6961903213729667573">"JavaScript"</string> <string name="js_dialog_before_unload" msgid="1901675448179653089">"Перейти с этой страницы?"\n\n"<xliff:g id="MESSAGE">%s</xliff:g>"\n\n"Нажмите \"ОК\", чтобы продолжить, или \"Отмена\", чтобы остаться на текущей странице."</string> <string name="save_password_label" msgid="6860261758665825069">"Подтвердите"</string> + <string name="double_tap_toast" msgid="1068216937244567247">"Совет: нажмите дважды, чтобы увеличить и уменьшить масштаб."</string> <string name="permlab_readHistoryBookmarks" msgid="1284843728203412135">"считывать историю и закладки браузера"</string> <string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"Разрешает приложению считывать все URL, посещенные браузером, и все его закладки."</string> <string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"записывать историю и закладки браузера"</string> @@ -692,10 +745,8 @@ <string name="extmedia_format_message" msgid="3621369962433523619">"Отформатировать карту SD? Все данные, находящиеся на карте, будут уничтожены."</string> <string name="extmedia_format_button_format" msgid="4131064560127478695">"Формат"</string> <string name="adb_active_notification_title" msgid="6729044778949189918">"Отладка USB подключена"</string> - <!-- no translation found for adb_active_notification_message (8470296818270110396) --> - <skip /> - <!-- no translation found for select_input_method (6865512749462072765) --> - <skip /> + <string name="adb_active_notification_message" msgid="8470296818270110396">"Нажмите, чтобы отключить отладку USB."</string> + <string name="select_input_method" msgid="6865512749462072765">"Выберите способ ввода"</string> <string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string> <string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string> <string name="candidates_style" msgid="4333913089637062257"><u>"варианты"</u></string> @@ -726,16 +777,19 @@ <string name="create_contact_using" msgid="4947405226788104538">"Создать контакт"\n"с номером <xliff:g id="NUMBER">%s</xliff:g>"</string> <string name="accessibility_compound_button_selected" msgid="5612776946036285686">"отмечено"</string> <string name="accessibility_compound_button_unselected" msgid="8864512895673924091">"не проверено"</string> - <string name="grant_credentials_permission_message_desc" msgid="6883276587034335667">"Перечисленные приложения запрашивают разрешение на доступ к регистрационном данным аккаунта <xliff:g id="ACCOUNT">%1$s</xliff:g> из <xliff:g id="APPLICATION">%2$s</xliff:g>. Разрешить доступ? Если да, ваш ответ будет сохранен и это сообщение больше не будет выводиться."</string> - <string name="grant_credentials_permission_message_with_authtokenlabel_desc" msgid="3159007601893584687">"Перечисленные приложения запрашивают разрешение на доступ к регистрационном данным <xliff:g id="TYPE">%1$s</xliff:g> аккаунта <xliff:g id="ACCOUNT">%2$s</xliff:g> из <xliff:g id="APPLICATION">%3$s</xliff:g>. Разрешить доступ? Если да, ваш ответ будет сохранен и это сообщение больше не будет выводиться."</string> + <string name="grant_credentials_permission_message_desc" msgid="6883276587034335667">"Перечисленные приложения запрашивают разрешение на доступ к регистрационном данным аккаунта <xliff:g id="ACCOUNT">%1$s</xliff:g> из <xliff:g id="APPLICATION">%2$s</xliff:g>. Разрешить доступ? Если да, ответ будет сохранен и это сообщение больше не будет выводиться."</string> + <string name="grant_credentials_permission_message_with_authtokenlabel_desc" msgid="3159007601893584687">"Перечисленные приложения запрашивают разрешение на доступ к регистрационном данным <xliff:g id="TYPE">%1$s</xliff:g> аккаунта <xliff:g id="ACCOUNT">%2$s</xliff:g> из <xliff:g id="APPLICATION">%3$s</xliff:g>. Разрешить доступ? Если да, ответ будет сохранен и это сообщение больше не будет выводиться."</string> <string name="allow" msgid="7225948811296386551">"Разрешить"</string> <string name="deny" msgid="2081879885755434506">"Отклонить"</string> <string name="permission_request_notification_title" msgid="5390555465778213840">"Разрешение запрошено"</string> - <!-- no translation found for permission_request_notification_with_subtitle (4325409589686688000) --> - <skip /> + <string name="permission_request_notification_with_subtitle" msgid="4325409589686688000">"Требуется разрешение"\n"для аккаунта <xliff:g id="ACCOUNT">%s</xliff:g>"</string> <string name="input_method_binding_label" msgid="1283557179944992649">"Способ ввода"</string> <string name="sync_binding_label" msgid="3687969138375092423">"Синхр."</string> <string name="accessibility_binding_label" msgid="4148120742096474641">"Специальные возможности"</string> <string name="wallpaper_binding_label" msgid="1240087844304687662">"Фоновый рисунок"</string> <string name="chooser_wallpaper" msgid="7873476199295190279">"Изменить фоновый рисунок"</string> + <string name="pptp_vpn_description" msgid="2688045385181439401">"Протокол PPTP"</string> + <string name="l2tp_vpn_description" msgid="3750692169378923304">"Протокол L2TP"</string> + <string name="l2tp_ipsec_psk_vpn_description" msgid="3945043564008303239">"L2TP/IPSec VPN (на основе предв. общ. ключа)"</string> + <string name="l2tp_ipsec_crt_vpn_description" msgid="5382714073103653577">"L2TP/IPSec VPN (на основе сертификата)"</string> </resources> diff --git a/core/res/res/values-sv/strings.xml b/core/res/res/values-sv/strings.xml index 0f0d966e4b64..823ba22a73d3 100644 --- a/core/res/res/values-sv/strings.xml +++ b/core/res/res/values-sv/strings.xml @@ -111,8 +111,7 @@ <string name="httpErrorFile" msgid="8250549644091165175">"Det gick inte att komma åt filen."</string> <string name="httpErrorFileNotFound" msgid="5588380756326017105">"Den begärda filen hittades inte."</string> <string name="httpErrorTooManyRequests" msgid="1235396927087188253">"För många begäranden bearbetas. Försök igen senare."</string> - <!-- no translation found for notification_title (1259940370369187045) --> - <skip /> + <string name="notification_title" msgid="1259940370369187045">"Inloggningsfel för <xliff:g id="ACCOUNT">%1$s</xliff:g>"</string> <string name="contentServiceSync" msgid="8353523060269335667">"Synkronisera"</string> <string name="contentServiceSyncNotificationTitle" msgid="397743349191901458">"Synkronisera"</string> <string name="contentServiceTooManyDeletesNotificationDesc" msgid="8100981435080696431">"För många <xliff:g id="CONTENT_TYPE">%s</xliff:g>-borttagningar."</string> @@ -148,8 +147,8 @@ <string name="permgroupdesc_location" msgid="2430258821648348660">"Övervaka din fysiska plats"</string> <string name="permgrouplab_network" msgid="5808983377727109831">"Nätverkskommunikation"</string> <string name="permgroupdesc_network" msgid="5035763698958415998">"Tillåt att program kommer åt olika nätverksfunktioner."</string> - <string name="permgrouplab_accounts" msgid="7140261692496314430">"Dina Google-konton"</string> - <string name="permgroupdesc_accounts" msgid="6735915929704895193">"Få åtkomst till tillgängliga Google-konton."</string> + <string name="permgrouplab_accounts" msgid="3359646291125325519">"Dina konton"</string> + <string name="permgroupdesc_accounts" msgid="4948732641827091312">"Få åtkomst till tillgängliga konton."</string> <string name="permgrouplab_hardwareControls" msgid="7998214968791599326">"Kontroller för maskinvara"</string> <string name="permgroupdesc_hardwareControls" msgid="4357057861225462702">"Direkt åtkomst till maskinvara på handenheten."</string> <string name="permgrouplab_phoneCalls" msgid="9067173988325865923">"Telefonsamtal"</string> @@ -317,7 +316,7 @@ <string name="permlab_callPrivileged" msgid="4198349211108497879">"ringa telefonnummer direkt"</string> <string name="permdesc_callPrivileged" msgid="244405067160028452">"Tillåter att programmet ringer ett telefonnummer, inklusive nödnummer, utan att du behöver göra något. Skadliga program kan ringa onödiga och olagliga samtal till räddningtjänsten."</string> <string name="permlab_performCdmaProvisioning" msgid="5604848095315421425">"starta CDMA-telefoninställningar direkt"</string> - <string name="permdesc_performCdmaProvisioning" msgid="6457447676108355905">"Tillåter att programmet startar CDMA-anslutning. Skadliga program kan skada CDMA-anslutningar i onödan."</string> + <string name="permdesc_performCdmaProvisioning" msgid="6457447676108355905">"Tillåter att programmet startar CDMA-anslutning. Skadliga program kan starta CDMA-anslutningar i onödan."</string> <string name="permlab_locationUpdates" msgid="7785408253364335740">"styra meddelanden för platsuppdatering"</string> <string name="permdesc_locationUpdates" msgid="2300018303720930256">"Tillåter aktivering och inaktivering av avisering om platsuppdatering i radion. Används inte av vanliga program."</string> <string name="permlab_checkinProperties" msgid="7855259461268734914">"få åtkomst till incheckningsegenskaper"</string> @@ -433,6 +432,58 @@ <item msgid="2506857312718630823">"ICQ"</item> <item msgid="1648797903785279353">"Jabber"</item> </string-array> + <string name="phoneTypeCustom" msgid="1644738059053355820">"Anpassad"</string> + <string name="phoneTypeHome" msgid="2570923463033985887">"Hem"</string> + <string name="phoneTypeMobile" msgid="6501463557754751037">"Mobil"</string> + <string name="phoneTypeWork" msgid="8863939667059911633">"Arbete"</string> + <string name="phoneTypeFaxWork" msgid="3517792160008890912">"Arbetsfax"</string> + <string name="phoneTypeFaxHome" msgid="2067265972322971467">"Hemfax"</string> + <string name="phoneTypePager" msgid="7582359955394921732">"Personsökare"</string> + <string name="phoneTypeOther" msgid="1544425847868765990">"Övrigt"</string> + <string name="phoneTypeCallback" msgid="2712175203065678206">"Återuppringning"</string> + <string name="phoneTypeCar" msgid="8738360689616716982">"Bil"</string> + <string name="phoneTypeCompanyMain" msgid="540434356461478916">"Nummer till företag"</string> + <string name="phoneTypeIsdn" msgid="8022453193171370337">"ISDN"</string> + <string name="phoneTypeMain" msgid="6766137010628326916">"Telefonnummer"</string> + <string name="phoneTypeOtherFax" msgid="8587657145072446565">"Annat faxnummer"</string> + <string name="phoneTypeRadio" msgid="4093738079908667513">"Radio"</string> + <string name="phoneTypeTelex" msgid="3367879952476250512">"Telex"</string> + <string name="phoneTypeTtyTdd" msgid="8606514378585000044">"TTY TDD"</string> + <string name="phoneTypeWorkMobile" msgid="1311426989184065709">"Mobiltelefon, arbetet"</string> + <string name="phoneTypeWorkPager" msgid="649938731231157056">"Personsökare, arbetet"</string> + <string name="phoneTypeAssistant" msgid="5596772636128562884">"Assistent"</string> + <string name="phoneTypeMms" msgid="7254492275502768992">"MMS"</string> + <string name="eventTypeBirthday" msgid="2813379844211390740">"Födelsedag"</string> + <string name="eventTypeAnniversary" msgid="3876779744518284000">"Högtidsdag"</string> + <string name="eventTypeOther" msgid="5834288791948564594">"Händelse"</string> + <string name="emailTypeCustom" msgid="8525960257804213846">"Anpassad"</string> + <string name="emailTypeHome" msgid="449227236140433919">"Hem"</string> + <string name="emailTypeWork" msgid="3548058059601149973">"Arbete"</string> + <string name="emailTypeOther" msgid="2923008695272639549">"Övrigt"</string> + <string name="emailTypeMobile" msgid="119919005321166205">"Mobil"</string> + <string name="postalTypeCustom" msgid="8903206903060479902">"Anpassad"</string> + <string name="postalTypeHome" msgid="8165756977184483097">"Hem"</string> + <string name="postalTypeWork" msgid="5268172772387694495">"Arbete"</string> + <string name="postalTypeOther" msgid="2726111966623584341">"Övrigt"</string> + <string name="imTypeCustom" msgid="2074028755527826046">"Anpassad"</string> + <string name="imTypeHome" msgid="6241181032954263892">"Hem"</string> + <string name="imTypeWork" msgid="1371489290242433090">"Arbete"</string> + <string name="imTypeOther" msgid="5377007495735915478">"Övrigt"</string> + <string name="imProtocolCustom" msgid="6919453836618749992">"Anpassad"</string> + <string name="imProtocolAim" msgid="7050360612368383417">"AIM"</string> + <string name="imProtocolMsn" msgid="144556545420769442">"Windows Live"</string> + <string name="imProtocolYahoo" msgid="8271439408469021273">"Yahoo"</string> + <string name="imProtocolSkype" msgid="9019296744622832951">"Skype"</string> + <string name="imProtocolQq" msgid="8887484379494111884">"QQ"</string> + <string name="imProtocolGoogleTalk" msgid="3808393979157698766">"Google Talk"</string> + <string name="imProtocolIcq" msgid="1574870433606517315">"ICQ"</string> + <string name="imProtocolJabber" msgid="2279917630875771722">"Jabber"</string> + <string name="imProtocolNetMeeting" msgid="8287625655986827971">"NetMeeting"</string> + <string name="orgTypeWork" msgid="29268870505363872">"Arbete"</string> + <string name="orgTypeOther" msgid="3951781131570124082">"Övrigt"</string> + <string name="orgTypeCustom" msgid="225523415372088322">"Anpassad"</string> + <string name="contact_status_update_attribution" msgid="5112589886094402795">"via <xliff:g id="SOURCE">%1$s</xliff:g>"</string> + <string name="contact_status_update_attribution_with_date" msgid="5945386376369979909">"<xliff:g id="DATE">%1$s</xliff:g> via <xliff:g id="SOURCE">%2$s</xliff:g>"</string> <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Ange PIN-kod"</string> <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Fel PIN-kod!"</string> <string name="keyguard_label_text" msgid="861796461028298424">"Tryck på Meny och sedan på 0 om du vill låsa upp."</string> @@ -447,6 +498,7 @@ <string name="lockscreen_pattern_wrong" msgid="4817583279053112312">"Försök igen"</string> <string name="lockscreen_plugged_in" msgid="613343852842944435">"Laddar (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string> <string name="lockscreen_charged" msgid="4938930459620989972">"Laddad."</string> + <string name="lockscreen_battery_short" msgid="3617549178603354656">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string> <string name="lockscreen_low_battery" msgid="1482873981919249740">"Anslut din laddare."</string> <string name="lockscreen_missing_sim_message_short" msgid="7381499217732227295">"Inget SIM-kort."</string> <string name="lockscreen_missing_sim_message" msgid="2186920585695169078">"Inget SIM-kort i telefonen."</string> @@ -478,7 +530,7 @@ <string name="battery_status_charging" msgid="756617993998772213">"Laddar…"</string> <string name="battery_low_title" msgid="7923774589611311406">"Anslut laddaren"</string> <string name="battery_low_subtitle" msgid="7388781709819722764">"Batteriet håller på att ta slut:"</string> - <string name="battery_low_percent_format" msgid="6564958083485073855">"Mindre än <xliff:g id="NUMBER">%d%%</xliff:g> återstår."</string> + <string name="battery_low_percent_format" msgid="696154104579022959">"<xliff:g id="NUMBER">%d%%</xliff:g> eller mindre kvar."</string> <string name="battery_low_why" msgid="7279169609518386372">"Batteriförbrukning"</string> <string name="factorytest_failed" msgid="5410270329114212041">"Det gick fel vid fabrikstestet"</string> <string name="factorytest_not_system" msgid="4435201656767276723">"Åtgärden FACTORY_TEST stöds endast för paket som har installerats i /system/app."</string> @@ -488,6 +540,7 @@ <string name="js_dialog_title_default" msgid="6961903213729667573">"JavaScript"</string> <string name="js_dialog_before_unload" msgid="1901675448179653089">"Vill du lämna den här den här sidan?"\n\n"<xliff:g id="MESSAGE">%s</xliff:g>"\n\n"Tryck på OK om du vill fortsätta eller på Avbryt om du vill vara kvar på den aktuella sidan."</string> <string name="save_password_label" msgid="6860261758665825069">"Bekräfta"</string> + <string name="double_tap_toast" msgid="1068216937244567247">"Tips! Dubbelklicka om du vill zooma in eller ut."</string> <string name="permlab_readHistoryBookmarks" msgid="1284843728203412135">"läsa webbläsarhistorik och bokmärken"</string> <string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"Tillåter att program läser alla webbadresser som webbläsaren har öppnat och alla webbläsarens bokmärken."</string> <string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"skriva webbläsarhistorik och bokmärken"</string> @@ -692,10 +745,8 @@ <string name="extmedia_format_message" msgid="3621369962433523619">"Vill du formatera SD-kortet? Alla data på ditt kort kommer att gå förlorade."</string> <string name="extmedia_format_button_format" msgid="4131064560127478695">"Format"</string> <string name="adb_active_notification_title" msgid="6729044778949189918">"USB-felsökning ansluten"</string> - <!-- no translation found for adb_active_notification_message (8470296818270110396) --> - <skip /> - <!-- no translation found for select_input_method (6865512749462072765) --> - <skip /> + <string name="adb_active_notification_message" msgid="8470296818270110396">"Välj att inaktivera USB-felsökning."</string> + <string name="select_input_method" msgid="6865512749462072765">"Välj indatametod"</string> <string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string> <string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string> <string name="candidates_style" msgid="4333913089637062257"><u>"kandidater"</u></string> @@ -731,11 +782,14 @@ <string name="allow" msgid="7225948811296386551">"Tillåt"</string> <string name="deny" msgid="2081879885755434506">"Neka"</string> <string name="permission_request_notification_title" msgid="5390555465778213840">"Begärd behörighet"</string> - <!-- no translation found for permission_request_notification_with_subtitle (4325409589686688000) --> - <skip /> + <string name="permission_request_notification_with_subtitle" msgid="4325409589686688000">"Behörighet krävs"\n"för kontot <xliff:g id="ACCOUNT">%s</xliff:g>"</string> <string name="input_method_binding_label" msgid="1283557179944992649">"Indatametod"</string> <string name="sync_binding_label" msgid="3687969138375092423">"Synkronisera"</string> <string name="accessibility_binding_label" msgid="4148120742096474641">"Tillgänglighet"</string> <string name="wallpaper_binding_label" msgid="1240087844304687662">"Bakgrund"</string> <string name="chooser_wallpaper" msgid="7873476199295190279">"Ändra bakgrund"</string> + <string name="pptp_vpn_description" msgid="2688045385181439401">"Point-to-Point Tunneling Protocol"</string> + <string name="l2tp_vpn_description" msgid="3750692169378923304">"Layer 2 Tunneling Protocol"</string> + <string name="l2tp_ipsec_psk_vpn_description" msgid="3945043564008303239">"I förväg delad L2TP/IPSec VPN-nyckel"</string> + <string name="l2tp_ipsec_crt_vpn_description" msgid="5382714073103653577">"Certifikatsbaserad L2TP/IPSec VPN"</string> </resources> diff --git a/core/res/res/values-tr/strings.xml b/core/res/res/values-tr/strings.xml index a63a387a6df2..f95fc0a0a056 100644 --- a/core/res/res/values-tr/strings.xml +++ b/core/res/res/values-tr/strings.xml @@ -111,8 +111,7 @@ <string name="httpErrorFile" msgid="8250549644091165175">"Dosyaya erişilemedi."</string> <string name="httpErrorFileNotFound" msgid="5588380756326017105">"İstenen dosya bulunamadı."</string> <string name="httpErrorTooManyRequests" msgid="1235396927087188253">"Çok fazla sayıda istek işleniyor. Daha sonra yeniden deneyin."</string> - <!-- no translation found for notification_title (1259940370369187045) --> - <skip /> + <string name="notification_title" msgid="1259940370369187045">"<xliff:g id="ACCOUNT">%1$s</xliff:g> hesabı için oturum açma hatası"</string> <string name="contentServiceSync" msgid="8353523060269335667">"Senk."</string> <string name="contentServiceSyncNotificationTitle" msgid="397743349191901458">"Senk."</string> <string name="contentServiceTooManyDeletesNotificationDesc" msgid="8100981435080696431">"Çok fazla <xliff:g id="CONTENT_TYPE">%s</xliff:g> silme var."</string> @@ -148,8 +147,8 @@ <string name="permgroupdesc_location" msgid="2430258821648348660">"Fiziksel konumunuzu izleyin"</string> <string name="permgrouplab_network" msgid="5808983377727109831">"Ağ iletişimi"</string> <string name="permgroupdesc_network" msgid="5035763698958415998">"Uygulamaların çeşitli ağ özelliklerine erişmesine izin verir."</string> - <string name="permgrouplab_accounts" msgid="7140261692496314430">"Google hesaplarınız"</string> - <string name="permgroupdesc_accounts" msgid="6735915929704895193">"Kullanılabilir Google hesaplarına erişin."</string> + <string name="permgrouplab_accounts" msgid="3359646291125325519">"Hesaplarınız"</string> + <string name="permgroupdesc_accounts" msgid="4948732641827091312">"Kullanılabilir hesaplara erişin."</string> <string name="permgrouplab_hardwareControls" msgid="7998214968791599326">"Donanım denetimleri"</string> <string name="permgroupdesc_hardwareControls" msgid="4357057861225462702">"Telefon donanımına doğrudan erişim."</string> <string name="permgrouplab_phoneCalls" msgid="9067173988325865923">"Telefon çağrıları"</string> @@ -433,6 +432,58 @@ <item msgid="2506857312718630823">"ICQ"</item> <item msgid="1648797903785279353">"Jabber"</item> </string-array> + <string name="phoneTypeCustom" msgid="1644738059053355820">"Özel"</string> + <string name="phoneTypeHome" msgid="2570923463033985887">"Ev"</string> + <string name="phoneTypeMobile" msgid="6501463557754751037">"Mobil"</string> + <string name="phoneTypeWork" msgid="8863939667059911633">"İş"</string> + <string name="phoneTypeFaxWork" msgid="3517792160008890912">"İş Faksı"</string> + <string name="phoneTypeFaxHome" msgid="2067265972322971467">"Ev Faksı"</string> + <string name="phoneTypePager" msgid="7582359955394921732">"Çağrı cihazı"</string> + <string name="phoneTypeOther" msgid="1544425847868765990">"Diğer"</string> + <string name="phoneTypeCallback" msgid="2712175203065678206">"Geri Arama"</string> + <string name="phoneTypeCar" msgid="8738360689616716982">"Araç"</string> + <string name="phoneTypeCompanyMain" msgid="540434356461478916">"Şirket Merkezi"</string> + <string name="phoneTypeIsdn" msgid="8022453193171370337">"ISDN"</string> + <string name="phoneTypeMain" msgid="6766137010628326916">"Ana"</string> + <string name="phoneTypeOtherFax" msgid="8587657145072446565">"Diğer Faks"</string> + <string name="phoneTypeRadio" msgid="4093738079908667513">"Telsiz"</string> + <string name="phoneTypeTelex" msgid="3367879952476250512">"Teleks"</string> + <string name="phoneTypeTtyTdd" msgid="8606514378585000044">"TTY TDD"</string> + <string name="phoneTypeWorkMobile" msgid="1311426989184065709">"İş Yeri Cep Telefonu"</string> + <string name="phoneTypeWorkPager" msgid="649938731231157056">"İş Yeri Çağrı Cihazı"</string> + <string name="phoneTypeAssistant" msgid="5596772636128562884">"Yardımcı"</string> + <string name="phoneTypeMms" msgid="7254492275502768992">"MMS"</string> + <string name="eventTypeBirthday" msgid="2813379844211390740">"Doğum günü"</string> + <string name="eventTypeAnniversary" msgid="3876779744518284000">"Yıldönümü"</string> + <string name="eventTypeOther" msgid="5834288791948564594">"Etkinlik"</string> + <string name="emailTypeCustom" msgid="8525960257804213846">"Özel"</string> + <string name="emailTypeHome" msgid="449227236140433919">"Ev"</string> + <string name="emailTypeWork" msgid="3548058059601149973">"İş"</string> + <string name="emailTypeOther" msgid="2923008695272639549">"Diğer"</string> + <string name="emailTypeMobile" msgid="119919005321166205">"Mobil"</string> + <string name="postalTypeCustom" msgid="8903206903060479902">"Özel"</string> + <string name="postalTypeHome" msgid="8165756977184483097">"Ev"</string> + <string name="postalTypeWork" msgid="5268172772387694495">"İş"</string> + <string name="postalTypeOther" msgid="2726111966623584341">"Diğer"</string> + <string name="imTypeCustom" msgid="2074028755527826046">"Özel"</string> + <string name="imTypeHome" msgid="6241181032954263892">"Ev"</string> + <string name="imTypeWork" msgid="1371489290242433090">"İş"</string> + <string name="imTypeOther" msgid="5377007495735915478">"Diğer"</string> + <string name="imProtocolCustom" msgid="6919453836618749992">"Özel"</string> + <string name="imProtocolAim" msgid="7050360612368383417">"AIM"</string> + <string name="imProtocolMsn" msgid="144556545420769442">"Windows Live"</string> + <string name="imProtocolYahoo" msgid="8271439408469021273">"Yahoo"</string> + <string name="imProtocolSkype" msgid="9019296744622832951">"Skype"</string> + <string name="imProtocolQq" msgid="8887484379494111884">"QQ"</string> + <string name="imProtocolGoogleTalk" msgid="3808393979157698766">"Google Talk"</string> + <string name="imProtocolIcq" msgid="1574870433606517315">"ICQ"</string> + <string name="imProtocolJabber" msgid="2279917630875771722">"Jabber"</string> + <string name="imProtocolNetMeeting" msgid="8287625655986827971">"NetMeeting"</string> + <string name="orgTypeWork" msgid="29268870505363872">"İş"</string> + <string name="orgTypeOther" msgid="3951781131570124082">"Diğer"</string> + <string name="orgTypeCustom" msgid="225523415372088322">"Özel"</string> + <string name="contact_status_update_attribution" msgid="5112589886094402795">"<xliff:g id="SOURCE">%1$s</xliff:g> aracılığıyla"</string> + <string name="contact_status_update_attribution_with_date" msgid="5945386376369979909">"<xliff:g id="SOURCE">%2$s</xliff:g> ile <xliff:g id="DATE">%1$s</xliff:g> tarihinde"</string> <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"PIN kodunu gir"</string> <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Yanlış PIN kodu!"</string> <string name="keyguard_label_text" msgid="861796461028298424">"Kilidi açmak için önce Menü\'ye, sonra 0\'a basın."</string> @@ -447,6 +498,7 @@ <string name="lockscreen_pattern_wrong" msgid="4817583279053112312">"Üzgünüz, lütfen yeniden deneyin"</string> <string name="lockscreen_plugged_in" msgid="613343852842944435">"Şarj oluyor (<xliff:g id="PERCENT">%%</xliff:g><xliff:g id="NUMBER">%d</xliff:g>)"</string> <string name="lockscreen_charged" msgid="4938930459620989972">"Şarj oldu."</string> + <string name="lockscreen_battery_short" msgid="3617549178603354656">"<xliff:g id="NUMBER">%d</xliff:g> <xliff:g id="PERCENT">%%</xliff:g>"</string> <string name="lockscreen_low_battery" msgid="1482873981919249740">"Şarj cihazınızı bağlayın."</string> <string name="lockscreen_missing_sim_message_short" msgid="7381499217732227295">"SIM kart yok."</string> <string name="lockscreen_missing_sim_message" msgid="2186920585695169078">"Telefonda SIM kart yok."</string> @@ -478,7 +530,7 @@ <string name="battery_status_charging" msgid="756617993998772213">"Şarj oluyor…"</string> <string name="battery_low_title" msgid="7923774589611311406">"Lütfen şarj cihazını takın"</string> <string name="battery_low_subtitle" msgid="7388781709819722764">"Pil tükeniyor:"</string> - <string name="battery_low_percent_format" msgid="6564958083485073855">"<xliff:g id="NUMBER">%d%%</xliff:g> adetten daha az kaldı."</string> + <string name="battery_low_percent_format" msgid="696154104579022959">"<xliff:g id="NUMBER">%d%%</xliff:g> veya daha az kaldı."</string> <string name="battery_low_why" msgid="7279169609518386372">"Pil kullanımı"</string> <string name="factorytest_failed" msgid="5410270329114212041">"Fabrika testi yapılamadı"</string> <string name="factorytest_not_system" msgid="4435201656767276723">"FACTORY_TEST işlemi yalnızca /system/app dizinine yüklenmiş paketler için desteklenir."</string> @@ -488,6 +540,7 @@ <string name="js_dialog_title_default" msgid="6961903213729667573">"JavaScript"</string> <string name="js_dialog_before_unload" msgid="1901675448179653089">"Bu sayfadan ayrılıyor musunuz?"\n\n"<xliff:g id="MESSAGE">%s</xliff:g>"\n\n"Devam etmek için Tamam\'ı, sayfada kalmak için İptal\'i tıklatın."</string> <string name="save_password_label" msgid="6860261758665825069">"Onayla"</string> + <string name="double_tap_toast" msgid="1068216937244567247">"İpucu: Yakınlaştırmak ve uzaklaştırmak için iki kez hafifçe vurun."</string> <string name="permlab_readHistoryBookmarks" msgid="1284843728203412135">"Tarayıcı geçmişini ve favorileri oku"</string> <string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"Uygulamaya Tarayıcının ziyaret etmiş olduğu tüm URL\'leri ve Tarayıcının tüm favorilerini okuma izni verir."</string> <string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"Tarayıcı geçmişini ve favorileri yaz"</string> @@ -692,10 +745,8 @@ <string name="extmedia_format_message" msgid="3621369962433523619">"SD kartı biçimlendirmek istediğinizden emin misiniz? Kartınızdaki tüm veriler yok olacak."</string> <string name="extmedia_format_button_format" msgid="4131064560127478695">"Biçimlendir"</string> <string name="adb_active_notification_title" msgid="6729044778949189918">"USB hata ayıklaması bağlandı"</string> - <!-- no translation found for adb_active_notification_message (8470296818270110396) --> - <skip /> - <!-- no translation found for select_input_method (6865512749462072765) --> - <skip /> + <string name="adb_active_notification_message" msgid="8470296818270110396">"USB hata ayıklamasını devre dışı bırakmak için tıklayın."</string> + <string name="select_input_method" msgid="6865512749462072765">"Giriş yöntemini seç"</string> <string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string> <string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string> <string name="candidates_style" msgid="4333913089637062257"><u>"adaylar"</u></string> @@ -731,11 +782,14 @@ <string name="allow" msgid="7225948811296386551">"İzin Ver"</string> <string name="deny" msgid="2081879885755434506">"Reddet"</string> <string name="permission_request_notification_title" msgid="5390555465778213840">"İzin İstendi"</string> - <!-- no translation found for permission_request_notification_with_subtitle (4325409589686688000) --> - <skip /> + <string name="permission_request_notification_with_subtitle" msgid="4325409589686688000">"<xliff:g id="ACCOUNT">%s</xliff:g> hesabı için"\n"İzin İstendi"</string> <string name="input_method_binding_label" msgid="1283557179944992649">"Giriş yöntemi"</string> <string name="sync_binding_label" msgid="3687969138375092423">"Senkronizasyon"</string> <string name="accessibility_binding_label" msgid="4148120742096474641">"Erişebilirlik"</string> <string name="wallpaper_binding_label" msgid="1240087844304687662">"Duvar Kağıdı"</string> <string name="chooser_wallpaper" msgid="7873476199295190279">"Duvar kağıdını değiştir"</string> + <string name="pptp_vpn_description" msgid="2688045385181439401">"Noktadan Noktaya Tünel Protokolü Kuralları"</string> + <string name="l2tp_vpn_description" msgid="3750692169378923304">"Katman 2 Tünel Protokolü"</string> + <string name="l2tp_ipsec_psk_vpn_description" msgid="3945043564008303239">"L2TP/IPSec VPN temelli önceden paylaşılmış anahtar"</string> + <string name="l2tp_ipsec_crt_vpn_description" msgid="5382714073103653577">"L2TP/IPSec VPN temelli sertifika"</string> </resources> diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml index 2974203aad31..ab5554baedbe 100644 --- a/core/res/res/values-zh-rCN/strings.xml +++ b/core/res/res/values-zh-rCN/strings.xml @@ -29,9 +29,9 @@ <string name="defaultVoiceMailAlphaTag" msgid="2660020990097733077">"语音信箱"</string> <string name="defaultMsisdnAlphaTag" msgid="2850889754919584674">"MSISDN1"</string> <string name="mmiError" msgid="5154499457739052907">"出现连接问题或 MMI 码无效。"</string> - <string name="serviceEnabled" msgid="8147278346414714315">"服务已启用。"</string> + <string name="serviceEnabled" msgid="8147278346414714315">"已启用服务。"</string> <string name="serviceEnabledFor" msgid="6856228140453471041">"已针对以下内容启用了服务:"</string> - <string name="serviceDisabled" msgid="1937553226592516411">"服务已被停用。"</string> + <string name="serviceDisabled" msgid="1937553226592516411">"已停用服务。"</string> <string name="serviceRegistered" msgid="6275019082598102493">"注册成功。"</string> <string name="serviceErased" msgid="1288584695297200972">"清除成功。"</string> <string name="passwordIncorrect" msgid="7612208839450128715">"密码不正确。"</string> @@ -42,25 +42,25 @@ <string name="invalidPin" msgid="3850018445187475377">"输入一个 4 至 8 位数的 PIN。"</string> <string name="needPuk" msgid="919668385956251611">"您的 SIM 卡被 PUK 锁定。请输入 PUK 码进行解锁。"</string> <string name="needPuk2" msgid="4526033371987193070">"输入 PUK2 以解锁 SIM 卡。"</string> - <string name="ClipMmi" msgid="6952821216480289285">"来电显示"</string> - <string name="ClirMmi" msgid="7784673673446833091">"外拨电话显示"</string> + <string name="ClipMmi" msgid="6952821216480289285">"来电者信息"</string> + <string name="ClirMmi" msgid="7784673673446833091">"外拨者信息"</string> <string name="CfMmi" msgid="5123218989141573515">"呼叫转接"</string> <string name="CwMmi" msgid="9129678056795016867">"呼叫等待"</string> <string name="BaMmi" msgid="455193067926770581">"呼叫限制"</string> <string name="PwdMmi" msgid="7043715687905254199">"密码更改"</string> <string name="PinMmi" msgid="3113117780361190304">"PIN 码更改"</string> <string name="CnipMmi" msgid="3110534680557857162">"来电显示"</string> - <string name="CnirMmi" msgid="3062102121430548731">"来电显示已禁用"</string> + <string name="CnirMmi" msgid="3062102121430548731">"来电显示受限制"</string> <string name="ThreeWCMmi" msgid="9051047170321190368">"三方通话"</string> <string name="RuacMmi" msgid="7827887459138308886">"拒绝不想接听的骚扰电话"</string> <string name="CndMmi" msgid="3116446237081575808">"主叫号码传送"</string> <string name="DndMmi" msgid="1265478932418334331">"请勿打扰"</string> - <string name="CLIRDefaultOnNextCallOn" msgid="429415409145781923">"来电显示默认设置为受限制。下一个呼叫:受限制"</string> - <string name="CLIRDefaultOnNextCallOff" msgid="3092918006077864624">"来电显示默认设置为受限制。下一个呼叫:不受限制"</string> - <string name="CLIRDefaultOffNextCallOn" msgid="6179425182856418465">"来电显示默认设置为不受限制。下一个呼叫:受限制"</string> - <string name="CLIRDefaultOffNextCallOff" msgid="2567998633124408552">"来电显示默认设置为不受限制。下一个呼叫:不受限制"</string> + <string name="CLIRDefaultOnNextCallOn" msgid="429415409145781923">"来电者信息在默认情况下受限制。在下一次通话中:受限制"</string> + <string name="CLIRDefaultOnNextCallOff" msgid="3092918006077864624">"来电者信息在默认情况受限制。在下一次通话中:不受限制"</string> + <string name="CLIRDefaultOffNextCallOn" msgid="6179425182856418465">"来电者信息在默认情况下不受限制。在下一次通话中:受限制"</string> + <string name="CLIRDefaultOffNextCallOff" msgid="2567998633124408552">"来电者信息在默认情况下不受限制。在下一次通话中:不受限制"</string> <string name="serviceNotProvisioned" msgid="8614830180508686666">"未提供服务。"</string> - <string name="CLIRPermanent" msgid="5460892159398802465">"无法更改来电显示设置。"</string> + <string name="CLIRPermanent" msgid="5460892159398802465">"无法更改来电者信息设置。"</string> <string name="RestrictedChangedTitle" msgid="5592189398956187498">"访问受限情况已发生变化"</string> <string name="RestrictedOnData" msgid="8653794784690065540">"数据服务已禁用。"</string> <string name="RestrictedOnEmergency" msgid="6581163779072833665">"紧急服务已禁用。"</string> @@ -111,12 +111,11 @@ <string name="httpErrorFile" msgid="8250549644091165175">"无法访问该文件。"</string> <string name="httpErrorFileNotFound" msgid="5588380756326017105">"找不到请求的文件。"</string> <string name="httpErrorTooManyRequests" msgid="1235396927087188253">"正在处理的请求太多,请稍后重试。"</string> - <!-- no translation found for notification_title (1259940370369187045) --> - <skip /> + <string name="notification_title" msgid="1259940370369187045">"<xliff:g id="ACCOUNT">%1$s</xliff:g> 发生登录错误"</string> <string name="contentServiceSync" msgid="8353523060269335667">"同步"</string> <string name="contentServiceSyncNotificationTitle" msgid="397743349191901458">"同步"</string> <string name="contentServiceTooManyDeletesNotificationDesc" msgid="8100981435080696431">"太多<xliff:g id="CONTENT_TYPE">%s</xliff:g>删除项。"</string> - <string name="low_memory" msgid="6632412458436461203">"手机存储空间已满!请删除一些文件来腾出空间。"</string> + <string name="low_memory" msgid="6632412458436461203">"手机内存已用完!请删除一些文件来腾出空间。"</string> <string name="me" msgid="6545696007631404292">"我"</string> <string name="power_dialog" msgid="1319919075463988638">"手机选项"</string> <string name="silent_mode" msgid="7167703389802618663">"静音模式"</string> @@ -131,8 +130,8 @@ <string name="global_action_lock" msgid="2844945191792119712">"屏幕锁定"</string> <string name="global_action_power_off" msgid="4471879440839879722">"关机"</string> <string name="global_action_toggle_silent_mode" msgid="8219525344246810925">"静音模式"</string> - <string name="global_action_silent_mode_on_status" msgid="3289841937003758806">"声音已“关闭”"</string> - <string name="global_action_silent_mode_off_status" msgid="1506046579177066419">"声音已“开启”"</string> + <string name="global_action_silent_mode_on_status" msgid="3289841937003758806">"已关闭声音"</string> + <string name="global_action_silent_mode_off_status" msgid="1506046579177066419">"已打开声音"</string> <string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"飞行模式"</string> <string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"飞行模式已开启"</string> <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"飞行模式已关闭"</string> @@ -148,8 +147,8 @@ <string name="permgroupdesc_location" msgid="2430258821648348660">"监视您的物理位置"</string> <string name="permgrouplab_network" msgid="5808983377727109831">"网络通信"</string> <string name="permgroupdesc_network" msgid="5035763698958415998">"允许应用程序访问各种网络功能。"</string> - <string name="permgrouplab_accounts" msgid="7140261692496314430">"您的 Google 帐户"</string> - <string name="permgroupdesc_accounts" msgid="6735915929704895193">"访问可用的 Google 帐户。"</string> + <string name="permgrouplab_accounts" msgid="3359646291125325519">"您的帐户"</string> + <string name="permgroupdesc_accounts" msgid="4948732641827091312">"访问可用的帐户。"</string> <string name="permgrouplab_hardwareControls" msgid="7998214968791599326">"硬件控制"</string> <string name="permgroupdesc_hardwareControls" msgid="4357057861225462702">"直接访问手机上的硬件。"</string> <string name="permgrouplab_phoneCalls" msgid="9067173988325865923">"手机通话"</string> @@ -164,8 +163,8 @@ <string name="permdesc_statusBar" msgid="1365473595331989732">"允许应用程序停用状态栏,或者添加和删除系统图标。"</string> <string name="permlab_expandStatusBar" msgid="1148198785937489264">"展开/折叠状态栏"</string> <string name="permdesc_expandStatusBar" msgid="7088604400110768665">"允许应用程序展开或折叠状态栏。"</string> - <string name="permlab_processOutgoingCalls" msgid="1136262550878335980">"拦截对外呼叫"</string> - <string name="permdesc_processOutgoingCalls" msgid="2228988201852654461">"允许应用程序处理对外呼叫和更改要拨打的号码。恶意应用程序可借此监视、重定向或阻止对外呼叫。"</string> + <string name="permlab_processOutgoingCalls" msgid="1136262550878335980">"拦截外拨电话"</string> + <string name="permdesc_processOutgoingCalls" msgid="2228988201852654461">"允许应用程序处理外拨电话和更改要拨打的号码。恶意应用程序可借此监视、重定向或阻止外拨电话。"</string> <string name="permlab_receiveSms" msgid="2697628268086208535">"接收短信"</string> <string name="permdesc_receiveSms" msgid="6298292335965966117">"允许应用程序接收和处理短信。恶意应用程序可借此监视您的信息,或者将信息删除而不向您显示。"</string> <string name="permlab_receiveMms" msgid="8894700916188083287">"接收彩信"</string> @@ -178,7 +177,7 @@ <string name="permdesc_writeSms" msgid="6299398896177548095">"允许应用程序写入手机或 SIM 卡中存储的短信。恶意应用程序可借此删除您的信息。"</string> <string name="permlab_receiveWapPush" msgid="8258226427716551388">"接收 WAP"</string> <string name="permdesc_receiveWapPush" msgid="5979623826128082171">"允许应用程序接收和处理 WAP 消息。恶意应用程序可借此监视您的消息,或者将消息删除而不向您显示。"</string> - <string name="permlab_getTasks" msgid="5005277531132573353">"检索所运行的应用程序"</string> + <string name="permlab_getTasks" msgid="5005277531132573353">"检索当前运行的应用程序"</string> <string name="permdesc_getTasks" msgid="7048711358713443341">"允许应用程序检索有关当前和最近运行的任务的信息。恶意应用程序可借此发现有关其他应用程序的私有信息。"</string> <string name="permlab_reorderTasks" msgid="5669588525059921549">"对正在运行的应用程序重新排序"</string> <string name="permdesc_reorderTasks" msgid="126252774270522835">"允许应用程序将任务移至前台和后台。恶意应用程序可借此强行进到前台,而不受您的控制。"</string> @@ -204,11 +203,11 @@ <string name="permdesc_broadcastSmsReceived" msgid="9122419277306740155">"允许应用程序广播已收到短信的通知。恶意应用程序可借此伪造收到的短信。"</string> <string name="permlab_broadcastWapPush" msgid="3145347413028582371">"发送 WAP 一键接收广播"</string> <string name="permdesc_broadcastWapPush" msgid="3955303669461378091">"允许应用程序广播收到 WAP 一键信息的通知。恶意应用程序可借此乱发彩信或暗中用恶意内容替换任意网页中的内容。"</string> - <string name="permlab_setProcessLimit" msgid="2451873664363662666">"限制所运行进程的数量"</string> + <string name="permlab_setProcessLimit" msgid="2451873664363662666">"限制运行的进程个数"</string> <string name="permdesc_setProcessLimit" msgid="7824786028557379539">"允许应用程序控制将运行的最大进程数。普通应用程序从不需要使用此权限。"</string> <string name="permlab_setAlwaysFinish" msgid="5342837862439543783">"关闭所有后台应用程序"</string> <string name="permdesc_setAlwaysFinish" msgid="8773936403987091620">"允许应用程序控制活动是否始终是一转至后台就完成。普通应用程序从不需要使用此权限。"</string> - <string name="permlab_batteryStats" msgid="7863923071360031652">"修改电池使用情况统计信息"</string> + <string name="permlab_batteryStats" msgid="7863923071360031652">"修改电池统计信息"</string> <string name="permdesc_batteryStats" msgid="5847319823772230560">"允许修改收集的电池使用情况统计信息。普通应用程序不能使用此权限。"</string> <string name="permlab_backup" msgid="470013022865453920">"控制系统备份和还原"</string> <string name="permdesc_backup" msgid="4837493065154256525">"允许应用程序控制系统的备份和还原机制。不适用于普通应用程序。"</string> @@ -221,7 +220,7 @@ <string name="permlab_setAnimationScale" msgid="2805103241153907174">"修改全局动画速度"</string> <string name="permdesc_setAnimationScale" msgid="7181522138912391988">"允许应用程序随时更改全局动画速度(加快或放慢动画)。"</string> <string name="permlab_manageAppTokens" msgid="17124341698093865">"管理应用程序令牌"</string> - <string name="permdesc_manageAppTokens" msgid="977127907524195988">"允许应用程序创建和管理自己的令牌,从而绕开正常的 Z 排序方式。普通应用程序从不需要使用此权限。"</string> + <string name="permdesc_manageAppTokens" msgid="977127907524195988">"允许应用程序创建和管理自己的令牌,从而绕开正常的 Z 方向排序。普通应用程序从不需要使用此权限。"</string> <string name="permlab_injectEvents" msgid="1378746584023586600">"按键和控制按钮"</string> <string name="permdesc_injectEvents" msgid="3946098050410874715">"允许应用程序将其自己的输入活动(按键等)提供给其他应用程序。恶意应用程序可借此掌控手机。"</string> <string name="permlab_readInputState" msgid="469428900041249234">"记录您输入的内容和采取的操作"</string> @@ -230,7 +229,7 @@ <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"允许手机用户绑定至输入法的顶级界面。普通应用程序从不需要使用此权限。"</string> <string name="permlab_bindWallpaper" msgid="8716400279937856462">"绑定到壁纸"</string> <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"允许手机用户绑定到壁纸的顶级界面。应该从不需要将此权限授予普通应用程序。"</string> - <string name="permlab_setOrientation" msgid="3365947717163866844">"更改屏幕浏览模式"</string> + <string name="permlab_setOrientation" msgid="3365947717163866844">"更改屏幕显示方向"</string> <string name="permdesc_setOrientation" msgid="6335814461615851863">"允许应用程序随时更改屏幕的旋转方向。普通应用程序从不需要使用此权限。"</string> <string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"向应用程序发送 Linux 信号"</string> <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"允许应用程序请求将提供的信号发送给所有持续的进程。"</string> @@ -247,7 +246,7 @@ <string name="permlab_installPackages" msgid="335800214119051089">"直接安装应用程序"</string> <string name="permdesc_installPackages" msgid="526669220850066132">"允许应用程序安装新的或更新的 Android 包。恶意应用程序可借此添加具有极大权限的新应用程序。"</string> <string name="permlab_clearAppCache" msgid="4747698311163766540">"删除所有应用程序缓存数据"</string> - <string name="permdesc_clearAppCache" msgid="7740465694193671402">"允许应用程序通过删除应用程序缓存目录中的文件释放手机存储空间。对系统进程的访问通常受到严格限制。"</string> + <string name="permdesc_clearAppCache" msgid="7740465694193671402">"允许应用程序通过删除应用程序缓存目录中的文件释放手机内存。通常严格限制访问系统进程。"</string> <string name="permlab_readLogs" msgid="4811921703882532070">"读取系统日志文件"</string> <string name="permdesc_readLogs" msgid="2257937955580475902">"允许应用程序读取系统的各日志文件。这样应用程序可以发现有关您操作手机的一般信息,但这些信息不应包含任何个人信息或私有信息。"</string> <string name="permlab_diagnostic" msgid="8076743953908000342">"读取/写入诊断所拥有的资源"</string> @@ -264,7 +263,7 @@ <string name="permdesc_writeGservices" msgid="6602362746516676175">"允许应用程序修改 Google 服务地图。普通应用程序不能使用此权限。"</string> <string name="permlab_receiveBootCompleted" msgid="7776779842866993377">"开机时自动启动"</string> <string name="permdesc_receiveBootCompleted" msgid="698336728415008796">"允许应用程序在系统完成启动后即自行启动。这样会延长手机的启动时间,而且如果应用程序一直运行,会降低手机的整体速度。"</string> - <string name="permlab_broadcastSticky" msgid="7919126372606881614">"发送顽固广播"</string> + <string name="permlab_broadcastSticky" msgid="7919126372606881614">"发送置顶广播"</string> <string name="permdesc_broadcastSticky" msgid="1920045289234052219">"允许应用程序发送顽固广播,这些广播在结束后仍会保留。恶意应用程序可能会借此使手机耗用太多内存,从而降低其速度或稳定性。"</string> <string name="permlab_readContacts" msgid="6219652189510218240">"读取联系人数据"</string> <string name="permdesc_readContacts" msgid="3371591512896545975">"允许应用程序读取您手机上存储的所有联系人(地址)数据。恶意应用程序可借此将您的数据发送给其他人。"</string> @@ -278,11 +277,11 @@ <string name="permdesc_readCalendar" msgid="5533029139652095734">"允许应用程序读取您手机上存储的所有日历活动。恶意应用程序可借此将您的日历活动发送给其他人。"</string> <string name="permlab_writeCalendar" msgid="377926474603567214">"写入日历数据"</string> <string name="permdesc_writeCalendar" msgid="8674240662630003173">"允许应用程序修改您手机上存储的日历活动。恶意应用程序可借此清除或修改您的日历数据。"</string> - <string name="permlab_accessMockLocation" msgid="8688334974036823330">"用于测试的模拟位置源"</string> + <string name="permlab_accessMockLocation" msgid="8688334974036823330">"禁止使用位置来源进行测试"</string> <string name="permdesc_accessMockLocation" msgid="7648286063459727252">"创建用于测试的模拟位置源。恶意应用程序可借此替代真正的位置源(如 GPS 或网络提供商)返回的位置和/或状态。"</string> - <string name="permlab_accessLocationExtraCommands" msgid="2836308076720553837">"接收额外的位置提供者命令"</string> + <string name="permlab_accessLocationExtraCommands" msgid="2836308076720553837">"访问更多位置提供者的命令"</string> <string name="permdesc_accessLocationExtraCommands" msgid="1948144701382451721">"访问额外的位置提供程序命令。恶意应用程序可借此干扰 GPS 或其他位置源的运作。"</string> - <string name="permlab_installLocationProvider" msgid="6578101199825193873">"安装地点信息提供程序的权限"</string> + <string name="permlab_installLocationProvider" msgid="6578101199825193873">"安装位置信息提供程序"</string> <string name="permdesc_installLocationProvider" msgid="5449175116732002106">"创建用于测试的模拟地点信息源。恶意应用程序可借此覆盖真正的地点信息源(如 GPS 或网络提供商)返回的地点和/或状态,或者监视您的地点并向外部信息源报告。"</string> <string name="permlab_accessFineLocation" msgid="8116127007541369477">"精准位置 (GPS)"</string> <string name="permdesc_accessFineLocation" msgid="7411213317434337331">"访问精准的位置源,例如手机上的全球定位系统(如果适用)。恶意应用程序可能借此确定您所处的位置,并消耗额外的电池电量。"</string> @@ -313,9 +312,9 @@ <string name="permlab_hardware_test" msgid="4148290860400659146">"测试硬件"</string> <string name="permdesc_hardware_test" msgid="3668894686500081699">"允许应用程序控制各种用于硬件测试的外围设备。"</string> <string name="permlab_callPhone" msgid="3925836347681847954">"直接拨打电话号码"</string> - <string name="permdesc_callPhone" msgid="3369867353692722456">"允许应用程序在没有您干预的情况下呼叫电话号码。恶意应用程序可借此在您的话费单上产生意外通话费。请注意,此权限不允许应用程序呼叫紧急电话号码。"</string> + <string name="permdesc_callPhone" msgid="3369867353692722456">"允许应用程序在无人操作的情况下拨打电话。恶意应用程序可借此在您的话费单上产生意外通话费。请注意,此权限不允许应用程序拨打紧急电话。"</string> <string name="permlab_callPrivileged" msgid="4198349211108497879">"直接呼叫任何电话号码"</string> - <string name="permdesc_callPrivileged" msgid="244405067160028452">"允许应用程序在没有您干预的情况下呼叫任何电话号码(包括紧急电话号码)。恶意应用程序可借此对紧急服务拨打骚扰电话和非法电话。"</string> + <string name="permdesc_callPrivileged" msgid="244405067160028452">"允许应用程序在无人操作的情况下拨打任何电话(包括紧急电话)。恶意应用程序可借此向紧急服务拨打骚扰电话和非法电话。"</string> <string name="permlab_performCdmaProvisioning" msgid="5604848095315421425">"直接启动 CDMA 电话设置"</string> <string name="permdesc_performCdmaProvisioning" msgid="6457447676108355905">"允许应用程序启动 CDMA 服务。恶意应用程序可能会无端启动 CDMA 服务"</string> <string name="permlab_locationUpdates" msgid="7785408253364335740">"控制位置更新通知"</string> @@ -354,7 +353,7 @@ <string name="permdesc_useCredentials" msgid="7416570544619546974">"允许应用程序请求身份验证标记。"</string> <string name="permlab_accessNetworkState" msgid="6865575199464405769">"查看网络状态"</string> <string name="permdesc_accessNetworkState" msgid="558721128707712766">"允许应用程序查看所有网络的状态。"</string> - <string name="permlab_createNetworkSockets" msgid="9121633680349549585">"互联网完全访问"</string> + <string name="permlab_createNetworkSockets" msgid="9121633680349549585">"完全访问互联网"</string> <string name="permdesc_createNetworkSockets" msgid="4593339106921772192">"允许应用程序创建网络套接字。"</string> <string name="permlab_writeApnSettings" msgid="7823599210086622545">"写入接入点名称设置"</string> <string name="permdesc_writeApnSettings" msgid="7443433457842966680">"允许应用程序修改 APN 设置,例如任何 APN 的代理和端口。"</string> @@ -407,10 +406,10 @@ <item msgid="2374913952870110618">"自定义邮箱"</item> </string-array> <string-array name="postalAddressTypes"> - <item msgid="6880257626740047286">"住宅地址"</item> - <item msgid="5629153956045109251">"单位地址"</item> - <item msgid="4966604264500343469">"其他地址"</item> - <item msgid="4932682847595299369">"自定义地址"</item> + <item msgid="6880257626740047286">"住宅"</item> + <item msgid="5629153956045109251">"单位"</item> + <item msgid="4966604264500343469">"其他"</item> + <item msgid="4932682847595299369">"自定义"</item> </string-array> <string-array name="imAddressTypes"> <item msgid="1738585194601476694">"住宅聊天工具"</item> @@ -433,6 +432,58 @@ <item msgid="2506857312718630823">"ICQ"</item> <item msgid="1648797903785279353">"Jabber"</item> </string-array> + <string name="phoneTypeCustom" msgid="1644738059053355820">"自定义"</string> + <string name="phoneTypeHome" msgid="2570923463033985887">"住宅"</string> + <string name="phoneTypeMobile" msgid="6501463557754751037">"手机"</string> + <string name="phoneTypeWork" msgid="8863939667059911633">"单位"</string> + <string name="phoneTypeFaxWork" msgid="3517792160008890912">"单位传真"</string> + <string name="phoneTypeFaxHome" msgid="2067265972322971467">"住宅传真"</string> + <string name="phoneTypePager" msgid="7582359955394921732">"寻呼机"</string> + <string name="phoneTypeOther" msgid="1544425847868765990">"其他"</string> + <string name="phoneTypeCallback" msgid="2712175203065678206">"回拨号码"</string> + <string name="phoneTypeCar" msgid="8738360689616716982">"车载电话"</string> + <string name="phoneTypeCompanyMain" msgid="540434356461478916">"公司总机"</string> + <string name="phoneTypeIsdn" msgid="8022453193171370337">"ISDN"</string> + <string name="phoneTypeMain" msgid="6766137010628326916">"总机"</string> + <string name="phoneTypeOtherFax" msgid="8587657145072446565">"其他传真"</string> + <string name="phoneTypeRadio" msgid="4093738079908667513">"无线装置"</string> + <string name="phoneTypeTelex" msgid="3367879952476250512">"电报"</string> + <string name="phoneTypeTtyTdd" msgid="8606514378585000044">"TTY TDD"</string> + <string name="phoneTypeWorkMobile" msgid="1311426989184065709">"单位手机"</string> + <string name="phoneTypeWorkPager" msgid="649938731231157056">"单位寻呼机"</string> + <string name="phoneTypeAssistant" msgid="5596772636128562884">"助理"</string> + <string name="phoneTypeMms" msgid="7254492275502768992">"彩信"</string> + <string name="eventTypeBirthday" msgid="2813379844211390740">"生日"</string> + <string name="eventTypeAnniversary" msgid="3876779744518284000">"周年纪念"</string> + <string name="eventTypeOther" msgid="5834288791948564594">"活动"</string> + <string name="emailTypeCustom" msgid="8525960257804213846">"自定义"</string> + <string name="emailTypeHome" msgid="449227236140433919">"住宅"</string> + <string name="emailTypeWork" msgid="3548058059601149973">"单位"</string> + <string name="emailTypeOther" msgid="2923008695272639549">"其他"</string> + <string name="emailTypeMobile" msgid="119919005321166205">"手机"</string> + <string name="postalTypeCustom" msgid="8903206903060479902">"自定义"</string> + <string name="postalTypeHome" msgid="8165756977184483097">"住宅"</string> + <string name="postalTypeWork" msgid="5268172772387694495">"单位"</string> + <string name="postalTypeOther" msgid="2726111966623584341">"其他"</string> + <string name="imTypeCustom" msgid="2074028755527826046">"自定义"</string> + <string name="imTypeHome" msgid="6241181032954263892">"住宅"</string> + <string name="imTypeWork" msgid="1371489290242433090">"单位"</string> + <string name="imTypeOther" msgid="5377007495735915478">"其他"</string> + <string name="imProtocolCustom" msgid="6919453836618749992">"自定义"</string> + <string name="imProtocolAim" msgid="7050360612368383417">"AIM"</string> + <string name="imProtocolMsn" msgid="144556545420769442">"Windows Live"</string> + <string name="imProtocolYahoo" msgid="8271439408469021273">"雅虎"</string> + <string name="imProtocolSkype" msgid="9019296744622832951">"Skype"</string> + <string name="imProtocolQq" msgid="8887484379494111884">"QQ"</string> + <string name="imProtocolGoogleTalk" msgid="3808393979157698766">"Google Talk"</string> + <string name="imProtocolIcq" msgid="1574870433606517315">"ICQ"</string> + <string name="imProtocolJabber" msgid="2279917630875771722">"Jabber"</string> + <string name="imProtocolNetMeeting" msgid="8287625655986827971">"NetMeeting"</string> + <string name="orgTypeWork" msgid="29268870505363872">"公司"</string> + <string name="orgTypeOther" msgid="3951781131570124082">"其他"</string> + <string name="orgTypeCustom" msgid="225523415372088322">"自定义"</string> + <string name="contact_status_update_attribution" msgid="5112589886094402795">"通过 <xliff:g id="SOURCE">%1$s</xliff:g>"</string> + <string name="contact_status_update_attribution_with_date" msgid="5945386376369979909">"时间:<xliff:g id="DATE">%1$s</xliff:g>,方式:<xliff:g id="SOURCE">%2$s</xliff:g>"</string> <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"输入 PIN 码"</string> <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"PIN 码不正确!"</string> <string name="keyguard_label_text" msgid="861796461028298424">"要解锁,请先按 MENU 再按 0。"</string> @@ -446,15 +497,16 @@ <string name="lockscreen_pattern_correct" msgid="9039008650362261237">"正确!"</string> <string name="lockscreen_pattern_wrong" msgid="4817583279053112312">"很抱歉,请重试"</string> <string name="lockscreen_plugged_in" msgid="613343852842944435">"正在充电 (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string> - <string name="lockscreen_charged" msgid="4938930459620989972">"电已充满。"</string> + <string name="lockscreen_charged" msgid="4938930459620989972">"已充满。"</string> + <string name="lockscreen_battery_short" msgid="3617549178603354656">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string> <string name="lockscreen_low_battery" msgid="1482873981919249740">"连接您的充电器。"</string> - <string name="lockscreen_missing_sim_message_short" msgid="7381499217732227295">"没有 SIM 卡。"</string> - <string name="lockscreen_missing_sim_message" msgid="2186920585695169078">"手机中无 SIM 卡。"</string> - <string name="lockscreen_missing_sim_instructions" msgid="8874620818937719067">"请插入 SIM 卡。"</string> + <string name="lockscreen_missing_sim_message_short" msgid="7381499217732227295">"没有 SIM 卡"</string> + <string name="lockscreen_missing_sim_message" msgid="2186920585695169078">"手机中无 SIM 卡"</string> + <string name="lockscreen_missing_sim_instructions" msgid="8874620818937719067">"请插入 SIM 卡"</string> <string name="lockscreen_network_locked_message" msgid="143389224986028501">"网络已锁定"</string> - <string name="lockscreen_sim_puk_locked_message" msgid="7441797339976230">"SIM 卡被 PUK 锁定。"</string> + <string name="lockscreen_sim_puk_locked_message" msgid="7441797339976230">"SIM 卡被 PUK 锁定"</string> <string name="lockscreen_sim_puk_locked_instructions" msgid="635967534992394321">"请参阅《用户指南》或联系客服人员。"</string> - <string name="lockscreen_sim_locked_message" msgid="8066660129206001039">"SIM 卡被锁定。"</string> + <string name="lockscreen_sim_locked_message" msgid="8066660129206001039">"SIM 卡被锁定"</string> <string name="lockscreen_sim_unlock_progress_dialog_message" msgid="595323214052881264">"正在解锁 SIM 卡..."</string> <string name="lockscreen_too_many_failed_attempts_dialog_message" msgid="3514742106066877476">"您已经 <xliff:g id="NUMBER_0">%d</xliff:g> 次错误地绘制了解锁图案。"\n\n"请在 <xliff:g id="NUMBER_1">%d</xliff:g> 秒后重试。"</string> <string name="lockscreen_failed_attempts_almost_glogin" msgid="3351013842320127827">"您已经 <xliff:g id="NUMBER_0">%d</xliff:g> 次错误地绘制了解锁图案。如果再尝试 <xliff:g id="NUMBER_1">%d</xliff:g> 次后仍不成功,系统会要求您使用自己的 Google 登录信息解锁手机。"\n\n"请在 <xliff:g id="NUMBER_2">%d</xliff:g> 秒后重试。"</string> @@ -478,7 +530,7 @@ <string name="battery_status_charging" msgid="756617993998772213">"正在充电..."</string> <string name="battery_low_title" msgid="7923774589611311406">"请连接充电器"</string> <string name="battery_low_subtitle" msgid="7388781709819722764">"电量在减少:"</string> - <string name="battery_low_percent_format" msgid="6564958083485073855">"剩余电量不足 <xliff:g id="NUMBER">%d%%</xliff:g>。"</string> + <string name="battery_low_percent_format" msgid="696154104579022959">"电量剩余 <xliff:g id="NUMBER">%d%%</xliff:g> 或更少。"</string> <string name="battery_low_why" msgid="7279169609518386372">"电量使用情况"</string> <string name="factorytest_failed" msgid="5410270329114212041">"出厂测试失败"</string> <string name="factorytest_not_system" msgid="4435201656767276723">"只有 /system/app 中安装的包支持 FACTORY_TEST 操作。"</string> @@ -488,6 +540,7 @@ <string name="js_dialog_title_default" msgid="6961903213729667573">"JavaScript"</string> <string name="js_dialog_before_unload" msgid="1901675448179653089">"是否从该页面导航至它处?"\n\n"<xliff:g id="MESSAGE">%s</xliff:g>"\n\n"选择“确定”继续,或选择“取消”留在当前页面。"</string> <string name="save_password_label" msgid="6860261758665825069">"确认"</string> + <string name="double_tap_toast" msgid="1068216937244567247">"提示:点按两次可放大和缩小。"</string> <string name="permlab_readHistoryBookmarks" msgid="1284843728203412135">"读取浏览器的历史记录和书签"</string> <string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"允许应用程序读取用浏览器访问过的所有网址,以及浏览器的所有书签。"</string> <string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"写入浏览器的历史记录和书签"</string> @@ -614,16 +667,16 @@ <string name="addToDictionary" msgid="8793624991686948709">"将“<xliff:g id="WORD">%s</xliff:g>”添加到词典"</string> <string name="editTextMenuTitle" msgid="1672989176958581452">"编辑文字"</string> <string name="low_internal_storage_view_title" msgid="1399732408701697546">"空间不足"</string> - <string name="low_internal_storage_view_text" msgid="635106544616378836">"手机存储空间正在减少。"</string> + <string name="low_internal_storage_view_text" msgid="635106544616378836">"手机内存空间正在减少。"</string> <string name="ok" msgid="5970060430562524910">"确定"</string> <string name="cancel" msgid="6442560571259935130">"取消"</string> <string name="yes" msgid="5362982303337969312">"确定"</string> <string name="no" msgid="5141531044935541497">"取消"</string> <string name="dialog_alert_title" msgid="2049658708609043103">"注意事项"</string> - <string name="capital_on" msgid="1544682755514494298">"开启"</string> + <string name="capital_on" msgid="1544682755514494298">"打开"</string> <string name="capital_off" msgid="6815870386972805832">"关闭"</string> - <string name="whichApplication" msgid="4533185947064773386">"使用以下内容完成操作"</string> - <string name="alwaysUse" msgid="4583018368000610438">"默认用于执行此操作。"</string> + <string name="whichApplication" msgid="4533185947064773386">"使用以下方式发送"</string> + <string name="alwaysUse" msgid="4583018368000610438">"默认使用此方式发送。"</string> <string name="clearDefaultHintMsg" msgid="4815455344600932173">"清除“主屏幕设置”>“应用程序”>“管理应用程序”中的默认设置。"</string> <string name="chooseActivity" msgid="1009246475582238425">"选择一项操作"</string> <string name="noApplications" msgid="1691104391758345586">"没有应用程序可执行此操作。"</string> @@ -680,7 +733,7 @@ <string name="usb_storage_button_unmount" msgid="6092146330053864766">"不安装"</string> <string name="usb_storage_error_message" msgid="2534784751603345363">"使用 SD 卡进行 USB 存储时出现问题。"</string> <string name="usb_storage_notification_title" msgid="8175892554757216525">"USB 已连接"</string> - <string name="usb_storage_notification_message" msgid="7380082404288219341">"选择以将文件复制到计算机/从计算机复制文件。"</string> + <string name="usb_storage_notification_message" msgid="7380082404288219341">"选择将文件复制到计算机/从计算机复制到存储设备。"</string> <string name="usb_storage_stop_notification_title" msgid="2336058396663516017">"关闭 USB 存储设备"</string> <string name="usb_storage_stop_notification_message" msgid="2591813490269841539">"选中以关闭 USB 存储设备。"</string> <string name="usb_storage_stop_title" msgid="6014127947456185321">"关闭 USB 存储设备"</string> @@ -691,11 +744,9 @@ <string name="extmedia_format_title" msgid="8663247929551095854">"格式化 SD 卡"</string> <string name="extmedia_format_message" msgid="3621369962433523619">"您确定要格式化 SD 卡?卡上的所有数据都会丢失。"</string> <string name="extmedia_format_button_format" msgid="4131064560127478695">"格式化"</string> - <string name="adb_active_notification_title" msgid="6729044778949189918">"已连接 USB 调试接口"</string> - <!-- no translation found for adb_active_notification_message (8470296818270110396) --> - <skip /> - <!-- no translation found for select_input_method (6865512749462072765) --> - <skip /> + <string name="adb_active_notification_title" msgid="6729044778949189918">"已连接 USB 调试"</string> + <string name="adb_active_notification_message" msgid="8470296818270110396">"选择停用 USB 调试。"</string> + <string name="select_input_method" msgid="6865512749462072765">"选择输入法"</string> <string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string> <string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string> <string name="candidates_style" msgid="4333913089637062257"><u>"候选"</u></string> @@ -731,11 +782,14 @@ <string name="allow" msgid="7225948811296386551">"允许"</string> <string name="deny" msgid="2081879885755434506">"拒绝"</string> <string name="permission_request_notification_title" msgid="5390555465778213840">"已请求权限"</string> - <!-- no translation found for permission_request_notification_with_subtitle (4325409589686688000) --> - <skip /> + <string name="permission_request_notification_with_subtitle" msgid="4325409589686688000">"已为帐户<xliff:g id="ACCOUNT">%s</xliff:g>"\n"请求了权限"</string> <string name="input_method_binding_label" msgid="1283557179944992649">"输入法"</string> <string name="sync_binding_label" msgid="3687969138375092423">"同步"</string> <string name="accessibility_binding_label" msgid="4148120742096474641">"辅助功能"</string> <string name="wallpaper_binding_label" msgid="1240087844304687662">"壁纸"</string> <string name="chooser_wallpaper" msgid="7873476199295190279">"更改壁纸"</string> + <string name="pptp_vpn_description" msgid="2688045385181439401">"点对点隧道协议"</string> + <string name="l2tp_vpn_description" msgid="3750692169378923304">"第 2 层隧道协议"</string> + <string name="l2tp_ipsec_psk_vpn_description" msgid="3945043564008303239">"基于预共享密钥的 L2TP/IPSec VPN"</string> + <string name="l2tp_ipsec_crt_vpn_description" msgid="5382714073103653577">"基于证书的 L2TP/IPSec VPN"</string> </resources> diff --git a/core/res/res/values-zh-rTW/strings.xml b/core/res/res/values-zh-rTW/strings.xml index 8f9f310e5a17..da02fe7bd7c2 100644 --- a/core/res/res/values-zh-rTW/strings.xml +++ b/core/res/res/values-zh-rTW/strings.xml @@ -111,8 +111,7 @@ <string name="httpErrorFile" msgid="8250549644091165175">"無法存取此檔案。"</string> <string name="httpErrorFileNotFound" msgid="5588380756326017105">"找不到要求的檔案。"</string> <string name="httpErrorTooManyRequests" msgid="1235396927087188253">"太多執行要求。請稍後再試一次。"</string> - <!-- no translation found for notification_title (1259940370369187045) --> - <skip /> + <string name="notification_title" msgid="1259940370369187045">"<xliff:g id="ACCOUNT">%1$s</xliff:g>登入錯誤"</string> <string name="contentServiceSync" msgid="8353523060269335667">"同步處理"</string> <string name="contentServiceSyncNotificationTitle" msgid="397743349191901458">"同步處理"</string> <string name="contentServiceTooManyDeletesNotificationDesc" msgid="8100981435080696431">"同時刪除太多 <xliff:g id="CONTENT_TYPE">%s</xliff:g>。"</string> @@ -148,8 +147,8 @@ <string name="permgroupdesc_location" msgid="2430258821648348660">"監視實際位置"</string> <string name="permgrouplab_network" msgid="5808983377727109831">"網路通訊"</string> <string name="permgroupdesc_network" msgid="5035763698958415998">"允許應用程式存取多項網路功能。"</string> - <string name="permgrouplab_accounts" msgid="7140261692496314430">"您的 Google 帳戶"</string> - <string name="permgroupdesc_accounts" msgid="6735915929704895193">"存取可用 Google 帳戶。"</string> + <string name="permgrouplab_accounts" msgid="3359646291125325519">"您的帳戶"</string> + <string name="permgroupdesc_accounts" msgid="4948732641827091312">"存取可用帳戶。"</string> <string name="permgrouplab_hardwareControls" msgid="7998214968791599326">"硬體控制"</string> <string name="permgroupdesc_hardwareControls" msgid="4357057861225462702">"在免持設備上直接存取硬體。"</string> <string name="permgrouplab_phoneCalls" msgid="9067173988325865923">"撥打電話"</string> @@ -433,6 +432,58 @@ <item msgid="2506857312718630823">"ICQ"</item> <item msgid="1648797903785279353">"Jabber"</item> </string-array> + <string name="phoneTypeCustom" msgid="1644738059053355820">"自訂"</string> + <string name="phoneTypeHome" msgid="2570923463033985887">"住家"</string> + <string name="phoneTypeMobile" msgid="6501463557754751037">"行動裝置"</string> + <string name="phoneTypeWork" msgid="8863939667059911633">"公司"</string> + <string name="phoneTypeFaxWork" msgid="3517792160008890912">"公司傳真"</string> + <string name="phoneTypeFaxHome" msgid="2067265972322971467">"住家傳真"</string> + <string name="phoneTypePager" msgid="7582359955394921732">"呼叫器"</string> + <string name="phoneTypeOther" msgid="1544425847868765990">"其他"</string> + <string name="phoneTypeCallback" msgid="2712175203065678206">"回撥電話"</string> + <string name="phoneTypeCar" msgid="8738360689616716982">"汽車電話"</string> + <string name="phoneTypeCompanyMain" msgid="540434356461478916">"公司代表號"</string> + <string name="phoneTypeIsdn" msgid="8022453193171370337">"ISDN"</string> + <string name="phoneTypeMain" msgid="6766137010628326916">"代表號"</string> + <string name="phoneTypeOtherFax" msgid="8587657145072446565">"其他傳真"</string> + <string name="phoneTypeRadio" msgid="4093738079908667513">"無線電"</string> + <string name="phoneTypeTelex" msgid="3367879952476250512">"Telex"</string> + <string name="phoneTypeTtyTdd" msgid="8606514378585000044">"TTY/TDD"</string> + <string name="phoneTypeWorkMobile" msgid="1311426989184065709">"公司行動電話"</string> + <string name="phoneTypeWorkPager" msgid="649938731231157056">"公司呼叫器"</string> + <string name="phoneTypeAssistant" msgid="5596772636128562884">"助理"</string> + <string name="phoneTypeMms" msgid="7254492275502768992">"MMS"</string> + <string name="eventTypeBirthday" msgid="2813379844211390740">"生日"</string> + <string name="eventTypeAnniversary" msgid="3876779744518284000">"週年紀念日"</string> + <string name="eventTypeOther" msgid="5834288791948564594">"活動"</string> + <string name="emailTypeCustom" msgid="8525960257804213846">"自訂"</string> + <string name="emailTypeHome" msgid="449227236140433919">"住家"</string> + <string name="emailTypeWork" msgid="3548058059601149973">"公司"</string> + <string name="emailTypeOther" msgid="2923008695272639549">"其他"</string> + <string name="emailTypeMobile" msgid="119919005321166205">"行動裝置"</string> + <string name="postalTypeCustom" msgid="8903206903060479902">"自訂"</string> + <string name="postalTypeHome" msgid="8165756977184483097">"住家"</string> + <string name="postalTypeWork" msgid="5268172772387694495">"公司"</string> + <string name="postalTypeOther" msgid="2726111966623584341">"其他"</string> + <string name="imTypeCustom" msgid="2074028755527826046">"自訂"</string> + <string name="imTypeHome" msgid="6241181032954263892">"住家"</string> + <string name="imTypeWork" msgid="1371489290242433090">"公司"</string> + <string name="imTypeOther" msgid="5377007495735915478">"其他"</string> + <string name="imProtocolCustom" msgid="6919453836618749992">"自訂"</string> + <string name="imProtocolAim" msgid="7050360612368383417">"AIM"</string> + <string name="imProtocolMsn" msgid="144556545420769442">"Windows Live"</string> + <string name="imProtocolYahoo" msgid="8271439408469021273">"Yahoo"</string> + <string name="imProtocolSkype" msgid="9019296744622832951">"Skype"</string> + <string name="imProtocolQq" msgid="8887484379494111884">"QQ"</string> + <string name="imProtocolGoogleTalk" msgid="3808393979157698766">"Google Talk"</string> + <string name="imProtocolIcq" msgid="1574870433606517315">"ICQ"</string> + <string name="imProtocolJabber" msgid="2279917630875771722">"Jabber"</string> + <string name="imProtocolNetMeeting" msgid="8287625655986827971">"網路會議"</string> + <string name="orgTypeWork" msgid="29268870505363872">"公司"</string> + <string name="orgTypeOther" msgid="3951781131570124082">"其他"</string> + <string name="orgTypeCustom" msgid="225523415372088322">"自訂"</string> + <string name="contact_status_update_attribution" msgid="5112589886094402795">"透過 <xliff:g id="SOURCE">%1$s</xliff:g>"</string> + <string name="contact_status_update_attribution_with_date" msgid="5945386376369979909">"<xliff:g id="DATE">%1$s</xliff:g>透過「<xliff:g id="SOURCE">%2$s</xliff:g>」"</string> <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"輸入 PIN 碼"</string> <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"PIN 碼錯誤!"</string> <string name="keyguard_label_text" msgid="861796461028298424">"如要解鎖,請按 Menu 鍵,然後按 0。"</string> @@ -447,6 +498,7 @@ <string name="lockscreen_pattern_wrong" msgid="4817583279053112312">"很抱歉,請再試一次"</string> <string name="lockscreen_plugged_in" msgid="613343852842944435">"正在充電 (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string> <string name="lockscreen_charged" msgid="4938930459620989972">"充電完成。"</string> + <string name="lockscreen_battery_short" msgid="3617549178603354656">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string> <string name="lockscreen_low_battery" msgid="1482873981919249740">"請連接充電器。"</string> <string name="lockscreen_missing_sim_message_short" msgid="7381499217732227295">"沒有 SIM 卡。"</string> <string name="lockscreen_missing_sim_message" msgid="2186920585695169078">"手機未插入 SIM 卡。"</string> @@ -478,7 +530,7 @@ <string name="battery_status_charging" msgid="756617993998772213">"充電中"</string> <string name="battery_low_title" msgid="7923774589611311406">"請連接充電器"</string> <string name="battery_low_subtitle" msgid="7388781709819722764">"電池電量即將不足:"</string> - <string name="battery_low_percent_format" msgid="6564958083485073855">"電池電量不到 <xliff:g id="NUMBER">%d%%</xliff:g>。"</string> + <string name="battery_low_percent_format" msgid="696154104579022959">"還剩 <xliff:g id="NUMBER">%d%%</xliff:g> 以下。"</string> <string name="battery_low_why" msgid="7279169609518386372">"電池使用狀況"</string> <string name="factorytest_failed" msgid="5410270329114212041">"出廠測試失敗"</string> <string name="factorytest_not_system" msgid="4435201656767276723">"只有安裝在 /system/app 裡的程式才能支援 FACTORY_TEST 操作。"</string> @@ -488,6 +540,7 @@ <string name="js_dialog_title_default" msgid="6961903213729667573">"JavaScript"</string> <string name="js_dialog_before_unload" msgid="1901675448179653089">"離開此頁?"\n\n"<xliff:g id="MESSAGE">%s</xliff:g>"\n\n" 選取 [確定] 離開此頁;或 [取消] 留在此頁。"</string> <string name="save_password_label" msgid="6860261758665825069">"確認"</string> + <string name="double_tap_toast" msgid="1068216937244567247">"提示:輕按兩下可放大縮小。"</string> <string name="permlab_readHistoryBookmarks" msgid="1284843728203412135">"讀取瀏覽器的記錄與書籤"</string> <string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"允許應用程式讀取瀏覽器曾經造訪過的所有網址,以及瀏覽器的所有書籤。"</string> <string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"寫入瀏覽器的記錄與書籤"</string> @@ -692,10 +745,8 @@ <string name="extmedia_format_message" msgid="3621369962433523619">"確定要將 SD 卡格式化嗎?該 SD 卡中的所有資料將會遺失。"</string> <string name="extmedia_format_button_format" msgid="4131064560127478695">"格式化"</string> <string name="adb_active_notification_title" msgid="6729044778949189918">"USB 偵錯模式已啟用"</string> - <!-- no translation found for adb_active_notification_message (8470296818270110396) --> - <skip /> - <!-- no translation found for select_input_method (6865512749462072765) --> - <skip /> + <string name="adb_active_notification_message" msgid="8470296818270110396">"選取以停用 USB 偵錯。"</string> + <string name="select_input_method" msgid="6865512749462072765">"選取輸入方式"</string> <string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string> <string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string> <string name="candidates_style" msgid="4333913089637062257"><u>"待選項目"</u></string> @@ -731,11 +782,14 @@ <string name="allow" msgid="7225948811296386551">"允許"</string> <string name="deny" msgid="2081879885755434506">"拒絕"</string> <string name="permission_request_notification_title" msgid="5390555465778213840">"已要求權限"</string> - <!-- no translation found for permission_request_notification_with_subtitle (4325409589686688000) --> - <skip /> + <string name="permission_request_notification_with_subtitle" msgid="4325409589686688000">"帳戶 <xliff:g id="ACCOUNT">%s</xliff:g> 的"\n"權限要求"</string> <string name="input_method_binding_label" msgid="1283557179944992649">"輸入方式"</string> <string name="sync_binding_label" msgid="3687969138375092423">"同步處理"</string> <string name="accessibility_binding_label" msgid="4148120742096474641">"協助工具"</string> <string name="wallpaper_binding_label" msgid="1240087844304687662">"桌布"</string> <string name="chooser_wallpaper" msgid="7873476199295190279">"變更桌布"</string> + <string name="pptp_vpn_description" msgid="2688045385181439401">"點對點通道通訊協定"</string> + <string name="l2tp_vpn_description" msgid="3750692169378923304">"第二層通道通訊協定"</string> + <string name="l2tp_ipsec_psk_vpn_description" msgid="3945043564008303239">"採用預先共用金鑰的 L2TP/IPSec VPN"</string> + <string name="l2tp_ipsec_crt_vpn_description" msgid="5382714073103653577">"採用憑證的 L2TP/IPSec VPN"</string> </resources> diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml index 8aab59558546..81da739eba13 100644 --- a/core/res/res/values/attrs.xml +++ b/core/res/res/values/attrs.xml @@ -3474,8 +3474,7 @@ referenced from its {@link android.service.wallpaper.WallpaperService#SERVICE_META_DATA} meta-data entry. Described here are the attributes that can be - included in that tag. - @hide Live Wallpaper --> + included in that tag. --> <declare-styleable name="Wallpaper"> <!-- Component name of an activity that allows the user to modify the current settings for this wallpaper. --> @@ -3483,6 +3482,12 @@ <!-- Reference to a the wallpaper's thumbnail bitmap. --> <attr name="thumbnail" format="reference" /> + + <!-- Name of the author of a wallpaper, e.g. Google. --> + <attr name="wallpaperAuthor" format="reference" /> + + <!-- Short description of the wallpaper's purpose or behavior. --> + <attr name="wallpaperDescription" format="reference" /> </declare-styleable> <!-- =============================== --> diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index c87a11c6de53..90582214bfec 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -40,6 +40,10 @@ <!-- The duration (in milliseconds) of a long animation. --> <integer name="config_longAnimTime">400</integer> + <!-- The duration (in milliseconds) that the radio will scan for a signal + when there's no network connection. If the scan doesn't timeout, use zero --> + <integer name="config_radioScanningTimeout">0</integer> + <!-- XXXXX NOTE THE FOLLOWING RESOURCES USE THE WRONG NAMING CONVENTION. Please don't copy them, copy anything else. --> @@ -67,7 +71,8 @@ the slider can be opened (for example, in a pocket or purse). --> <bool name="config_bypass_keyguard_if_slider_open">true</bool> - <!-- Flag indicating whether the device supports automatic brightness mode. --> + <!-- Flag indicating whether the we should enable the automatic brightness in Settings. + Software implementation will be used if config_hardware_auto_brightness_available is not set --> <bool name="config_automatic_brightness_available">false</bool> <!-- XXXXXX END OF RESOURCES USING WRONG NAMING CONVENTION --> @@ -160,4 +165,41 @@ <!-- Control whether status bar should distinguish HSPA data icon form UMTS data icon on devices --> <bool name="config_hspa_data_distinguishable">false</bool> + + <!-- Array of light sensor LUX values to define our levels for auto backlight brightness support. + The N entries of this array define N + 1 zones as follows: + + Zone 0: 0 <= LUX < array[0] + Zone 1: array[0] <= LUX < array[1] + ... + Zone N: array[N - 1] <= LUX < array[N] + Zone N + 1: array[N] <= LUX < infinity + + Must be overridden in platform specific overlays --> + <integer-array name="config_autoBrightnessLevels"> + </integer-array> + + <!-- Array of output values for LCD backlight corresponding to the LUX values + in the config_autoBrightnessLevels array. This array should have size one greater + than the size of the config_autoBrightnessLevels array. + This must be overridden in platform specific overlays --> + <integer-array name="config_autoBrightnessLcdBacklightValues"> + </integer-array> + + <!-- Array of output values for button backlight corresponding to the LUX values + in the config_autoBrightnessLevels array. This array should have size one greater + than the size of the config_autoBrightnessLevels array. + This must be overridden in platform specific overlays --> + <integer-array name="config_autoBrightnessButtonBacklightValues"> + </integer-array> + + <!-- Array of output values for keyboard backlight corresponding to the LUX values + in the config_autoBrightnessLevels array. This array should have size one greater + than the size of the config_autoBrightnessLevels array. + This must be overridden in platform specific overlays --> + <integer-array name="config_autoBrightnessKeyboardBacklightValues"> + </integer-array> + + <!-- Enables swipe versus poly-finger touch disambiguation in the KeyboardView --> + <bool name="config_swipeDisambiguation">true</bool> </resources> diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml index 52e3200211eb..5eb1c8e2345e 100644 --- a/core/res/res/values/public.xml +++ b/core/res/res/values/public.xml @@ -1194,4 +1194,15 @@ <public type="drawable" name="screen_background_dark_transparent" /> <public type="drawable" name="screen_background_light_transparent" /> <public type="drawable" name="stat_notify_sdcard_prepare" /> + + <public type="attr" name="quickContactBadgeStyleWindowSmall" /> + <public type="attr" name="quickContactBadgeStyleWindowMedium" /> + <public type="attr" name="quickContactBadgeStyleWindowLarge" /> + <public type="attr" name="quickContactBadgeStyleSmallWindowSmall" /> + <public type="attr" name="quickContactBadgeStyleSmallWindowMedium" /> + <public type="attr" name="quickContactBadgeStyleSmallWindowLarge" /> + + <public type="attr" name="wallpaperAuthor" /> + <public type="attr" name="wallpaperDescription" /> + </resources> diff --git a/core/res/res/xml/power_profile.xml b/core/res/res/xml/power_profile.xml index 710b71ea7e75..ce623e8d4d35 100644 --- a/core/res/res/xml/power_profile.xml +++ b/core/res/res/xml/power_profile.xml @@ -29,10 +29,12 @@ <item name="dsp.audio">0.1</item> <item name="dsp.video">0.1</item> <item name="radio.active">1</item> + <!-- The current consumed by the radio when it is scanning for a signal --> + <item name="radio.scanning">0.5</item> <item name="gps.on">1</item> <!-- Current consumed by the radio at different signal strengths, when paging --> <array name="radio.on"> <!-- Strength 0 to BINS-1 --> - <value>1</value> + <value>0.2</value> <value>0.1</value> </array> <!-- Different CPU speeds as reported in diff --git a/data/sounds/ringtones/FreeFlight.ogg b/data/sounds/ringtones/FreeFlight.ogg Binary files differnew file mode 100644 index 000000000000..76dfabe619ed --- /dev/null +++ b/data/sounds/ringtones/FreeFlight.ogg diff --git a/data/sounds/ringtones/FreeFlight.wav b/data/sounds/ringtones/FreeFlight.wav Binary files differnew file mode 100644 index 000000000000..a4e14aacc7bd --- /dev/null +++ b/data/sounds/ringtones/FreeFlight.wav diff --git a/graphics/java/android/graphics/TableMaskFilter.java b/graphics/java/android/graphics/TableMaskFilter.java new file mode 100644 index 000000000000..a8a7ff0528e1 --- /dev/null +++ b/graphics/java/android/graphics/TableMaskFilter.java @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2006 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.graphics; + +/** + * @hide + */ +public class TableMaskFilter extends MaskFilter { + + public TableMaskFilter(byte[] table) { + if (table.length < 256) { + throw new RuntimeException("table.length must be >= 256"); + } + native_instance = nativeNewTable(table); + } + + private TableMaskFilter(int ni) { + native_instance = ni; + } + + public static TableMaskFilter CreateClipTable(int min, int max) { + return new TableMaskFilter(nativeNewClip(min, max)); + } + + public static TableMaskFilter CreateGammaTable(float gamma) { + return new TableMaskFilter(nativeNewGamma(gamma)); + } + + private static native int nativeNewTable(byte[] table); + private static native int nativeNewClip(int min, int max); + private static native int nativeNewGamma(float gamma); +} diff --git a/graphics/java/android/renderscript/ProgramStore.java b/graphics/java/android/renderscript/ProgramStore.java index b7d987efbb1a..5cbe1b29415a 100644 --- a/graphics/java/android/renderscript/ProgramStore.java +++ b/graphics/java/android/renderscript/ProgramStore.java @@ -49,7 +49,7 @@ public class ProgramStore extends BaseObj { SRC_ALPHA (4), ONE_MINUS_SRC_ALPHA (5), DST_ALPHA (6), - ONE_MINUS_DST_ALPA (7), + ONE_MINUS_DST_ALPHA (7), SRC_ALPHA_SATURATE (8); int mID; @@ -66,7 +66,7 @@ public class ProgramStore extends BaseObj { SRC_ALPHA (4), ONE_MINUS_SRC_ALPHA (5), DST_ALPHA (6), - ONE_MINUS_DST_ALPA (7); + ONE_MINUS_DST_ALPHA (7); int mID; BlendDstFunc(int id) { diff --git a/graphics/java/android/renderscript/RSSurfaceView.java b/graphics/java/android/renderscript/RSSurfaceView.java index 53466cc5f0b9..1bc03ac34382 100644 --- a/graphics/java/android/renderscript/RSSurfaceView.java +++ b/graphics/java/android/renderscript/RSSurfaceView.java @@ -80,6 +80,9 @@ public class RSSurfaceView extends SurfaceView implements SurfaceHolder.Callback */ public void surfaceDestroyed(SurfaceHolder holder) { // Surface will be destroyed when we return + if (mRS != null) { + mRS.contextSetSurface(null); + } //Log.v(RenderScript.LOG_TAG, "surfaceDestroyed"); } @@ -88,6 +91,9 @@ 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) { + if (mRS != null) { + mRS.contextSetSurface(holder.getSurface()); + } //Log.v(RenderScript.LOG_TAG, "surfaceChanged"); } diff --git a/graphics/java/android/renderscript/RenderScript.java b/graphics/java/android/renderscript/RenderScript.java index 1f2ea38faf9c..f1e5af1eb540 100644 --- a/graphics/java/android/renderscript/RenderScript.java +++ b/graphics/java/android/renderscript/RenderScript.java @@ -64,6 +64,7 @@ public class RenderScript { native void nDeviceSetConfig(int dev, int param, int value); native int nContextCreate(int dev, Surface sur, int ver, boolean useDepth); native void nContextDestroy(int con); + native void nContextSetSurface(Surface sur); native void nContextBindRootScript(int script); native void nContextBindSampler(int sampler, int slot); @@ -276,6 +277,11 @@ public class RenderScript { mMessageThread.start(); } + public void contextSetSurface(Surface sur) { + mSurface = sur; + nContextSetSurface(mSurface); + } + public void destroy() { nContextDeinitToClient(); mMessageThread.mRun = false; diff --git a/graphics/java/android/renderscript/SimpleMesh.java b/graphics/java/android/renderscript/SimpleMesh.java index 0ad093e57978..3d10e3bf0721 100644 --- a/graphics/java/android/renderscript/SimpleMesh.java +++ b/graphics/java/android/renderscript/SimpleMesh.java @@ -228,17 +228,17 @@ public class SimpleMesh extends BaseObj { mVtxData[mVtxCount++] = mB; mVtxData[mVtxCount++] = mA; } + if ((mFlags & TEXTURE_0) != 0) { + makeSpace(2); + mVtxData[mVtxCount++] = mS0; + mVtxData[mVtxCount++] = mT0; + } if ((mFlags & NORMAL) != 0) { makeSpace(3); mVtxData[mVtxCount++] = mNX; mVtxData[mVtxCount++] = mNY; mVtxData[mVtxCount++] = mNZ; } - if ((mFlags & TEXTURE_0) != 0) { - makeSpace(2); - mVtxData[mVtxCount++] = mS0; - mVtxData[mVtxCount++] = mT0; - } } public void addVertex(float x, float y) { diff --git a/graphics/jni/android_renderscript_RenderScript.cpp b/graphics/jni/android_renderscript_RenderScript.cpp index fa3baa200fe3..f3dda417e064 100644 --- a/graphics/jni/android_renderscript_RenderScript.cpp +++ b/graphics/jni/android_renderscript_RenderScript.cpp @@ -171,6 +171,24 @@ nContextCreate(JNIEnv *_env, jobject _this, jint dev, jobject wnd, jint ver, jbo } static void +nContextSetSurface(JNIEnv *_env, jobject _this, jobject wnd) +{ + RsContext con = (RsContext)(_env->GetIntField(_this, gContextId)); + LOG_API("nContextSetSurface, con(%p), surface(%p)", con, (Surface *)wnd); + + Surface * window = NULL; + if (wnd == NULL) { + + } else { + jclass surface_class = _env->FindClass("android/view/Surface"); + jfieldID surfaceFieldID = _env->GetFieldID(surface_class, "mSurface", "I"); + window = (Surface*)_env->GetIntField(wnd, surfaceFieldID); + } + + rsContextSetSurface(con, window); +} + +static void nContextDestroy(JNIEnv *_env, jobject _this, jint con) { LOG_API("nContextDestroy, con(%p)", (RsContext)con); @@ -1328,6 +1346,7 @@ static JNINativeMethod methods[] = { {"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 }, {"nContextDestroy", "(I)V", (void*)nContextDestroy }, {"nContextPause", "()V", (void*)nContextPause }, {"nContextResume", "()V", (void*)nContextResume }, diff --git a/include/binder/MemoryHeapBase.h b/include/binder/MemoryHeapBase.h index 435540e8c60c..d793c240f95f 100644 --- a/include/binder/MemoryHeapBase.h +++ b/include/binder/MemoryHeapBase.h @@ -35,7 +35,8 @@ public: MAP_ONCE = IMemoryHeap::MAP_ONCE, // memory won't be mapped locally, but will be mapped in the remote // process. - DONT_MAP_LOCALLY = 0x00000100 + DONT_MAP_LOCALLY = 0x00000100, + NO_CACHING = 0x00000200 }; /* diff --git a/include/media/AudioRecord.h b/include/media/AudioRecord.h index 503cb315246f..008468c91b09 100644 --- a/include/media/AudioRecord.h +++ b/include/media/AudioRecord.h @@ -314,6 +314,11 @@ private: }; bool processAudioBuffer(const sp<ClientRecordThread>& thread); + status_t openRecord(uint32_t sampleRate, + int format, + int channelCount, + int frameCount, + uint32_t flags); sp<IAudioRecord> mAudioRecord; sp<IMemory> mCblkMemory; @@ -341,6 +346,7 @@ private: uint32_t mNewPosition; uint32_t mUpdatePeriod; audio_io_handle_t mInput; + uint32_t mFlags; }; }; // namespace android diff --git a/include/media/AudioSystem.h b/include/media/AudioSystem.h index 57f8102d5776..e0661778c3e3 100644 --- a/include/media/AudioSystem.h +++ b/include/media/AudioSystem.h @@ -220,6 +220,7 @@ public: static status_t getInputBufferSize(uint32_t sampleRate, int format, int channelCount, size_t* buffSize); + static status_t setVoiceVolume(float volume); // // AudioPolicyService interface @@ -256,11 +257,12 @@ public: DEVICE_IN_WIRED_HEADSET = 0x100000, DEVICE_IN_AUX_DIGITAL = 0x200000, DEVICE_IN_VOICE_CALL = 0x400000, + DEVICE_IN_BACK_MIC = 0x800000, DEVICE_IN_DEFAULT = 0x80000000, DEVICE_IN_ALL = (DEVICE_IN_COMMUNICATION | DEVICE_IN_AMBIENT | DEVICE_IN_BUILTIN_MIC | DEVICE_IN_BLUETOOTH_SCO_HEADSET | DEVICE_IN_WIRED_HEADSET | DEVICE_IN_AUX_DIGITAL | - DEVICE_IN_VOICE_CALL| DEVICE_IN_DEFAULT) + DEVICE_IN_VOICE_CALL | DEVICE_IN_BACK_MIC | DEVICE_IN_DEFAULT) }; // device connection states used for setDeviceConnectionState() diff --git a/include/media/AudioTrack.h b/include/media/AudioTrack.h index 981c2f6b696c..14b30ae9cba4 100644 --- a/include/media/AudioTrack.h +++ b/include/media/AudioTrack.h @@ -391,6 +391,14 @@ private: }; bool processAudioBuffer(const sp<AudioTrackThread>& thread); + status_t createTrack(int streamType, + uint32_t sampleRate, + int format, + int channelCount, + int frameCount, + uint32_t flags, + const sp<IMemory>& sharedBuffer, + audio_io_handle_t output); sp<IAudioTrack> mAudioTrack; sp<IMemory> mCblkMemory; diff --git a/include/media/IAudioFlinger.h b/include/media/IAudioFlinger.h index 8018568424a6..a46c72774f31 100644 --- a/include/media/IAudioFlinger.h +++ b/include/media/IAudioFlinger.h @@ -102,10 +102,10 @@ public: virtual status_t setParameters(int ioHandle, const String8& keyValuePairs) = 0; virtual String8 getParameters(int ioHandle, const String8& keys) = 0; - + // register a current process for audio output change notifications virtual void registerClient(const sp<IAudioFlingerClient>& client) = 0; - + // retrieve the audio recording buffer size virtual size_t getInputBufferSize(uint32_t sampleRate, int format, int channelCount) = 0; @@ -128,6 +128,8 @@ public: virtual status_t closeInput(int input) = 0; virtual status_t setStreamOutput(uint32_t stream, int output) = 0; + + virtual status_t setVoiceVolume(float volume) = 0; }; diff --git a/include/media/IMediaPlayerService.h b/include/media/IMediaPlayerService.h index 303444cd9112..d5c1594fd2a7 100644 --- a/include/media/IMediaPlayerService.h +++ b/include/media/IMediaPlayerService.h @@ -42,7 +42,7 @@ public: virtual sp<IMediaPlayer> create(pid_t pid, const sp<IMediaPlayerClient>& client, int fd, int64_t offset, int64_t length) = 0; virtual sp<IMemory> decode(const char* url, uint32_t *pSampleRate, int* pNumChannels, int* pFormat) = 0; virtual sp<IMemory> decode(int fd, int64_t offset, int64_t length, uint32_t *pSampleRate, int* pNumChannels, int* pFormat) = 0; - virtual sp<IOMX> createOMX() = 0; + virtual sp<IOMX> getOMX() = 0; // Take a peek at currently playing audio, for visualization purposes. // This returns a buffer of 16 bit mono PCM data, or NULL if no visualization buffer is currently available. diff --git a/include/media/IOMX.h b/include/media/IOMX.h index 10e0197b6b94..6f3ba1cfcbba 100644 --- a/include/media/IOMX.h +++ b/include/media/IOMX.h @@ -42,57 +42,57 @@ public: typedef void *buffer_id; typedef void *node_id; - virtual status_t list_nodes(List<String8> *list) = 0; + virtual status_t listNodes(List<String8> *list) = 0; - virtual status_t allocate_node(const char *name, node_id *node) = 0; - virtual status_t free_node(node_id node) = 0; + virtual status_t allocateNode( + const char *name, const sp<IOMXObserver> &observer, + node_id *node) = 0; - virtual status_t send_command( + virtual status_t freeNode(node_id node) = 0; + + virtual status_t sendCommand( node_id node, OMX_COMMANDTYPE cmd, OMX_S32 param) = 0; - virtual status_t get_parameter( + virtual status_t getParameter( node_id node, OMX_INDEXTYPE index, void *params, size_t size) = 0; - virtual status_t set_parameter( + virtual status_t setParameter( node_id node, OMX_INDEXTYPE index, const void *params, size_t size) = 0; - virtual status_t get_config( + virtual status_t getConfig( node_id node, OMX_INDEXTYPE index, void *params, size_t size) = 0; - virtual status_t set_config( + virtual status_t setConfig( node_id node, OMX_INDEXTYPE index, const void *params, size_t size) = 0; - virtual status_t use_buffer( + virtual status_t useBuffer( node_id node, OMX_U32 port_index, const sp<IMemory> ¶ms, buffer_id *buffer) = 0; - virtual status_t allocate_buffer( + virtual status_t allocateBuffer( node_id node, OMX_U32 port_index, size_t size, buffer_id *buffer) = 0; - virtual status_t allocate_buffer_with_backup( + virtual status_t allocateBufferWithBackup( node_id node, OMX_U32 port_index, const sp<IMemory> ¶ms, buffer_id *buffer) = 0; - virtual status_t free_buffer( + virtual status_t freeBuffer( node_id node, OMX_U32 port_index, buffer_id buffer) = 0; - virtual status_t observe_node( - node_id node, const sp<IOMXObserver> &observer) = 0; - - virtual void fill_buffer(node_id node, buffer_id buffer) = 0; + virtual status_t fillBuffer(node_id node, buffer_id buffer) = 0; - virtual void empty_buffer( + virtual status_t emptyBuffer( node_id node, buffer_id buffer, OMX_U32 range_offset, OMX_U32 range_length, OMX_U32 flags, OMX_TICKS timestamp) = 0; - virtual status_t get_extension_index( + virtual status_t getExtensionIndex( node_id node, const char *parameter_name, OMX_INDEXTYPE *index) = 0; @@ -162,7 +162,7 @@ class IOMXObserver : public IInterface { public: DECLARE_META_INTERFACE(OMXObserver); - virtual void on_message(const omx_message &msg) = 0; + virtual void onMessage(const omx_message &msg) = 0; }; class IOMXRenderer : public IInterface { diff --git a/include/media/ToneGenerator.h b/include/media/ToneGenerator.h index c884c2c5b16a..1ad1f26e108a 100644 --- a/include/media/ToneGenerator.h +++ b/include/media/ToneGenerator.h @@ -151,7 +151,7 @@ public: NUM_SUP_TONES = LAST_SUP_TONE-FIRST_SUP_TONE+1 }; - ToneGenerator(int streamType, float volume); + ToneGenerator(int streamType, float volume, bool threadCanCallJava = false); ~ToneGenerator(); bool startTone(int toneType, int durationMs = -1); @@ -242,6 +242,7 @@ private: static const ToneDescriptor sToneDescriptors[]; + bool mThreadCanCallJava; unsigned int mTotalSmp; // Total number of audio samples played (gives current time) unsigned int mNextSegSmp; // Position of next segment transition expressed in samples // NOTE: because mTotalSmp, mNextSegSmp are stored on 32 bit, current design will operate properly diff --git a/include/media/mediarecorder.h b/include/media/mediarecorder.h index 13316a9339d3..8c7392b026f4 100644 --- a/include/media/mediarecorder.h +++ b/include/media/mediarecorder.h @@ -41,7 +41,9 @@ enum audio_source { AUDIO_SOURCE_VOICE_UPLINK = 2, AUDIO_SOURCE_VOICE_DOWNLINK = 3, AUDIO_SOURCE_VOICE_CALL = 4, - AUDIO_SOURCE_MAX = AUDIO_SOURCE_VOICE_CALL, + AUDIO_SOURCE_CAMCORDER = 5, + AUDIO_SOURCE_VOICE_RECOGNITION = 6, + AUDIO_SOURCE_MAX = AUDIO_SOURCE_VOICE_RECOGNITION, AUDIO_SOURCE_LIST_END // must be last - used to validate audio source type }; diff --git a/include/media/stagefright/HTTPStream.h b/include/media/stagefright/HTTPStream.h index 3d0d67a26a0d..72e796c2bc88 100644 --- a/include/media/stagefright/HTTPStream.h +++ b/include/media/stagefright/HTTPStream.h @@ -21,7 +21,7 @@ #include <sys/types.h> #include <media/stagefright/MediaErrors.h> -#include <media/stagefright/string.h> +#include <media/stagefright/stagefright_string.h> #include <utils/KeyedVector.h> namespace android { diff --git a/include/media/stagefright/OMXCodec.h b/include/media/stagefright/OMXCodec.h index ff7e34a886a7..3f3dcf9eba4c 100644 --- a/include/media/stagefright/OMXCodec.h +++ b/include/media/stagefright/OMXCodec.h @@ -90,6 +90,7 @@ private: kRequiresFlushCompleteEmulation = 16, kRequiresAllocateBufferOnOutputPorts = 32, kRequiresFlushBeforeShutdown = 64, + kOutputDimensionsAre16Aligned = 128, }; struct BufferInfo { diff --git a/include/media/stagefright/string.h b/include/media/stagefright/stagefright_string.h index 5dc711653f04..1ed4c8692655 100644 --- a/include/media/stagefright/string.h +++ b/include/media/stagefright/stagefright_string.h @@ -14,9 +14,9 @@ * limitations under the License. */ -#ifndef STRING_H_ +#ifndef STAGEFRIGHT_STRING_H_ -#define STRING_H_ +#define STAGEFRIGHT_STRING_H_ #include <utils/String8.h> @@ -51,4 +51,4 @@ private: } // namespace android -#endif // STRING_H_ +#endif // STAGEFRIGHT_STRING_H_ diff --git a/include/private/opengles/gl_context.h b/include/private/opengles/gl_context.h index 67c2dd80681f..26cde38693b9 100644 --- a/include/private/opengles/gl_context.h +++ b/include/private/opengles/gl_context.h @@ -32,6 +32,8 @@ #include <GLES/gl.h> #include <GLES/glext.h> +struct android_native_buffer_t; + namespace android { const unsigned int OGLES_NUM_COMPRESSED_TEXTURE_FORMATS = 10; @@ -602,7 +604,7 @@ struct copybits_context_t { copybit_device_t* blitEngine; int32_t minScale; int32_t maxScale; - buffer_handle_t drawSurfaceBuffer; + android_native_buffer_t* drawSurfaceBuffer; }; struct ogles_context_t { diff --git a/include/private/ui/RegionHelper.h b/include/private/ui/RegionHelper.h index 926fddb177cd..8d76533c5abb 100644 --- a/include/private/ui/RegionHelper.h +++ b/include/private/ui/RegionHelper.h @@ -86,7 +86,7 @@ public: rasterizer(current); } } - } while(!spannerInner.isDone()); + } while(!spannerInner.isDone()); } while(!spanner.isDone()); } @@ -220,18 +220,21 @@ private: } inline void prepare(int inside) { - SpannerBase::lhs_head = lhs.rects->left + lhs.dx; - SpannerBase::lhs_tail = lhs.rects->right + lhs.dx; - SpannerBase::rhs_head = rhs.rects->left + rhs.dx; - SpannerBase::rhs_tail = rhs.rects->right + rhs.dx; if (inside == SpannerBase::lhs_before_rhs) { + SpannerBase::lhs_head = lhs.rects->left + lhs.dx; + SpannerBase::lhs_tail = lhs.rects->right + lhs.dx; SpannerBase::rhs_head = max_value; SpannerBase::rhs_tail = max_value; } else if (inside == SpannerBase::lhs_after_rhs) { SpannerBase::lhs_head = max_value; SpannerBase::lhs_tail = max_value; + SpannerBase::rhs_head = rhs.rects->left + rhs.dx; + SpannerBase::rhs_tail = rhs.rects->right + rhs.dx; } else { - // use both spans + SpannerBase::lhs_head = lhs.rects->left + lhs.dx; + SpannerBase::lhs_tail = lhs.rects->right + lhs.dx; + SpannerBase::rhs_head = rhs.rects->left + rhs.dx; + SpannerBase::rhs_tail = rhs.rects->right + rhs.dx; } } diff --git a/include/ui/CameraHardwareInterface.h b/include/ui/CameraHardwareInterface.h index af40f31ed19a..240c1348a35e 100644 --- a/include/ui/CameraHardwareInterface.h +++ b/include/ui/CameraHardwareInterface.h @@ -25,6 +25,15 @@ #include <ui/Overlay.h> namespace android { +/** + * The size of image for display. + */ +typedef struct image_rect_struct +{ + uint32_t width; /* Image width */ + uint32_t height; /* Image height */ +} image_rect_type; + typedef void (*notify_callback)(int32_t msgType, int32_t ext1, diff --git a/include/ui/GraphicBuffer.h b/include/ui/GraphicBuffer.h index 8897f0314b7d..b9c491be1a6c 100644 --- a/include/ui/GraphicBuffer.h +++ b/include/ui/GraphicBuffer.h @@ -66,7 +66,11 @@ public: GraphicBuffer(); // creates w * h buffer - GraphicBuffer(uint32_t w, uint32_t h, PixelFormat format, uint32_t ssage); + GraphicBuffer(uint32_t w, uint32_t h, PixelFormat format, uint32_t usage); + + // create a buffer from an existing handle + GraphicBuffer(uint32_t w, uint32_t h, PixelFormat format, uint32_t usage, + uint32_t stride, native_handle_t* handle, bool keepOwnership); // return status status_t initCheck() const; @@ -89,14 +93,22 @@ public: void setIndex(int index); int getIndex() const; + void setVerticalStride(uint32_t vstride); + uint32_t getVerticalStride() const; protected: GraphicBuffer(const Parcel& reply); virtual ~GraphicBuffer(); + enum { + ownNone = 0, + ownHandle = 1, + ownData = 2, + }; + inline const GraphicBufferMapper& getBufferMapper() const { return mBufferMapper; } inline GraphicBufferMapper& getBufferMapper() { return mBufferMapper; } - bool mOwner; + uint8_t mOwner; private: friend class Surface; diff --git a/include/utils/ResourceTypes.h b/include/utils/ResourceTypes.h index 17ccad6f987b..49145e8efd53 100644 --- a/include/utils/ResourceTypes.h +++ b/include/utils/ResourceTypes.h @@ -1272,7 +1272,7 @@ struct ResTable_config if (version || o.version) { if ((sdkVersion != o.sdkVersion) && requested->sdkVersion) { - return (sdkVersion); + return (sdkVersion > o.sdkVersion); } if ((minorVersion != o.minorVersion) && @@ -1384,7 +1384,7 @@ struct ResTable_config } if (version != 0) { if (settings.sdkVersion != 0 && sdkVersion != 0 - && sdkVersion != settings.sdkVersion) { + && sdkVersion > settings.sdkVersion) { return false; } if (settings.minorVersion != 0 && minorVersion != 0 diff --git a/libs/audioflinger/AudioFlinger.cpp b/libs/audioflinger/AudioFlinger.cpp index ba8b3222933c..9c0c8508606b 100644 --- a/libs/audioflinger/AudioFlinger.cpp +++ b/libs/audioflinger/AudioFlinger.cpp @@ -482,38 +482,17 @@ status_t AudioFlinger::setStreamVolume(int stream, float value, int output) } } - status_t ret = NO_ERROR; - - if (stream == AudioSystem::VOICE_CALL || - stream == AudioSystem::BLUETOOTH_SCO) { - float hwValue; - if (stream == AudioSystem::VOICE_CALL) { - hwValue = (float)AudioSystem::logToLinear(value)/100.0f; - // offset value to reflect actual hardware volume that never reaches 0 - // 1% corresponds roughly to first step in VOICE_CALL stream volume setting (see AudioService.java) - value = 0.01 + 0.99 * value; - } else { // (type == AudioSystem::BLUETOOTH_SCO) - hwValue = 1.0f; - } - - AutoMutex lock(mHardwareLock); - mHardwareStatus = AUDIO_SET_VOICE_VOLUME; - ret = mAudioHardware->setVoiceVolume(hwValue); - mHardwareStatus = AUDIO_HW_IDLE; - - } - mStreamTypes[stream].volume = value; if (thread == NULL) { - for (uint32_t i = 0; i < mPlaybackThreads.size(); i++) + for (uint32_t i = 0; i < mPlaybackThreads.size(); i++) { mPlaybackThreads.valueAt(i)->setStreamVolume(stream, value); - + } } else { thread->setStreamVolume(stream, value); } - return ret; + return NO_ERROR; } status_t AudioFlinger::setStreamMute(int stream, bool muted) @@ -553,11 +532,6 @@ float AudioFlinger::streamVolume(int stream, int output) const volume = mStreamTypes[stream].volume; } - // remove correction applied by setStreamVolume() - if (stream == AudioSystem::VOICE_CALL) { - volume = (volume - 0.01) / 0.99 ; - } - return volume; } @@ -644,6 +618,21 @@ size_t AudioFlinger::getInputBufferSize(uint32_t sampleRate, int format, int cha return mAudioHardware->getInputBufferSize(sampleRate, format, channelCount); } +status_t AudioFlinger::setVoiceVolume(float value) +{ + // check calling permissions + if (!settingsAllowed()) { + return PERMISSION_DENIED; + } + + AutoMutex lock(mHardwareLock); + mHardwareStatus = AUDIO_SET_VOICE_VOLUME; + status_t ret = mAudioHardware->setVoiceVolume(value); + mHardwareStatus = AUDIO_HW_IDLE; + + return ret; +} + void AudioFlinger::registerClient(const sp<IAudioFlingerClient>& client) { @@ -1173,7 +1162,7 @@ AudioFlinger::MixerThread::~MixerThread() bool AudioFlinger::MixerThread::threadLoop() { - uint32_t sleepTime = 0; + uint32_t sleepTime = 1000; uint32_t maxBufferRecoveryInUsecs = getMaxBufferRecoveryInUsecs(); int16_t* curBuf = mMixBuffer; Vector< sp<Track> > tracksToRemove; @@ -1235,6 +1224,7 @@ bool AudioFlinger::MixerThread::threadLoop() } standbyTime = systemTime() + kStandbyTimeInNsecs; + sleepTime = 1000; continue; } } @@ -1602,7 +1592,7 @@ AudioFlinger::DirectOutputThread::~DirectOutputThread() bool AudioFlinger::DirectOutputThread::threadLoop() { - uint32_t sleepTime = 0; + uint32_t sleepTime = 1000; uint32_t maxBufferRecoveryInUsecs = getMaxBufferRecoveryInUsecs(); sp<Track> trackToRemove; sp<Track> activeTrack; @@ -1654,6 +1644,7 @@ bool AudioFlinger::DirectOutputThread::threadLoop() } standbyTime = systemTime() + kStandbyTimeInNsecs; + sleepTime = 1000; continue; } } @@ -1890,7 +1881,7 @@ AudioFlinger::DuplicatingThread::~DuplicatingThread() bool AudioFlinger::DuplicatingThread::threadLoop() { - uint32_t sleepTime = 0; + uint32_t sleepTime = 1000; uint32_t maxBufferRecoveryInUsecs = getMaxBufferRecoveryInUsecs(); int16_t* curBuf = mMixBuffer; Vector< sp<Track> > tracksToRemove; @@ -1951,6 +1942,7 @@ bool AudioFlinger::DuplicatingThread::threadLoop() } standbyTime = systemTime() + kStandbyTimeInNsecs; + sleepTime = 1000; continue; } } diff --git a/libs/audioflinger/AudioFlinger.h b/libs/audioflinger/AudioFlinger.h index 4bf73ceceb05..56599f6ea656 100644 --- a/libs/audioflinger/AudioFlinger.h +++ b/libs/audioflinger/AudioFlinger.h @@ -133,6 +133,8 @@ public: virtual status_t setStreamOutput(uint32_t stream, int output); + virtual status_t setVoiceVolume(float volume); + // IBinder::DeathRecipient virtual void binderDied(const wp<IBinder>& who); diff --git a/libs/audioflinger/AudioPolicyManagerGeneric.cpp b/libs/audioflinger/AudioPolicyManagerGeneric.cpp index 632385915a32..8cfc20433a35 100644 --- a/libs/audioflinger/AudioPolicyManagerGeneric.cpp +++ b/libs/audioflinger/AudioPolicyManagerGeneric.cpp @@ -459,6 +459,61 @@ status_t AudioPolicyManagerGeneric::getStreamVolumeIndex(AudioSystem::stream_typ return NO_ERROR; } +status_t AudioPolicyManagerGeneric::dump(int fd) +{ + const size_t SIZE = 256; + char buffer[SIZE]; + String8 result; + + snprintf(buffer, SIZE, "\nAudioPolicyManager Dump: %p\n", this); + result.append(buffer); + snprintf(buffer, SIZE, " Hardware Output: %d\n", mHardwareOutput); + result.append(buffer); + snprintf(buffer, SIZE, " Output devices: %08x\n", mAvailableOutputDevices); + result.append(buffer); + snprintf(buffer, SIZE, " Input devices: %08x\n", mAvailableInputDevices); + result.append(buffer); + snprintf(buffer, SIZE, " Phone state: %d\n", mPhoneState); + result.append(buffer); + snprintf(buffer, SIZE, " Ringer mode: %d\n", mRingerMode); + result.append(buffer); + snprintf(buffer, SIZE, " Force use for communications %d\n", mForceUse[AudioSystem::FOR_COMMUNICATION]); + result.append(buffer); + snprintf(buffer, SIZE, " Force use for media %d\n", mForceUse[AudioSystem::FOR_MEDIA]); + result.append(buffer); + snprintf(buffer, SIZE, " Force use for record %d\n", mForceUse[AudioSystem::FOR_RECORD]); + result.append(buffer); + write(fd, result.string(), result.size()); + + snprintf(buffer, SIZE, "\nOutputs dump:\n"); + write(fd, buffer, strlen(buffer)); + for (size_t i = 0; i < mOutputs.size(); i++) { + snprintf(buffer, SIZE, "- Output %d dump:\n", mOutputs.keyAt(i)); + write(fd, buffer, strlen(buffer)); + mOutputs.valueAt(i)->dump(fd); + } + + snprintf(buffer, SIZE, "\nInputs dump:\n"); + write(fd, buffer, strlen(buffer)); + for (size_t i = 0; i < mInputs.size(); i++) { + snprintf(buffer, SIZE, "- Input %d dump:\n", mInputs.keyAt(i)); + write(fd, buffer, strlen(buffer)); + mInputs.valueAt(i)->dump(fd); + } + + snprintf(buffer, SIZE, "\nStreams dump:\n"); + write(fd, buffer, strlen(buffer)); + snprintf(buffer, SIZE, " Stream Index Min Index Max Index Cur Mute Count Can be muted\n"); + write(fd, buffer, strlen(buffer)); + for (size_t i = 0; i < AudioSystem::NUM_STREAM_TYPES; i++) { + snprintf(buffer, SIZE, " %02d", i); + mStreams[i].dump(buffer + 3, SIZE); + write(fd, buffer, strlen(buffer)); + } + + return NO_ERROR; +} + // ---------------------------------------------------------------------------- // AudioPolicyManagerGeneric // ---------------------------------------------------------------------------- @@ -815,6 +870,35 @@ uint32_t AudioPolicyManagerGeneric::AudioOutputDescriptor::refCount() return refcount; } +status_t AudioPolicyManagerGeneric::AudioOutputDescriptor::dump(int fd) +{ + const size_t SIZE = 256; + char buffer[SIZE]; + String8 result; + + snprintf(buffer, SIZE, " Sampling rate: %d\n", mSamplingRate); + result.append(buffer); + snprintf(buffer, SIZE, " Format: %d\n", mFormat); + result.append(buffer); + snprintf(buffer, SIZE, " Channels: %08x\n", mChannels); + result.append(buffer); + snprintf(buffer, SIZE, " Latency: %d\n", mLatency); + result.append(buffer); + snprintf(buffer, SIZE, " Flags %08x\n", mFlags); + result.append(buffer); + snprintf(buffer, SIZE, " Devices %08x\n", mDevice); + result.append(buffer); + snprintf(buffer, SIZE, " Stream refCount\n"); + result.append(buffer); + for (int i = 0; i < AudioSystem::NUM_STREAM_TYPES; i++) { + snprintf(buffer, SIZE, " %02d %d\n", i, mRefCount[i]); + result.append(buffer); + } + write(fd, result.string(), result.size()); + + return NO_ERROR; +} + // --- AudioInputDescriptor class implementation AudioPolicyManagerGeneric::AudioInputDescriptor::AudioInputDescriptor() @@ -823,4 +907,39 @@ AudioPolicyManagerGeneric::AudioInputDescriptor::AudioInputDescriptor() { } +status_t AudioPolicyManagerGeneric::AudioInputDescriptor::dump(int fd) +{ + const size_t SIZE = 256; + char buffer[SIZE]; + String8 result; + + snprintf(buffer, SIZE, " Sampling rate: %d\n", mSamplingRate); + result.append(buffer); + snprintf(buffer, SIZE, " Format: %d\n", mFormat); + result.append(buffer); + snprintf(buffer, SIZE, " Channels: %08x\n", mChannels); + result.append(buffer); + snprintf(buffer, SIZE, " Acoustics %08x\n", mAcoustics); + result.append(buffer); + snprintf(buffer, SIZE, " Devices %08x\n", mDevice); + result.append(buffer); + snprintf(buffer, SIZE, " Ref Count %d\n", mRefCount); + result.append(buffer); + write(fd, result.string(), result.size()); + + return NO_ERROR; +} + +// --- StreamDescriptor class implementation + +void AudioPolicyManagerGeneric::StreamDescriptor::dump(char* buffer, size_t size) +{ + snprintf(buffer, size, " %02d %02d %02d %02d %d\n", + mIndexMin, + mIndexMax, + mIndexCur, + mMuteCount, + mCanBeMuted); +} + }; // namespace android diff --git a/libs/audioflinger/AudioPolicyManagerGeneric.h b/libs/audioflinger/AudioPolicyManagerGeneric.h index d904520cbca1..4997cdf1499b 100644 --- a/libs/audioflinger/AudioPolicyManagerGeneric.h +++ b/libs/audioflinger/AudioPolicyManagerGeneric.h @@ -76,6 +76,8 @@ public: virtual status_t setStreamVolumeIndex(AudioSystem::stream_type stream, int index); virtual status_t getStreamVolumeIndex(AudioSystem::stream_type stream, int *index); + virtual status_t dump(int fd); + private: enum routing_strategy { @@ -93,6 +95,7 @@ private: public: AudioOutputDescriptor(); + status_t dump(int fd); uint32_t device(); void changeRefCount(AudioSystem::stream_type, int delta); @@ -115,6 +118,8 @@ private: public: AudioInputDescriptor(); + status_t dump(int fd); + uint32_t mSamplingRate; // uint32_t mFormat; // input configuration uint32_t mChannels; // @@ -130,6 +135,8 @@ private: StreamDescriptor() : mIndexMin(0), mIndexMax(1), mIndexCur(1), mMuteCount(0), mCanBeMuted(true) {} + void dump(char* buffer, size_t size); + int mIndexMin; // min volume index int mIndexMax; // max volume index int mIndexCur; // current volume index diff --git a/libs/audioflinger/AudioPolicyService.cpp b/libs/audioflinger/AudioPolicyService.cpp index 5c3cc8e1e642..97236973e640 100644 --- a/libs/audioflinger/AudioPolicyService.cpp +++ b/libs/audioflinger/AudioPolicyService.cpp @@ -43,6 +43,12 @@ namespace android { +static const char* kDeadlockedString = "AudioPolicyService may be deadlocked\n"; +static const char* kCmdDeadlockedString = "AudioPolicyService command thread may be deadlocked\n"; + +static const int kDumpLockRetries = 50; +static const int kDumpLockSleep = 20000; + static bool checkPermission() { #ifndef HAVE_ANDROID_OS return true; @@ -335,17 +341,65 @@ void AudioPolicyService::binderDied(const wp<IBinder>& who) { LOGW("binderDied() %p, tid %d, calling tid %d", who.unsafe_get(), gettid(), IPCThreadState::self()->getCallingPid()); } +static bool tryLock(Mutex& mutex) +{ + bool locked = false; + for (int i = 0; i < kDumpLockRetries; ++i) { + if (mutex.tryLock() == NO_ERROR) { + locked = true; + break; + } + usleep(kDumpLockSleep); + } + return locked; +} + +status_t AudioPolicyService::dumpInternals(int fd) +{ + const size_t SIZE = 256; + char buffer[SIZE]; + String8 result; + + snprintf(buffer, SIZE, "PolicyManager Interface: %p\n", mpPolicyManager); + result.append(buffer); + snprintf(buffer, SIZE, "Command Thread: %p\n", mAudioCommandThread.get()); + result.append(buffer); + snprintf(buffer, SIZE, "Tones Thread: %p\n", mTonePlaybackThread.get()); + result.append(buffer); + + write(fd, result.string(), result.size()); + return NO_ERROR; +} + status_t AudioPolicyService::dump(int fd, const Vector<String16>& args) { if (checkCallingPermission(String16("android.permission.DUMP")) == false) { - dumpPermissionDenial(fd, args); + dumpPermissionDenial(fd); } else { + bool locked = tryLock(mLock); + if (!locked) { + String8 result(kDeadlockedString); + write(fd, result.string(), result.size()); + } + dumpInternals(fd); + if (mAudioCommandThread != NULL) { + mAudioCommandThread->dump(fd); + } + if (mTonePlaybackThread != NULL) { + mTonePlaybackThread->dump(fd); + } + + if (mpPolicyManager) { + mpPolicyManager->dump(fd); + } + + if (locked) mLock.unlock(); } return NO_ERROR; } -status_t AudioPolicyService::dumpPermissionDenial(int fd, const Vector<String16>& args) +status_t AudioPolicyService::dumpPermissionDenial(int fd) { const size_t SIZE = 256; char buffer[SIZE]; @@ -495,6 +549,10 @@ status_t AudioPolicyService::stopTone() return NO_ERROR; } +status_t AudioPolicyService::setVoiceVolume(float volume, int delayMs) +{ + return mAudioCommandThread->voiceVolumeCommand(volume, delayMs); +} // ----------- AudioPolicyService::AudioCommandThread implementation ---------- @@ -577,6 +635,16 @@ bool AudioPolicyService::AudioCommandThread::threadLoop() } delete data; }break; + case SET_VOICE_VOLUME: { + VoiceVolumeData *data = (VoiceVolumeData *)command->mParam; + LOGV("AudioCommandThread() processing set voice volume volume %f", data->mVolume); + command->mStatus = AudioSystem::setVoiceVolume(data->mVolume); + if (command->mWaitStatus) { + command->mCond.signal(); + mWaitWorkCV.wait(mLock); + } + delete data; + }break; default: LOGW("AudioCommandThread() unknown command %d", command->mCommand); } @@ -595,9 +663,38 @@ bool AudioPolicyService::AudioCommandThread::threadLoop() return false; } +status_t AudioPolicyService::AudioCommandThread::dump(int fd) +{ + const size_t SIZE = 256; + char buffer[SIZE]; + String8 result; + + snprintf(buffer, SIZE, "AudioCommandThread %p Dump\n", this); + result.append(buffer); + write(fd, result.string(), result.size()); + + bool locked = tryLock(mLock); + if (!locked) { + String8 result2(kCmdDeadlockedString); + write(fd, result2.string(), result2.size()); + } + + snprintf(buffer, SIZE, "- Commands:\n"); + result = String8(buffer); + result.append(" Command Time Status Wait pParam\n"); + for (int i = 0; i < (int)mAudioCommands.size(); i++) { + mAudioCommands[i]->dump(buffer, SIZE); + result.append(buffer); + } + write(fd, result.string(), result.size()); + + if (locked) mLock.unlock(); + + return NO_ERROR; +} + void AudioPolicyService::AudioCommandThread::startToneCommand(int type, int stream) { - Mutex::Autolock _l(mLock); AudioCommand *command = new AudioCommand(); command->mCommand = START_TONE; ToneData *data = new ToneData(); @@ -605,6 +702,7 @@ void AudioPolicyService::AudioCommandThread::startToneCommand(int type, int stre data->mStream = stream; command->mParam = (void *)data; command->mWaitStatus = false; + Mutex::Autolock _l(mLock); insertCommand_l(command); LOGV("AudioCommandThread() adding tone start type %d, stream %d", type, stream); mWaitWorkCV.signal(); @@ -612,11 +710,11 @@ void AudioPolicyService::AudioCommandThread::startToneCommand(int type, int stre void AudioPolicyService::AudioCommandThread::stopToneCommand() { - Mutex::Autolock _l(mLock); AudioCommand *command = new AudioCommand(); command->mCommand = STOP_TONE; command->mParam = NULL; command->mWaitStatus = false; + Mutex::Autolock _l(mLock); insertCommand_l(command); LOGV("AudioCommandThread() adding tone stop"); mWaitWorkCV.signal(); @@ -626,7 +724,6 @@ status_t AudioPolicyService::AudioCommandThread::volumeCommand(int stream, float { status_t status = NO_ERROR; - Mutex::Autolock _l(mLock); AudioCommand *command = new AudioCommand(); command->mCommand = SET_VOLUME; VolumeData *data = new VolumeData(); @@ -639,6 +736,7 @@ status_t AudioPolicyService::AudioCommandThread::volumeCommand(int stream, float } else { command->mWaitStatus = false; } + Mutex::Autolock _l(mLock); insertCommand_l(command, delayMs); LOGV("AudioCommandThread() adding set volume stream %d, volume %f, output %d", stream, volume, output); mWaitWorkCV.signal(); @@ -654,7 +752,6 @@ status_t AudioPolicyService::AudioCommandThread::parametersCommand(int ioHandle, { status_t status = NO_ERROR; - Mutex::Autolock _l(mLock); AudioCommand *command = new AudioCommand(); command->mCommand = SET_PARAMETERS; ParametersData *data = new ParametersData(); @@ -666,6 +763,7 @@ status_t AudioPolicyService::AudioCommandThread::parametersCommand(int ioHandle, } else { command->mWaitStatus = false; } + Mutex::Autolock _l(mLock); insertCommand_l(command, delayMs); LOGV("AudioCommandThread() adding set parameter string %s, io %d ,delay %d", keyValuePairs.string(), ioHandle, delayMs); mWaitWorkCV.signal(); @@ -677,6 +775,32 @@ status_t AudioPolicyService::AudioCommandThread::parametersCommand(int ioHandle, return status; } +status_t AudioPolicyService::AudioCommandThread::voiceVolumeCommand(float volume, int delayMs) +{ + status_t status = NO_ERROR; + + AudioCommand *command = new AudioCommand(); + command->mCommand = SET_VOICE_VOLUME; + VoiceVolumeData *data = new VoiceVolumeData(); + data->mVolume = volume; + command->mParam = data; + if (delayMs == 0) { + command->mWaitStatus = true; + } else { + command->mWaitStatus = false; + } + Mutex::Autolock _l(mLock); + insertCommand_l(command, delayMs); + LOGV("AudioCommandThread() adding set voice volume volume %f", volume); + mWaitWorkCV.signal(); + if (command->mWaitStatus) { + command->mCond.wait(mLock); + status = command->mStatus; + mWaitWorkCV.signal(); + } + return status; +} + // insertCommand_l() must be called with mLock held void AudioPolicyService::AudioCommandThread::insertCommand_l(AudioCommand *command, int delayMs) { @@ -768,4 +892,15 @@ void AudioPolicyService::AudioCommandThread::exit() requestExitAndWait(); } +void AudioPolicyService::AudioCommandThread::AudioCommand::dump(char* buffer, size_t size) +{ + snprintf(buffer, size, " %02d %06d.%03d %03d %01u %p\n", + mCommand, + (int)ns2s(mTime), + (int)ns2ms(mTime)%1000, + mStatus, + mWaitStatus, + mParam); +} + }; // namespace android diff --git a/libs/audioflinger/AudioPolicyService.h b/libs/audioflinger/AudioPolicyService.h index 56a85e13ab8f..7c1bb85993ca 100644 --- a/libs/audioflinger/AudioPolicyService.h +++ b/libs/audioflinger/AudioPolicyService.h @@ -105,11 +105,14 @@ public: virtual String8 getParameters(audio_io_handle_t ioHandle, const String8& keys); virtual status_t startTone(ToneGenerator::tone_type tone, AudioSystem::stream_type stream); virtual status_t stopTone(); + virtual status_t setVoiceVolume(float volume, int delayMs = 0); private: AudioPolicyService(); virtual ~AudioPolicyService(); + status_t dumpInternals(int fd); + // Thread used for tone playback and to send audio config commands to audio flinger // For tone playback, using a separate thread is necessary to avoid deadlock with mLock because startTone() // and stopTone() are normally called with mLock locked and requesting a tone start or stop will cause @@ -125,12 +128,15 @@ private: START_TONE, STOP_TONE, SET_VOLUME, - SET_PARAMETERS + SET_PARAMETERS, + SET_VOICE_VOLUME }; AudioCommandThread (); virtual ~AudioCommandThread(); + status_t dump(int fd); + // Thread virtuals virtual void onFirstRef(); virtual bool threadLoop(); @@ -140,12 +146,15 @@ private: void stopToneCommand(); status_t volumeCommand(int stream, float volume, int output, int delayMs = 0); status_t parametersCommand(int ioHandle, const String8& keyValuePairs, int delayMs = 0); + status_t voiceVolumeCommand(float volume, int delayMs = 0); void insertCommand_l(AudioCommand *command, int delayMs = 0); private: // descriptor for requested tone playback event class AudioCommand { public: + void dump(char* buffer, size_t size); + int mCommand; // START_TONE, STOP_TONE ... nsecs_t mTime; // time stamp Condition mCond; // condition for status return @@ -166,12 +175,17 @@ private: float mVolume; int mIO; }; + class ParametersData { public: int mIO; String8 mKeyValuePairs; }; + class VoiceVolumeData { + public: + float mVolume; + }; Mutex mLock; Condition mWaitWorkCV; @@ -180,7 +194,7 @@ private: }; // Internal dump utilities. - status_t dumpPermissionDenial(int fd, const Vector<String16>& args); + status_t dumpPermissionDenial(int fd); Mutex mLock; // prevents concurrent access to AudioPolicy manager functions changing device diff --git a/libs/binder/IPCThreadState.cpp b/libs/binder/IPCThreadState.cpp index c371a23b85f4..d474571bebc7 100644 --- a/libs/binder/IPCThreadState.cpp +++ b/libs/binder/IPCThreadState.cpp @@ -14,10 +14,13 @@ * limitations under the License. */ +#define LOG_TAG "IPCThreadState" + #include <binder/IPCThreadState.h> #include <binder/Binder.h> #include <binder/BpBinder.h> +#include <cutils/sched_policy.h> #include <utils/Debug.h> #include <utils/Log.h> #include <utils/TextOutput.h> @@ -418,7 +421,14 @@ void IPCThreadState::joinThreadPool(bool isMain) alog << "Processing top-level Command: " << getReturnString(cmd) << endl; } + + result = executeCommand(cmd); + + // Make sure that after executing the command that we put the thread back into the + // default cgroup. This is just a failsafe incase the thread's priority or cgroup was + // not properly restored. + set_sched_policy(getpid(), SP_FOREGROUND); } // Let this thread exit the thread pool if it is no longer diff --git a/libs/binder/MemoryHeapBase.cpp b/libs/binder/MemoryHeapBase.cpp index 5df078f8bdbb..624f7eba8470 100644 --- a/libs/binder/MemoryHeapBase.cpp +++ b/libs/binder/MemoryHeapBase.cpp @@ -67,7 +67,11 @@ MemoryHeapBase::MemoryHeapBase(const char* device, size_t size, uint32_t flags) : mFD(-1), mSize(0), mBase(MAP_FAILED), mFlags(flags), mDevice(0), mNeedUnmap(false) { - int fd = open(device, O_RDWR); + int open_flags = O_RDWR; + if (flags & NO_CACHING) + open_flags |= O_SYNC; + + int fd = open(device, open_flags); LOGE_IF(fd<0, "error opening %s: %s", device, strerror(errno)); if (fd >= 0) { const size_t pagesize = getpagesize(); diff --git a/libs/binder/MemoryHeapPmem.cpp b/libs/binder/MemoryHeapPmem.cpp index 3806a42d37c5..c66094761df5 100644 --- a/libs/binder/MemoryHeapPmem.cpp +++ b/libs/binder/MemoryHeapPmem.cpp @@ -132,7 +132,7 @@ MemoryHeapPmem::MemoryHeapPmem(const sp<MemoryHeapBase>& pmemHeap, char const * const device = pmemHeap->getDevice(); #if HAVE_ANDROID_OS if (device) { - int fd = open(device, O_RDWR); + int fd = open(device, O_RDWR | (flags & NO_CACHING ? O_SYNC : 0)); LOGE_IF(fd<0, "couldn't open %s (%s)", device, strerror(errno)); if (fd >= 0) { int err = ioctl(fd, PMEM_CONNECT, pmemHeap->heapID()); diff --git a/libs/rs/rs.spec b/libs/rs/rs.spec index a393e2f22c5a..865e43555ad7 100644 --- a/libs/rs/rs.spec +++ b/libs/rs/rs.spec @@ -36,6 +36,10 @@ ContextPause { ContextResume { } +ContextSetSurface { + param void *sur + } + AssignName { param void *obj param const char *name diff --git a/libs/rs/rsAllocation.cpp b/libs/rs/rsAllocation.cpp index 8ac9c26a2f37..16029a6f9c57 100644 --- a/libs/rs/rsAllocation.cpp +++ b/libs/rs/rsAllocation.cpp @@ -52,6 +52,19 @@ Allocation::Allocation(Context *rsc, const Type *type) : ObjectBase(rsc) Allocation::~Allocation() { + free(mPtr); + mPtr = NULL; + + if (mBufferID) { + // Causes a SW crash.... + //LOGV(" mBufferID %i", mBufferID); + //glDeleteBuffers(1, &mBufferID); + //mBufferID = 0; + } + if (mTextureID) { + glDeleteTextures(1, &mTextureID); + mTextureID = 0; + } } void Allocation::setCpuWritable(bool) @@ -91,6 +104,7 @@ void Allocation::uploadToTexture(uint32_t lodOffset) glGenTextures(1, &mTextureID); } glBindTexture(GL_TEXTURE_2D, mTextureID); + glPixelStorei(GL_UNPACK_ALIGNMENT, 1); Adapter2D adapt(getContext(), this); for(uint32_t lod = 0; (lod + lodOffset) < mType->getLODCount(); lod++) { @@ -405,7 +419,7 @@ RsAllocation rsi_AllocationCreateFromBitmapBoxed(Context *rsc, uint32_t w, uint3 const uint8_t * src = static_cast<const uint8_t *>(data); for (uint32_t y = 0; y < h; y++) { uint8_t * ydst = &tmp[(y + ((h2 - h) >> 1)) * w2 * bpp]; - memcpy(&ydst[(w2 - w) >> 1], src, w * bpp); + memcpy(&ydst[((w2 - w) >> 1) * bpp], src, w * bpp); src += w * bpp; } diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp index 195ea6f1d7d5..3e4cc36bc36a 100644 --- a/libs/rs/rsContext.cpp +++ b/libs/rs/rsContext.cpp @@ -29,6 +29,21 @@ using namespace android; using namespace android::renderscript; pthread_key_t Context::gThreadTLSKey = 0; +uint32_t Context::gThreadTLSKeyCount = 0; +uint32_t Context::gGLContextCount = 0; +pthread_mutex_t Context::gInitMutex = PTHREAD_MUTEX_INITIALIZER; + +static void checkEglError(const char* op, EGLBoolean returnVal = EGL_TRUE) { + if (returnVal != EGL_TRUE) { + fprintf(stderr, "%s() returned %d\n", op, returnVal); + } + + for (EGLint error = eglGetError(); error != EGL_SUCCESS; error + = eglGetError()) { + fprintf(stderr, "after %s() eglError %s (0x%x)\n", op, EGLUtils::strerror(error), + error); + } +} void Context::initEGL() { @@ -57,8 +72,12 @@ void Context::initEGL() configAttribsPtr[0] = EGL_NONE; rsAssert(configAttribsPtr < (configAttribs + (sizeof(configAttribs) / sizeof(EGLint)))); + LOGV("initEGL start"); mEGL.mDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY); + checkEglError("eglGetDisplay"); + eglInitialize(mEGL.mDisplay, &mEGL.mMajorVersion, &mEGL.mMinorVersion); + checkEglError("eglInitialize"); status_t err = EGLUtils::selectConfigForNativeWindow(mEGL.mDisplay, configAttribs, mWndSurface, &mEGL.mConfig); if (err) { @@ -66,16 +85,20 @@ void Context::initEGL() } //eglChooseConfig(mEGL.mDisplay, configAttribs, &mEGL.mConfig, 1, &mEGL.mNumConfigs); + + mEGL.mContext = eglCreateContext(mEGL.mDisplay, mEGL.mConfig, EGL_NO_CONTEXT, NULL); + checkEglError("eglCreateContext"); + if (mEGL.mContext == EGL_NO_CONTEXT) { + LOGE("eglCreateContext returned EGL_NO_CONTEXT"); + } + gGLContextCount++; + if (mWndSurface) { - mEGL.mSurface = eglCreateWindowSurface(mEGL.mDisplay, mEGL.mConfig, mWndSurface, NULL); + setSurface(mWndSurface); } else { - mEGL.mSurface = eglCreateWindowSurface(mEGL.mDisplay, mEGL.mConfig, - android_createDisplaySurface(), - NULL); + setSurface((Surface *)android_createDisplaySurface()); } - mEGL.mContext = eglCreateContext(mEGL.mDisplay, mEGL.mConfig, NULL, NULL); - eglMakeCurrent(mEGL.mDisplay, mEGL.mSurface, mEGL.mSurface, mEGL.mContext); eglQuerySurface(mEGL.mDisplay, mEGL.mSurface, EGL_WIDTH, &mEGL.mWidth); eglQuerySurface(mEGL.mDisplay, mEGL.mSurface, EGL_HEIGHT, &mEGL.mHeight); @@ -98,6 +121,19 @@ void Context::initEGL() } } +void Context::deinitEGL() +{ + setSurface(NULL); + eglDestroyContext(mEGL.mDisplay, mEGL.mContext); + checkEglError("eglDestroyContext"); + + gGLContextCount--; + if (!gGLContextCount) { + eglTerminate(mEGL.mDisplay); + } +} + + bool Context::runScript(Script *s, uint32_t launchID) { ObjectBaseRef<ProgramFragment> frag(mFragment); @@ -144,6 +180,12 @@ bool Context::runRootScript() } mStateFragmentStore.mLast.clear(); bool ret = runScript(mRootScript.get(), 0); + + GLenum err = glGetError(); + if (err != GL_NO_ERROR) { + LOGE("Pending GL Error, 0x%x", err); + } + return ret; } @@ -223,7 +265,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); ScriptTLSStruct *tlsStruct = new ScriptTLSStruct; if (!tlsStruct) { @@ -251,6 +295,7 @@ void * Context::threadProc(void *vrsc) while (!rsc->mExit) { mDraw |= rsc->mIO.playCoreCommands(rsc, !mDraw); mDraw &= (rsc->mRootScript.get() != NULL); + mDraw &= (rsc->mWndSurface != NULL); if (mDraw) { mDraw = rsc->runRootScript() && !rsc->mPaused; @@ -282,17 +327,25 @@ void * Context::threadProc(void *vrsc) rsc->mStateFragmentStore.deinit(rsc); ObjectBase::zeroAllUserRef(rsc); + rsc->mObjDestroy.mNeedToEmpty = true; + rsc->objDestroyOOBRun(); + glClearColor(0,0,0,0); glClear(GL_COLOR_BUFFER_BIT); eglSwapBuffers(rsc->mEGL.mDisplay, rsc->mEGL.mSurface); - eglTerminate(rsc->mEGL.mDisplay); - rsc->objDestroyOOBRun(); + + pthread_mutex_lock(&gInitMutex); + rsc->deinitEGL(); + pthread_mutex_unlock(&gInitMutex); + LOGV("RS Thread exited"); return NULL; } Context::Context(Device *dev, Surface *sur, bool useDepth) { + pthread_mutex_lock(&gInitMutex); + dev->addContext(this); mDev = dev; mRunning = false; @@ -304,16 +357,18 @@ Context::Context(Device *dev, Surface *sur, bool useDepth) int status; pthread_attr_t threadAttr; - if (!gThreadTLSKey) { + if (!gThreadTLSKeyCount) { status = pthread_key_create(&gThreadTLSKey, NULL); if (status) { LOGE("Failed to init thread tls key."); + pthread_mutex_unlock(&gInitMutex); return; } - } else { - // HACK: workaround gl hang on start - exit(-1); } + gThreadTLSKeyCount++; + pthread_mutex_unlock(&gInitMutex); + + // Global init done at this point. status = pthread_attr_init(&threadAttr); if (status) { @@ -353,16 +408,50 @@ Context::~Context() mIO.shutdown(); int status = pthread_join(mThreadId, &res); + mObjDestroy.mNeedToEmpty = true; objDestroyOOBRun(); + // Global structure cleanup. + pthread_mutex_lock(&gInitMutex); if (mDev) { mDev->removeContext(this); - pthread_key_delete(gThreadTLSKey); + --gThreadTLSKeyCount; + if (!gThreadTLSKeyCount) { + pthread_key_delete(gThreadTLSKey); + } + mDev = NULL; } + pthread_mutex_unlock(&gInitMutex); objDestroyOOBDestroy(); } +void Context::setSurface(Surface *sur) +{ + EGLBoolean ret; + if (mEGL.mSurface != NULL) { + ret = eglMakeCurrent(mEGL.mDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + checkEglError("eglMakeCurrent", ret); + + ret = eglDestroySurface(mEGL.mDisplay, mEGL.mSurface); + checkEglError("eglDestroySurface", ret); + + mEGL.mSurface = NULL; + } + + mWndSurface = sur; + if (mWndSurface != NULL) { + mEGL.mSurface = eglCreateWindowSurface(mEGL.mDisplay, mEGL.mConfig, mWndSurface, NULL); + checkEglError("eglCreateWindowSurface"); + if (mEGL.mSurface == EGL_NO_SURFACE) { + LOGE("eglCreateWindowSurface returned EGL_NO_SURFACE"); + } + + ret = eglMakeCurrent(mEGL.mDisplay, mEGL.mSurface, mEGL.mSurface, mEGL.mContext); + checkEglError("eglMakeCurrent", ret); + } +} + void Context::pause() { mPaused = true; @@ -419,6 +508,7 @@ void Context::setVertex(ProgramVertex *pv) } else { mVertex.set(pv); } + mVertex->forceDirty(); } void Context::assignName(ObjectBase *obj, const char *name, uint32_t len) @@ -677,6 +767,11 @@ void rsi_ContextResume(Context *rsc) rsc->resume(); } +void rsi_ContextSetSurface(Context *rsc, void *sur) +{ + rsc->setSurface((Surface *)sur); +} + } } diff --git a/libs/rs/rsContext.h b/libs/rs/rsContext.h index 3570e102d96e..bffc55b7cb8b 100644 --- a/libs/rs/rsContext.h +++ b/libs/rs/rsContext.h @@ -53,6 +53,10 @@ public: ~Context(); static pthread_key_t gThreadTLSKey; + static uint32_t gThreadTLSKeyCount; + static uint32_t gGLContextCount; + static pthread_mutex_t gInitMutex; + struct ScriptTLSStruct { Context * mContext; Script * mScript; @@ -90,6 +94,7 @@ public: void pause(); void resume(); + void setSurface(Surface *sur); void assignName(ObjectBase *obj, const char *name, uint32_t len); void removeName(ObjectBase *obj); @@ -212,6 +217,7 @@ private: Context(); void initEGL(); + void deinitEGL(); bool runRootScript(); diff --git a/libs/rs/rsObjectBase.cpp b/libs/rs/rsObjectBase.cpp index 0008ea47c222..b7d67cca4b3c 100644 --- a/libs/rs/rsObjectBase.cpp +++ b/libs/rs/rsObjectBase.cpp @@ -39,6 +39,7 @@ ObjectBase::~ObjectBase() rsAssert(!mUserRefCount); rsAssert(!mSysRefCount); remove(); + delete[] mName; } void ObjectBase::dumpLOGV(const char *op) const @@ -112,12 +113,7 @@ bool ObjectBase::decSysRef() const void ObjectBase::setName(const char *name) { - delete mName; - mName = NULL; - if (name) { - mName = new char[strlen(name) +1]; - strcpy(mName, name); - } + setName(name, strlen(name)); } void ObjectBase::setName(const char *name, uint32_t len) diff --git a/libs/rs/rsProgram.h b/libs/rs/rsProgram.h index 26b78ddde257..57c654f28c97 100644 --- a/libs/rs/rsProgram.h +++ b/libs/rs/rsProgram.h @@ -44,6 +44,10 @@ protected: ObjectBaseRef<Allocation> mConstants; mutable bool mDirty; + + +public: + void forceDirty() {mDirty = true;} }; diff --git a/libs/rs/rsProgramRaster.cpp b/libs/rs/rsProgramRaster.cpp index fcf6824f691d..51ae7cf61f16 100644 --- a/libs/rs/rsProgramRaster.cpp +++ b/libs/rs/rsProgramRaster.cpp @@ -74,7 +74,7 @@ void ProgramRaster::setupGL(const Context *rsc, ProgramRasterState *state) if (mLineSmooth) { glEnable(GL_LINE_SMOOTH); } else { - glEnable(GL_LINE_SMOOTH); + glDisable(GL_LINE_SMOOTH); } if (rsc->checkVersion1_1()) { diff --git a/libs/rs/rsScript.h b/libs/rs/rsScript.h index 8aa45423c774..bc4085429fd9 100644 --- a/libs/rs/rsScript.h +++ b/libs/rs/rsScript.h @@ -54,7 +54,7 @@ public: ObjectBaseRef<ProgramRaster> mRaster; ObjectBaseRef<ProgramFragmentStore> mFragmentStore; InvokeFunc_t mInvokables[MAX_SCRIPT_BANKS]; - const char * mScriptText; + char * mScriptText; uint32_t mScriptTextLength; }; Enviroment_t mEnviroment; diff --git a/libs/rs/rsScriptC.cpp b/libs/rs/rsScriptC.cpp index 9da7766217b6..073d98bf4e1b 100644 --- a/libs/rs/rsScriptC.cpp +++ b/libs/rs/rsScriptC.cpp @@ -46,6 +46,8 @@ ScriptC::~ScriptC() if (mAccScript) { accDeleteScript(mAccScript); } + free(mEnviroment.mScriptText); + mEnviroment.mScriptText = NULL; } void ScriptC::setupScript() @@ -404,7 +406,11 @@ void rsi_ScriptCSetScript(Context * rsc, void *vp) void rsi_ScriptCSetText(Context *rsc, const char *text, uint32_t len) { ScriptCState *ss = &rsc->mScriptC; - ss->mScript->mEnviroment.mScriptText = text; + + char *t = (char *)malloc(len + 1); + memcpy(t, text, len); + t[len] = 0; + ss->mScript->mEnviroment.mScriptText = t; ss->mScript->mEnviroment.mScriptTextLength = len; } diff --git a/libs/rs/rsScriptC.h b/libs/rs/rsScriptC.h index ae124b45e741..69afc18bc9b6 100644 --- a/libs/rs/rsScriptC.h +++ b/libs/rs/rsScriptC.h @@ -41,10 +41,6 @@ public: virtual ~ScriptC(); struct Program_t { - const char * mScriptText; - uint32_t mScriptTextLength; - - int mVersionMajor; int mVersionMinor; diff --git a/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp b/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp index f84933ee77e9..1abfd68c7654 100644 --- a/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp +++ b/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp @@ -256,12 +256,16 @@ void DisplayHardware::init(uint32_t dpy) if (strstr(gl_extensions, "GL_OES_draw_texture")) { mFlags |= DRAW_TEXTURE_EXTENSION; } +#ifdef EGL_ANDROID_image_native_buffer if (strstr( gl_extensions, "GL_OES_EGL_image") && (strstr(egl_extensions, "EGL_KHR_image_base") || strstr(egl_extensions, "EGL_KHR_image")) && strstr(egl_extensions, "EGL_ANDROID_image_native_buffer")) { mFlags |= DIRECT_TEXTURE; } +#else +#warning "EGL_ANDROID_image_native_buffer not supported" +#endif // Unbind the context from this thread eglMakeCurrent(display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); diff --git a/libs/surfaceflinger/Layer.cpp b/libs/surfaceflinger/Layer.cpp index 7fd5434d0523..f5a5a0bf2d2e 100644 --- a/libs/surfaceflinger/Layer.cpp +++ b/libs/surfaceflinger/Layer.cpp @@ -134,87 +134,113 @@ void Layer::reloadTexture(const Region& dirty) { Mutex::Autolock _l(mLock); sp<GraphicBuffer> buffer(getFrontBufferLocked()); - if (LIKELY((mFlags & DisplayHardware::DIRECT_TEXTURE) && - (buffer->usage & GRALLOC_USAGE_HW_TEXTURE))) { - int index = mFrontBufferIndex; - if (LIKELY(!mTextures[index].dirty)) { - glBindTexture(GL_TEXTURE_2D, mTextures[index].name); + int index = mFrontBufferIndex; + + // create the new texture name if needed + if (UNLIKELY(mTextures[index].name == -1U)) { + mTextures[index].name = createTexture(); + mTextures[index].width = 0; + mTextures[index].height = 0; + } + +#ifdef EGL_ANDROID_image_native_buffer + if (mFlags & DisplayHardware::DIRECT_TEXTURE) { + if (buffer->usage & GraphicBuffer::USAGE_HW_TEXTURE) { + if (mTextures[index].dirty) { + initializeEglImage(buffer, &mTextures[index]); + } } else { - // we need to recreate the texture - EGLDisplay dpy(mFlinger->graphicPlane(0).getEGLDisplay()); - - // create the new texture name if needed - if (UNLIKELY(mTextures[index].name == -1U)) { - mTextures[index].name = createTexture(); - } else { - glBindTexture(GL_TEXTURE_2D, mTextures[index].name); + if (mHybridBuffer==0 || (mHybridBuffer->width != buffer->width || + mHybridBuffer->height != buffer->height)) { + mHybridBuffer.clear(); + mHybridBuffer = new GraphicBuffer( + buffer->width, buffer->height, buffer->format, + GraphicBuffer::USAGE_SW_WRITE_OFTEN | + GraphicBuffer::USAGE_HW_TEXTURE); + initializeEglImage( + mHybridBuffer, &mTextures[0]); } - // free the previous image - if (mTextures[index].image != EGL_NO_IMAGE_KHR) { - eglDestroyImageKHR(dpy, mTextures[index].image); - mTextures[index].image = EGL_NO_IMAGE_KHR; - } - - // construct an EGL_NATIVE_BUFFER_ANDROID - android_native_buffer_t* clientBuf = buffer->getNativeBuffer(); - - // create the new EGLImageKHR - const EGLint attrs[] = { - EGL_IMAGE_PRESERVED_KHR, EGL_TRUE, - EGL_NONE, EGL_NONE - }; - mTextures[index].image = eglCreateImageKHR( - dpy, EGL_NO_CONTEXT, EGL_NATIVE_BUFFER_ANDROID, - (EGLClientBuffer)clientBuf, attrs); - - LOGE_IF(mTextures[index].image == EGL_NO_IMAGE_KHR, - "eglCreateImageKHR() failed. err=0x%4x", - eglGetError()); - - if (mTextures[index].image != EGL_NO_IMAGE_KHR) { - glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, - (GLeglImageOES)mTextures[index].image); - GLint error = glGetError(); - if (UNLIKELY(error != GL_NO_ERROR)) { - // this failed, for instance, because we don't support - // NPOT. - // FIXME: do something! - LOGD("layer=%p, glEGLImageTargetTexture2DOES(%p) " - "failed err=0x%04x", - this, mTextures[index].image, error); - mFlags &= ~DisplayHardware::DIRECT_TEXTURE; - } else { - // Everything went okay! - mTextures[index].NPOTAdjust = false; - mTextures[index].dirty = false; - mTextures[index].width = clientBuf->width; - mTextures[index].height = clientBuf->height; + GGLSurface t; + status_t res = buffer->lock(&t, GRALLOC_USAGE_SW_READ_OFTEN); + LOGE_IF(res, "error %d (%s) locking buffer %p", + res, strerror(res), buffer.get()); + if (res == NO_ERROR) { + Texture* const texture(&mTextures[0]); + + glBindTexture(GL_TEXTURE_2D, texture->name); + + sp<GraphicBuffer> buf(mHybridBuffer); + void* vaddr; + res = buf->lock(GraphicBuffer::USAGE_SW_WRITE_OFTEN, &vaddr); + if (res == NO_ERROR) { + int bpp = 0; + switch (t.format) { + case GGL_PIXEL_FORMAT_RGB_565: + case GGL_PIXEL_FORMAT_RGBA_4444: + bpp = 2; + break; + case GGL_PIXEL_FORMAT_RGBA_8888: + case GGL_PIXEL_FORMAT_RGBX_8888: + bpp = 4; + break; + case GGL_PIXEL_FORMAT_YCbCr_422_SP: + case GGL_PIXEL_FORMAT_YCbCr_420_SP: + // just show the Y plane of YUV buffers + bpp = 1; + break; + default: + // oops, we don't handle this format! + LOGE("layer %p, texture=%d, using format %d, which is not " + "supported by the GL", this, texture->name, t.format); + } + if (bpp) { + const Rect bounds(dirty.getBounds()); + size_t src_stride = t.stride; + size_t dst_stride = buf->stride; + if (src_stride == dst_stride && + bounds.width() == t.width && + bounds.height() == t.height) + { + memcpy(vaddr, t.data, t.height * t.stride * bpp); + } else { + GLubyte const * src = t.data + + (bounds.left + bounds.top * src_stride) * bpp; + GLubyte * dst = (GLubyte *)vaddr + + (bounds.left + bounds.top * dst_stride) * bpp; + const size_t length = bounds.width() * bpp; + size_t h = bounds.height(); + src_stride *= bpp; + dst_stride *= bpp; + while (h--) { + memcpy(dst, src, length); + dst += dst_stride; + src += src_stride; + } + } + } + buf->unlock(); } - } + buffer->unlock(); + } } - } else { - for (size_t i=0 ; i<NUM_BUFFERS ; i++) + } else +#endif + { + for (size_t i=0 ; i<NUM_BUFFERS ; i++) { mTextures[i].image = EGL_NO_IMAGE_KHR; - + } GGLSurface t; status_t res = buffer->lock(&t, GRALLOC_USAGE_SW_READ_OFTEN); LOGE_IF(res, "error %d (%s) locking buffer %p", res, strerror(res), buffer.get()); - if (res == NO_ERROR) { - if (UNLIKELY(mTextures[0].name == -1U)) { - mTextures[0].name = createTexture(); - mTextures[0].width = 0; - mTextures[0].height = 0; - } loadTexture(&mTextures[0], dirty, t); buffer->unlock(); } } } - void Layer::onDraw(const Region& clip) const { int index = mFrontBufferIndex; diff --git a/libs/surfaceflinger/Layer.h b/libs/surfaceflinger/Layer.h index 702c51a55c50..1310ecc9c19f 100644 --- a/libs/surfaceflinger/Layer.h +++ b/libs/surfaceflinger/Layer.h @@ -118,6 +118,7 @@ private: // protected by mLock sp<GraphicBuffer> mBuffers[NUM_BUFFERS]; Texture mTextures[NUM_BUFFERS]; + sp<GraphicBuffer> mHybridBuffer; uint32_t mWidth; uint32_t mHeight; diff --git a/libs/surfaceflinger/LayerBase.cpp b/libs/surfaceflinger/LayerBase.cpp index b376e72aa15f..8003d22daa8b 100644 --- a/libs/surfaceflinger/LayerBase.cpp +++ b/libs/surfaceflinger/LayerBase.cpp @@ -507,7 +507,7 @@ void LayerBase::loadTexture(Texture* texture, // uh? return; } - + glBindTexture(GL_TEXTURE_2D, texture->name); /* @@ -617,6 +617,63 @@ void LayerBase::loadTexture(Texture* texture, } } +status_t LayerBase::initializeEglImage( + const sp<GraphicBuffer>& buffer, Texture* texture) +{ + status_t err = NO_ERROR; + + // we need to recreate the texture + EGLDisplay dpy(mFlinger->graphicPlane(0).getEGLDisplay()); + + // free the previous image + if (texture->image != EGL_NO_IMAGE_KHR) { + eglDestroyImageKHR(dpy, texture->image); + texture->image = EGL_NO_IMAGE_KHR; + } + + // construct an EGL_NATIVE_BUFFER_ANDROID + android_native_buffer_t* clientBuf = buffer->getNativeBuffer(); + + // create the new EGLImageKHR + const EGLint attrs[] = { + EGL_IMAGE_PRESERVED_KHR, EGL_TRUE, + EGL_NONE, EGL_NONE + }; + texture->image = eglCreateImageKHR( + dpy, EGL_NO_CONTEXT, EGL_NATIVE_BUFFER_ANDROID, + (EGLClientBuffer)clientBuf, attrs); + + LOGE_IF(texture->image == EGL_NO_IMAGE_KHR, + "eglCreateImageKHR() failed. err=0x%4x", + eglGetError()); + + if (texture->image != EGL_NO_IMAGE_KHR) { + glBindTexture(GL_TEXTURE_2D, texture->name); + glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, + (GLeglImageOES)texture->image); + GLint error = glGetError(); + if (UNLIKELY(error != GL_NO_ERROR)) { + // this failed, for instance, because we don't support NPOT. + // FIXME: do something! + LOGE("layer=%p, glEGLImageTargetTexture2DOES(%p) " + "failed err=0x%04x", + this, texture->image, error); + mFlags &= ~DisplayHardware::DIRECT_TEXTURE; + err = INVALID_OPERATION; + } else { + // Everything went okay! + texture->NPOTAdjust = false; + texture->dirty = false; + texture->width = clientBuf->width; + texture->height = clientBuf->height; + } + } else { + err = INVALID_OPERATION; + } + return err; +} + + // --------------------------------------------------------------------------- int32_t LayerBaseClient::sIdentity = 0; diff --git a/libs/surfaceflinger/LayerBase.h b/libs/surfaceflinger/LayerBase.h index efa4f8c2109a..ed07b3f93360 100644 --- a/libs/surfaceflinger/LayerBase.h +++ b/libs/surfaceflinger/LayerBase.h @@ -261,6 +261,8 @@ protected: void drawWithOpenGL(const Region& clip, const Texture& texture) const; void loadTexture(Texture* texture, const Region& dirty, const GGLSurface& t) const; + status_t initializeEglImage( + const sp<GraphicBuffer>& buffer, Texture* texture); sp<SurfaceFlinger> mFlinger; diff --git a/libs/surfaceflinger/LayerBlur.cpp b/libs/surfaceflinger/LayerBlur.cpp index 744f2e940d20..5fd7904be6cf 100644 --- a/libs/surfaceflinger/LayerBlur.cpp +++ b/libs/surfaceflinger/LayerBlur.cpp @@ -40,9 +40,10 @@ const char* const LayerBlur::typeID = "LayerBlur"; LayerBlur::LayerBlur(SurfaceFlinger* flinger, DisplayID display, const sp<Client>& client, int32_t i) -: LayerBaseClient(flinger, display, client, i), mCacheDirty(true), -mRefreshCache(true), mCacheAge(0), mTextureName(-1U), -mWidthScale(1.0f), mHeightScale(1.0f) + : LayerBaseClient(flinger, display, client, i), mCacheDirty(true), + mRefreshCache(true), mCacheAge(0), mTextureName(-1U), + mWidthScale(1.0f), mHeightScale(1.0f), + mBlurFormat(GGL_PIXEL_FORMAT_RGB_565) { } diff --git a/libs/surfaceflinger/LayerBuffer.cpp b/libs/surfaceflinger/LayerBuffer.cpp index 7e27a02be819..a36304c8de78 100644 --- a/libs/surfaceflinger/LayerBuffer.cpp +++ b/libs/surfaceflinger/LayerBuffer.cpp @@ -33,14 +33,13 @@ #include "SurfaceFlinger.h" #include "DisplayHardware/DisplayHardware.h" -#include "gralloc_priv.h" // needed for msm / copybit - namespace android { // --------------------------------------------------------------------------- const uint32_t LayerBuffer::typeInfo = LayerBaseClient::typeInfo | 0x20; const char* const LayerBuffer::typeID = "LayerBuffer"; +gralloc_module_t const* LayerBuffer::sGrallocModule = 0; // --------------------------------------------------------------------------- @@ -60,6 +59,16 @@ void LayerBuffer::onFirstRef() LayerBaseClient::onFirstRef(); mSurface = new SurfaceLayerBuffer(mFlinger, clientIndex(), const_cast<LayerBuffer *>(this)); + + hw_module_t const* module = (hw_module_t const*)sGrallocModule; + if (!module) { + // NOTE: technically there is a race here, but it shouldn't + // cause any problem since hw_get_module() always returns + // the same value. + if (hw_get_module(GRALLOC_HARDWARE_MODULE_ID, &module) == 0) { + sGrallocModule = (gralloc_module_t const *)module; + } + } } sp<LayerBaseClient::Surface> LayerBuffer::createSurface() const @@ -243,30 +252,36 @@ LayerBuffer::Buffer::Buffer(const ISurface::BufferHeap& buffers, ssize_t offset) : mBufferHeap(buffers) { NativeBuffer& src(mNativeBuffer); - - src.crop.l = 0; - src.crop.t = 0; - src.crop.r = buffers.w; - src.crop.b = buffers.h; - - src.img.w = buffers.hor_stride ?: buffers.w; - src.img.h = buffers.ver_stride ?: buffers.h; - src.img.format = buffers.format; - src.img.base = (void*)(intptr_t(buffers.heap->base()) + offset); - - // FIXME: gross hack, we should never access private_handle_t from here, - // but this is needed by msm drivers - private_handle_t* hnd = new private_handle_t( - buffers.heap->heapID(), buffers.heap->getSize(), 0); - hnd->offset = offset; - src.img.handle = hnd; + src.img.handle = 0; + + gralloc_module_t const * module = LayerBuffer::getGrallocModule(); + if (module && module->perform) { + int err = module->perform(module, + GRALLOC_MODULE_PERFORM_CREATE_HANDLE_FROM_BUFFER, + buffers.heap->heapID(), buffers.heap->getSize(), + offset, buffers.heap->base(), + &src.img.handle); + + if (err == NO_ERROR) { + src.crop.l = 0; + src.crop.t = 0; + src.crop.r = buffers.w; + src.crop.b = buffers.h; + + src.img.w = buffers.hor_stride ?: buffers.w; + src.img.h = buffers.ver_stride ?: buffers.h; + src.img.format = buffers.format; + src.img.base = (void*)(intptr_t(buffers.heap->base()) + offset); + } + } } LayerBuffer::Buffer::~Buffer() { NativeBuffer& src(mNativeBuffer); - if (src.img.handle) - delete (private_handle_t*)src.img.handle; + if (src.img.handle) { + native_handle_delete(src.img.handle); + } } // ============================================================================ @@ -339,12 +354,6 @@ LayerBuffer::BufferSource::BufferSource(LayerBuffer& layer, mLayer.setNeedsBlending((info.h_alpha - info.l_alpha) > 0); mBufferSize = info.getScanlineSize(buffers.hor_stride)*buffers.ver_stride; mLayer.forceVisibilityTransaction(); - - hw_module_t const* module; - mBlitEngine = NULL; - if (hw_get_module(COPYBIT_HARDWARE_MODULE_ID, &module) == 0) { - copybit_open(module, &mBlitEngine); - } } LayerBuffer::BufferSource::~BufferSource() @@ -352,8 +361,9 @@ LayerBuffer::BufferSource::~BufferSource() if (mTexture.name != -1U) { glDeleteTextures(1, &mTexture.name); } - if (mBlitEngine) { - copybit_close(mBlitEngine); + if (mTexture.image != EGL_NO_IMAGE_KHR) { + EGLDisplay dpy(mLayer.mFlinger->graphicPlane(0).getEGLDisplay()); + eglDestroyImageKHR(dpy, mTexture.image); } } @@ -421,124 +431,30 @@ void LayerBuffer::BufferSource::onDraw(const Region& clip) const status_t err = NO_ERROR; NativeBuffer src(ourBuffer->getBuffer()); const Rect transformedBounds(mLayer.getTransformedBounds()); - copybit_device_t* copybit = mBlitEngine; - - if (copybit) { - const int src_width = src.crop.r - src.crop.l; - const int src_height = src.crop.b - src.crop.t; - int W = transformedBounds.width(); - int H = transformedBounds.height(); - if (mLayer.getOrientation() & Transform::ROT_90) { - int t(W); W=H; H=t; - } -#ifdef EGL_ANDROID_get_render_buffer - EGLDisplay dpy = eglGetCurrentDisplay(); - EGLSurface draw = eglGetCurrentSurface(EGL_DRAW); - EGLClientBuffer clientBuf = eglGetRenderBufferANDROID(dpy, draw); - android_native_buffer_t* nb = (android_native_buffer_t*)clientBuf; - if (nb == 0) { - err = BAD_VALUE; - } else { - copybit_image_t dst; - dst.w = nb->width; - dst.h = nb->height; - dst.format = nb->format; - dst.base = NULL; // unused by copybit on msm7k - dst.handle = (native_handle_t *)nb->handle; - - /* With LayerBuffer, it is likely that we'll have to rescale the - * surface, because this is often used for video playback or - * camera-preview. Since we want these operation as fast as possible - * we make sure we can use the 2D H/W even if it doesn't support - * the requested scale factor, in which case we perform the scaling - * in several passes. */ - - const float min = copybit->get(copybit, COPYBIT_MINIFICATION_LIMIT); - const float mag = copybit->get(copybit, COPYBIT_MAGNIFICATION_LIMIT); - - float xscale = 1.0f; - if (src_width > W*min) xscale = 1.0f / min; - else if (src_width*mag < W) xscale = mag; - - float yscale = 1.0f; - if (src_height > H*min) yscale = 1.0f / min; - else if (src_height*mag < H) yscale = mag; - - if (UNLIKELY(xscale!=1.0f || yscale!=1.0f)) { - const int tmp_w = floorf(src_width * xscale); - const int tmp_h = floorf(src_height * yscale); - - if (mTempBitmap==0 || - mTempBitmap->getWidth() < size_t(tmp_w) || - mTempBitmap->getHeight() < size_t(tmp_h)) { - mTempBitmap.clear(); - mTempBitmap = new GraphicBuffer( - tmp_w, tmp_h, src.img.format, - GraphicBuffer::USAGE_HW_2D); - err = mTempBitmap->initCheck(); - } - - if (LIKELY(err == NO_ERROR)) { - NativeBuffer tmp; - tmp.img.w = tmp_w; - tmp.img.h = tmp_h; - tmp.img.format = src.img.format; - tmp.img.handle = (native_handle_t*)mTempBitmap->getNativeBuffer()->handle; - tmp.crop.l = 0; - tmp.crop.t = 0; - tmp.crop.r = tmp.img.w; - tmp.crop.b = tmp.img.h; - - region_iterator tmp_it(Region(Rect(tmp.crop.r, tmp.crop.b))); - copybit->set_parameter(copybit, COPYBIT_TRANSFORM, 0); - copybit->set_parameter(copybit, COPYBIT_PLANE_ALPHA, 0xFF); - copybit->set_parameter(copybit, COPYBIT_DITHER, COPYBIT_DISABLE); - err = copybit->stretch(copybit, - &tmp.img, &src.img, &tmp.crop, &src.crop, &tmp_it); - src = tmp; - } - } + if (UNLIKELY(mTexture.name == -1LU)) { + mTexture.name = mLayer.createTexture(); + } - const Rect transformedBounds(mLayer.getTransformedBounds()); - const copybit_rect_t& drect = - reinterpret_cast<const copybit_rect_t&>(transformedBounds); - const State& s(mLayer.drawingState()); - region_iterator it(clip); - - // pick the right orientation for this buffer - int orientation = mLayer.getOrientation(); - if (UNLIKELY(mBufferHeap.transform)) { - Transform rot90; - GraphicPlane::orientationToTransfrom( - ISurfaceComposer::eOrientation90, 0, 0, &rot90); - const Transform& planeTransform(mLayer.graphicPlane(0).transform()); - const Layer::State& s(mLayer.drawingState()); - Transform tr(planeTransform * s.transform * rot90); - orientation = tr.getOrientation(); - } +#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->set_parameter(copybit, COPYBIT_TRANSFORM, orientation); - copybit->set_parameter(copybit, COPYBIT_PLANE_ALPHA, s.alpha); - copybit->set_parameter(copybit, COPYBIT_DITHER, COPYBIT_ENABLE); + graphicBuffer->setVerticalStride(src.img.h); - err = copybit->stretch(copybit, - &dst, &src.img, &drect, &src.crop, &it); - if (err != NO_ERROR) { - LOGE("copybit failed (%s)", strerror(err)); - } - } + err = mLayer.initializeEglImage(graphicBuffer, &mTexture); } #endif - - if (!copybit || err) - { - // OpenGL fall-back - if (UNLIKELY(mTexture.name == -1LU)) { - mTexture.name = mLayer.createTexture(); - } - GLuint w = 0; - GLuint h = 0; + else { + err = INVALID_OPERATION; + } + + if (err != NO_ERROR) { + // slower fallback GGLSurface t; t.version = sizeof(GGLSurface); t.width = src.crop.r; @@ -549,11 +465,11 @@ void LayerBuffer::BufferSource::onDraw(const Region& clip) const t.data = (GGLubyte*)src.img.base; const Region dirty(Rect(t.width, t.height)); mLayer.loadTexture(&mTexture, dirty, t); - mTexture.transform = mBufferHeap.transform; - mLayer.drawWithOpenGL(clip, mTexture); } -} + mTexture.transform = mBufferHeap.transform; + mLayer.drawWithOpenGL(clip, mTexture); +} // --------------------------------------------------------------------------- diff --git a/libs/surfaceflinger/LayerBuffer.h b/libs/surfaceflinger/LayerBuffer.h index 5eb472cc96a9..47482f49e476 100644 --- a/libs/surfaceflinger/LayerBuffer.h +++ b/libs/surfaceflinger/LayerBuffer.h @@ -91,6 +91,11 @@ private: copybit_rect_t crop; }; + static gralloc_module_t const* sGrallocModule; + static gralloc_module_t const* getGrallocModule() { + return sGrallocModule; + } + class Buffer : public LightRefBase<Buffer> { public: Buffer(const ISurface::BufferHeap& buffers, ssize_t offset); @@ -132,7 +137,6 @@ private: size_t mBufferSize; mutable sp<GraphicBuffer> mTempBitmap; mutable LayerBase::Texture mTexture; - copybit_device_t* mBlitEngine; }; class OverlaySource : public Source { diff --git a/libs/surfaceflinger/LayerDim.cpp b/libs/surfaceflinger/LayerDim.cpp index 538dc777c0f0..fd61e30d8f5a 100644 --- a/libs/surfaceflinger/LayerDim.cpp +++ b/libs/surfaceflinger/LayerDim.cpp @@ -55,8 +55,8 @@ void LayerDim::initDimmer(SurfaceFlinger* flinger, uint32_t w, uint32_t h) sHeight = h; sUseTexture = false; -#ifdef DIM_WITH_TEXTURE - +#if defined(DIM_WITH_TEXTURE) && defined(EGL_ANDROID_image_native_buffer) + #warning "using a texture to implement LayerDim" /* On some h/w like msm7K, it is faster to use a texture because the @@ -69,7 +69,6 @@ void LayerDim::initDimmer(SurfaceFlinger* flinger, uint32_t w, uint32_t h) uint32_t flags = hw.getFlags(); if (LIKELY(flags & DisplayHardware::DIRECT_TEXTURE)) { - // TODO: api to pass the usage flags sp<GraphicBuffer> buffer = new GraphicBuffer(w, h, PIXEL_FORMAT_RGB_565, GraphicBuffer::USAGE_SW_WRITE_OFTEN | GraphicBuffer::USAGE_HW_TEXTURE); @@ -123,7 +122,7 @@ void LayerDim::onDraw(const Region& clip) const glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); glColor4x(0, 0, 0, alpha); -#ifdef DIM_WITH_TEXTURE +#if defined(DIM_WITH_TEXTURE) && defined(EGL_ANDROID_image_native_buffer) if (sUseTexture) { glBindTexture(GL_TEXTURE_2D, sTexId); glEnable(GL_TEXTURE_2D); diff --git a/libs/surfaceflinger/SurfaceFlinger.h b/libs/surfaceflinger/SurfaceFlinger.h index 6698e003c32d..f9bfe6c7c301 100644 --- a/libs/surfaceflinger/SurfaceFlinger.h +++ b/libs/surfaceflinger/SurfaceFlinger.h @@ -246,8 +246,10 @@ private: virtual status_t readyToRun(); virtual void onFirstRef(); +public: // hack to work around gcc 4.0.3 bug const GraphicPlane& graphicPlane(int dpy) const; GraphicPlane& graphicPlane(int dpy); +private: void waitForEvent(); public: // hack to work around gcc 4.0.3 bug diff --git a/libs/ui/FramebufferNativeWindow.cpp b/libs/ui/FramebufferNativeWindow.cpp index c5e22e5645e3..0efba9c96640 100644 --- a/libs/ui/FramebufferNativeWindow.cpp +++ b/libs/ui/FramebufferNativeWindow.cpp @@ -118,6 +118,8 @@ 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/libs/ui/GraphicBuffer.cpp b/libs/ui/GraphicBuffer.cpp index 1cf20d783a26..6a5c8a9c4ca5 100644 --- a/libs/ui/GraphicBuffer.cpp +++ b/libs/ui/GraphicBuffer.cpp @@ -37,7 +37,7 @@ namespace android { // =========================================================================== GraphicBuffer::GraphicBuffer() - : BASE(), mOwner(false), mBufferMapper(GraphicBufferMapper::get()), + : BASE(), mOwner(ownData), mBufferMapper(GraphicBufferMapper::get()), mInitCheck(NO_ERROR), mVStride(0), mIndex(-1) { width = @@ -50,7 +50,7 @@ GraphicBuffer::GraphicBuffer() GraphicBuffer::GraphicBuffer(uint32_t w, uint32_t h, PixelFormat reqFormat, uint32_t reqUsage) - : BASE(), mOwner(false), mBufferMapper(GraphicBufferMapper::get()), + : BASE(), mOwner(ownData), mBufferMapper(GraphicBufferMapper::get()), mInitCheck(NO_ERROR), mVStride(0), mIndex(-1) { width = @@ -62,8 +62,23 @@ GraphicBuffer::GraphicBuffer(uint32_t w, uint32_t h, mInitCheck = initSize(w, h, reqFormat, reqUsage); } +GraphicBuffer::GraphicBuffer(uint32_t w, uint32_t h, + PixelFormat inFormat, uint32_t inUsage, + uint32_t inStride, native_handle_t* inHandle, bool keepOwnership) + : BASE(), mOwner(keepOwnership ? ownHandle : ownNone), + mBufferMapper(GraphicBufferMapper::get()), + mInitCheck(NO_ERROR), mVStride(0), mIndex(-1) +{ + width = w; + height = h; + stride = inStride; + format = inFormat; + usage = inUsage; + handle = inHandle; +} + GraphicBuffer::GraphicBuffer(const Parcel& data) - : BASE(), mOwner(true), mBufferMapper(GraphicBufferMapper::get()), + : BASE(), mOwner(ownHandle), mBufferMapper(GraphicBufferMapper::get()), mInitCheck(NO_ERROR), mVStride(0), mIndex(-1) { // we own the handle in this case @@ -83,10 +98,10 @@ GraphicBuffer::GraphicBuffer(const Parcel& data) GraphicBuffer::~GraphicBuffer() { if (handle) { - if (mOwner) { + if (mOwner == ownHandle) { native_handle_close(handle); native_handle_delete(const_cast<native_handle*>(handle)); - } else { + } else if (mOwner == ownData) { GraphicBufferAllocator& allocator(GraphicBufferAllocator::get()); allocator.free(handle); } @@ -106,6 +121,9 @@ android_native_buffer_t* GraphicBuffer::getNativeBuffer() const status_t GraphicBuffer::reallocate(uint32_t w, uint32_t h, PixelFormat f, uint32_t reqUsage) { + if (mOwner != ownData) + return INVALID_OPERATION; + if (handle) { GraphicBufferAllocator& allocator(GraphicBufferAllocator::get()); allocator.free(handle); @@ -208,6 +226,14 @@ int GraphicBuffer::getIndex() const { return mIndex; } +void GraphicBuffer::setVerticalStride(uint32_t vstride) { + mVStride = vstride; +} + +uint32_t GraphicBuffer::getVerticalStride() const { + return mVStride; +} + // --------------------------------------------------------------------------- }; // namespace android diff --git a/libs/ui/tests/region.cpp b/libs/ui/tests/region.cpp index 0deb2ba9e55d..ef15de9747e0 100644 --- a/libs/ui/tests/region.cpp +++ b/libs/ui/tests/region.cpp @@ -25,9 +25,16 @@ using namespace android; int main() { + Region empty; Region reg0( Rect( 0, 0, 100, 100 ) ); Region reg1 = reg0; Region reg2, reg3; + + Region reg4 = empty | reg1; + Region reg5 = reg1 | empty; + + reg4.dump("reg4"); + reg5.dump("reg5"); reg0.dump("reg0"); reg1.dump("reg1"); diff --git a/media/java/android/media/AsyncPlayer.java b/media/java/android/media/AsyncPlayer.java index 35f0409d09a8..e1e09b96acc0 100644 --- a/media/java/android/media/AsyncPlayer.java +++ b/media/java/android/media/AsyncPlayer.java @@ -19,10 +19,12 @@ package android.media; import android.content.Context; import android.net.Uri; import android.os.PowerManager; +import android.os.SystemClock; import android.util.Log; import java.io.IOException; import java.lang.IllegalStateException; +import java.util.LinkedList; /** * Plays a series of audio URIs, but does all the hard work on another thread @@ -31,14 +33,15 @@ import java.lang.IllegalStateException; public class AsyncPlayer { private static final int PLAY = 1; private static final int STOP = 2; + private static final boolean mDebug = false; private static final class Command { - Command next; int code; Context context; Uri uri; boolean looping; int stream; + long requestTime; public String toString() { return "{ code=" + code + " looping=" + looping + " stream=" + stream @@ -46,6 +49,36 @@ public class AsyncPlayer { } } + private LinkedList<Command> mCmdQueue = new LinkedList(); + + private void startSound(Command cmd) { + // Preparing can be slow, so if there is something else + // is playing, let it continue until we're done, so there + // is less of a glitch. + try { + if (mDebug) Log.d(mTag, "Starting playback"); + MediaPlayer player = new MediaPlayer(); + player.setAudioStreamType(cmd.stream); + player.setDataSource(cmd.context, cmd.uri); + player.setLooping(cmd.looping); + player.prepare(); + player.start(); + if (mPlayer != null) { + mPlayer.release(); + } + mPlayer = player; + long delay = SystemClock.uptimeMillis() - cmd.requestTime; + if (delay > 1000) { + Log.w(mTag, "Notification sound delayed by " + delay + "msecs"); + } + } + catch (IOException e) { + Log.w(mTag, "error loading sound for " + cmd.uri, e); + } catch (IllegalStateException e) { + Log.w(mTag, "IllegalStateException (content provider died?) " + cmd.uri, e); + } + } + private final class Thread extends java.lang.Thread { Thread() { super("AsyncPlayer-" + mTag); @@ -55,41 +88,23 @@ public class AsyncPlayer { while (true) { Command cmd = null; - synchronized (mLock) { - if (mHead != null) { - cmd = mHead; - mHead = cmd.next; - if (mTail == cmd) { - mTail = null; - } - } + synchronized (mCmdQueue) { + if (mDebug) Log.d(mTag, "RemoveFirst"); + cmd = mCmdQueue.removeFirst(); } switch (cmd.code) { case PLAY: - try { - // Preparing can be slow, so if there is something else - // is playing, let it continue until we're done, so there - // is less of a glitch. - MediaPlayer player = new MediaPlayer(); - player.setAudioStreamType(cmd.stream); - player.setDataSource(cmd.context, cmd.uri); - player.setLooping(cmd.looping); - player.prepare(); - player.start(); - if (mPlayer != null) { - mPlayer.release(); - } - mPlayer = player; - } - catch (IOException e) { - Log.w(mTag, "error loading sound for " + cmd.uri, e); - } catch (IllegalStateException e) { - Log.w(mTag, "IllegalStateException (content provider died?) " + cmd.uri, e); - } + if (mDebug) Log.d(mTag, "PLAY"); + startSound(cmd); break; case STOP: + if (mDebug) Log.d(mTag, "STOP"); if (mPlayer != null) { + long delay = SystemClock.uptimeMillis() - cmd.requestTime; + if (delay > 1000) { + Log.w(mTag, "Notification stop delayed by " + delay + "msecs"); + } mPlayer.stop(); mPlayer.release(); mPlayer = null; @@ -99,8 +114,8 @@ public class AsyncPlayer { break; } - synchronized (mLock) { - if (mHead == null) { + synchronized (mCmdQueue) { + if (mCmdQueue.size() == 0) { // nothing left to do, quit // doing this check after we're done prevents the case where they // added it during the operation from spawning two threads and @@ -115,11 +130,8 @@ public class AsyncPlayer { } private String mTag; - private Command mHead; - private Command mTail; private Thread mThread; private MediaPlayer mPlayer; - private Object mLock = new Object(); private PowerManager.WakeLock mWakeLock; // The current state according to the caller. Reality lags behind @@ -154,12 +166,13 @@ public class AsyncPlayer { */ public void play(Context context, Uri uri, boolean looping, int stream) { Command cmd = new Command(); + cmd.requestTime = SystemClock.uptimeMillis(); cmd.code = PLAY; cmd.context = context; cmd.uri = uri; cmd.looping = looping; cmd.stream = stream; - synchronized (mLock) { + synchronized (mCmdQueue) { enqueueLocked(cmd); mState = PLAY; } @@ -170,11 +183,12 @@ public class AsyncPlayer { * at this point. Calling this multiple times has no ill effects. */ public void stop() { - synchronized (mLock) { + synchronized (mCmdQueue) { // This check allows stop to be called multiple times without starting // a thread that ends up doing nothing. if (mState != STOP) { Command cmd = new Command(); + cmd.requestTime = SystemClock.uptimeMillis(); cmd.code = STOP; enqueueLocked(cmd); mState = STOP; @@ -183,12 +197,7 @@ public class AsyncPlayer { } private void enqueueLocked(Command cmd) { - if (mTail == null) { - mHead = cmd; - } else { - mTail.next = cmd; - } - mTail = cmd; + mCmdQueue.add(cmd); if (mThread == null) { acquireWakeLock(); mThread = new Thread(); diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java index d90871ea2018..58a0bba163f4 100644 --- a/media/java/android/media/AudioService.java +++ b/media/java/android/media/AudioService.java @@ -959,10 +959,10 @@ public class AudioService extends IAudioService.Stub { /////////////////////////////////////////////////////////////////////////// public class VolumeStreamState { - private final String mVolumeIndexSettingName; - private final String mLastAudibleVolumeIndexSettingName; private final int mStreamType; + private String mVolumeIndexSettingName; + private String mLastAudibleVolumeIndexSettingName; private int mIndexMax; private int mIndex; private int mLastAudibleIndex; @@ -970,8 +970,7 @@ public class AudioService extends IAudioService.Stub { private VolumeStreamState(String settingName, int streamType) { - mVolumeIndexSettingName = settingName; - mLastAudibleVolumeIndexSettingName = settingName + System.APPEND_FOR_LAST_AUDIBLE; + setVolumeIndexSettingName(settingName); mStreamType = streamType; @@ -991,6 +990,11 @@ public class AudioService extends IAudioService.Stub { mDeathHandlers = new ArrayList<VolumeDeathHandler>(); } + public void setVolumeIndexSettingName(String settingName) { + mVolumeIndexSettingName = settingName; + mLastAudibleVolumeIndexSettingName = settingName + System.APPEND_FOR_LAST_AUDIBLE; + } + public boolean adjustIndex(int deltaIndex) { return setIndex(mIndex + deltaIndex * 10, true); } @@ -1370,11 +1374,17 @@ public class AudioService extends IAudioService.Stub { mNotificationsUseRingVolume = notificationsUseRingVolume; if (mNotificationsUseRingVolume == 1) { STREAM_VOLUME_ALIAS[AudioSystem.STREAM_NOTIFICATION] = AudioSystem.STREAM_RING; + mStreamStates[AudioSystem.STREAM_NOTIFICATION].setVolumeIndexSettingName( + System.VOLUME_SETTINGS[AudioSystem.STREAM_RING]); } else { STREAM_VOLUME_ALIAS[AudioSystem.STREAM_NOTIFICATION] = AudioSystem.STREAM_NOTIFICATION; + mStreamStates[AudioSystem.STREAM_NOTIFICATION].setVolumeIndexSettingName( + System.VOLUME_SETTINGS[AudioSystem.STREAM_NOTIFICATION]); // Persist notification volume volume as it was not persisted while aliased to ring volume + // and persist with no delay as there might be registered observers of the persisted + // notification volume. sendMsg(mAudioHandler, MSG_PERSIST_VOLUME, AudioSystem.STREAM_NOTIFICATION, - SENDMSG_REPLACE, 0, 0, mStreamStates[AudioSystem.STREAM_NOTIFICATION], PERSIST_DELAY); + SENDMSG_REPLACE, 0, 0, mStreamStates[AudioSystem.STREAM_NOTIFICATION], 0); } } } diff --git a/media/java/android/media/MediaRecorder.java b/media/java/android/media/MediaRecorder.java index 9bb00c64bf2c..4203cbadb001 100644 --- a/media/java/android/media/MediaRecorder.java +++ b/media/java/android/media/MediaRecorder.java @@ -135,6 +135,12 @@ public class MediaRecorder /** Voice call uplink + downlink audio source */ public static final int VOICE_CALL = 4; + + /** Microphone audio source with same orientation as camera */ + public static final int CAMCORDER = 5; + + /** Microphone audio source tuned for voice recognition */ + public static final int VOICE_RECOGNITION = 6; } /** @@ -274,7 +280,7 @@ public class MediaRecorder * Gets the maximum value for audio sources. * @see android.media.MediaRecorder.AudioSource */ - public static final int getAudioSourceMax() { return AudioSource.VOICE_CALL; } + public static final int getAudioSourceMax() { return AudioSource.VOICE_RECOGNITION; } /** * Sets the video source to be used for recording. If this method is not diff --git a/media/libmedia/AudioRecord.cpp b/media/libmedia/AudioRecord.cpp index 5e355644a65a..e63c0d2dd281 100644 --- a/media/libmedia/AudioRecord.cpp +++ b/media/libmedia/AudioRecord.cpp @@ -101,11 +101,6 @@ status_t AudioRecord::set( return INVALID_OPERATION; } - const sp<IAudioFlinger>& audioFlinger = AudioSystem::get_audio_flinger(); - if (audioFlinger == 0) { - return NO_INIT; - } - if (inputSource == AUDIO_SOURCE_DEFAULT) { inputSource = AUDIO_SOURCE_MIC; } @@ -171,22 +166,14 @@ status_t AudioRecord::set( notificationFrames = frameCount/2; } - // open record channel - status_t status; - sp<IAudioRecord> record = audioFlinger->openRecord(getpid(), mInput, - sampleRate, format, - channelCount, - frameCount, - ((uint16_t)flags) << 16, - &status); - if (record == 0) { - LOGE("AudioFlinger could not create record track, status: %d", status); + // create the IAudioRecord + status_t status = openRecord(sampleRate, format, channelCount, + frameCount, flags); + + if (status != NO_ERROR) { return status; } - sp<IMemory> cblk = record->getCblk(); - if (cblk == 0) { - return NO_INIT; - } + if (cbf != 0) { mClientRecordThread = new ClientRecordThread(*this, threadCanCallJava); if (mClientRecordThread == 0) { @@ -196,11 +183,6 @@ status_t AudioRecord::set( mStatus = NO_ERROR; - mAudioRecord = record; - mCblkMemory = cblk; - mCblk = static_cast<audio_track_cblk_t*>(cblk->pointer()); - mCblk->buffers = (char*)mCblk + sizeof(audio_track_cblk_t); - mCblk->out = 0; mFormat = format; // Update buffer size in case it has been limited by AudioFlinger during track creation mFrameCount = mCblk->frameCount; @@ -217,6 +199,7 @@ status_t AudioRecord::set( mNewPosition = 0; mUpdatePeriod = 0; mInputSource = (uint8_t)inputSource; + mFlags = flags; return NO_ERROR; } @@ -284,15 +267,26 @@ status_t AudioRecord::start() if (android_atomic_or(1, &mActive) == 0) { ret = AudioSystem::startInput(mInput); if (ret == NO_ERROR) { - mNewPosition = mCblk->user + mUpdatePeriod; - mCblk->bufferTimeoutMs = MAX_RUN_TIMEOUT_MS; - mCblk->waitTimeMs = 0; - if (t != 0) { - t->run("ClientRecordThread", THREAD_PRIORITY_AUDIO_CLIENT); + ret = mAudioRecord->start(); + if (ret == DEAD_OBJECT) { + LOGV("start() dead IAudioRecord: creating a new one"); + ret = openRecord(mCblk->sampleRate, mFormat, mChannelCount, + mFrameCount, mFlags); + } + if (ret == NO_ERROR) { + mNewPosition = mCblk->user + mUpdatePeriod; + mCblk->bufferTimeoutMs = MAX_RUN_TIMEOUT_MS; + mCblk->waitTimeMs = 0; + if (t != 0) { + t->run("ClientRecordThread", THREAD_PRIORITY_AUDIO_CLIENT); + } else { + setpriority(PRIO_PROCESS, 0, THREAD_PRIORITY_AUDIO_CLIENT); + } } else { - setpriority(PRIO_PROCESS, 0, THREAD_PRIORITY_AUDIO_CLIENT); + LOGV("start() failed"); + AudioSystem::stopInput(mInput); + android_atomic_and(~1, &mActive); } - ret = mAudioRecord->start(); } } @@ -396,10 +390,48 @@ status_t AudioRecord::getPosition(uint32_t *position) // ------------------------------------------------------------------------- +status_t AudioRecord::openRecord( + uint32_t sampleRate, + int format, + int channelCount, + int frameCount, + uint32_t flags) +{ + status_t status; + const sp<IAudioFlinger>& audioFlinger = AudioSystem::get_audio_flinger(); + if (audioFlinger == 0) { + return NO_INIT; + } + + sp<IAudioRecord> record = audioFlinger->openRecord(getpid(), mInput, + sampleRate, format, + channelCount, + frameCount, + ((uint16_t)flags) << 16, + &status); + if (record == 0) { + LOGE("AudioFlinger could not create record track, status: %d", status); + return status; + } + sp<IMemory> cblk = record->getCblk(); + if (cblk == 0) { + LOGE("Could not get control block"); + return NO_INIT; + } + mAudioRecord.clear(); + mAudioRecord = record; + mCblkMemory.clear(); + mCblkMemory = cblk; + mCblk = static_cast<audio_track_cblk_t*>(cblk->pointer()); + mCblk->buffers = (char*)mCblk + sizeof(audio_track_cblk_t); + mCblk->out = 0; + + return NO_ERROR; +} + status_t AudioRecord::obtainBuffer(Buffer* audioBuffer, int32_t waitCount) { int active; - int timeout = 0; status_t result; audio_track_cblk_t* cblk = mCblk; uint32_t framesReq = audioBuffer->frameCount; @@ -411,25 +443,40 @@ status_t AudioRecord::obtainBuffer(Buffer* audioBuffer, int32_t waitCount) uint32_t framesReady = cblk->framesReady(); if (framesReady == 0) { - Mutex::Autolock _l(cblk->lock); + cblk->lock.lock(); goto start_loop_here; while (framesReady == 0) { active = mActive; - if (UNLIKELY(!active)) + if (UNLIKELY(!active)) { + cblk->lock.unlock(); return NO_MORE_BUFFERS; - if (UNLIKELY(!waitCount)) + } + if (UNLIKELY(!waitCount)) { + cblk->lock.unlock(); return WOULD_BLOCK; - timeout = 0; + } result = cblk->cv.waitRelative(cblk->lock, milliseconds(waitTimeMs)); if (__builtin_expect(result!=NO_ERROR, false)) { cblk->waitTimeMs += waitTimeMs; if (cblk->waitTimeMs >= cblk->bufferTimeoutMs) { LOGW( "obtainBuffer timed out (is the CPU pegged?) " "user=%08x, server=%08x", cblk->user, cblk->server); - timeout = 1; + cblk->lock.unlock(); + result = mAudioRecord->start(); + if (result == DEAD_OBJECT) { + LOGW("obtainBuffer() dead IAudioRecord: creating a new one"); + result = openRecord(cblk->sampleRate, mFormat, mChannelCount, + mFrameCount, mFlags); + if (result == NO_ERROR) { + cblk = mCblk; + cblk->bufferTimeoutMs = MAX_RUN_TIMEOUT_MS; + } + } + cblk->lock.lock(); cblk->waitTimeMs = 0; } if (--waitCount == 0) { + cblk->lock.unlock(); return TIMED_OUT; } } @@ -437,13 +484,9 @@ status_t AudioRecord::obtainBuffer(Buffer* audioBuffer, int32_t waitCount) start_loop_here: framesReady = cblk->framesReady(); } + cblk->lock.unlock(); } - LOGW_IF(timeout, - "*** SERIOUS WARNING *** obtainBuffer() timed out " - "but didn't need to be locked. We recovered, but " - "this shouldn't happen (user=%08x, server=%08x)", cblk->user, cblk->server); - cblk->waitTimeMs = 0; if (framesReq > framesReady) { diff --git a/media/libmedia/AudioSystem.cpp b/media/libmedia/AudioSystem.cpp index bd1b2d707da6..5352234f7984 100644 --- a/media/libmedia/AudioSystem.cpp +++ b/media/libmedia/AudioSystem.cpp @@ -335,6 +335,13 @@ status_t AudioSystem::getInputBufferSize(uint32_t sampleRate, int format, int ch return NO_ERROR; } +status_t AudioSystem::setVoiceVolume(float value) +{ + const sp<IAudioFlinger>& af = AudioSystem::get_audio_flinger(); + if (af == 0) return PERMISSION_DENIED; + return af->setVoiceVolume(value); +} + // --------------------------------------------------------------------------- void AudioSystem::AudioFlingerClient::binderDied(const wp<IBinder>& who) { diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp index 4b9d272cf60a..8529a8e46fa1 100644 --- a/media/libmedia/AudioTrack.cpp +++ b/media/libmedia/AudioTrack.cpp @@ -122,11 +122,6 @@ status_t AudioTrack::set( return INVALID_OPERATION; } - const sp<IAudioFlinger>& audioFlinger = AudioSystem::get_audio_flinger(); - if (audioFlinger == 0) { - LOGE("Could not get audioflinger"); - return NO_INIT; - } int afSampleRate; if (AudioSystem::getOutputSamplingRate(&afSampleRate, streamType) != NO_ERROR) { return NO_INIT; @@ -217,28 +212,16 @@ status_t AudioTrack::set( } } - // create the track - status_t status; - sp<IAudioTrack> track = audioFlinger->createTrack(getpid(), - streamType, - sampleRate, - format, - channelCount, - frameCount, - ((uint16_t)flags) << 16, - sharedBuffer, - output, - &status); + mVolume[LEFT] = 1.0f; + mVolume[RIGHT] = 1.0f; + // create the IAudioTrack + status_t status = createTrack(streamType, sampleRate, format, channelCount, + frameCount, flags, sharedBuffer, output); - if (track == 0) { - LOGE("AudioFlinger could not create track, status: %d", status); + if (status != NO_ERROR) { return status; } - sp<IMemory> cblk = track->getCblk(); - if (cblk == 0) { - LOGE("Could not get control block"); - return NO_INIT; - } + if (cbf != 0) { mAudioTrackThread = new AudioTrackThread(*this, threadCanCallJava); if (mAudioTrackThread == 0) { @@ -249,22 +232,6 @@ status_t AudioTrack::set( mStatus = NO_ERROR; - mAudioTrack = track; - mCblkMemory = cblk; - mCblk = static_cast<audio_track_cblk_t*>(cblk->pointer()); - mCblk->out = 1; - // Update buffer size in case it has been limited by AudioFlinger during track creation - mFrameCount = mCblk->frameCount; - if (sharedBuffer == 0) { - mCblk->buffers = (char*)mCblk + sizeof(audio_track_cblk_t); - } else { - mCblk->buffers = sharedBuffer->pointer(); - // Force buffer full condition as data is already present in shared memory - mCblk->stepUser(mFrameCount); - } - mCblk->volume[0] = mCblk->volume[1] = 0x1000; - mVolume[LEFT] = 1.0f; - mVolume[RIGHT] = 1.0f; mStreamType = streamType; mFormat = format; mChannels = channels; @@ -351,16 +318,27 @@ void AudioTrack::start() } if (android_atomic_or(1, &mActive) == 0) { - AudioSystem::startOutput(getOutput(), (AudioSystem::stream_type)mStreamType); - mNewPosition = mCblk->server + mUpdatePeriod; - mCblk->bufferTimeoutMs = MAX_STARTUP_TIMEOUT_MS; - mCblk->waitTimeMs = 0; - if (t != 0) { - t->run("AudioTrackThread", THREAD_PRIORITY_AUDIO_CLIENT); + audio_io_handle_t output = AudioTrack::getOutput(); + status_t status = mAudioTrack->start(); + if (status == DEAD_OBJECT) { + LOGV("start() dead IAudioTrack: creating a new one"); + status = createTrack(mStreamType, mCblk->sampleRate, mFormat, mChannelCount, + mFrameCount, mFlags, mSharedBuffer, output); + } + if (status == NO_ERROR) { + AudioSystem::startOutput(output, (AudioSystem::stream_type)mStreamType); + mNewPosition = mCblk->server + mUpdatePeriod; + mCblk->bufferTimeoutMs = MAX_STARTUP_TIMEOUT_MS; + mCblk->waitTimeMs = 0; + if (t != 0) { + t->run("AudioTrackThread", THREAD_PRIORITY_AUDIO_CLIENT); + } else { + setpriority(PRIO_PROCESS, 0, THREAD_PRIORITY_AUDIO_CLIENT); + } } else { - setpriority(PRIO_PROCESS, 0, THREAD_PRIORITY_AUDIO_CLIENT); + LOGV("start() failed"); + android_atomic_and(~1, &mActive); } - mAudioTrack->start(); } if (t != 0) { @@ -617,10 +595,67 @@ audio_io_handle_t AudioTrack::getOutput() // ------------------------------------------------------------------------- +status_t AudioTrack::createTrack( + int streamType, + uint32_t sampleRate, + int format, + int channelCount, + int frameCount, + uint32_t flags, + const sp<IMemory>& sharedBuffer, + audio_io_handle_t output) +{ + status_t status; + const sp<IAudioFlinger>& audioFlinger = AudioSystem::get_audio_flinger(); + if (audioFlinger == 0) { + LOGE("Could not get audioflinger"); + return NO_INIT; + } + + sp<IAudioTrack> track = audioFlinger->createTrack(getpid(), + streamType, + sampleRate, + format, + channelCount, + frameCount, + ((uint16_t)flags) << 16, + sharedBuffer, + output, + &status); + + if (track == 0) { + LOGE("AudioFlinger could not create track, status: %d", status); + return status; + } + sp<IMemory> cblk = track->getCblk(); + if (cblk == 0) { + LOGE("Could not get control block"); + return NO_INIT; + } + mAudioTrack.clear(); + mAudioTrack = track; + mCblkMemory.clear(); + mCblkMemory = cblk; + mCblk = static_cast<audio_track_cblk_t*>(cblk->pointer()); + mCblk->out = 1; + // Update buffer size in case it has been limited by AudioFlinger during track creation + mFrameCount = mCblk->frameCount; + if (sharedBuffer == 0) { + mCblk->buffers = (char*)mCblk + sizeof(audio_track_cblk_t); + } else { + mCblk->buffers = sharedBuffer->pointer(); + // Force buffer full condition as data is already present in shared memory + mCblk->stepUser(mFrameCount); + } + + mCblk->volumeLR = (int32_t(int16_t(mVolume[LEFT] * 0x1000)) << 16) | int16_t(mVolume[RIGHT] * 0x1000); + + return NO_ERROR; +} + status_t AudioTrack::obtainBuffer(Buffer* audioBuffer, int32_t waitCount) { int active; - int timeout = 0; status_t result; audio_track_cblk_t* cblk = mCblk; uint32_t framesReq = audioBuffer->frameCount; @@ -632,17 +667,20 @@ status_t AudioTrack::obtainBuffer(Buffer* audioBuffer, int32_t waitCount) uint32_t framesAvail = cblk->framesAvailable(); if (framesAvail == 0) { - Mutex::Autolock _l(cblk->lock); + cblk->lock.lock(); goto start_loop_here; while (framesAvail == 0) { active = mActive; if (UNLIKELY(!active)) { LOGV("Not active and NO_MORE_BUFFERS"); + cblk->lock.unlock(); return NO_MORE_BUFFERS; } - if (UNLIKELY(!waitCount)) + if (UNLIKELY(!waitCount)) { + cblk->lock.unlock(); return WOULD_BLOCK; - timeout = 0; + } + result = cblk->cv.waitRelative(cblk->lock, milliseconds(waitTimeMs)); if (__builtin_expect(result!=NO_ERROR, false)) { cblk->waitTimeMs += waitTimeMs; @@ -654,14 +692,23 @@ status_t AudioTrack::obtainBuffer(Buffer* audioBuffer, int32_t waitCount) "user=%08x, server=%08x", this, cblk->user, cblk->server); //unlock cblk mutex before calling mAudioTrack->start() (see issue #1617140) cblk->lock.unlock(); - mAudioTrack->start(); + result = mAudioTrack->start(); + if (result == DEAD_OBJECT) { + LOGW("obtainBuffer() dead IAudioTrack: creating a new one"); + result = createTrack(mStreamType, cblk->sampleRate, mFormat, mChannelCount, + mFrameCount, mFlags, mSharedBuffer, getOutput()); + if (result == NO_ERROR) { + cblk = mCblk; + cblk->bufferTimeoutMs = MAX_RUN_TIMEOUT_MS; + } + } cblk->lock.lock(); - timeout = 1; } cblk->waitTimeMs = 0; } if (--waitCount == 0) { + cblk->lock.unlock(); return TIMED_OUT; } } @@ -669,6 +716,7 @@ status_t AudioTrack::obtainBuffer(Buffer* audioBuffer, int32_t waitCount) start_loop_here: framesAvail = cblk->framesAvailable_l(); } + cblk->lock.unlock(); } cblk->waitTimeMs = 0; @@ -684,11 +732,6 @@ status_t AudioTrack::obtainBuffer(Buffer* audioBuffer, int32_t waitCount) framesReq = bufferEnd - u; } - LOGW_IF(timeout, - "*** SERIOUS WARNING *** obtainBuffer() timed out " - "but didn't need to be locked. We recovered, but " - "this shouldn't happen (user=%08x, server=%08x)", cblk->user, cblk->server); - audioBuffer->flags = mMuted ? Buffer::MUTE : 0; audioBuffer->channelCount = mChannelCount; audioBuffer->frameCount = framesReq; @@ -991,7 +1034,7 @@ bool audio_track_cblk_t::stepServer(uint32_t frameCount) // Mark that we have read the first buffer so that next time stepUser() is called // we switch to normal obtainBuffer() timeout period if (bufferTimeoutMs == MAX_STARTUP_TIMEOUT_MS) { - bufferTimeoutMs = MAX_RUN_TIMEOUT_MS - 1; + bufferTimeoutMs = MAX_STARTUP_TIMEOUT_MS - 1; } // It is possible that we receive a flush() // while the mixer is processing a block: in this case, diff --git a/media/libmedia/IAudioFlinger.cpp b/media/libmedia/IAudioFlinger.cpp index 5089157bc97c..0eff20528511 100644 --- a/media/libmedia/IAudioFlinger.cpp +++ b/media/libmedia/IAudioFlinger.cpp @@ -59,7 +59,8 @@ enum { RESTORE_OUTPUT, OPEN_INPUT, CLOSE_INPUT, - SET_STREAM_OUTPUT + SET_STREAM_OUTPUT, + SET_VOICE_VOLUME }; class BpAudioFlinger : public BpInterface<IAudioFlinger> @@ -455,6 +456,15 @@ public: remote()->transact(SET_STREAM_OUTPUT, data, &reply); return reply.readInt32(); } + + virtual status_t setVoiceVolume(float volume) + { + Parcel data, reply; + data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor()); + data.writeFloat(volume); + remote()->transact(SET_VOICE_VOLUME, data, &reply); + return reply.readInt32(); + } }; IMPLEMENT_META_INTERFACE(AudioFlinger, "android.media.IAudioFlinger"); @@ -700,6 +710,12 @@ status_t BnAudioFlinger::onTransact( reply->writeInt32(setStreamOutput(stream, output)); return NO_ERROR; } break; + case SET_VOICE_VOLUME: { + CHECK_INTERFACE(IAudioFlinger, data, reply); + float volume = data.readFloat(); + reply->writeInt32( setVoiceVolume(volume) ); + return NO_ERROR; + } break; default: return BBinder::onTransact(code, data, reply, flags); } diff --git a/media/libmedia/IAudioRecord.cpp b/media/libmedia/IAudioRecord.cpp index dacf75aae873..ba0d55b843d4 100644 --- a/media/libmedia/IAudioRecord.cpp +++ b/media/libmedia/IAudioRecord.cpp @@ -15,6 +15,10 @@ ** limitations under the License. */ +#define LOG_TAG "IAudioRecord" +//#define LOG_NDEBUG 0 +#include <utils/Log.h> + #include <stdint.h> #include <sys/types.h> @@ -42,8 +46,13 @@ public: { Parcel data, reply; data.writeInterfaceToken(IAudioRecord::getInterfaceDescriptor()); - remote()->transact(START, data, &reply); - return reply.readInt32(); + status_t status = remote()->transact(START, data, &reply); + if (status == NO_ERROR) { + status = reply.readInt32(); + } else { + LOGW("start() error: %s", strerror(-status)); + } + return status; } virtual void stop() diff --git a/media/libmedia/IAudioTrack.cpp b/media/libmedia/IAudioTrack.cpp index 7f43347a86cb..01ffd75e56c5 100644 --- a/media/libmedia/IAudioTrack.cpp +++ b/media/libmedia/IAudioTrack.cpp @@ -15,6 +15,10 @@ ** limitations under the License. */ +#define LOG_TAG "IAudioTrack" +//#define LOG_NDEBUG 0 +#include <utils/Log.h> + #include <stdint.h> #include <sys/types.h> @@ -45,8 +49,13 @@ public: { Parcel data, reply; data.writeInterfaceToken(IAudioTrack::getInterfaceDescriptor()); - remote()->transact(START, data, &reply); - return reply.readInt32(); + status_t status = remote()->transact(START, data, &reply); + if (status == NO_ERROR) { + status = reply.readInt32(); + } else { + LOGW("start() error: %s", strerror(-status)); + } + return status; } virtual void stop() diff --git a/media/libmedia/IMediaPlayerService.cpp b/media/libmedia/IMediaPlayerService.cpp index 98f7ef18043c..cca3e9b104c2 100644 --- a/media/libmedia/IMediaPlayerService.cpp +++ b/media/libmedia/IMediaPlayerService.cpp @@ -35,7 +35,7 @@ enum { DECODE_FD, CREATE_MEDIA_RECORDER, CREATE_METADATA_RETRIEVER, - CREATE_OMX, + GET_OMX, SNOOP }; @@ -123,10 +123,10 @@ public: return interface_cast<IMemory>(reply.readStrongBinder()); } - virtual sp<IOMX> createOMX() { + virtual sp<IOMX> getOMX() { Parcel data, reply; data.writeInterfaceToken(IMediaPlayerService::getInterfaceDescriptor()); - remote()->transact(CREATE_OMX, data, &reply); + remote()->transact(GET_OMX, data, &reply); return interface_cast<IOMX>(reply.readStrongBinder()); } }; @@ -207,9 +207,9 @@ status_t BnMediaPlayerService::onTransact( reply->writeStrongBinder(retriever->asBinder()); return NO_ERROR; } break; - case CREATE_OMX: { + case GET_OMX: { CHECK_INTERFACE(IMediaPlayerService, data, reply); - sp<IOMX> omx = createOMX(); + sp<IOMX> omx = getOMX(); reply->writeStrongBinder(omx->asBinder()); return NO_ERROR; } break; diff --git a/media/libmedia/IOMX.cpp b/media/libmedia/IOMX.cpp index 0cec7bbe8c10..88a70649dd69 100644 --- a/media/libmedia/IOMX.cpp +++ b/media/libmedia/IOMX.cpp @@ -24,7 +24,6 @@ enum { ALLOC_BUFFER, ALLOC_BUFFER_WITH_BACKUP, FREE_BUFFER, - OBSERVE_NODE, FILL_BUFFER, EMPTY_BUFFER, GET_EXTENSION_INDEX, @@ -76,7 +75,7 @@ public: : BpInterface<IOMX>(impl) { } - virtual status_t list_nodes(List<String8> *list) { + virtual status_t listNodes(List<String8> *list) { list->clear(); Parcel data, reply; @@ -93,10 +92,12 @@ public: return OK; } - virtual status_t allocate_node(const char *name, node_id *node) { + virtual status_t allocateNode( + const char *name, const sp<IOMXObserver> &observer, node_id *node) { Parcel data, reply; data.writeInterfaceToken(IOMX::getInterfaceDescriptor()); data.writeCString(name); + data.writeStrongBinder(observer->asBinder()); remote()->transact(ALLOCATE_NODE, data, &reply); status_t err = reply.readInt32(); @@ -109,7 +110,7 @@ public: return err; } - virtual status_t free_node(node_id node) { + virtual status_t freeNode(node_id node) { Parcel data, reply; data.writeInterfaceToken(IOMX::getInterfaceDescriptor()); data.writeIntPtr((intptr_t)node); @@ -118,7 +119,7 @@ public: return reply.readInt32(); } - virtual status_t send_command( + virtual status_t sendCommand( node_id node, OMX_COMMANDTYPE cmd, OMX_S32 param) { Parcel data, reply; data.writeInterfaceToken(IOMX::getInterfaceDescriptor()); @@ -130,7 +131,7 @@ public: return reply.readInt32(); } - virtual status_t get_parameter( + virtual status_t getParameter( node_id node, OMX_INDEXTYPE index, void *params, size_t size) { Parcel data, reply; @@ -151,7 +152,7 @@ public: return OK; } - virtual status_t set_parameter( + virtual status_t setParameter( node_id node, OMX_INDEXTYPE index, const void *params, size_t size) { Parcel data, reply; @@ -165,7 +166,7 @@ public: return reply.readInt32(); } - virtual status_t get_config( + virtual status_t getConfig( node_id node, OMX_INDEXTYPE index, void *params, size_t size) { Parcel data, reply; @@ -186,7 +187,7 @@ public: return OK; } - virtual status_t set_config( + virtual status_t setConfig( node_id node, OMX_INDEXTYPE index, const void *params, size_t size) { Parcel data, reply; @@ -200,7 +201,7 @@ public: return reply.readInt32(); } - virtual status_t use_buffer( + virtual status_t useBuffer( node_id node, OMX_U32 port_index, const sp<IMemory> ¶ms, buffer_id *buffer) { Parcel data, reply; @@ -222,7 +223,7 @@ public: return err; } - virtual status_t allocate_buffer( + virtual status_t allocateBuffer( node_id node, OMX_U32 port_index, size_t size, buffer_id *buffer) { Parcel data, reply; @@ -244,7 +245,7 @@ public: return err; } - virtual status_t allocate_buffer_with_backup( + virtual status_t allocateBufferWithBackup( node_id node, OMX_U32 port_index, const sp<IMemory> ¶ms, buffer_id *buffer) { Parcel data, reply; @@ -266,7 +267,7 @@ public: return err; } - virtual status_t free_buffer( + virtual status_t freeBuffer( node_id node, OMX_U32 port_index, buffer_id buffer) { Parcel data, reply; data.writeInterfaceToken(IOMX::getInterfaceDescriptor()); @@ -278,26 +279,17 @@ public: return reply.readInt32(); } - virtual status_t observe_node( - node_id node, const sp<IOMXObserver> &observer) { - Parcel data, reply; - data.writeInterfaceToken(IOMX::getInterfaceDescriptor()); - data.writeIntPtr((intptr_t)node); - data.writeStrongBinder(observer->asBinder()); - remote()->transact(OBSERVE_NODE, data, &reply); - - return reply.readInt32(); - } - - virtual void fill_buffer(node_id node, buffer_id buffer) { + virtual status_t fillBuffer(node_id node, buffer_id buffer) { Parcel data, reply; data.writeInterfaceToken(IOMX::getInterfaceDescriptor()); data.writeIntPtr((intptr_t)node); data.writeIntPtr((intptr_t)buffer); remote()->transact(FILL_BUFFER, data, &reply, IBinder::FLAG_ONEWAY); + + return reply.readInt32(); } - virtual void empty_buffer( + virtual status_t emptyBuffer( node_id node, buffer_id buffer, OMX_U32 range_offset, OMX_U32 range_length, @@ -311,9 +303,11 @@ public: data.writeInt32(flags); data.writeInt64(timestamp); remote()->transact(EMPTY_BUFFER, data, &reply, IBinder::FLAG_ONEWAY); + + return reply.readInt32(); } - virtual status_t get_extension_index( + virtual status_t getExtensionIndex( node_id node, const char *parameter_name, OMX_INDEXTYPE *index) { @@ -375,7 +369,7 @@ status_t BnOMX::onTransact( CHECK_INTERFACE(IOMX, data, reply); List<String8> list; - list_nodes(&list); + listNodes(&list); reply->writeInt32(list.size()); for (List<String8>::iterator it = list.begin(); @@ -390,8 +384,14 @@ status_t BnOMX::onTransact( { CHECK_INTERFACE(IOMX, data, reply); + const char *name = data.readCString(); + + sp<IOMXObserver> observer = + interface_cast<IOMXObserver>(data.readStrongBinder()); + node_id node; - status_t err = allocate_node(data.readCString(), &node); + + status_t err = allocateNode(name, observer, &node); reply->writeInt32(err); if (err == OK) { reply->writeIntPtr((intptr_t)node); @@ -406,7 +406,7 @@ status_t BnOMX::onTransact( node_id node = (void*)data.readIntPtr(); - reply->writeInt32(free_node(node)); + reply->writeInt32(freeNode(node)); return NO_ERROR; } @@ -421,7 +421,7 @@ status_t BnOMX::onTransact( static_cast<OMX_COMMANDTYPE>(data.readInt32()); OMX_S32 param = data.readInt32(); - reply->writeInt32(send_command(node, cmd, param)); + reply->writeInt32(sendCommand(node, cmd, param)); return NO_ERROR; } @@ -439,7 +439,7 @@ status_t BnOMX::onTransact( void *params = malloc(size); data.read(params, size); - status_t err = get_parameter(node, index, params, size); + status_t err = getParameter(node, index, params, size); reply->writeInt32(err); @@ -463,7 +463,7 @@ status_t BnOMX::onTransact( size_t size = data.readInt32(); void *params = const_cast<void *>(data.readInplace(size)); - reply->writeInt32(set_parameter(node, index, params, size)); + reply->writeInt32(setParameter(node, index, params, size)); return NO_ERROR; } @@ -481,7 +481,7 @@ status_t BnOMX::onTransact( void *params = malloc(size); data.read(params, size); - status_t err = get_config(node, index, params, size); + status_t err = getConfig(node, index, params, size); reply->writeInt32(err); @@ -505,7 +505,7 @@ status_t BnOMX::onTransact( size_t size = data.readInt32(); void *params = const_cast<void *>(data.readInplace(size)); - reply->writeInt32(set_config(node, index, params, size)); + reply->writeInt32(setConfig(node, index, params, size)); return NO_ERROR; } @@ -520,7 +520,7 @@ status_t BnOMX::onTransact( interface_cast<IMemory>(data.readStrongBinder()); buffer_id buffer; - status_t err = use_buffer(node, port_index, params, &buffer); + status_t err = useBuffer(node, port_index, params, &buffer); reply->writeInt32(err); if (err == OK) { @@ -539,7 +539,7 @@ status_t BnOMX::onTransact( size_t size = data.readInt32(); buffer_id buffer; - status_t err = allocate_buffer(node, port_index, size, &buffer); + status_t err = allocateBuffer(node, port_index, size, &buffer); reply->writeInt32(err); if (err == OK) { @@ -559,7 +559,7 @@ status_t BnOMX::onTransact( interface_cast<IMemory>(data.readStrongBinder()); buffer_id buffer; - status_t err = allocate_buffer_with_backup( + status_t err = allocateBufferWithBackup( node, port_index, params, &buffer); reply->writeInt32(err); @@ -578,19 +578,7 @@ status_t BnOMX::onTransact( node_id node = (void*)data.readIntPtr(); OMX_U32 port_index = data.readInt32(); buffer_id buffer = (void*)data.readIntPtr(); - reply->writeInt32(free_buffer(node, port_index, buffer)); - - return NO_ERROR; - } - - case OBSERVE_NODE: - { - CHECK_INTERFACE(IOMX, data, reply); - - node_id node = (void*)data.readIntPtr(); - sp<IOMXObserver> observer = - interface_cast<IOMXObserver>(data.readStrongBinder()); - reply->writeInt32(observe_node(node, observer)); + reply->writeInt32(freeBuffer(node, port_index, buffer)); return NO_ERROR; } @@ -601,7 +589,7 @@ status_t BnOMX::onTransact( node_id node = (void*)data.readIntPtr(); buffer_id buffer = (void*)data.readIntPtr(); - fill_buffer(node, buffer); + reply->writeInt32(fillBuffer(node, buffer)); return NO_ERROR; } @@ -617,9 +605,10 @@ status_t BnOMX::onTransact( OMX_U32 flags = data.readInt32(); OMX_TICKS timestamp = data.readInt64(); - empty_buffer( - node, buffer, range_offset, range_length, - flags, timestamp); + reply->writeInt32( + emptyBuffer( + node, buffer, range_offset, range_length, + flags, timestamp)); return NO_ERROR; } @@ -632,7 +621,7 @@ status_t BnOMX::onTransact( const char *parameter_name = data.readCString(); OMX_INDEXTYPE index; - status_t err = get_extension_index(node, parameter_name, &index); + status_t err = getExtensionIndex(node, parameter_name, &index); reply->writeInt32(err); @@ -683,7 +672,7 @@ public: : BpInterface<IOMXObserver>(impl) { } - virtual void on_message(const omx_message &msg) { + virtual void onMessage(const omx_message &msg) { Parcel data, reply; data.writeInterfaceToken(IOMXObserver::getInterfaceDescriptor()); data.write(&msg, sizeof(msg)); @@ -705,7 +694,7 @@ status_t BnOMXObserver::onTransact( data.read(&msg, sizeof(msg)); // XXX Could use readInplace maybe? - on_message(msg); + onMessage(msg); return NO_ERROR; } diff --git a/media/libmedia/ToneGenerator.cpp b/media/libmedia/ToneGenerator.cpp index 3729eb34226f..60e3d71171a6 100644 --- a/media/libmedia/ToneGenerator.cpp +++ b/media/libmedia/ToneGenerator.cpp @@ -798,7 +798,7 @@ const unsigned char ToneGenerator::sToneMappingTable[NUM_REGIONS-1][NUM_SUP_TONE // none // //////////////////////////////////////////////////////////////////////////////// -ToneGenerator::ToneGenerator(int streamType, float volume) { +ToneGenerator::ToneGenerator(int streamType, float volume, bool threadCanCallJava) { LOGV("ToneGenerator constructor: streamType=%d, volume=%f\n", streamType, volume); @@ -808,6 +808,7 @@ ToneGenerator::ToneGenerator(int streamType, float volume) { LOGE("Unable to marshal AudioFlinger"); return; } + mThreadCanCallJava = threadCanCallJava; mStreamType = streamType; mVolume = volume; mpAudioTrack = 0; @@ -903,10 +904,11 @@ bool ToneGenerator::startTone(int toneType, int durationMs) { if (mState == TONE_STOPPED) { LOGV("Start waiting for previous tone to stop"); - lStatus = mWaitCbkCond.waitRelative(mLock, seconds(1)); + lStatus = mWaitCbkCond.waitRelative(mLock, seconds(3)); if (lStatus != NO_ERROR) { LOGE("--- start wait for stop timed out, status %d", lStatus); mState = TONE_IDLE; + mLock.unlock(); return lResult; } } @@ -921,7 +923,7 @@ bool ToneGenerator::startTone(int toneType, int durationMs) { mLock.lock(); if (mState == TONE_STARTING) { LOGV("Wait for start callback"); - lStatus = mWaitCbkCond.waitRelative(mLock, seconds(1)); + lStatus = mWaitCbkCond.waitRelative(mLock, seconds(3)); if (lStatus != NO_ERROR) { LOGE("--- Immediate start timed out, status %d", lStatus); mState = TONE_IDLE; @@ -934,7 +936,7 @@ bool ToneGenerator::startTone(int toneType, int durationMs) { } else { LOGV("Delayed start\n"); mState = TONE_RESTARTING; - lStatus = mWaitCbkCond.waitRelative(mLock, seconds(1)); + lStatus = mWaitCbkCond.waitRelative(mLock, seconds(3)); if (lStatus == NO_ERROR) { if (mState != TONE_IDLE) { lResult = true; @@ -973,7 +975,7 @@ void ToneGenerator::stopTone() { if (mState == TONE_PLAYING || mState == TONE_STARTING || mState == TONE_RESTARTING) { mState = TONE_STOPPING; LOGV("waiting cond"); - status_t lStatus = mWaitCbkCond.waitRelative(mLock, seconds(1)); + status_t lStatus = mWaitCbkCond.waitRelative(mLock, seconds(3)); if (lStatus == NO_ERROR) { LOGV("track stop complete, time %d", (unsigned int)(systemTime()/1000000)); } else { @@ -1014,15 +1016,25 @@ bool ToneGenerator::initAudioTrack() { } // Open audio track in mono, PCM 16bit, default sampling rate, default buffer size - mpAudioTrack - = new AudioTrack(mStreamType, 0, AudioSystem::PCM_16_BIT, AudioSystem::CHANNEL_OUT_MONO, 0, 0, audioCallback, this, 0); - + mpAudioTrack = new AudioTrack(); if (mpAudioTrack == 0) { LOGE("AudioTrack allocation failed"); goto initAudioTrack_exit; } LOGV("Create Track: %p\n", mpAudioTrack); + mpAudioTrack->set(mStreamType, + 0, + AudioSystem::PCM_16_BIT, + AudioSystem::CHANNEL_OUT_MONO, + 0, + 0, + audioCallback, + this, + 0, + 0, + mThreadCanCallJava); + if (mpAudioTrack->initCheck() != NO_ERROR) { LOGE("AudioTrack->initCheck failed"); goto initAudioTrack_exit; @@ -1087,6 +1099,7 @@ void ToneGenerator::audioCallback(int event, void* user, void *info) { lpToneGen->mLock.lock(); + // Update pcm frame count and end time (current time at the end of this process) lpToneGen->mTotalSmp += lReqSmp; diff --git a/media/libmediaplayerservice/Android.mk b/media/libmediaplayerservice/Android.mk index f21eb737bea6..fb569dab0590 100644 --- a/media/libmediaplayerservice/Android.mk +++ b/media/libmediaplayerservice/Android.mk @@ -50,7 +50,7 @@ LOCAL_C_INCLUDES := external/tremor/Tremor \ $(JNI_H_INCLUDE) \ $(call include-path-for, graphics corecg) \ $(TOP)/external/opencore/extern_libs_v2/khronos/openmax/include \ - $(TOP)/frameworks/base/media/libstagefright/omx + $(TOP)/frameworks/base/media/libstagefright/include LOCAL_MODULE:= libmediaplayerservice diff --git a/media/libmediaplayerservice/MediaPlayerService.cpp b/media/libmediaplayerservice/MediaPlayerService.cpp index 84be8746b813..0a6c365df5ad 100644 --- a/media/libmediaplayerservice/MediaPlayerService.cpp +++ b/media/libmediaplayerservice/MediaPlayerService.cpp @@ -225,7 +225,10 @@ MediaPlayerService::~MediaPlayerService() sp<IMediaRecorder> MediaPlayerService::createMediaRecorder(pid_t pid) { #ifndef NO_OPENCORE - sp<MediaRecorderClient> recorder = new MediaRecorderClient(pid); + sp<MediaRecorderClient> recorder = new MediaRecorderClient(this, pid); + wp<MediaRecorderClient> w = recorder; + Mutex::Autolock lock(mLock); + mMediaRecorderClients.add(w); #else sp<MediaRecorderClient> recorder = NULL; #endif @@ -233,6 +236,13 @@ sp<IMediaRecorder> MediaPlayerService::createMediaRecorder(pid_t pid) return recorder; } +void MediaPlayerService::removeMediaRecorderClient(wp<MediaRecorderClient> client) +{ + Mutex::Autolock lock(mLock); + mMediaRecorderClients.remove(client); + LOGV("Delete media recorder client"); +} + sp<IMediaMetadataRetriever> MediaPlayerService::createMetadataRetriever(pid_t pid) { sp<MetadataRetrieverClient> retriever = new MetadataRetrieverClient(pid); @@ -274,8 +284,14 @@ sp<IMediaPlayer> MediaPlayerService::create(pid_t pid, const sp<IMediaPlayerClie return c; } -sp<IOMX> MediaPlayerService::createOMX() { - return new OMX; +sp<IOMX> MediaPlayerService::getOMX() { + Mutex::Autolock autoLock(mLock); + + if (mOMX.get() == NULL) { + mOMX = new OMX; + } + + return mOMX; } status_t MediaPlayerService::AudioCache::dump(int fd, const Vector<String16>& args) const @@ -460,6 +476,13 @@ status_t MediaPlayerService::dump(int fd, const Vector<String16>& args) sp<Client> c = mClients[i].promote(); if (c != 0) c->dump(fd, args); } + for (int i = 0, n = mMediaRecorderClients.size(); i < n; ++i) { + result.append(" MediaRecorderClient\n"); + sp<MediaRecorderClient> c = mMediaRecorderClients[i].promote(); + snprintf(buffer, 255, " pid(%d)\n\n", c->mPid); + result.append(buffer); + } + result.append(" Files opened and/or mapped:\n"); snprintf(buffer, SIZE, "/proc/%d/maps", myTid()); FILE *f = fopen(buffer, "r"); @@ -1492,6 +1515,7 @@ void MediaPlayerService::AudioOutput::pause() { LOGV("pause"); if (mTrack) mTrack->pause(); + lastWriteTime = 0; } void MediaPlayerService::AudioOutput::close() diff --git a/media/libmediaplayerservice/MediaPlayerService.h b/media/libmediaplayerservice/MediaPlayerService.h index 7d2e611838d9..b00f5b747785 100644 --- a/media/libmediaplayerservice/MediaPlayerService.h +++ b/media/libmediaplayerservice/MediaPlayerService.h @@ -35,6 +35,7 @@ namespace android { class IMediaRecorder; class IMediaMetadataRetriever; class IOMX; +class MediaRecorderClient; #define CALLBACK_ANTAGONIZER 0 #if CALLBACK_ANTAGONIZER @@ -175,6 +176,7 @@ public: // IMediaPlayerService interface virtual sp<IMediaRecorder> createMediaRecorder(pid_t pid); + void removeMediaRecorderClient(wp<MediaRecorderClient> client); virtual sp<IMediaMetadataRetriever> createMetadataRetriever(pid_t pid); // House keeping for media player clients @@ -183,7 +185,7 @@ public: virtual sp<IMemory> decode(const char* url, uint32_t *pSampleRate, int* pNumChannels, int* pFormat); virtual sp<IMemory> decode(int fd, int64_t offset, int64_t length, uint32_t *pSampleRate, int* pNumChannels, int* pFormat); virtual sp<IMemory> snoop(); - virtual sp<IOMX> createOMX(); + virtual sp<IOMX> getOMX(); virtual status_t dump(int fd, const Vector<String16>& args); @@ -280,7 +282,9 @@ private: mutable Mutex mLock; SortedVector< wp<Client> > mClients; + SortedVector< wp<MediaRecorderClient> > mMediaRecorderClients; int32_t mNextConnId; + sp<IOMX> mOMX; }; // ---------------------------------------------------------------------------- diff --git a/media/libmediaplayerservice/MediaRecorderClient.cpp b/media/libmediaplayerservice/MediaRecorderClient.cpp index e54f20d5ab62..95ee3e46218a 100644 --- a/media/libmediaplayerservice/MediaRecorderClient.cpp +++ b/media/libmediaplayerservice/MediaRecorderClient.cpp @@ -32,7 +32,10 @@ #include <media/PVMediaRecorder.h> #include <utils/String16.h> +#include <media/AudioTrack.h> + #include "MediaRecorderClient.h" +#include "MediaPlayerService.h" namespace android { @@ -80,6 +83,7 @@ status_t MediaRecorderClient::setVideoSource(int vs) Mutex::Autolock lock(mLock); if (mRecorder == NULL) { LOGE("recorder is not initialized"); + return NO_INIT; } return mRecorder->setVideoSource((video_source)vs); } @@ -93,6 +97,7 @@ status_t MediaRecorderClient::setAudioSource(int as) Mutex::Autolock lock(mLock); if (mRecorder == NULL) { LOGE("recorder is not initialized"); + return NO_INIT; } return mRecorder->setAudioSource((audio_source)as); } @@ -271,15 +276,18 @@ status_t MediaRecorderClient::release() if (mRecorder != NULL) { delete mRecorder; mRecorder = NULL; + wp<MediaRecorderClient> client(this); + mMediaPlayerService->removeMediaRecorderClient(client); } return NO_ERROR; } -MediaRecorderClient::MediaRecorderClient(pid_t pid) +MediaRecorderClient::MediaRecorderClient(const sp<MediaPlayerService>& service, pid_t pid) { LOGV("Client constructor"); mPid = pid; mRecorder = new PVMediaRecorder(); + mMediaPlayerService = service; } MediaRecorderClient::~MediaRecorderClient() diff --git a/media/libmediaplayerservice/MediaRecorderClient.h b/media/libmediaplayerservice/MediaRecorderClient.h index 6a1c2d5c4636..6260441a8825 100644 --- a/media/libmediaplayerservice/MediaRecorderClient.h +++ b/media/libmediaplayerservice/MediaRecorderClient.h @@ -24,6 +24,7 @@ namespace android { class PVMediaRecorder; class ISurface; +class MediaPlayerService; class MediaRecorderClient : public BnMediaRecorder { @@ -53,12 +54,13 @@ public: private: friend class MediaPlayerService; // for accessing private constructor - MediaRecorderClient(pid_t pid); + MediaRecorderClient(const sp<MediaPlayerService>& service, pid_t pid); virtual ~MediaRecorderClient(); pid_t mPid; Mutex mLock; PVMediaRecorder *mRecorder; + sp<MediaPlayerService> mMediaPlayerService; }; }; // namespace android diff --git a/media/libmediaplayerservice/MetadataRetrieverClient.cpp b/media/libmediaplayerservice/MetadataRetrieverClient.cpp index ddd4e24d9b7e..2cdc351b0f87 100644 --- a/media/libmediaplayerservice/MetadataRetrieverClient.cpp +++ b/media/libmediaplayerservice/MetadataRetrieverClient.cpp @@ -21,6 +21,7 @@ #include <sys/types.h> #include <sys/stat.h> +#include <sys/resource.h> #include <dirent.h> #include <unistd.h> @@ -38,6 +39,18 @@ #include "MidiMetadataRetriever.h" #include "MetadataRetrieverClient.h" +/* desktop Linux needs a little help with gettid() */ +#if defined(HAVE_GETTID) && !defined(HAVE_ANDROID_OS) +#define __KERNEL__ +# include <linux/unistd.h> +#ifdef _syscall0 +_syscall0(pid_t,gettid) +#else +pid_t gettid() { return syscall(__NR_gettid);} +#endif +#undef __KERNEL__ +#endif + namespace android { extern player_type getPlayerType(const char* url); @@ -125,6 +138,12 @@ status_t MetadataRetrieverClient::setDataSource(const char *url) return UNKNOWN_ERROR; } player_type playerType = getPlayerType(url); +#if !defined(NO_OPENCORE) && defined(BUILD_WITH_FULL_STAGEFRIGHT) + if (playerType == STAGEFRIGHT_PLAYER) { + // Stagefright doesn't support metadata in this branch yet. + playerType = PV_PLAYER; + } +#endif LOGV("player type = %d", playerType); sp<MediaMetadataRetrieverBase> p = createRetriever(playerType); if (p == NULL) return NO_INIT; @@ -163,6 +182,12 @@ status_t MetadataRetrieverClient::setDataSource(int fd, int64_t offset, int64_t } player_type playerType = getPlayerType(fd, offset, length); +#if !defined(NO_OPENCORE) && defined(BUILD_WITH_FULL_STAGEFRIGHT) + if (playerType == STAGEFRIGHT_PLAYER) { + // Stagefright doesn't support metadata in this branch yet. + playerType = PV_PLAYER; + } +#endif LOGV("player type = %d", playerType); sp<MediaMetadataRetrieverBase> p = createRetriever(playerType); if (p == NULL) { @@ -212,6 +237,7 @@ sp<IMemory> MetadataRetrieverClient::captureFrame() { LOGV("captureFrame"); Mutex::Autolock lock(mLock); + Priority priority(ANDROID_PRIORITY_BACKGROUND); mThumbnail.clear(); mThumbnailDealer.clear(); if (mRetriever == NULL) { @@ -253,6 +279,7 @@ sp<IMemory> MetadataRetrieverClient::extractAlbumArt() { LOGV("extractAlbumArt"); Mutex::Autolock lock(mLock); + Priority priority(ANDROID_PRIORITY_BACKGROUND); mAlbumArt.clear(); mAlbumArtDealer.clear(); if (mRetriever == NULL) { @@ -294,7 +321,19 @@ const char* MetadataRetrieverClient::extractMetadata(int keyCode) LOGE("retriever is not initialized"); return NULL; } + Priority priority(ANDROID_PRIORITY_BACKGROUND); return mRetriever->extractMetadata(keyCode); } +MetadataRetrieverClient::Priority::Priority(int newPriority) +{ + mOldPriority = getpriority(PRIO_PROCESS, 0); + setpriority(PRIO_PROCESS, 0, newPriority); +} + +MetadataRetrieverClient::Priority::~Priority() +{ + setpriority(PRIO_PROCESS, 0, mOldPriority); +} + }; // namespace android diff --git a/media/libmediaplayerservice/MetadataRetrieverClient.h b/media/libmediaplayerservice/MetadataRetrieverClient.h index 8cb8ad13f1b0..852d73497fd4 100644 --- a/media/libmediaplayerservice/MetadataRetrieverClient.h +++ b/media/libmediaplayerservice/MetadataRetrieverClient.h @@ -54,6 +54,16 @@ public: private: friend class MediaPlayerService; + class Priority + { + public: + Priority(int newPriority); + ~Priority(); + private: + Priority(); + int mOldPriority; + }; + explicit MetadataRetrieverClient(pid_t pid); virtual ~MetadataRetrieverClient(); diff --git a/media/libstagefright/Android.mk b/media/libstagefright/Android.mk index 3c343a3103a2..9f71dae9d36d 100644 --- a/media/libstagefright/Android.mk +++ b/media/libstagefright/Android.mk @@ -33,7 +33,7 @@ LOCAL_SRC_FILES += \ TimeSource.cpp \ TimedEventQueue.cpp \ AudioPlayer.cpp \ - string.cpp + stagefright_string.cpp endif diff --git a/media/libstagefright/AudioPlayer.cpp b/media/libstagefright/AudioPlayer.cpp index 319488ed3306..538facba9c94 100644 --- a/media/libstagefright/AudioPlayer.cpp +++ b/media/libstagefright/AudioPlayer.cpp @@ -14,6 +14,7 @@ * limitations under the License. */ +//#define LOG_NDEBUG 0 #define LOG_TAG "AudioPlayer" #include <utils/Log.h> @@ -136,7 +137,7 @@ void AudioPlayer::stop() { // Make sure to release any buffer we hold onto so that the // source is able to stop(). if (mInputBuffer != NULL) { - LOGI("AudioPlayer releasing input buffer."); + LOGV("AudioPlayer releasing input buffer."); mInputBuffer->release(); mInputBuffer = NULL; @@ -176,7 +177,7 @@ void AudioPlayer::AudioCallback(int event, void *info) { void AudioPlayer::fillBuffer(void *data, size_t size) { if (mNumFramesPlayed == 0) { - LOGI("AudioCallback"); + LOGV("AudioCallback"); } size_t size_done = 0; @@ -222,6 +223,11 @@ void AudioPlayer::fillBuffer(void *data, size_t size) { mPositionTimeRealUs = ((mNumFramesPlayed + size_done / mFrameSize) * 1000000) / mSampleRate; + + LOGV("buffer->size() = %d, " + "mPositionTimeMediaUs=%.2f mPositionTimeRealUs=%.2f", + mInputBuffer->range_length(), + mPositionTimeMediaUs / 1E6, mPositionTimeRealUs / 1E6); } if (mInputBuffer->range_length() == 0) { diff --git a/media/libstagefright/HTTPDataSource.cpp b/media/libstagefright/HTTPDataSource.cpp index 698223b786b7..4dedebd43360 100644 --- a/media/libstagefright/HTTPDataSource.cpp +++ b/media/libstagefright/HTTPDataSource.cpp @@ -19,7 +19,7 @@ #include <media/stagefright/HTTPDataSource.h> #include <media/stagefright/HTTPStream.h> #include <media/stagefright/MediaDebug.h> -#include <media/stagefright/string.h> +#include <media/stagefright/stagefright_string.h> namespace android { diff --git a/media/libstagefright/MediaPlayerImpl.cpp b/media/libstagefright/MediaPlayerImpl.cpp index 2e609e3583b2..622ea7eee409 100644 --- a/media/libstagefright/MediaPlayerImpl.cpp +++ b/media/libstagefright/MediaPlayerImpl.cpp @@ -157,7 +157,15 @@ void MediaPlayerImpl::play() { if (mAudioSource != NULL) { mAudioPlayer = new AudioPlayer(mAudioSink); mAudioPlayer->setSource(mAudioDecoder); - mAudioPlayer->start(); + + if (mVideoDecoder == NULL) { + // If there is no video, start playing right away, + // otherwise we'll start the audio player after we decode + // the first video frame, this way we won't be behind right + // away. + mAudioPlayer->start(); + } + mTimeSource = mAudioPlayer; } else { mTimeSource = new SystemTimeSource; @@ -285,6 +293,10 @@ void MediaPlayerImpl::videoEntry() { } if (firstFrame || seeking) { + if (firstFrame && mAudioPlayer != NULL) { + // We've deferred starting the audio player until now. + mAudioPlayer->start(); + } mTimeSourceDeltaUs = mTimeSource->getRealTimeUs() - pts_us; firstFrame = false; } diff --git a/media/libstagefright/OMXClient.cpp b/media/libstagefright/OMXClient.cpp index dba7a2a0115c..9de873eceed5 100644 --- a/media/libstagefright/OMXClient.cpp +++ b/media/libstagefright/OMXClient.cpp @@ -35,7 +35,7 @@ status_t OMXClient::connect() { CHECK(service.get() != NULL); - mOMX = service->createOMX(); + mOMX = service->getOMX(); CHECK(mOMX.get() != NULL); return OK; diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp index c4c6149df947..ebf1e0c532d2 100644 --- a/media/libstagefright/OMXCodec.cpp +++ b/media/libstagefright/OMXCodec.cpp @@ -85,12 +85,15 @@ static const CodecInfo kEncoderInfo[] = { #define CODEC_LOGV(x, ...) LOGV("[%s] "x, mComponentName, ##__VA_ARGS__) struct OMXCodecObserver : public BnOMXObserver { - OMXCodecObserver(const wp<OMXCodec> &target) - : mTarget(target) { + OMXCodecObserver() { + } + + void setCodec(const sp<OMXCodec> &target) { + mTarget = target; } // from IOMXObserver - virtual void on_message(const omx_message &msg) { + virtual void onMessage(const omx_message &msg) { sp<OMXCodec> codec = mTarget.promote(); if (codec.get() != NULL) { @@ -177,6 +180,7 @@ sp<OMXCodec> OMXCodec::Create( CHECK(success); const char *componentName = NULL; + sp<OMXCodecObserver> observer = new OMXCodecObserver; IOMX::node_id node = 0; for (int index = 0;; ++index) { if (createEncoder) { @@ -200,7 +204,7 @@ sp<OMXCodec> OMXCodec::Create( LOGV("Attempting to allocate OMX node '%s'", componentName); - status_t err = omx->allocate_node(componentName, &node); + status_t err = omx->allocateNode(componentName, observer, &node); if (err == OK) { LOGI("Successfully allocated OMX node '%s'", componentName); break; @@ -210,6 +214,7 @@ sp<OMXCodec> OMXCodec::Create( uint32_t quirks = 0; if (!strcmp(componentName, "OMX.PV.avcdec")) { quirks |= kWantsNALFragments; + quirks |= kOutputDimensionsAre16Aligned; } if (!strcmp(componentName, "OMX.TI.MP3.decode")) { quirks |= kNeedsFlushBeforeDisable; @@ -229,8 +234,8 @@ sp<OMXCodec> OMXCodec::Create( } if (!strncmp(componentName, "OMX.qcom.video.decoder.", 23)) { // XXX Required on P....on only. - quirks |= kRequiresAllocateBufferOnInputPorts; quirks |= kRequiresAllocateBufferOnOutputPorts; + quirks |= kOutputDimensionsAre16Aligned; } if (!strncmp(componentName, "OMX.TI.", 7)) { @@ -247,6 +252,8 @@ sp<OMXCodec> OMXCodec::Create( omx, node, quirks, createEncoder, mime, componentName, source); + observer->setCodec(codec); + uint32_t type; const void *data; size_t size; @@ -329,7 +336,9 @@ sp<OMXCodec> OMXCodec::Create( if (!strcmp(componentName, "OMX.TI.Video.Decoder") && (profile != kAVCProfileBaseline || level > 39)) { - // This stream exceeds the decoder's capabilities. + // This stream exceeds the decoder's capabilities. The decoder + // does not handle this gracefully and would clobber the heap + // and wreak havoc instead... LOGE("Profile and/or level exceed the decoder's capabilities."); return NULL; @@ -404,7 +413,7 @@ void OMXCodec::setMinBufferSize(OMX_U32 portIndex, OMX_U32 size) { InitOMXParams(&def); def.nPortIndex = portIndex; - status_t err = mOMX->get_parameter( + status_t err = mOMX->getParameter( mNode, OMX_IndexParamPortDefinition, &def, sizeof(def)); CHECK_EQ(err, OK); @@ -413,7 +422,7 @@ void OMXCodec::setMinBufferSize(OMX_U32 portIndex, OMX_U32 size) { } - err = mOMX->set_parameter( + err = mOMX->setParameter( mNode, OMX_IndexParamPortDefinition, &def, sizeof(def)); CHECK_EQ(err, OK); } @@ -431,7 +440,7 @@ status_t OMXCodec::setVideoPortFormatType( OMX_U32 index = 0; for (;;) { format.nIndex = index; - status_t err = mOMX->get_parameter( + status_t err = mOMX->getParameter( mNode, OMX_IndexParamVideoPortFormat, &format, sizeof(format)); @@ -476,8 +485,8 @@ status_t OMXCodec::setVideoPortFormatType( return UNKNOWN_ERROR; } - CODEC_LOGI("found a match."); - status_t err = mOMX->set_parameter( + CODEC_LOGV("found a match."); + status_t err = mOMX->setParameter( mNode, OMX_IndexParamVideoPortFormat, &format, sizeof(format)); @@ -520,7 +529,7 @@ void OMXCodec::setVideoInputFormat( OMX_VIDEO_PORTDEFINITIONTYPE *video_def = &def.format.video; - status_t err = mOMX->get_parameter( + status_t err = mOMX->getParameter( mNode, OMX_IndexParamPortDefinition, &def, sizeof(def)); CHECK_EQ(err, OK); @@ -532,7 +541,7 @@ void OMXCodec::setVideoInputFormat( video_def->eCompressionFormat = compressionFormat; video_def->eColorFormat = OMX_COLOR_FormatUnused; - err = mOMX->set_parameter( + err = mOMX->setParameter( mNode, OMX_IndexParamPortDefinition, &def, sizeof(def)); CHECK_EQ(err, OK); @@ -541,7 +550,7 @@ void OMXCodec::setVideoInputFormat( InitOMXParams(&def); def.nPortIndex = kPortIndexInput; - err = mOMX->get_parameter( + err = mOMX->getParameter( mNode, OMX_IndexParamPortDefinition, &def, sizeof(def)); CHECK_EQ(err, OK); @@ -555,7 +564,7 @@ void OMXCodec::setVideoInputFormat( video_def->eCompressionFormat = OMX_VIDEO_CodingUnused; video_def->eColorFormat = colorFormat; - err = mOMX->set_parameter( + err = mOMX->setParameter( mNode, OMX_IndexParamPortDefinition, &def, sizeof(def)); CHECK_EQ(err, OK); } @@ -586,7 +595,7 @@ void OMXCodec::setVideoOutputFormat( format.nPortIndex = kPortIndexOutput; format.nIndex = 0; - status_t err = mOMX->get_parameter( + status_t err = mOMX->getParameter( mNode, OMX_IndexParamVideoPortFormat, &format, sizeof(format)); CHECK_EQ(err, OK); @@ -599,7 +608,7 @@ void OMXCodec::setVideoOutputFormat( || format.eColorFormat == OMX_COLOR_FormatCbYCrY || format.eColorFormat == OMX_QCOM_COLOR_FormatYVU420SemiPlanar); - err = mOMX->set_parameter( + err = mOMX->setParameter( mNode, OMX_IndexParamVideoPortFormat, &format, sizeof(format)); CHECK_EQ(err, OK); @@ -612,7 +621,7 @@ void OMXCodec::setVideoOutputFormat( OMX_VIDEO_PORTDEFINITIONTYPE *video_def = &def.format.video; - status_t err = mOMX->get_parameter( + status_t err = mOMX->getParameter( mNode, OMX_IndexParamPortDefinition, &def, sizeof(def)); CHECK_EQ(err, OK); @@ -632,7 +641,7 @@ void OMXCodec::setVideoOutputFormat( video_def->eColorFormat = OMX_COLOR_FormatUnused; - err = mOMX->set_parameter( + err = mOMX->setParameter( mNode, OMX_IndexParamPortDefinition, &def, sizeof(def)); CHECK_EQ(err, OK); @@ -641,7 +650,7 @@ void OMXCodec::setVideoOutputFormat( InitOMXParams(&def); def.nPortIndex = kPortIndexOutput; - err = mOMX->get_parameter( + err = mOMX->getParameter( mNode, OMX_IndexParamPortDefinition, &def, sizeof(def)); CHECK_EQ(err, OK); CHECK_EQ(def.eDomain, OMX_PortDomainVideo); @@ -654,7 +663,7 @@ void OMXCodec::setVideoOutputFormat( video_def->nFrameWidth = width; video_def->nFrameHeight = height; - err = mOMX->set_parameter( + err = mOMX->setParameter( mNode, OMX_IndexParamPortDefinition, &def, sizeof(def)); CHECK_EQ(err, OK); } @@ -682,9 +691,6 @@ OMXCodec::OMXCodec( mPortStatus[kPortIndexInput] = ENABLED; mPortStatus[kPortIndexOutput] = ENABLED; - mObserver = new OMXCodecObserver(this); - mOMX->observe_node(mNode, mObserver); - setComponentRole(); } @@ -742,7 +748,7 @@ void OMXCodec::setComponentRole( roleParams.cRole[OMX_MAX_STRINGNAME_SIZE - 1] = '\0'; - status_t err = omx->set_parameter( + status_t err = omx->setParameter( node, OMX_IndexParamStandardComponentRole, &roleParams, sizeof(roleParams)); @@ -759,10 +765,7 @@ void OMXCodec::setComponentRole() { OMXCodec::~OMXCodec() { CHECK(mState == LOADED || mState == ERROR); - status_t err = mOMX->observe_node(mNode, NULL); - CHECK_EQ(err, OK); - - err = mOMX->free_node(mNode); + status_t err = mOMX->freeNode(mNode); CHECK_EQ(err, OK); mNode = NULL; @@ -784,7 +787,7 @@ status_t OMXCodec::init() { status_t err; if (!(mQuirks & kRequiresLoadedToIdleAfterAllocation)) { - err = mOMX->send_command(mNode, OMX_CommandStateSet, OMX_StateIdle); + err = mOMX->sendCommand(mNode, OMX_CommandStateSet, OMX_StateIdle); CHECK_EQ(err, OK); setState(LOADED_TO_IDLE); } @@ -793,7 +796,7 @@ status_t OMXCodec::init() { CHECK_EQ(err, OK); if (mQuirks & kRequiresLoadedToIdleAfterAllocation) { - err = mOMX->send_command(mNode, OMX_CommandStateSet, OMX_StateIdle); + err = mOMX->sendCommand(mNode, OMX_CommandStateSet, OMX_StateIdle); CHECK_EQ(err, OK); setState(LOADED_TO_IDLE); @@ -830,7 +833,7 @@ status_t OMXCodec::allocateBuffersOnPort(OMX_U32 portIndex) { InitOMXParams(&def); def.nPortIndex = portIndex; - status_t err = mOMX->get_parameter( + status_t err = mOMX->getParameter( mNode, OMX_IndexParamPortDefinition, &def, sizeof(def)); if (err != OK) { @@ -847,14 +850,14 @@ status_t OMXCodec::allocateBuffersOnPort(OMX_U32 portIndex) { IOMX::buffer_id buffer; if (portIndex == kPortIndexInput && (mQuirks & kRequiresAllocateBufferOnInputPorts)) { - err = mOMX->allocate_buffer_with_backup( + err = mOMX->allocateBufferWithBackup( mNode, portIndex, mem, &buffer); } else if (portIndex == kPortIndexOutput && (mQuirks & kRequiresAllocateBufferOnOutputPorts)) { - err = mOMX->allocate_buffer_with_backup( + err = mOMX->allocateBufferWithBackup( mNode, portIndex, mem, &buffer); } else { - err = mOMX->use_buffer(mNode, portIndex, mem, &buffer); + err = mOMX->useBuffer(mNode, portIndex, mem, &buffer); } if (err != OK) { @@ -921,7 +924,7 @@ void OMXCodec::on_message(const omx_message &msg) { CODEC_LOGV("Port is disabled, freeing buffer %p", buffer); status_t err = - mOMX->free_buffer(mNode, kPortIndexInput, buffer); + mOMX->freeBuffer(mNode, kPortIndexInput, buffer); CHECK_EQ(err, OK); buffers->removeAt(i); @@ -967,7 +970,7 @@ void OMXCodec::on_message(const omx_message &msg) { CODEC_LOGV("Port is disabled, freeing buffer %p", buffer); status_t err = - mOMX->free_buffer(mNode, kPortIndexOutput, buffer); + mOMX->freeBuffer(mNode, kPortIndexOutput, buffer); CHECK_EQ(err, OK); buffers->removeAt(i); @@ -1137,7 +1140,7 @@ void OMXCodec::onCmdComplete(OMX_COMMANDTYPE cmd, OMX_U32 data) { mPortStatus[kPortIndexOutput] = SHUTTING_DOWN; status_t err = - mOMX->send_command(mNode, OMX_CommandStateSet, OMX_StateIdle); + mOMX->sendCommand(mNode, OMX_CommandStateSet, OMX_StateIdle); CHECK_EQ(err, OK); } } else { @@ -1177,7 +1180,7 @@ void OMXCodec::onStateChange(OMX_STATETYPE newState) { { CODEC_LOGV("Now Idle."); if (mState == LOADED_TO_IDLE) { - status_t err = mOMX->send_command( + status_t err = mOMX->sendCommand( mNode, OMX_CommandStateSet, OMX_StateExecuting); CHECK_EQ(err, OK); @@ -1194,7 +1197,7 @@ void OMXCodec::onStateChange(OMX_STATETYPE newState) { countBuffersWeOwn(mPortBuffers[kPortIndexOutput]), mPortBuffers[kPortIndexOutput].size()); - status_t err = mOMX->send_command( + status_t err = mOMX->sendCommand( mNode, OMX_CommandStateSet, OMX_StateLoaded); CHECK_EQ(err, OK); @@ -1277,7 +1280,7 @@ status_t OMXCodec::freeBuffersOnPort( CODEC_LOGV("freeing buffer %p on port %ld", info->mBuffer, portIndex); status_t err = - mOMX->free_buffer(mNode, portIndex, info->mBuffer); + mOMX->freeBuffer(mNode, portIndex, info->mBuffer); if (err != OK) { stickyErr = err; @@ -1337,7 +1340,7 @@ bool OMXCodec::flushPortAsync(OMX_U32 portIndex) { } status_t err = - mOMX->send_command(mNode, OMX_CommandFlush, portIndex); + mOMX->sendCommand(mNode, OMX_CommandFlush, portIndex); CHECK_EQ(err, OK); return true; @@ -1350,7 +1353,7 @@ void OMXCodec::disablePortAsync(OMX_U32 portIndex) { mPortStatus[portIndex] = DISABLING; status_t err = - mOMX->send_command(mNode, OMX_CommandPortDisable, portIndex); + mOMX->sendCommand(mNode, OMX_CommandPortDisable, portIndex); CHECK_EQ(err, OK); freeBuffersOnPort(portIndex, true); @@ -1363,7 +1366,7 @@ void OMXCodec::enablePortAsync(OMX_U32 portIndex) { mPortStatus[portIndex] = ENABLING; status_t err = - mOMX->send_command(mNode, OMX_CommandPortEnable, portIndex); + mOMX->sendCommand(mNode, OMX_CommandPortEnable, portIndex); CHECK_EQ(err, OK); } @@ -1415,10 +1418,11 @@ void OMXCodec::drainInputBuffer(BufferInfo *info) { memcpy(info->mMem->pointer(), specific->mData, specific->mSize); } - mOMX->empty_buffer( + status_t err = mOMX->emptyBuffer( mNode, info->mBuffer, 0, size, OMX_BUFFERFLAG_ENDOFFRAME | OMX_BUFFERFLAG_CODECCONFIG, 0); + CHECK_EQ(err, OK); info->mOwnedByComponent = true; @@ -1471,16 +1475,21 @@ void OMXCodec::drainInputBuffer(BufferInfo *info) { } } - mOMX->empty_buffer( - mNode, info->mBuffer, 0, srcLength, - flags, timestamp); - - info->mOwnedByComponent = true; - if (srcBuffer != NULL) { srcBuffer->release(); srcBuffer = NULL; } + + err = mOMX->emptyBuffer( + mNode, info->mBuffer, 0, srcLength, + flags, timestamp); + + if (err != OK) { + setState(ERROR); + return; + } + + info->mOwnedByComponent = true; } void OMXCodec::fillOutputBuffer(BufferInfo *info) { @@ -1493,7 +1502,8 @@ void OMXCodec::fillOutputBuffer(BufferInfo *info) { } CODEC_LOGV("Calling fill_buffer on buffer %p", info->mBuffer); - mOMX->fill_buffer(mNode, info->mBuffer); + status_t err = mOMX->fillBuffer(mNode, info->mBuffer); + CHECK_EQ(err, OK); info->mOwnedByComponent = true; } @@ -1537,7 +1547,7 @@ void OMXCodec::setRawAudioFormat( InitOMXParams(&pcmParams); pcmParams.nPortIndex = portIndex; - status_t err = mOMX->get_parameter( + status_t err = mOMX->getParameter( mNode, OMX_IndexParamAudioPcm, &pcmParams, sizeof(pcmParams)); CHECK_EQ(err, OK); @@ -1558,7 +1568,7 @@ void OMXCodec::setRawAudioFormat( pcmParams.eChannelMapping[1] = OMX_AUDIO_ChannelRF; } - err = mOMX->set_parameter( + err = mOMX->setParameter( mNode, OMX_IndexParamAudioPcm, &pcmParams, sizeof(pcmParams)); CHECK_EQ(err, OK); @@ -1571,14 +1581,14 @@ void OMXCodec::setAMRFormat() { def.nPortIndex = kPortIndexInput; status_t err = - mOMX->get_parameter(mNode, OMX_IndexParamAudioAmr, &def, sizeof(def)); + mOMX->getParameter(mNode, OMX_IndexParamAudioAmr, &def, sizeof(def)); CHECK_EQ(err, OK); def.eAMRFrameFormat = OMX_AUDIO_AMRFrameFormatFSF; def.eAMRBandMode = OMX_AUDIO_AMRBandModeNB0; - err = mOMX->set_parameter(mNode, OMX_IndexParamAudioAmr, &def, sizeof(def)); + err = mOMX->setParameter(mNode, OMX_IndexParamAudioAmr, &def, sizeof(def)); CHECK_EQ(err, OK); } @@ -1602,14 +1612,14 @@ void OMXCodec::setAMRWBFormat() { def.nPortIndex = kPortIndexInput; status_t err = - mOMX->get_parameter(mNode, OMX_IndexParamAudioAmr, &def, sizeof(def)); + mOMX->getParameter(mNode, OMX_IndexParamAudioAmr, &def, sizeof(def)); CHECK_EQ(err, OK); def.eAMRFrameFormat = OMX_AUDIO_AMRFrameFormatFSF; def.eAMRBandMode = OMX_AUDIO_AMRBandModeWB0; - err = mOMX->set_parameter(mNode, OMX_IndexParamAudioAmr, &def, sizeof(def)); + err = mOMX->setParameter(mNode, OMX_IndexParamAudioAmr, &def, sizeof(def)); CHECK_EQ(err, OK); } @@ -1634,7 +1644,7 @@ void OMXCodec::setAACFormat(int32_t numChannels, int32_t sampleRate) { InitOMXParams(&profile); profile.nPortIndex = kPortIndexInput; - status_t err = mOMX->get_parameter( + status_t err = mOMX->getParameter( mNode, OMX_IndexParamAudioAac, &profile, sizeof(profile)); CHECK_EQ(err, OK); @@ -1642,7 +1652,7 @@ void OMXCodec::setAACFormat(int32_t numChannels, int32_t sampleRate) { profile.nSampleRate = sampleRate; profile.eAACStreamFormat = OMX_AUDIO_AACStreamFormatMP4ADTS; - err = mOMX->set_parameter( + err = mOMX->setParameter( mNode, OMX_IndexParamAudioAac, &profile, sizeof(profile)); CHECK_EQ(err, OK); } @@ -1666,7 +1676,7 @@ void OMXCodec::setImageOutputFormat( InitOMXParams(&def); def.nPortIndex = kPortIndexOutput; - status_t err = mOMX->get_parameter( + status_t err = mOMX->getParameter( mNode, OMX_IndexParamPortDefinition, &def, sizeof(def)); CHECK_EQ(err, OK); @@ -1715,7 +1725,7 @@ void OMXCodec::setImageOutputFormat( def.nBufferCountActual = def.nBufferCountMin; - err = mOMX->set_parameter( + err = mOMX->setParameter( mNode, OMX_IndexParamPortDefinition, &def, sizeof(def)); CHECK_EQ(err, OK); } @@ -1726,7 +1736,7 @@ void OMXCodec::setJPEGInputFormat( InitOMXParams(&def); def.nPortIndex = kPortIndexInput; - status_t err = mOMX->get_parameter( + status_t err = mOMX->getParameter( mNode, OMX_IndexParamPortDefinition, &def, sizeof(def)); CHECK_EQ(err, OK); @@ -1740,7 +1750,7 @@ void OMXCodec::setJPEGInputFormat( def.nBufferSize = compressedSize; def.nBufferCountActual = def.nBufferCountMin; - err = mOMX->set_parameter( + err = mOMX->setParameter( mNode, OMX_IndexParamPortDefinition, &def, sizeof(def)); CHECK_EQ(err, OK); } @@ -1830,7 +1840,7 @@ status_t OMXCodec::stop() { mPortStatus[kPortIndexOutput] = SHUTTING_DOWN; status_t err = - mOMX->send_command(mNode, OMX_CommandStateSet, OMX_StateIdle); + mOMX->sendCommand(mNode, OMX_CommandStateSet, OMX_StateIdle); CHECK_EQ(err, OK); } @@ -1867,9 +1877,24 @@ status_t OMXCodec::read( return UNKNOWN_ERROR; } + bool seeking = false; + int64_t seekTimeUs; + if (options && options->getSeekTo(&seekTimeUs)) { + seeking = true; + } + if (mInitialBufferSubmit) { mInitialBufferSubmit = false; + if (seeking) { + CHECK(seekTimeUs >= 0); + mSeekTimeUs = seekTimeUs; + + // There's no reason to trigger the code below, there's + // nothing to flush yet. + seeking = false; + } + drainInputBuffers(); if (mState == EXECUTING) { @@ -1879,8 +1904,7 @@ status_t OMXCodec::read( } } - int64_t seekTimeUs; - if (options && options->getSeekTo(&seekTimeUs)) { + if (seeking) { CODEC_LOGV("seeking to %lld us (%.2f secs)", seekTimeUs, seekTimeUs / 1E6); mSignalledEOS = false; @@ -2162,7 +2186,7 @@ void OMXCodec::dumpPortStatus(OMX_U32 portIndex) { InitOMXParams(&def); def.nPortIndex = portIndex; - status_t err = mOMX->get_parameter( + status_t err = mOMX->getParameter( mNode, OMX_IndexParamPortDefinition, &def, sizeof(def)); CHECK_EQ(err, OK); @@ -2228,7 +2252,7 @@ void OMXCodec::dumpPortStatus(OMX_U32 portIndex) { InitOMXParams(¶ms); params.nPortIndex = portIndex; - err = mOMX->get_parameter( + err = mOMX->getParameter( mNode, OMX_IndexParamAudioPcm, ¶ms, sizeof(params)); CHECK_EQ(err, OK); @@ -2247,7 +2271,7 @@ void OMXCodec::dumpPortStatus(OMX_U32 portIndex) { InitOMXParams(&amr); amr.nPortIndex = portIndex; - err = mOMX->get_parameter( + err = mOMX->getParameter( mNode, OMX_IndexParamAudioAmr, &amr, sizeof(amr)); CHECK_EQ(err, OK); @@ -2279,7 +2303,7 @@ void OMXCodec::initOutputFormat(const sp<MetaData> &inputFormat) { InitOMXParams(&def); def.nPortIndex = kPortIndexOutput; - status_t err = mOMX->get_parameter( + status_t err = mOMX->getParameter( mNode, OMX_IndexParamPortDefinition, &def, sizeof(def)); CHECK_EQ(err, OK); @@ -2305,7 +2329,7 @@ void OMXCodec::initOutputFormat(const sp<MetaData> &inputFormat) { InitOMXParams(¶ms); params.nPortIndex = kPortIndexOutput; - err = mOMX->get_parameter( + err = mOMX->getParameter( mNode, OMX_IndexParamAudioPcm, ¶ms, sizeof(params)); CHECK_EQ(err, OK); @@ -2337,7 +2361,7 @@ void OMXCodec::initOutputFormat(const sp<MetaData> &inputFormat) { InitOMXParams(&amr); amr.nPortIndex = kPortIndexOutput; - err = mOMX->get_parameter( + err = mOMX->getParameter( mNode, OMX_IndexParamAudioAmr, &amr, sizeof(amr)); CHECK_EQ(err, OK); @@ -2386,7 +2410,7 @@ void OMXCodec::initOutputFormat(const sp<MetaData> &inputFormat) { CHECK(!"Unknown compression format."); } - if (!strcmp(mComponentName, "OMX.PV.avcdec")) { + if (mQuirks & kOutputDimensionsAre16Aligned) { // This component appears to be lying to me. mOutputFormat->setInt32( kKeyWidth, (video_def->nFrameWidth + 15) & -16); @@ -2434,8 +2458,9 @@ status_t QueryCodecs( return OK; } + sp<OMXCodecObserver> observer = new OMXCodecObserver; IOMX::node_id node; - status_t err = omx->allocate_node(componentName, &node); + status_t err = omx->allocateNode(componentName, observer, &node); if (err != OK) { continue; @@ -2453,7 +2478,7 @@ status_t QueryCodecs( param.nPortIndex = queryDecoders ? 0 : 1; for (param.nProfileIndex = 0;; ++param.nProfileIndex) { - err = omx->get_parameter( + err = omx->getParameter( node, OMX_IndexParamVideoProfileLevelQuerySupported, ¶m, sizeof(param)); @@ -2468,7 +2493,7 @@ status_t QueryCodecs( caps->mProfileLevels.push(profileLevel); } - CHECK_EQ(omx->free_node(node), OK); + CHECK_EQ(omx->freeNode(node), OK); } } diff --git a/media/libstagefright/ShoutcastSource.cpp b/media/libstagefright/ShoutcastSource.cpp index 8e8f4fa38fd1..346b5aa7cd60 100644 --- a/media/libstagefright/ShoutcastSource.cpp +++ b/media/libstagefright/ShoutcastSource.cpp @@ -23,7 +23,7 @@ #include <media/stagefright/MediaDefs.h> #include <media/stagefright/MetaData.h> #include <media/stagefright/ShoutcastSource.h> -#include <media/stagefright/string.h> +#include <media/stagefright/stagefright_string.h> namespace android { diff --git a/media/libstagefright/omx/OMX.h b/media/libstagefright/include/OMX.h index 6325f79c7bad..d0bd61e56373 100644 --- a/media/libstagefright/omx/OMX.h +++ b/media/libstagefright/include/OMX.h @@ -19,66 +19,67 @@ #include <media/IOMX.h> #include <utils/threads.h> +#include <utils/KeyedVector.h> namespace android { -class NodeMeta; +class OMXNodeInstance; -class OMX : public BnOMX { +class OMX : public BnOMX, + public IBinder::DeathRecipient { public: OMX(); - virtual status_t list_nodes(List<String8> *list); + virtual status_t listNodes(List<String8> *list); - virtual status_t allocate_node(const char *name, node_id *node); - virtual status_t free_node(node_id node); + virtual status_t allocateNode( + const char *name, const sp<IOMXObserver> &observer, node_id *node); - virtual status_t send_command( + virtual status_t freeNode(node_id node); + + virtual status_t sendCommand( node_id node, OMX_COMMANDTYPE cmd, OMX_S32 param); - virtual status_t get_parameter( + virtual status_t getParameter( node_id node, OMX_INDEXTYPE index, void *params, size_t size); - virtual status_t set_parameter( + virtual status_t setParameter( node_id node, OMX_INDEXTYPE index, const void *params, size_t size); - virtual status_t get_config( + virtual status_t getConfig( node_id node, OMX_INDEXTYPE index, void *params, size_t size); - virtual status_t set_config( + virtual status_t setConfig( node_id node, OMX_INDEXTYPE index, const void *params, size_t size); - virtual status_t use_buffer( + virtual status_t useBuffer( node_id node, OMX_U32 port_index, const sp<IMemory> ¶ms, buffer_id *buffer); - virtual status_t allocate_buffer( + virtual status_t allocateBuffer( node_id node, OMX_U32 port_index, size_t size, buffer_id *buffer); - virtual status_t allocate_buffer_with_backup( + virtual status_t allocateBufferWithBackup( node_id node, OMX_U32 port_index, const sp<IMemory> ¶ms, buffer_id *buffer); - virtual status_t free_buffer( + virtual status_t freeBuffer( node_id node, OMX_U32 port_index, buffer_id buffer); - virtual status_t observe_node( - node_id node, const sp<IOMXObserver> &observer); - - virtual void fill_buffer(node_id node, buffer_id buffer); + virtual status_t fillBuffer(node_id node, buffer_id buffer); - virtual void empty_buffer( + virtual status_t emptyBuffer( node_id node, buffer_id buffer, OMX_U32 range_offset, OMX_U32 range_length, OMX_U32 flags, OMX_TICKS timestamp); - virtual status_t get_extension_index( + virtual status_t getExtensionIndex( node_id node, const char *parameter_name, OMX_INDEXTYPE *index); @@ -90,44 +91,38 @@ public: size_t encodedWidth, size_t encodedHeight, size_t displayWidth, size_t displayHeight); -private: - static OMX_CALLBACKTYPE kCallbacks; - - Mutex mLock; - - struct CallbackDispatcher; - sp<CallbackDispatcher> mDispatcher; - - static OMX_ERRORTYPE OnEvent( - OMX_IN OMX_HANDLETYPE hComponent, - OMX_IN OMX_PTR pAppData, - OMX_IN OMX_EVENTTYPE eEvent, - OMX_IN OMX_U32 nData1, - OMX_IN OMX_U32 nData2, - OMX_IN OMX_PTR pEventData); - - static OMX_ERRORTYPE OnEmptyBufferDone( - OMX_IN OMX_HANDLETYPE hComponent, - OMX_IN OMX_PTR pAppData, - OMX_IN OMX_BUFFERHEADERTYPE* pBuffer); - - static OMX_ERRORTYPE OnFillBufferDone( - OMX_IN OMX_HANDLETYPE hComponent, - OMX_IN OMX_PTR pAppData, - OMX_IN OMX_BUFFERHEADERTYPE* pBuffer); + virtual void binderDied(const wp<IBinder> &the_late_who); OMX_ERRORTYPE OnEvent( - NodeMeta *meta, + node_id node, OMX_IN OMX_EVENTTYPE eEvent, OMX_IN OMX_U32 nData1, OMX_IN OMX_U32 nData2, OMX_IN OMX_PTR pEventData); - + OMX_ERRORTYPE OnEmptyBufferDone( - NodeMeta *meta, OMX_IN OMX_BUFFERHEADERTYPE *pBuffer); + node_id node, OMX_IN OMX_BUFFERHEADERTYPE *pBuffer); OMX_ERRORTYPE OnFillBufferDone( - NodeMeta *meta, OMX_IN OMX_BUFFERHEADERTYPE *pBuffer); + node_id node, OMX_IN OMX_BUFFERHEADERTYPE *pBuffer); + + void invalidateNodeID(node_id node); + +private: + Mutex mLock; + + struct CallbackDispatcher; + sp<CallbackDispatcher> mDispatcher; + + int32_t mNodeCounter; + + KeyedVector<wp<IBinder>, OMXNodeInstance *> mLiveNodes; + KeyedVector<node_id, OMXNodeInstance *> mNodeIDToInstance; + + node_id makeNodeID(OMXNodeInstance *instance); + OMXNodeInstance *findInstance(node_id node); + + void invalidateNodeID_l(node_id node); OMX(const OMX &); OMX &operator=(const OMX &); diff --git a/media/libstagefright/include/OMXNodeInstance.h b/media/libstagefright/include/OMXNodeInstance.h new file mode 100644 index 000000000000..09a88169c040 --- /dev/null +++ b/media/libstagefright/include/OMXNodeInstance.h @@ -0,0 +1,125 @@ +/* + * 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 OMX_NODE_INSTANCE_H_ + +#define OMX_NODE_INSTANCE_H_ + +#include "OMX.h" + +#include <utils/RefBase.h> +#include <utils/threads.h> + +namespace android { + +class IOMXObserver; + +struct OMXNodeInstance { + OMXNodeInstance( + OMX *owner, const sp<IOMXObserver> &observer); + + void setHandle(OMX::node_id node_id, OMX_HANDLETYPE handle); + + OMX *owner(); + sp<IOMXObserver> observer(); + OMX::node_id nodeID(); + + status_t freeNode(); + + status_t sendCommand(OMX_COMMANDTYPE cmd, OMX_S32 param); + status_t getParameter(OMX_INDEXTYPE index, void *params, size_t size); + + status_t setParameter( + OMX_INDEXTYPE index, const void *params, size_t size); + + status_t getConfig(OMX_INDEXTYPE index, void *params, size_t size); + status_t setConfig(OMX_INDEXTYPE index, const void *params, size_t size); + + status_t useBuffer( + OMX_U32 portIndex, const sp<IMemory> ¶ms, + OMX::buffer_id *buffer); + + status_t allocateBuffer( + OMX_U32 portIndex, size_t size, OMX::buffer_id *buffer); + + status_t allocateBufferWithBackup( + OMX_U32 portIndex, const sp<IMemory> ¶ms, + OMX::buffer_id *buffer); + + status_t freeBuffer(OMX_U32 portIndex, OMX::buffer_id buffer); + + status_t fillBuffer(OMX::buffer_id buffer); + + status_t emptyBuffer( + OMX::buffer_id buffer, + OMX_U32 rangeOffset, OMX_U32 rangeLength, + OMX_U32 flags, OMX_TICKS timestamp); + + status_t getExtensionIndex( + const char *parameterName, OMX_INDEXTYPE *index); + + void onMessage(const omx_message &msg); + void onObserverDied(); + void onGetHandleFailed(); + + static OMX_CALLBACKTYPE kCallbacks; + +private: + Mutex mLock; + + OMX *mOwner; + OMX::node_id mNodeID; + OMX_HANDLETYPE mHandle; + sp<IOMXObserver> mObserver; + + struct ActiveBuffer { + OMX_U32 mPortIndex; + OMX::buffer_id mID; + }; + Vector<ActiveBuffer> mActiveBuffers; + + ~OMXNodeInstance(); + + void addActiveBuffer(OMX_U32 portIndex, OMX::buffer_id id); + void removeActiveBuffer(OMX_U32 portIndex, OMX::buffer_id id); + void freeActiveBuffers(); + + static OMX_ERRORTYPE OnEvent( + OMX_IN OMX_HANDLETYPE hComponent, + OMX_IN OMX_PTR pAppData, + OMX_IN OMX_EVENTTYPE eEvent, + OMX_IN OMX_U32 nData1, + OMX_IN OMX_U32 nData2, + OMX_IN OMX_PTR pEventData); + + static OMX_ERRORTYPE OnEmptyBufferDone( + OMX_IN OMX_HANDLETYPE hComponent, + OMX_IN OMX_PTR pAppData, + OMX_IN OMX_BUFFERHEADERTYPE *pBuffer); + + static OMX_ERRORTYPE OnFillBufferDone( + OMX_IN OMX_HANDLETYPE hComponent, + OMX_IN OMX_PTR pAppData, + OMX_IN OMX_BUFFERHEADERTYPE *pBuffer); + + OMXNodeInstance(const OMXNodeInstance &); + OMXNodeInstance &operator=(const OMXNodeInstance &); +}; + +} // namespace android + +#endif // OMX_NODE_INSTANCE_H_ + diff --git a/media/libstagefright/omx/Android.mk b/media/libstagefright/omx/Android.mk index 4cadccd82e87..20fb4f34a2e0 100644 --- a/media/libstagefright/omx/Android.mk +++ b/media/libstagefright/omx/Android.mk @@ -11,6 +11,7 @@ LOCAL_C_INCLUDES += $(JNI_H_INCLUDE) LOCAL_SRC_FILES:= \ OMX.cpp \ + OMXNodeInstance.cpp \ QComHardwareRenderer.cpp \ SoftwareRenderer.cpp \ TIHardwareRenderer.cpp diff --git a/media/libstagefright/omx/OMX.cpp b/media/libstagefright/omx/OMX.cpp index 8b83dd6ca61c..9ac0d44e025b 100644 --- a/media/libstagefright/omx/OMX.cpp +++ b/media/libstagefright/omx/OMX.cpp @@ -18,13 +18,13 @@ #define LOG_TAG "OMX" #include <utils/Log.h> -#include <sys/socket.h> - -#include "OMX.h" +#include "../include/OMX.h" #include "OMXRenderer.h" #include "pv_omxcore.h" +#include "../include/OMXNodeInstance.h" + #include <binder/IMemory.h> #include <media/stagefright/MediaDebug.h> #include <media/stagefright/QComHardwareRenderer.h> @@ -36,47 +36,10 @@ namespace android { -class NodeMeta { -public: - NodeMeta(OMX *owner) - : mOwner(owner), - mHandle(NULL) { - } - - OMX *owner() const { - return mOwner; - } - - void setHandle(OMX_HANDLETYPE handle) { - CHECK_EQ(mHandle, NULL); - mHandle = handle; - } - - OMX_HANDLETYPE handle() const { - return mHandle; - } - - void setObserver(const sp<IOMXObserver> &observer) { - mObserver = observer; - } - - sp<IOMXObserver> observer() { - return mObserver; - } - -private: - OMX *mOwner; - OMX_HANDLETYPE mHandle; - sp<IOMXObserver> mObserver; - - NodeMeta(const NodeMeta &); - NodeMeta &operator=(const NodeMeta &); -}; - //////////////////////////////////////////////////////////////////////////////// struct OMX::CallbackDispatcher : public RefBase { - CallbackDispatcher(); + CallbackDispatcher(OMX *owner); void post(const omx_message &msg); @@ -85,6 +48,8 @@ protected: private: Mutex mLock; + + OMX *mOwner; bool mDone; Condition mQueueChanged; List<omx_message> mQueue; @@ -100,8 +65,9 @@ private: CallbackDispatcher &operator=(const CallbackDispatcher &); }; -OMX::CallbackDispatcher::CallbackDispatcher() - : mDone(false) { +OMX::CallbackDispatcher::CallbackDispatcher(OMX *owner) + : mOwner(owner), + mDone(false) { pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); @@ -130,12 +96,12 @@ void OMX::CallbackDispatcher::post(const omx_message &msg) { } void OMX::CallbackDispatcher::dispatch(const omx_message &msg) { - NodeMeta *meta = static_cast<NodeMeta *>(msg.node); - - sp<IOMXObserver> observer = meta->observer(); - if (observer.get() != NULL) { - observer->on_message(msg); + OMXNodeInstance *instance = mOwner->findInstance(msg.node); + if (instance == NULL) { + LOGV("Would have dispatched a message to a node that's already gone."); + return; } + instance->onMessage(msg); } // static @@ -213,46 +179,30 @@ private: BufferMeta &operator=(const BufferMeta &); }; -// static -OMX_CALLBACKTYPE OMX::kCallbacks = { - &OnEvent, &OnEmptyBufferDone, &OnFillBufferDone -}; - -// static -OMX_ERRORTYPE OMX::OnEvent( - OMX_IN OMX_HANDLETYPE hComponent, - OMX_IN OMX_PTR pAppData, - OMX_IN OMX_EVENTTYPE eEvent, - OMX_IN OMX_U32 nData1, - OMX_IN OMX_U32 nData2, - OMX_IN OMX_PTR pEventData) { - NodeMeta *meta = static_cast<NodeMeta *>(pAppData); - return meta->owner()->OnEvent(meta, eEvent, nData1, nData2, pEventData); +OMX::OMX() + : mDispatcher(new CallbackDispatcher(this)), + mNodeCounter(0) { } -// static -OMX_ERRORTYPE OMX::OnEmptyBufferDone( - OMX_IN OMX_HANDLETYPE hComponent, - OMX_IN OMX_PTR pAppData, - OMX_IN OMX_BUFFERHEADERTYPE* pBuffer) { - NodeMeta *meta = static_cast<NodeMeta *>(pAppData); - return meta->owner()->OnEmptyBufferDone(meta, pBuffer); -} +void OMX::binderDied(const wp<IBinder> &the_late_who) { + OMXNodeInstance *instance; -// static -OMX_ERRORTYPE OMX::OnFillBufferDone( - OMX_IN OMX_HANDLETYPE hComponent, - OMX_IN OMX_PTR pAppData, - OMX_IN OMX_BUFFERHEADERTYPE* pBuffer) { - NodeMeta *meta = static_cast<NodeMeta *>(pAppData); - return meta->owner()->OnFillBufferDone(meta, pBuffer); -} + { + Mutex::Autolock autoLock(mLock); -OMX::OMX() - : mDispatcher(new CallbackDispatcher) { + ssize_t index = mLiveNodes.indexOfKey(the_late_who); + CHECK(index >= 0); + + instance = mLiveNodes.editValueAt(index); + mLiveNodes.removeItemsAt(index); + + invalidateNodeID_l(instance->nodeID()); + } + + instance->onObserverDied(); } -status_t OMX::list_nodes(List<String8> *list) { +status_t OMX::listNodes(List<String8> *list) { OMX_MasterInit(); // XXX Put this somewhere else. list->clear(); @@ -269,204 +219,132 @@ status_t OMX::list_nodes(List<String8> *list) { return OK; } -status_t OMX::allocate_node(const char *name, node_id *node) { +status_t OMX::allocateNode( + const char *name, const sp<IOMXObserver> &observer, node_id *node) { Mutex::Autolock autoLock(mLock); *node = 0; OMX_MasterInit(); // XXX Put this somewhere else. - NodeMeta *meta = new NodeMeta(this); + OMXNodeInstance *instance = new OMXNodeInstance(this, observer); OMX_HANDLETYPE handle; OMX_ERRORTYPE err = OMX_MasterGetHandle( - &handle, const_cast<char *>(name), meta, &kCallbacks); + &handle, const_cast<char *>(name), instance, + &OMXNodeInstance::kCallbacks); if (err != OMX_ErrorNone) { LOGE("FAILED to allocate omx component '%s'", name); - delete meta; - meta = NULL; + instance->onGetHandleFailed(); return UNKNOWN_ERROR; } - meta->setHandle(handle); + *node = makeNodeID(instance); - *node = meta; + instance->setHandle(*node, handle); + + mLiveNodes.add(observer->asBinder(), instance); + observer->asBinder()->linkToDeath(this); return OK; } -status_t OMX::free_node(node_id node) { - Mutex::Autolock autoLock(mLock); - - NodeMeta *meta = static_cast<NodeMeta *>(node); - - OMX_ERRORTYPE err = OMX_MasterFreeHandle(meta->handle()); +status_t OMX::freeNode(node_id node) { + OMXNodeInstance *instance = findInstance(node); - delete meta; - meta = NULL; + ssize_t index = mLiveNodes.indexOfKey(instance->observer()->asBinder()); + CHECK(index >= 0); + mLiveNodes.removeItemsAt(index); + instance->observer()->asBinder()->unlinkToDeath(this); - return (err != OMX_ErrorNone) ? UNKNOWN_ERROR : OK; + return instance->freeNode(); } -status_t OMX::send_command( +status_t OMX::sendCommand( node_id node, OMX_COMMANDTYPE cmd, OMX_S32 param) { - Mutex::Autolock autoLock(mLock); - - NodeMeta *meta = static_cast<NodeMeta *>(node); - OMX_ERRORTYPE err = OMX_SendCommand(meta->handle(), cmd, param, NULL); - - return (err != OMX_ErrorNone) ? UNKNOWN_ERROR : OK; + return findInstance(node)->sendCommand(cmd, param); } -status_t OMX::get_parameter( +status_t OMX::getParameter( node_id node, OMX_INDEXTYPE index, void *params, size_t size) { - Mutex::Autolock autoLock(mLock); - - NodeMeta *meta = static_cast<NodeMeta *>(node); - OMX_ERRORTYPE err = OMX_GetParameter(meta->handle(), index, params); - - return (err != OMX_ErrorNone) ? UNKNOWN_ERROR : OK; + return findInstance(node)->getParameter( + index, params, size); } -status_t OMX::set_parameter( +status_t OMX::setParameter( node_id node, OMX_INDEXTYPE index, const void *params, size_t size) { - Mutex::Autolock autoLock(mLock); - - NodeMeta *meta = static_cast<NodeMeta *>(node); - OMX_ERRORTYPE err = - OMX_SetParameter(meta->handle(), index, const_cast<void *>(params)); - - return (err != OMX_ErrorNone) ? UNKNOWN_ERROR : OK; + return findInstance(node)->setParameter( + index, params, size); } -status_t OMX::get_config( +status_t OMX::getConfig( node_id node, OMX_INDEXTYPE index, void *params, size_t size) { - Mutex::Autolock autoLock(mLock); - - NodeMeta *meta = static_cast<NodeMeta *>(node); - OMX_ERRORTYPE err = OMX_GetConfig(meta->handle(), index, params); - - return (err != OMX_ErrorNone) ? UNKNOWN_ERROR : OK; + return findInstance(node)->getConfig( + index, params, size); } -status_t OMX::set_config( +status_t OMX::setConfig( node_id node, OMX_INDEXTYPE index, const void *params, size_t size) { - Mutex::Autolock autoLock(mLock); - - NodeMeta *meta = static_cast<NodeMeta *>(node); - OMX_ERRORTYPE err = - OMX_SetConfig(meta->handle(), index, const_cast<void *>(params)); - - return (err != OMX_ErrorNone) ? UNKNOWN_ERROR : OK; + return findInstance(node)->setConfig( + index, params, size); } -status_t OMX::use_buffer( +status_t OMX::useBuffer( node_id node, OMX_U32 port_index, const sp<IMemory> ¶ms, buffer_id *buffer) { - Mutex::Autolock autoLock(mLock); - - BufferMeta *buffer_meta = new BufferMeta(this, params); - - OMX_BUFFERHEADERTYPE *header; - - NodeMeta *node_meta = static_cast<NodeMeta *>(node); - OMX_ERRORTYPE err = - OMX_UseBuffer(node_meta->handle(), &header, port_index, buffer_meta, - params->size(), static_cast<OMX_U8 *>(params->pointer())); - - if (err != OMX_ErrorNone) { - LOGE("OMX_UseBuffer failed with error %d (0x%08x)", err, err); - - delete buffer_meta; - buffer_meta = NULL; - - *buffer = 0; - return UNKNOWN_ERROR; - } - - *buffer = header; - - return OK; + return findInstance(node)->useBuffer( + port_index, params, buffer); } -status_t OMX::allocate_buffer( +status_t OMX::allocateBuffer( node_id node, OMX_U32 port_index, size_t size, buffer_id *buffer) { - Mutex::Autolock autoLock(mLock); - - BufferMeta *buffer_meta = new BufferMeta(this, size); - - OMX_BUFFERHEADERTYPE *header; - - NodeMeta *node_meta = static_cast<NodeMeta *>(node); - OMX_ERRORTYPE err = - OMX_AllocateBuffer(node_meta->handle(), &header, port_index, - buffer_meta, size); - - if (err != OMX_ErrorNone) { - delete buffer_meta; - buffer_meta = NULL; - - *buffer = 0; - return UNKNOWN_ERROR; - } - - *buffer = header; - - return OK; + return findInstance(node)->allocateBuffer( + port_index, size, buffer); } -status_t OMX::allocate_buffer_with_backup( +status_t OMX::allocateBufferWithBackup( node_id node, OMX_U32 port_index, const sp<IMemory> ¶ms, buffer_id *buffer) { - Mutex::Autolock autoLock(mLock); - - BufferMeta *buffer_meta = new BufferMeta(this, params, true); - - OMX_BUFFERHEADERTYPE *header; - - NodeMeta *node_meta = static_cast<NodeMeta *>(node); - OMX_ERRORTYPE err = - OMX_AllocateBuffer( - node_meta->handle(), &header, port_index, buffer_meta, - params->size()); - - if (err != OMX_ErrorNone) { - delete buffer_meta; - buffer_meta = NULL; - - *buffer = 0; - return UNKNOWN_ERROR; - } - - *buffer = header; - - return OK; + return findInstance(node)->allocateBufferWithBackup( + port_index, params, buffer); } -status_t OMX::free_buffer(node_id node, OMX_U32 port_index, buffer_id buffer) { - OMX_BUFFERHEADERTYPE *header = (OMX_BUFFERHEADERTYPE *)buffer; - BufferMeta *buffer_meta = static_cast<BufferMeta *>(header->pAppPrivate); +status_t OMX::freeBuffer(node_id node, OMX_U32 port_index, buffer_id buffer) { + return findInstance(node)->freeBuffer( + port_index, buffer); +} - NodeMeta *node_meta = static_cast<NodeMeta *>(node); - OMX_ERRORTYPE err = - OMX_FreeBuffer(node_meta->handle(), port_index, header); +status_t OMX::fillBuffer(node_id node, buffer_id buffer) { + return findInstance(node)->fillBuffer(buffer); +} - delete buffer_meta; - buffer_meta = NULL; +status_t OMX::emptyBuffer( + node_id node, + buffer_id buffer, + OMX_U32 range_offset, OMX_U32 range_length, + OMX_U32 flags, OMX_TICKS timestamp) { + return findInstance(node)->emptyBuffer( + buffer, range_offset, range_length, flags, timestamp); +} - return (err != OMX_ErrorNone) ? UNKNOWN_ERROR : OK; +status_t OMX::getExtensionIndex( + node_id node, + const char *parameter_name, + OMX_INDEXTYPE *index) { + return findInstance(node)->getExtensionIndex( + parameter_name, index); } OMX_ERRORTYPE OMX::OnEvent( - NodeMeta *meta, + node_id node, OMX_IN OMX_EVENTTYPE eEvent, OMX_IN OMX_U32 nData1, OMX_IN OMX_U32 nData2, @@ -475,7 +353,7 @@ OMX_ERRORTYPE OMX::OnEvent( omx_message msg; msg.type = omx_message::EVENT; - msg.node = meta; + msg.node = node; msg.u.event_data.event = eEvent; msg.u.event_data.data1 = nData1; msg.u.event_data.data2 = nData2; @@ -484,14 +362,14 @@ OMX_ERRORTYPE OMX::OnEvent( return OMX_ErrorNone; } - + OMX_ERRORTYPE OMX::OnEmptyBufferDone( - NodeMeta *meta, OMX_IN OMX_BUFFERHEADERTYPE *pBuffer) { + node_id node, OMX_IN OMX_BUFFERHEADERTYPE *pBuffer) { LOGV("OnEmptyBufferDone buffer=%p", pBuffer); omx_message msg; msg.type = omx_message::EMPTY_BUFFER_DONE; - msg.node = meta; + msg.node = node; msg.u.buffer_data.buffer = pBuffer; mDispatcher->post(msg); @@ -500,14 +378,12 @@ OMX_ERRORTYPE OMX::OnEmptyBufferDone( } OMX_ERRORTYPE OMX::OnFillBufferDone( - NodeMeta *meta, OMX_IN OMX_BUFFERHEADERTYPE *pBuffer) { + node_id node, OMX_IN OMX_BUFFERHEADERTYPE *pBuffer) { LOGV("OnFillBufferDone buffer=%p", pBuffer); - BufferMeta *buffer_meta = static_cast<BufferMeta *>(pBuffer->pAppPrivate); - buffer_meta->CopyFromOMX(pBuffer); omx_message msg; msg.type = omx_message::FILL_BUFFER_DONE; - msg.node = meta; + msg.node = node; msg.u.extended_buffer_data.buffer = pBuffer; msg.u.extended_buffer_data.range_offset = pBuffer->nOffset; msg.u.extended_buffer_data.range_length = pBuffer->nFilledLen; @@ -520,62 +396,31 @@ OMX_ERRORTYPE OMX::OnFillBufferDone( return OMX_ErrorNone; } -status_t OMX::observe_node( - node_id node, const sp<IOMXObserver> &observer) { - NodeMeta *node_meta = static_cast<NodeMeta *>(node); +OMX::node_id OMX::makeNodeID(OMXNodeInstance *instance) { + // mLock is already held. - node_meta->setObserver(observer); + node_id node = (node_id)++mNodeCounter; + mNodeIDToInstance.add(node, instance); - return OK; + return node; } -void OMX::fill_buffer(node_id node, buffer_id buffer) { - OMX_BUFFERHEADERTYPE *header = (OMX_BUFFERHEADERTYPE *)buffer; - header->nFilledLen = 0; - header->nOffset = 0; - header->nFlags = 0; +OMXNodeInstance *OMX::findInstance(node_id node) { + Mutex::Autolock autoLock(mLock); - NodeMeta *node_meta = static_cast<NodeMeta *>(node); + ssize_t index = mNodeIDToInstance.indexOfKey(node); - OMX_ERRORTYPE err = - OMX_FillThisBuffer(node_meta->handle(), header); - CHECK_EQ(err, OMX_ErrorNone); + return index < 0 ? NULL : mNodeIDToInstance.valueAt(index); } -void OMX::empty_buffer( - node_id node, - buffer_id buffer, - OMX_U32 range_offset, OMX_U32 range_length, - OMX_U32 flags, OMX_TICKS timestamp) { - OMX_BUFFERHEADERTYPE *header = (OMX_BUFFERHEADERTYPE *)buffer; - header->nFilledLen = range_length; - header->nOffset = range_offset; - header->nFlags = flags; - header->nTimeStamp = timestamp; - - BufferMeta *buffer_meta = - static_cast<BufferMeta *>(header->pAppPrivate); - buffer_meta->CopyToOMX(header); - - NodeMeta *node_meta = static_cast<NodeMeta *>(node); - - OMX_ERRORTYPE err = - OMX_EmptyThisBuffer(node_meta->handle(), header); - CHECK_EQ(err, OMX_ErrorNone); +void OMX::invalidateNodeID(node_id node) { + Mutex::Autolock autoLock(mLock); + invalidateNodeID_l(node); } -status_t OMX::get_extension_index( - node_id node, - const char *parameter_name, - OMX_INDEXTYPE *index) { - NodeMeta *node_meta = static_cast<NodeMeta *>(node); - - OMX_ERRORTYPE err = - OMX_GetExtensionIndex( - node_meta->handle(), - const_cast<char *>(parameter_name), index); - - return err == OMX_ErrorNone ? OK : UNKNOWN_ERROR; +void OMX::invalidateNodeID_l(node_id node) { + // mLock is held. + mNodeIDToInstance.removeItem(node); } //////////////////////////////////////////////////////////////////////////////// diff --git a/media/libstagefright/omx/OMXNodeInstance.cpp b/media/libstagefright/omx/OMXNodeInstance.cpp new file mode 100644 index 000000000000..821891862c4b --- /dev/null +++ b/media/libstagefright/omx/OMXNodeInstance.cpp @@ -0,0 +1,461 @@ +/* + * 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_NDEBUG 0 +#define LOG_TAG "OMXNodeInstance" +#include <utils/Log.h> + +#include "../include/OMXNodeInstance.h" + +#include "pv_omxcore.h" + +#include <binder/IMemory.h> +#include <media/stagefright/MediaDebug.h> + +namespace android { + +struct BufferMeta { + BufferMeta(const sp<IMemory> &mem, bool is_backup = false) + : mMem(mem), + mIsBackup(is_backup) { + } + + BufferMeta(size_t size) + : mSize(size), + mIsBackup(false) { + } + + void CopyFromOMX(const OMX_BUFFERHEADERTYPE *header) { + if (!mIsBackup) { + return; + } + + memcpy((OMX_U8 *)mMem->pointer() + header->nOffset, + header->pBuffer + header->nOffset, + header->nFilledLen); + } + + void CopyToOMX(const OMX_BUFFERHEADERTYPE *header) { + if (!mIsBackup) { + return; + } + + memcpy(header->pBuffer + header->nOffset, + (const OMX_U8 *)mMem->pointer() + header->nOffset, + header->nFilledLen); + } + +private: + sp<IMemory> mMem; + size_t mSize; + bool mIsBackup; + + BufferMeta(const BufferMeta &); + BufferMeta &operator=(const BufferMeta &); +}; + +// static +OMX_CALLBACKTYPE OMXNodeInstance::kCallbacks = { + &OnEvent, &OnEmptyBufferDone, &OnFillBufferDone +}; + +OMXNodeInstance::OMXNodeInstance( + OMX *owner, const sp<IOMXObserver> &observer) + : mOwner(owner), + mNodeID(NULL), + mHandle(NULL), + mObserver(observer) { +} + +OMXNodeInstance::~OMXNodeInstance() { + CHECK_EQ(mHandle, NULL); +} + +void OMXNodeInstance::setHandle(OMX::node_id node_id, OMX_HANDLETYPE handle) { + CHECK_EQ(mHandle, NULL); + mNodeID = node_id; + mHandle = handle; +} + +OMX *OMXNodeInstance::owner() { + return mOwner; +} + +sp<IOMXObserver> OMXNodeInstance::observer() { + return mObserver; +} + +OMX::node_id OMXNodeInstance::nodeID() { + return mNodeID; +} + +static status_t StatusFromOMXError(OMX_ERRORTYPE err) { + return (err == OMX_ErrorNone) ? OK : UNKNOWN_ERROR; +} + +status_t OMXNodeInstance::freeNode() { + // Transition the node from its current state all the way down + // to "Loaded". + // This ensures that all active buffers are properly freed even + // for components that don't do this themselves on a call to + // "FreeHandle". + + OMX_STATETYPE state; + CHECK_EQ(OMX_GetState(mHandle, &state), OMX_ErrorNone); + switch (state) { + case OMX_StateExecuting: + { + LOGV("forcing Executing->Idle"); + sendCommand(OMX_CommandStateSet, OMX_StateIdle); + OMX_ERRORTYPE err; + while ((err = OMX_GetState(mHandle, &state)) == OMX_ErrorNone + && state != OMX_StateIdle) { + usleep(100000); + } + CHECK_EQ(err, OMX_ErrorNone); + + // fall through + } + + case OMX_StateIdle: + { + LOGV("forcing Idle->Loaded"); + sendCommand(OMX_CommandStateSet, OMX_StateLoaded); + + freeActiveBuffers(); + + OMX_ERRORTYPE err; + while ((err = OMX_GetState(mHandle, &state)) == OMX_ErrorNone + && state != OMX_StateLoaded) { + LOGV("waiting for Loaded state..."); + usleep(100000); + } + CHECK_EQ(err, OMX_ErrorNone); + + // fall through + } + + case OMX_StateLoaded: + case OMX_StateInvalid: + break; + + default: + CHECK(!"should not be here, unknown state."); + break; + } + + OMX_ERRORTYPE err = OMX_MasterFreeHandle(mHandle); + mHandle = NULL; + + if (err != OMX_ErrorNone) { + LOGE("FreeHandle FAILED with error 0x%08x.", err); + } + + mOwner->invalidateNodeID(mNodeID); + mNodeID = NULL; + + LOGV("OMXNodeInstance going away."); + delete this; + + return StatusFromOMXError(err); +} + +status_t OMXNodeInstance::sendCommand( + OMX_COMMANDTYPE cmd, OMX_S32 param) { + Mutex::Autolock autoLock(mLock); + + OMX_ERRORTYPE err = OMX_SendCommand(mHandle, cmd, param, NULL); + return StatusFromOMXError(err); +} + +status_t OMXNodeInstance::getParameter( + OMX_INDEXTYPE index, void *params, size_t size) { + Mutex::Autolock autoLock(mLock); + + OMX_ERRORTYPE err = OMX_GetParameter(mHandle, index, params); + return StatusFromOMXError(err); +} + +status_t OMXNodeInstance::setParameter( + OMX_INDEXTYPE index, const void *params, size_t size) { + Mutex::Autolock autoLock(mLock); + + OMX_ERRORTYPE err = OMX_SetParameter( + mHandle, index, const_cast<void *>(params)); + + return StatusFromOMXError(err); +} + +status_t OMXNodeInstance::getConfig( + OMX_INDEXTYPE index, void *params, size_t size) { + Mutex::Autolock autoLock(mLock); + + OMX_ERRORTYPE err = OMX_GetConfig(mHandle, index, params); + return StatusFromOMXError(err); +} + +status_t OMXNodeInstance::setConfig( + OMX_INDEXTYPE index, const void *params, size_t size) { + Mutex::Autolock autoLock(mLock); + + OMX_ERRORTYPE err = OMX_SetConfig( + mHandle, index, const_cast<void *>(params)); + + return StatusFromOMXError(err); +} + +status_t OMXNodeInstance::useBuffer( + OMX_U32 portIndex, const sp<IMemory> ¶ms, + OMX::buffer_id *buffer) { + Mutex::Autolock autoLock(mLock); + + BufferMeta *buffer_meta = new BufferMeta(params); + + OMX_BUFFERHEADERTYPE *header; + + OMX_ERRORTYPE err = OMX_UseBuffer( + mHandle, &header, portIndex, buffer_meta, + params->size(), static_cast<OMX_U8 *>(params->pointer())); + + if (err != OMX_ErrorNone) { + LOGE("OMX_UseBuffer failed with error %d (0x%08x)", err, err); + + delete buffer_meta; + buffer_meta = NULL; + + *buffer = 0; + + return UNKNOWN_ERROR; + } + + *buffer = header; + + addActiveBuffer(portIndex, *buffer); + + return OK; +} + +status_t OMXNodeInstance::allocateBuffer( + OMX_U32 portIndex, size_t size, OMX::buffer_id *buffer) { + Mutex::Autolock autoLock(mLock); + + BufferMeta *buffer_meta = new BufferMeta(size); + + OMX_BUFFERHEADERTYPE *header; + + OMX_ERRORTYPE err = OMX_AllocateBuffer( + mHandle, &header, portIndex, buffer_meta, size); + + if (err != OMX_ErrorNone) { + LOGE("OMX_AllocateBuffer failed with error %d (0x%08x)", err, err); + + delete buffer_meta; + buffer_meta = NULL; + + *buffer = 0; + + return UNKNOWN_ERROR; + } + + *buffer = header; + + addActiveBuffer(portIndex, *buffer); + + return OK; +} + +status_t OMXNodeInstance::allocateBufferWithBackup( + OMX_U32 portIndex, const sp<IMemory> ¶ms, + OMX::buffer_id *buffer) { + Mutex::Autolock autoLock(mLock); + + BufferMeta *buffer_meta = new BufferMeta(params, true); + + OMX_BUFFERHEADERTYPE *header; + + OMX_ERRORTYPE err = OMX_AllocateBuffer( + mHandle, &header, portIndex, buffer_meta, params->size()); + + if (err != OMX_ErrorNone) { + LOGE("OMX_AllocateBuffer failed with error %d (0x%08x)", err, err); + + delete buffer_meta; + buffer_meta = NULL; + + *buffer = 0; + + return UNKNOWN_ERROR; + } + + *buffer = header; + + addActiveBuffer(portIndex, *buffer); + + return OK; +} + +status_t OMXNodeInstance::freeBuffer( + OMX_U32 portIndex, OMX::buffer_id buffer) { + Mutex::Autolock autoLock(mLock); + + removeActiveBuffer(portIndex, buffer); + + OMX_BUFFERHEADERTYPE *header = (OMX_BUFFERHEADERTYPE *)buffer; + BufferMeta *buffer_meta = static_cast<BufferMeta *>(header->pAppPrivate); + + OMX_ERRORTYPE err = OMX_FreeBuffer(mHandle, portIndex, header); + + delete buffer_meta; + buffer_meta = NULL; + + return StatusFromOMXError(err); +} + +status_t OMXNodeInstance::fillBuffer(OMX::buffer_id buffer) { + Mutex::Autolock autoLock(mLock); + + OMX_BUFFERHEADERTYPE *header = (OMX_BUFFERHEADERTYPE *)buffer; + header->nFilledLen = 0; + header->nOffset = 0; + header->nFlags = 0; + + OMX_ERRORTYPE err = OMX_FillThisBuffer(mHandle, header); + + return StatusFromOMXError(err); +} + +status_t OMXNodeInstance::emptyBuffer( + OMX::buffer_id buffer, + OMX_U32 rangeOffset, OMX_U32 rangeLength, + OMX_U32 flags, OMX_TICKS timestamp) { + Mutex::Autolock autoLock(mLock); + + OMX_BUFFERHEADERTYPE *header = (OMX_BUFFERHEADERTYPE *)buffer; + header->nFilledLen = rangeLength; + header->nOffset = rangeOffset; + header->nFlags = flags; + header->nTimeStamp = timestamp; + + BufferMeta *buffer_meta = + static_cast<BufferMeta *>(header->pAppPrivate); + buffer_meta->CopyToOMX(header); + + OMX_ERRORTYPE err = OMX_EmptyThisBuffer(mHandle, header); + + return StatusFromOMXError(err); +} + +status_t OMXNodeInstance::getExtensionIndex( + const char *parameterName, OMX_INDEXTYPE *index) { + Mutex::Autolock autoLock(mLock); + + OMX_ERRORTYPE err = OMX_GetExtensionIndex( + mHandle, const_cast<char *>(parameterName), index); + + return StatusFromOMXError(err); +} + +void OMXNodeInstance::onMessage(const omx_message &msg) { + if (msg.type == omx_message::FILL_BUFFER_DONE) { + OMX_BUFFERHEADERTYPE *buffer = + static_cast<OMX_BUFFERHEADERTYPE *>( + msg.u.extended_buffer_data.buffer); + + BufferMeta *buffer_meta = + static_cast<BufferMeta *>(buffer->pAppPrivate); + + buffer_meta->CopyFromOMX(buffer); + } + + mObserver->onMessage(msg); +} + +void OMXNodeInstance::onObserverDied() { + LOGE("!!! Observer died. Quickly, do something, ... anything..."); + + // Try to force shutdown of the node and hope for the best. + freeNode(); +} + +void OMXNodeInstance::onGetHandleFailed() { + delete this; +} + +// static +OMX_ERRORTYPE OMXNodeInstance::OnEvent( + OMX_IN OMX_HANDLETYPE hComponent, + OMX_IN OMX_PTR pAppData, + OMX_IN OMX_EVENTTYPE eEvent, + OMX_IN OMX_U32 nData1, + OMX_IN OMX_U32 nData2, + OMX_IN OMX_PTR pEventData) { + OMXNodeInstance *instance = static_cast<OMXNodeInstance *>(pAppData); + return instance->owner()->OnEvent( + instance->nodeID(), eEvent, nData1, nData2, pEventData); +} + +// static +OMX_ERRORTYPE OMXNodeInstance::OnEmptyBufferDone( + OMX_IN OMX_HANDLETYPE hComponent, + OMX_IN OMX_PTR pAppData, + OMX_IN OMX_BUFFERHEADERTYPE* pBuffer) { + OMXNodeInstance *instance = static_cast<OMXNodeInstance *>(pAppData); + return instance->owner()->OnEmptyBufferDone(instance->nodeID(), pBuffer); +} + +// static +OMX_ERRORTYPE OMXNodeInstance::OnFillBufferDone( + OMX_IN OMX_HANDLETYPE hComponent, + OMX_IN OMX_PTR pAppData, + OMX_IN OMX_BUFFERHEADERTYPE* pBuffer) { + OMXNodeInstance *instance = static_cast<OMXNodeInstance *>(pAppData); + return instance->owner()->OnFillBufferDone(instance->nodeID(), pBuffer); +} + +void OMXNodeInstance::addActiveBuffer(OMX_U32 portIndex, OMX::buffer_id id) { + ActiveBuffer active; + active.mPortIndex = portIndex; + active.mID = id; + mActiveBuffers.push(active); +} + +void OMXNodeInstance::removeActiveBuffer( + OMX_U32 portIndex, OMX::buffer_id id) { + bool found = false; + for (size_t i = 0; i < mActiveBuffers.size(); ++i) { + if (mActiveBuffers[i].mPortIndex == portIndex + && mActiveBuffers[i].mID == id) { + found = true; + mActiveBuffers.removeItemsAt(i); + break; + } + } + + if (!found) { + LOGW("Attempt to remove an active buffer we know nothing about..."); + } +} + +void OMXNodeInstance::freeActiveBuffers() { + // Make sure to count down here, as freeBuffer will in turn remove + // the active buffer from the vector... + for (size_t i = mActiveBuffers.size(); i--;) { + freeBuffer(mActiveBuffers[i].mPortIndex, mActiveBuffers[i].mID); + } +} + +} // namespace android + diff --git a/media/libstagefright/omx/QComHardwareRenderer.cpp b/media/libstagefright/omx/QComHardwareRenderer.cpp index e9930be0b164..c65d1f3bebc4 100644 --- a/media/libstagefright/omx/QComHardwareRenderer.cpp +++ b/media/libstagefright/omx/QComHardwareRenderer.cpp @@ -83,6 +83,11 @@ void QComHardwareRenderer::render( } 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) { @@ -121,7 +126,8 @@ void QComHardwareRenderer::publishBuffers(uint32_t pmem_fd) { master->setDevice("/dev/pmem"); - mMemoryHeap = new MemoryHeapPmem(master, 0); + uint32_t heap_flags = master->getFlags() & MemoryHeapBase::NO_CACHING; + mMemoryHeap = new MemoryHeapPmem(master, heap_flags); mMemoryHeap->slap(); ISurface::BufferHeap bufferHeap( diff --git a/media/libstagefright/string.cpp b/media/libstagefright/stagefright_string.cpp index 5b1678403f8e..2aedb80739e2 100644 --- a/media/libstagefright/string.cpp +++ b/media/libstagefright/stagefright_string.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#include <media/stagefright/string.h> +#include <media/stagefright/stagefright_string.h> namespace android { diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaNames.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaNames.java index 9b7ff6ccf427..3b69df8983ca 100755 --- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaNames.java +++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaNames.java @@ -503,4 +503,5 @@ public class MediaNames { "http://75.17.48.204:10088/yslau/stress_media/mpeg4_qvga_24fps.3gp"; public static final int STREAM_H264_480_360_1411k_DURATION = 46000; public static final int VIDEO_H263_AAC_DURATION = 501000; + public static final int VIDEO_H263_AMR_DURATION = 502000; } diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/CameraTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/CameraTest.java index fa0986ab68d8..e66e560cc506 100644 --- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/CameraTest.java +++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/CameraTest.java @@ -226,7 +226,8 @@ public class CameraTest extends ActivityInstrumentationTestCase<MediaFrameworkTe * Test case 1: Take a picture and verify all the callback * functions are called properly. */ - @LargeTest + // TODO: add this back to LargeTest once bug 2141755 is fixed + // @LargeTest public void testTakePicture() throws Exception { synchronized (lock) { initializeMessageLooper(); diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaMetadataTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaMetadataTest.java index 1bf4958327fa..ca60e8cfa4c1 100644 --- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaMetadataTest.java +++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaMetadataTest.java @@ -23,6 +23,7 @@ import android.test.suitebuilder.annotation.Suppress; import android.util.Log; import com.android.mediaframeworktest.MediaNames; +import com.android.mediaframeworktest.MediaProfileReader; /** * This metadata test suite test the basic functionality of the * MediaMetadataRetriever @@ -31,7 +32,7 @@ import com.android.mediaframeworktest.MediaNames; public class MediaMetadataTest extends AndroidTestCase { private static final String TAG = "MediaMetadataTest"; - + public static enum METADATA_EXPECTEDRESULT{ FILE_PATH,CD_TRACK, ALBUM, ARTIST, AUTHOR, COMPOSER, @@ -193,12 +194,17 @@ public class MediaMetadataTest extends AndroidTestCase { } private static void validateMetatData(int fileIndex, String meta_data_file[][]) { + Log.v(TAG, "filePath = "+ meta_data_file[fileIndex][0]); + if ((meta_data_file[fileIndex][0].endsWith("wma") && !MediaProfileReader.getWMAEnable()) || + (meta_data_file[fileIndex][0].endsWith("wmv") && !MediaProfileReader.getWMVEnable())) { + Log.v(TAG, "Skip test since windows media is not supported"); + return; + } String value = null; MediaMetadataRetriever retriever = new MediaMetadataRetriever(); retriever.setMode(MediaMetadataRetriever.MODE_GET_METADATA_ONLY); try { retriever.setDataSource(meta_data_file[fileIndex][0]); - Log.v(TAG, "filePath = "+ meta_data_file[fileIndex][0]); } catch(Exception e) { Log.v(TAG, "Failed: "+meta_data_file[fileIndex][0] + " " + e.toString()); //Set the test case failure whenever it failed to setDataSource diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaMimeTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaMimeTest.java index d2809c1a4bea..ddf5e0bfaf0e 100644 --- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaMimeTest.java +++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaMimeTest.java @@ -83,7 +83,8 @@ public class MediaMimeTest extends ActivityInstrumentationTestCase2<MediaFramewo assertMediaPlaybackActivityHandles("audio/*"); } - @MediumTest + // TODO: temporarily remove from medium suite because it hangs whole suite + // @MediumTest // Checks the MediaPlaybackActivity handles application/itunes. Some servers // set the Content-type header to application/iTunes (with capital T, but // the download manager downcasts it) for their MP3 podcasts. This is non diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaPlayerApiTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaPlayerApiTest.java index 392d1d5a8862..5725c447f197 100644 --- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaPlayerApiTest.java +++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaPlayerApiTest.java @@ -242,8 +242,10 @@ public class MediaPlayerApiTest extends ActivityInstrumentationTestCase<MediaFra @LargeTest public void testWMA9SetLooping() throws Exception { - boolean isLoop = CodecTest.setLooping(MediaNames.WMA9); - assertTrue("WMA9 setLooping", isLoop); + if (isWMAEnable) { + boolean isLoop = CodecTest.setLooping(MediaNames.WMA9); + assertTrue("WMA9 setLooping", isLoop); + } } @LargeTest diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/performance/MediaPlayerPerformance.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/performance/MediaPlayerPerformance.java index 0ae354a49cca..6e3f5e34853d 100644 --- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/performance/MediaPlayerPerformance.java +++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/performance/MediaPlayerPerformance.java @@ -309,6 +309,8 @@ public class MediaPlayerPerformance extends ActivityInstrumentationTestCase<Medi } public boolean validateMemoryResult (int startPid, int startMemory, Writer output) throws Exception { + //Wait for 10 seconds to make sure the memory settle. + Thread.sleep(10000); mEndPid = getMediaserverPid(); mEndMemory = getMediaserverVsize(); Log.v(TAG, "End Memory " + mEndMemory); diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/MediaPlayerStressTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/MediaPlayerStressTest.java index 90d6ffafdb76..fdb43da675f7 100644 --- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/MediaPlayerStressTest.java +++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/MediaPlayerStressTest.java @@ -41,7 +41,7 @@ public class MediaPlayerStressTest extends ActivityInstrumentationTestCase2<Medi private static final int NUMBER_OF_RANDOM_REPOSITION_AND_PLAY = 10; private static final int NUMBER_OF_RANDOM_REPOSITION_AND_PLAY_SHORT = 5; private static final int NUMBER_OF_STRESS_LOOPS = 500; - private static final int PLAYBACK_END_TOLERANCE = 5000; + private static final int PLAYBACK_END_TOLERANCE = 30000; private static final int WAIT_UNTIL_PLAYBACK_FINISH = 515000 ; public MediaPlayerStressTest() { @@ -94,7 +94,7 @@ public class MediaPlayerStressTest extends ActivityInstrumentationTestCase2<Medi long randomseed = System.currentTimeMillis(); Random generator = new Random(randomseed); Log.v(TAG, "Random seed: " + randomseed); - int video_duration = MediaNames.VIDEO_H263_AAC_DURATION; + int video_duration = MediaNames.VIDEO_H263_AMR_DURATION; int random_play_time = 0; int random_seek_time = 0; int random_no_of_seek = 0; @@ -112,10 +112,11 @@ public class MediaPlayerStressTest extends ActivityInstrumentationTestCase2<Medi if (random_no_of_seek == 0) { random_no_of_seek = 1; } - // Random seek and play + Log.v(TAG, "random_seek = " + random_no_of_seek); + // Play for 10 seconds then random seekTo for (int j = 0; j < random_no_of_seek; j++) { random_play_time = - generator.nextInt(video_duration / 2); + generator.nextInt(video_duration / 100); Log.v(TAG, "Play time = " + random_play_time); Thread.sleep(random_play_time); random_seek_time = @@ -123,12 +124,13 @@ public class MediaPlayerStressTest extends ActivityInstrumentationTestCase2<Medi Log.v(TAG, "Seek time = " + random_seek_time); mp.seekTo(random_seek_time); } - //wait until the movie finish and check the current position - //Make sure the wait time is long enough - long wait_until_playback_finish = video_duration - random_seek_time + PLAYBACK_END_TOLERANCE * 2; - Thread.sleep(wait_until_playback_finish); + //Seek to 10s from the end of the video + mp.seekTo(video_duration - 10000); + //After reposition, play 30 seconds the video should be finished. + Thread.sleep(PLAYBACK_END_TOLERANCE); Log.v(TAG, "CurrentPosition = " + mp.getCurrentPosition()); - if ( mp.isPlaying() || mp.getCurrentPosition() > (video_duration + PLAYBACK_END_TOLERANCE)){ + if ( mp.isPlaying() || mp.getCurrentPosition() + > (video_duration)){ assertTrue("Current PlayTime greater than duration", false); } mp.release(); diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/MediaMetadataRetrieverTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/MediaMetadataRetrieverTest.java index 9927edaa3543..87500982bd67 100644 --- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/MediaMetadataRetrieverTest.java +++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/MediaMetadataRetrieverTest.java @@ -22,6 +22,7 @@ import android.graphics.Bitmap; import java.io.FileOutputStream; import android.test.AndroidTestCase; import com.android.mediaframeworktest.MediaNames; +import com.android.mediaframeworktest.MediaProfileReader; import android.test.suitebuilder.annotation.*; /** @@ -38,10 +39,19 @@ public class MediaMetadataRetrieverTest extends AndroidTestCase { public static void testAlbumArt() throws Exception { Log.v(TAG, "testAlbumArt starts."); MediaMetadataRetriever retriever = new MediaMetadataRetriever(); + MediaProfileReader reader = new MediaProfileReader(); + boolean supportWMA = reader.getWMAEnable(); + boolean supportWMV = reader.getWMVEnable(); retriever.setMode(MediaMetadataRetriever.MODE_GET_METADATA_ONLY); for (int i = 0, n = MediaNames.ALBUMART_TEST_FILES.length; i < n; ++i) { try { Log.v(TAG, "File " + i + ": " + MediaNames.ALBUMART_TEST_FILES[i]); + if ((MediaNames.ALBUMART_TEST_FILES[i].endsWith(".wma") && !supportWMA) || + (MediaNames.ALBUMART_TEST_FILES[i].endsWith(".wmv") && !supportWMV) + ) { + Log.v(TAG, "windows media is not supported and thus we will skip the test for this file"); + continue; + } retriever.setDataSource(MediaNames.ALBUMART_TEST_FILES[i]); byte[] albumArt = retriever.extractAlbumArt(); @@ -64,11 +74,20 @@ public class MediaMetadataRetrieverTest extends AndroidTestCase { @LargeTest public static void testThumbnailCapture() throws Exception { MediaMetadataRetriever retriever = new MediaMetadataRetriever(); + MediaProfileReader reader = new MediaProfileReader(); + boolean supportWMA = reader.getWMAEnable(); + boolean supportWMV = reader.getWMVEnable(); Log.v(TAG, "Thumbnail processing starts"); long startedAt = System.currentTimeMillis(); for(int i = 0, n = MediaNames.THUMBNAIL_CAPTURE_TEST_FILES.length; i < n; ++i) { try { Log.v(TAG, "File " + i + ": " + MediaNames.THUMBNAIL_CAPTURE_TEST_FILES[i]); + if ((MediaNames.THUMBNAIL_CAPTURE_TEST_FILES[i].endsWith(".wma") && !supportWMA) || + (MediaNames.THUMBNAIL_CAPTURE_TEST_FILES[i].endsWith(".wmv") && !supportWMV) + ) { + Log.v(TAG, "windows media is not supported and thus we will skip the test for this file"); + continue; + } retriever.setDataSource(MediaNames.THUMBNAIL_CAPTURE_TEST_FILES[i]); Bitmap bitmap = retriever.captureFrame(); assertTrue(bitmap != null); @@ -91,10 +110,20 @@ public class MediaMetadataRetrieverTest extends AndroidTestCase { @LargeTest public static void testMetadataRetrieval() throws Exception { + MediaProfileReader reader = new MediaProfileReader(); + boolean supportWMA = reader.getWMAEnable(); + boolean supportWMV = reader.getWMVEnable(); MediaMetadataRetriever retriever = new MediaMetadataRetriever(); retriever.setMode(MediaMetadataRetriever.MODE_GET_METADATA_ONLY); for(int i = 0, n = MediaNames.METADATA_RETRIEVAL_TEST_FILES.length; i < n; ++i) { try { + Log.v(TAG, "File " + i + ": " + MediaNames.METADATA_RETRIEVAL_TEST_FILES[i]); + if ((MediaNames.METADATA_RETRIEVAL_TEST_FILES[i].endsWith(".wma") && !supportWMA) || + (MediaNames.METADATA_RETRIEVAL_TEST_FILES[i].endsWith(".wmv") && !supportWMV) + ) { + Log.v(TAG, "windows media is not supported and thus we will skip the test for this file"); + continue; + } retriever.setDataSource(MediaNames.METADATA_RETRIEVAL_TEST_FILES[i]); extractAllSupportedMetadataValues(retriever); } catch(Exception e) { diff --git a/opengl/java/android/opengl/GLSurfaceView.java b/opengl/java/android/opengl/GLSurfaceView.java index 695d0616cbd9..952eff27cc9b 100644 --- a/opengl/java/android/opengl/GLSurfaceView.java +++ b/opengl/java/android/opengl/GLSurfaceView.java @@ -145,6 +145,7 @@ import android.view.SurfaceView; * */ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback { + private final static boolean LOG_THREADS = false; /** * The renderer only renders * when the surface is created, or when {@link #requestRender} is called. @@ -952,11 +953,15 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback mRequestRender = true; mRenderMode = RENDERMODE_CONTINUOUSLY; mRenderer = renderer; - setName("GLThread"); } @Override public void run() { + setName("GLThread " + getId()); + if (LOG_THREADS) { + Log.i("GLThread", "starting tid=" + getId()); + } + /* * When the android framework launches a second instance of * an activity, the new instance's onCreate() method may be @@ -967,7 +972,7 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback */ try { try { - sEglSemaphore.acquire(); + sGLThreadManager.start(this); } catch (InterruptedException e) { return; } @@ -975,7 +980,17 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback } catch (InterruptedException e) { // fall thru and exit normally } finally { - sEglSemaphore.release(); + try { + sGLThreadManager.end(this); + } finally { + synchronized(this) { + if (LOG_THREADS) { + Log.i("GLThread", "exiting tid=" + getId()); + } + mDone = true; + notifyAll(); + } + } } } @@ -1011,11 +1026,14 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback needStart = true; } while (needToWait()) { + if (LOG_THREADS) { + Log.i("GLThread", "needToWait tid=" + getId()); + } if (!mHasSurface) { if (!mWaitingForSurface) { mEglHelper.destroySurface(); mWaitingForSurface = true; - notify(); + notifyAll(); } } wait(); @@ -1031,6 +1049,7 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback if (mHasSurface && mWaitingForSurface) { changed = true; mWaitingForSurface = false; + notifyAll(); } } if (needStart) { @@ -1071,6 +1090,10 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback } private boolean needToWait() { + if (sGLThreadManager.shouldQuit(this)) { + mDone = true; + notifyAll(); + } if (mDone) { return false; } @@ -1093,7 +1116,7 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback synchronized(this) { mRenderMode = renderMode; if (renderMode == RENDERMODE_CONTINUOUSLY) { - notify(); + notifyAll(); } } } @@ -1107,22 +1130,28 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback public void requestRender() { synchronized(this) { mRequestRender = true; - notify(); + notifyAll(); } } public void surfaceCreated() { synchronized(this) { + if (LOG_THREADS) { + Log.i("GLThread", "surfaceCreated tid=" + getId()); + } mHasSurface = true; - notify(); + notifyAll(); } } public void surfaceDestroyed() { synchronized(this) { + if (LOG_THREADS) { + Log.i("GLThread", "surfaceDestroyed tid=" + getId()); + } mHasSurface = false; - notify(); - while(!mWaitingForSurface && isAlive()) { + notifyAll(); + while(!mWaitingForSurface && isAlive() && ! mDone) { try { wait(); } catch (InterruptedException e) { @@ -1135,13 +1164,15 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback public void onPause() { synchronized (this) { mPaused = true; + notifyAll(); } } public void onResume() { synchronized (this) { mPaused = false; - notify(); + mRequestRender = true; + notifyAll(); } } @@ -1150,7 +1181,7 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback mWidth = w; mHeight = h; mSizeChanged = true; - notify(); + notifyAll(); } } @@ -1159,7 +1190,7 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback // deadlock! synchronized(this) { mDone = true; - notify(); + notifyAll(); } try { join(); @@ -1241,7 +1272,38 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback } } + static class GLThreadManager { + public boolean shouldQuit(GLThread thread) { + synchronized(this) { + return thread != mMostRecentGLThread; + } + } + public void start(GLThread thread) throws InterruptedException { + GLThread oldThread = null; + synchronized(this) { + mMostRecentGLThread = thread; + oldThread = mMostRecentGLThread; + } + if (oldThread != null) { + synchronized(oldThread) { + oldThread.notifyAll(); + } + } + sEglSemaphore.acquire(); + } + public void end(GLThread thread) { + sEglSemaphore.release(); + synchronized(this) { + if (mMostRecentGLThread == thread) { + mMostRecentGLThread = null; + } + } + } + private GLThread mMostRecentGLThread; + } + private static final Semaphore sEglSemaphore = new Semaphore(1); + private static final GLThreadManager sGLThreadManager = new GLThreadManager(); private boolean mSizeChanged = true; private GLThread mGLThread; diff --git a/opengl/libagl/Android.mk b/opengl/libagl/Android.mk index 2522656f2213..983784554d30 100644 --- a/opengl/libagl/Android.mk +++ b/opengl/libagl/Android.mk @@ -25,6 +25,13 @@ LOCAL_SRC_FILES:= \ primitives.cpp.arm \ vertex.cpp.arm +LOCAL_CFLAGS += -DLOG_TAG=\"libagl\" +LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES +LOCAL_CFLAGS += -fvisibility=hidden + +LOCAL_SHARED_LIBRARIES := libcutils libhardware libutils libpixelflinger +LOCAL_LDLIBS := -lpthread -ldl + ifeq ($(TARGET_ARCH),arm) LOCAL_SRC_FILES += fixed_asm.S iterators.S LOCAL_CFLAGS += -fstrict-aliasing @@ -38,15 +45,9 @@ endif ifeq ($(LIBAGL_USE_GRALLOC_COPYBITS),1) LOCAL_CFLAGS += -DLIBAGL_USE_GRALLOC_COPYBITS LOCAL_SRC_FILES += copybit.cpp + LOCAL_SHARED_LIBRARIES += libui endif -LOCAL_CFLAGS += -DLOG_TAG=\"libagl\" -LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES - -LOCAL_SHARED_LIBRARIES := libcutils libhardware libutils libpixelflinger -LOCAL_CFLAGS += -fvisibility=hidden - -LOCAL_LDLIBS := -lpthread -ldl LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/egl LOCAL_MODULE:= libGLES_android diff --git a/opengl/libagl/copybit.cpp b/opengl/libagl/copybit.cpp index 867459d64881..1bef859b2eba 100644 --- a/opengl/libagl/copybit.cpp +++ b/opengl/libagl/copybit.cpp @@ -33,6 +33,10 @@ #include <hardware/copybit.h> #include <private/ui/android_natives_priv.h> +#include <ui/GraphicBuffer.h> +#include <ui/Region.h> +#include <ui/Rect.h> + #define DEBUG_COPYBIT true @@ -41,13 +45,25 @@ namespace android { static void textureToCopyBitImage( - const GGLSurface* surface, buffer_handle_t buffer, copybit_image_t* img) + const GGLSurface* surface, int32_t opFormat, + android_native_buffer_t* buffer, copybit_image_t* img) { + uint32_t vstride = 0; + if (opFormat == COPYBIT_FORMAT_YCbCr_422_SP || + opFormat == COPYBIT_FORMAT_YCbCr_420_SP) { + // NOTE: this static_cast is really not safe b/c we can't know for + // sure the buffer passed is of the right type. + // However, since we do this only for YUV formats, we should be safe + // since only SurfaceFlinger makes use of them. + GraphicBuffer* graphicBuffer = static_cast<GraphicBuffer*>(buffer); + vstride = graphicBuffer->getVerticalStride(); + } + img->w = surface->stride; - img->h = surface->height; - img->format = surface->format; + img->h = vstride ? vstride : surface->height; + img->format = opFormat; img->base = surface->data; - img->handle = (native_handle_t *)buffer; + img->handle = (native_handle_t *)buffer->handle; } struct clipRectRegion : public copybit_region_t { @@ -69,6 +85,7 @@ private: static int iterate_done(copybit_region_t const *, copybit_rect_t*) { return 0; } +public: copybit_rect_t r; }; @@ -149,6 +166,8 @@ static bool copybit(GLint x, GLint y, int transform, ogles_context_t* c) { + status_t err = NO_ERROR; + // We assume checkContext has already been called and has already // returned true. @@ -174,16 +193,6 @@ static bool copybit(GLint x, GLint y, dtdy /= screen_h; } dtdy = -dtdy; // see equation of dtdy above - if (dsdx < c->copybits.minScale || dsdx > c->copybits.maxScale - || dtdy < c->copybits.minScale || dtdy > c->copybits.maxScale) { - // The requested scale is out of the range the hardware - // can support. - LOGD_IF(DEBUG_COPYBIT, - "scale out of range dsdx=%08x (Wcr=%d / w=%d), " - "dtdy=%08x (Hcr=%d / h=%d), Ucr=%d, Vcr=%d", - dsdx, Wcr, w, dtdy, Hcr, h, Ucr, Vcr); - return false; - } // copybit doesn't say anything about filtering, so we can't // discriminate. On msm7k, copybit will always filter. @@ -205,41 +214,16 @@ static bool copybit(GLint x, GLint y, const uint32_t enables = c->rasterizer.state.enables; int planeAlpha = 255; + bool alphaPlaneWorkaround = false; static const int tmu = 0; texture_t& tev(c->rasterizer.state.texture[tmu]); - bool srcTextureHasAlpha = hasAlpha(textureObject->surface.format); + int32_t opFormat = textureObject->surface.format; + const bool srcTextureHasAlpha = hasAlpha(opFormat); if (!srcTextureHasAlpha) { planeAlpha = fixedToByte(c->currentColorClamped.a); } - switch (tev.env) { - case GGL_REPLACE: - break; - case GGL_MODULATE: - if (! (c->currentColorClamped.r == FIXED_ONE && - c->currentColorClamped.g == FIXED_ONE && - c->currentColorClamped.b == FIXED_ONE)) { - LOGD_IF(DEBUG_COPYBIT, - "MODULATE and non white color (%08x, %08x, %08x)", - c->currentColorClamped.r, - c->currentColorClamped.g, - c->currentColorClamped.b); - return false; - } - if (srcTextureHasAlpha && c->currentColorClamped.a < FIXED_ONE) { - LOGD_IF(DEBUG_COPYBIT, - "MODULATE and texture w/alpha and alpha=%08x)", - c->currentColorClamped.a); - return false; - } - break; - - default: - // Incompatible texture environment. - LOGD_IF(DEBUG_COPYBIT, "incompatible texture environment"); - return false; - } - + const bool cbHasAlpha = hasAlpha(cbSurface.format); bool blending = false; if ((enables & GGL_ENABLE_BLENDING) && !(c->rasterizer.state.blend.src == GL_ONE @@ -262,41 +246,209 @@ static bool copybit(GLint x, GLint y, } blending = true; } else { - // No blending is OK if we are not using alpha. - if (srcTextureHasAlpha || planeAlpha != 255) { - // Incompatible alpha - LOGD_IF(DEBUG_COPYBIT, "incompatible alpha"); - return false; + if (cbHasAlpha) { + // NOTE: the result will be slightly wrong in this case because + // the destination alpha channel will be set to 1.0 instead of + // the iterated alpha value. *shrug*. + } + // disable plane blending and src blending for supported formats + planeAlpha = 255; + if (opFormat == COPYBIT_FORMAT_RGBA_8888) { + opFormat = COPYBIT_FORMAT_RGBX_8888; + } else { + if (srcTextureHasAlpha) { + LOGD_IF(DEBUG_COPYBIT, "texture format requires blending"); + return false; + } } } - if (srcTextureHasAlpha && planeAlpha != 255) { - // Can't do two types of alpha at once. - LOGD_IF(DEBUG_COPYBIT, "src alpha and plane alpha"); + switch (tev.env) { + case GGL_REPLACE: + break; + case GGL_MODULATE: + // only cases allowed is: + // RGB source, color={1,1,1,a} -> can be done with GL_REPLACE + // RGBA source, color={1,1,1,1} -> can be done with GL_REPLACE + if (blending) { + if (c->currentColorClamped.r == c->currentColorClamped.a && + c->currentColorClamped.g == c->currentColorClamped.a && + c->currentColorClamped.b == c->currentColorClamped.a) { + // TODO: RGBA source, color={1,1,1,a} / regular-blending + // is equivalent + alphaPlaneWorkaround = true; + break; + } + } + LOGD_IF(DEBUG_COPYBIT, "GGL_MODULATE"); + return false; + default: + // Incompatible texture environment. + LOGD_IF(DEBUG_COPYBIT, "incompatible texture environment"); return false; } - // LOGW("calling copybits"); - copybit_device_t* copybit = c->copybits.blitEngine; + copybit_image_t src; + textureToCopyBitImage(&textureObject->surface, opFormat, + textureObject->buffer, &src); + copybit_rect_t srect = { Ucr, Vcr + Hcr, Ucr + Wcr, Vcr }; + + /* + * Below we perform extra passes needed to emulate things the h/w + * cannot do. + */ + + const GLfixed minScaleInv = gglDivQ(0x10000, c->copybits.minScale, 16); + const GLfixed maxScaleInv = gglDivQ(0x10000, c->copybits.maxScale, 16); + + sp<GraphicBuffer> tempBitmap; + + if (dsdx < maxScaleInv || dsdx > minScaleInv || + dtdy < maxScaleInv || dtdy > minScaleInv) + { + // The requested scale is out of the range the hardware + // can support. + LOGD_IF(DEBUG_COPYBIT, + "scale out of range dsdx=%08x (Wcr=%d / w=%d), " + "dtdy=%08x (Hcr=%d / h=%d), Ucr=%d, Vcr=%d", + dsdx, Wcr, w, dtdy, Hcr, h, Ucr, Vcr); + + int32_t xscale=0x10000, yscale=0x10000; + if (dsdx > minScaleInv) xscale = c->copybits.minScale; + else if (dsdx < maxScaleInv) xscale = c->copybits.maxScale; + if (dtdy > minScaleInv) yscale = c->copybits.minScale; + else if (dtdy < maxScaleInv) yscale = c->copybits.maxScale; + dsdx = gglMulx(dsdx, xscale); + dtdy = gglMulx(dtdy, yscale); + + /* we handle only one step of resizing below. Handling an arbitrary + * number is relatively easy (replace "if" above by "while"), but requires + * two intermediate buffers and so far we never had the need. + */ + + if (dsdx < maxScaleInv || dsdx > minScaleInv || + dtdy < maxScaleInv || dtdy > minScaleInv) { + LOGD_IF(DEBUG_COPYBIT, + "scale out of range dsdx=%08x (Wcr=%d / w=%d), " + "dtdy=%08x (Hcr=%d / h=%d), Ucr=%d, Vcr=%d", + dsdx, Wcr, w, dtdy, Hcr, h, Ucr, Vcr); + return false; + } + + const int tmp_w = gglMulx(srect.r - srect.l, xscale, 16); + const int tmp_h = gglMulx(srect.b - srect.t, yscale, 16); + + LOGD_IF(DEBUG_COPYBIT, + "xscale=%08x, yscale=%08x, dsdx=%08x, dtdy=%08x, tmp_w=%d, tmp_h=%d", + xscale, yscale, dsdx, dtdy, tmp_w, tmp_h); + + tempBitmap = new GraphicBuffer( + tmp_w, tmp_h, src.format, + GraphicBuffer::USAGE_HW_2D); + + err = tempBitmap->initCheck(); + if (err == NO_ERROR) { + copybit_image_t tmp_dst; + copybit_rect_t tmp_rect; + tmp_dst.w = tmp_w; + tmp_dst.h = tmp_h; + tmp_dst.format = tempBitmap->format; + tmp_dst.handle = (native_handle_t*)tempBitmap->getNativeBuffer()->handle; + tmp_rect.l = 0; + tmp_rect.t = 0; + tmp_rect.r = tmp_dst.w; + tmp_rect.b = tmp_dst.h; + region_iterator tmp_it(Region(Rect(tmp_rect.r, tmp_rect.b))); + copybit->set_parameter(copybit, COPYBIT_TRANSFORM, 0); + copybit->set_parameter(copybit, COPYBIT_PLANE_ALPHA, 0xFF); + copybit->set_parameter(copybit, COPYBIT_DITHER, COPYBIT_DISABLE); + err = copybit->stretch(copybit, + &tmp_dst, &src, &tmp_rect, &srect, &tmp_it); + src = tmp_dst; + srect = tmp_rect; + } + } copybit_image_t dst; - buffer_handle_t target_hnd = c->copybits.drawSurfaceBuffer; - textureToCopyBitImage(&cbSurface, target_hnd, &dst); + textureToCopyBitImage(&cbSurface, cbSurface.format, + c->copybits.drawSurfaceBuffer, &dst); copybit_rect_t drect = {x, y, x+w, y+h}; - copybit_image_t src; - buffer_handle_t source_hnd = textureObject->buffer->handle; - textureToCopyBitImage(&textureObject->surface, source_hnd, &src); - copybit_rect_t srect = { Ucr, Vcr + Hcr, Ucr + Wcr, Vcr }; - copybit->set_parameter(copybit, COPYBIT_TRANSFORM, transform); - copybit->set_parameter(copybit, COPYBIT_PLANE_ALPHA, planeAlpha); - copybit->set_parameter(copybit, COPYBIT_DITHER, - (enables & GGL_ENABLE_DITHER) ? COPYBIT_ENABLE : COPYBIT_DISABLE); - - clipRectRegion it(c); - status_t err = copybit->stretch(copybit, &dst, &src, &drect, &srect, &it); + /* and now the alpha-plane hack. This handles the "Fade" case of a + * texture with an alpha channel. + */ + if (alphaPlaneWorkaround) { + sp<GraphicBuffer> tempCb = new GraphicBuffer( + w, h, COPYBIT_FORMAT_RGB_565, + GraphicBuffer::USAGE_HW_2D); + + err = tempCb->initCheck(); + + copybit_image_t tmpCbImg; + copybit_rect_t tmpCbRect; + tmpCbImg.w = w; + tmpCbImg.h = h; + tmpCbImg.format = tempCb->format; + tmpCbImg.handle = (native_handle_t*)tempCb->getNativeBuffer()->handle; + tmpCbRect.l = 0; + tmpCbRect.t = 0; + tmpCbRect.r = w; + tmpCbRect.b = h; + + if (!err) { + // first make a copy of the destination buffer + region_iterator tmp_it(Region(Rect(w, h))); + copybit->set_parameter(copybit, COPYBIT_TRANSFORM, 0); + copybit->set_parameter(copybit, COPYBIT_PLANE_ALPHA, 0xFF); + copybit->set_parameter(copybit, COPYBIT_DITHER, COPYBIT_DISABLE); + err = copybit->stretch(copybit, + &tmpCbImg, &dst, &tmpCbRect, &drect, &tmp_it); + } + if (!err) { + // then proceed as usual, but without the alpha plane + copybit->set_parameter(copybit, COPYBIT_TRANSFORM, transform); + copybit->set_parameter(copybit, COPYBIT_PLANE_ALPHA, 0xFF); + copybit->set_parameter(copybit, COPYBIT_DITHER, + (enables & GGL_ENABLE_DITHER) ? + COPYBIT_ENABLE : COPYBIT_DISABLE); + clipRectRegion it(c); + err = copybit->stretch(copybit, &dst, &src, &drect, &srect, &it); + } + if (!err) { + // finally copy back the destination on top with 1-alphaplane + int invPlaneAlpha = 0xFF - fixedToByte(c->currentColorClamped.a); + clipRectRegion it(c); + copybit->set_parameter(copybit, COPYBIT_TRANSFORM, 0); + copybit->set_parameter(copybit, COPYBIT_PLANE_ALPHA, invPlaneAlpha); + copybit->set_parameter(copybit, COPYBIT_DITHER, COPYBIT_ENABLE); + err = copybit->stretch(copybit, + &dst, &tmpCbImg, &drect, &tmpCbRect, &it); + } + } else { + copybit->set_parameter(copybit, COPYBIT_TRANSFORM, transform); + copybit->set_parameter(copybit, COPYBIT_PLANE_ALPHA, planeAlpha); + copybit->set_parameter(copybit, COPYBIT_DITHER, + (enables & GGL_ENABLE_DITHER) ? + COPYBIT_ENABLE : COPYBIT_DISABLE); + clipRectRegion it(c); + + LOGD_IF(0, + "dst={%d, %d, %d, %p, %p}, " + "src={%d, %d, %d, %p, %p}, " + "drect={%d,%d,%d,%d}, " + "srect={%d,%d,%d,%d}, " + "it={%d,%d,%d,%d}, " , + dst.w, dst.h, dst.format, dst.base, dst.handle, + src.w, src.h, src.format, src.base, src.handle, + drect.l, drect.t, drect.r, drect.b, + srect.l, srect.t, srect.r, srect.b, + it.r.l, it.r.t, it.r.r, it.r.b + ); + + err = copybit->stretch(copybit, &dst, &src, &drect, &srect, &it); + } if (err != NO_ERROR) { c->textures.tmu[0].texture->try_copybit = false; } diff --git a/opengl/libagl/egl.cpp b/opengl/libagl/egl.cpp index 37628b7ea0d7..673c174ef45c 100644 --- a/opengl/libagl/egl.cpp +++ b/opengl/libagl/egl.cpp @@ -40,6 +40,7 @@ #include <pixelflinger/pixelflinger.h> #include <private/ui/android_natives_priv.h> +#include <private/ui/sw_gralloc_handle.h> #include <hardware/copybit.h> @@ -449,15 +450,26 @@ void egl_window_surface_v2_t::disconnect() status_t egl_window_surface_v2_t::lock( android_native_buffer_t* buf, int usage, void** vaddr) { - int err = module->lock(module, buf->handle, - usage, 0, 0, buf->width, buf->height, vaddr); + int err; + if (sw_gralloc_handle_t::validate(buf->handle) < 0) { + err = module->lock(module, buf->handle, + usage, 0, 0, buf->width, buf->height, vaddr); + } else { + sw_gralloc_handle_t const* hnd = + reinterpret_cast<sw_gralloc_handle_t const*>(buf->handle); + *vaddr = (void*)hnd->base; + err = NO_ERROR; + } return err; } status_t egl_window_surface_v2_t::unlock(android_native_buffer_t* buf) { if (!buf) return BAD_VALUE; - int err = module->unlock(module, buf->handle); + int err = NO_ERROR; + if (sw_gralloc_handle_t::validate(buf->handle) < 0) { + err = module->unlock(module, buf->handle); + } return err; } @@ -623,6 +635,7 @@ static bool supportedCopybitsDestinationFormat(int format) { switch (format) { case HAL_PIXEL_FORMAT_RGB_565: case HAL_PIXEL_FORMAT_RGBA_8888: + case HAL_PIXEL_FORMAT_RGBX_8888: case HAL_PIXEL_FORMAT_RGBA_4444: case HAL_PIXEL_FORMAT_RGBA_5551: case HAL_PIXEL_FORMAT_BGRA_8888: @@ -651,7 +664,7 @@ EGLBoolean egl_window_surface_v2_t::bindDrawSurface(ogles_context_t* gl) if (supportedCopybitsDestinationFormat(buffer.format)) { buffer_handle_t handle = this->buffer->handle; if (handle != NULL) { - gl->copybits.drawSurfaceBuffer = handle; + gl->copybits.drawSurfaceBuffer = this->buffer; } } } @@ -792,6 +805,7 @@ egl_pbuffer_surface_t::egl_pbuffer_surface_t(EGLDisplay dpy, case GGL_PIXEL_FORMAT_A_8: size *= 1; break; case GGL_PIXEL_FORMAT_RGB_565: size *= 2; break; case GGL_PIXEL_FORMAT_RGBA_8888: size *= 4; break; + case GGL_PIXEL_FORMAT_RGBX_8888: size *= 4; break; default: LOGE("incompatible pixel format for pbuffer (format=%d)", f); pbuffer.data = 0; @@ -953,12 +967,17 @@ static config_pair_t const config_base_attribute_list[] = { { EGL_BIND_TO_TEXTURE_RGB, EGL_FALSE }, { EGL_MIN_SWAP_INTERVAL, 1 }, { EGL_MAX_SWAP_INTERVAL, 1 }, + { EGL_LUMINANCE_SIZE, 0 }, + { EGL_ALPHA_MASK_SIZE, 0 }, + { EGL_COLOR_BUFFER_TYPE, EGL_RGB_BUFFER }, { EGL_RENDERABLE_TYPE, EGL_OPENGL_ES_BIT }, + { EGL_CONFORMANT, 0 } }; // These configs can override the base attribute list // NOTE: when adding a config here, don't forget to update eglCreate*Surface() +// 565 configs static config_pair_t const config_0_attribute_list[] = { { EGL_BUFFER_SIZE, 16 }, { EGL_ALPHA_SIZE, 0 }, @@ -981,8 +1000,32 @@ static config_pair_t const config_1_attribute_list[] = { { EGL_SURFACE_TYPE, EGL_WINDOW_BIT|EGL_PBUFFER_BIT|EGL_PIXMAP_BIT }, }; +// RGB 888 configs static config_pair_t const config_2_attribute_list[] = { { EGL_BUFFER_SIZE, 32 }, + { EGL_ALPHA_SIZE, 0 }, + { EGL_BLUE_SIZE, 8 }, + { EGL_GREEN_SIZE, 8 }, + { EGL_RED_SIZE, 8 }, + { EGL_DEPTH_SIZE, 0 }, + { EGL_CONFIG_ID, 6 }, + { EGL_SURFACE_TYPE, EGL_WINDOW_BIT|EGL_PBUFFER_BIT|EGL_PIXMAP_BIT }, +}; + +static config_pair_t const config_3_attribute_list[] = { + { EGL_BUFFER_SIZE, 32 }, + { EGL_ALPHA_SIZE, 0 }, + { EGL_BLUE_SIZE, 8 }, + { EGL_GREEN_SIZE, 8 }, + { EGL_RED_SIZE, 8 }, + { EGL_DEPTH_SIZE, 16 }, + { EGL_CONFIG_ID, 7 }, + { EGL_SURFACE_TYPE, EGL_WINDOW_BIT|EGL_PBUFFER_BIT|EGL_PIXMAP_BIT }, +}; + +// 8888 configs +static config_pair_t const config_4_attribute_list[] = { + { EGL_BUFFER_SIZE, 32 }, { EGL_ALPHA_SIZE, 8 }, { EGL_BLUE_SIZE, 8 }, { EGL_GREEN_SIZE, 8 }, @@ -992,7 +1035,7 @@ static config_pair_t const config_2_attribute_list[] = { { EGL_SURFACE_TYPE, EGL_WINDOW_BIT|EGL_PBUFFER_BIT|EGL_PIXMAP_BIT }, }; -static config_pair_t const config_3_attribute_list[] = { +static config_pair_t const config_5_attribute_list[] = { { EGL_BUFFER_SIZE, 32 }, { EGL_ALPHA_SIZE, 8 }, { EGL_BLUE_SIZE, 8 }, @@ -1003,7 +1046,8 @@ static config_pair_t const config_3_attribute_list[] = { { EGL_SURFACE_TYPE, EGL_WINDOW_BIT|EGL_PBUFFER_BIT|EGL_PIXMAP_BIT }, }; -static config_pair_t const config_4_attribute_list[] = { +// A8 configs +static config_pair_t const config_6_attribute_list[] = { { EGL_BUFFER_SIZE, 8 }, { EGL_ALPHA_SIZE, 8 }, { EGL_BLUE_SIZE, 0 }, @@ -1014,7 +1058,7 @@ static config_pair_t const config_4_attribute_list[] = { { EGL_SURFACE_TYPE, EGL_WINDOW_BIT|EGL_PBUFFER_BIT|EGL_PIXMAP_BIT }, }; -static config_pair_t const config_5_attribute_list[] = { +static config_pair_t const config_7_attribute_list[] = { { EGL_BUFFER_SIZE, 8 }, { EGL_ALPHA_SIZE, 8 }, { EGL_BLUE_SIZE, 0 }, @@ -1032,6 +1076,8 @@ static configs_t const gConfigs[] = { { config_3_attribute_list, NELEM(config_3_attribute_list) }, { config_4_attribute_list, NELEM(config_4_attribute_list) }, { config_5_attribute_list, NELEM(config_5_attribute_list) }, + { config_6_attribute_list, NELEM(config_6_attribute_list) }, + { config_7_attribute_list, NELEM(config_7_attribute_list) }, }; static config_management_t const gConfigManagement[] = { @@ -1062,14 +1108,66 @@ static config_management_t const gConfigManagement[] = { { EGL_BIND_TO_TEXTURE_RGB, config_management_t::exact }, { EGL_MIN_SWAP_INTERVAL, config_management_t::exact }, { EGL_MAX_SWAP_INTERVAL, config_management_t::exact }, + { EGL_LUMINANCE_SIZE, config_management_t::atLeast }, + { EGL_ALPHA_MASK_SIZE, config_management_t::atLeast }, + { EGL_COLOR_BUFFER_TYPE, config_management_t::exact }, + { EGL_RENDERABLE_TYPE, config_management_t::mask }, + { EGL_CONFORMANT, config_management_t::mask } }; + static config_pair_t const config_defaults[] = { - { EGL_SURFACE_TYPE, EGL_WINDOW_BIT }, + // attributes that are not specified are simply ignored, if a particular + // one needs not be ignored, it must be specified here, eg: + // { EGL_SURFACE_TYPE, EGL_WINDOW_BIT }, }; // ---------------------------------------------------------------------------- +static status_t getConfigFormatInfo(EGLint configID, + int32_t& pixelFormat, int32_t& depthFormat) +{ + switch(configID) { + case 0: + pixelFormat = GGL_PIXEL_FORMAT_RGB_565; + depthFormat = 0; + break; + case 1: + pixelFormat = GGL_PIXEL_FORMAT_RGB_565; + depthFormat = GGL_PIXEL_FORMAT_Z_16; + break; + case 2: + pixelFormat = GGL_PIXEL_FORMAT_RGBX_8888; + depthFormat = 0; + break; + case 3: + pixelFormat = GGL_PIXEL_FORMAT_RGBX_8888; + depthFormat = GGL_PIXEL_FORMAT_Z_16; + break; + case 4: + pixelFormat = GGL_PIXEL_FORMAT_RGBA_8888; + depthFormat = 0; + break; + case 5: + pixelFormat = GGL_PIXEL_FORMAT_RGBA_8888; + depthFormat = GGL_PIXEL_FORMAT_Z_16; + break; + case 6: + pixelFormat = GGL_PIXEL_FORMAT_A_8; + depthFormat = 0; + break; + case 7: + pixelFormat = GGL_PIXEL_FORMAT_A_8; + depthFormat = GGL_PIXEL_FORMAT_Z_16; + break; + default: + return NAME_NOT_FOUND; + } + return NO_ERROR; +} + +// ---------------------------------------------------------------------------- + template<typename T> static int binarySearch(T const sortedArray[], int first, int last, EGLint key) { @@ -1213,32 +1311,7 @@ static EGLSurface createWindowSurface(EGLDisplay dpy, EGLConfig config, int32_t depthFormat; int32_t pixelFormat; - switch(configID) { - case 0: - pixelFormat = GGL_PIXEL_FORMAT_RGB_565; - depthFormat = 0; - break; - case 1: - pixelFormat = GGL_PIXEL_FORMAT_RGB_565; - depthFormat = GGL_PIXEL_FORMAT_Z_16; - break; - case 2: - pixelFormat = GGL_PIXEL_FORMAT_RGBA_8888; - depthFormat = 0; - break; - case 3: - pixelFormat = GGL_PIXEL_FORMAT_RGBA_8888; - depthFormat = GGL_PIXEL_FORMAT_Z_16; - break; - case 4: - pixelFormat = GGL_PIXEL_FORMAT_A_8; - depthFormat = 0; - break; - case 5: - pixelFormat = GGL_PIXEL_FORMAT_A_8; - depthFormat = GGL_PIXEL_FORMAT_Z_16; - break; - default: + if (getConfigFormatInfo(configID, pixelFormat, depthFormat) != NO_ERROR) { return setError(EGL_BAD_MATCH, EGL_NO_SURFACE); } @@ -1287,32 +1360,7 @@ static EGLSurface createPixmapSurface(EGLDisplay dpy, EGLConfig config, int32_t depthFormat; int32_t pixelFormat; - switch(configID) { - case 0: - pixelFormat = GGL_PIXEL_FORMAT_RGB_565; - depthFormat = 0; - break; - case 1: - pixelFormat = GGL_PIXEL_FORMAT_RGB_565; - depthFormat = GGL_PIXEL_FORMAT_Z_16; - break; - case 2: - pixelFormat = GGL_PIXEL_FORMAT_RGBA_8888; - depthFormat = 0; - break; - case 3: - pixelFormat = GGL_PIXEL_FORMAT_RGBA_8888; - depthFormat = GGL_PIXEL_FORMAT_Z_16; - break; - case 4: - pixelFormat = GGL_PIXEL_FORMAT_A_8; - depthFormat = 0; - break; - case 5: - pixelFormat = GGL_PIXEL_FORMAT_A_8; - depthFormat = GGL_PIXEL_FORMAT_Z_16; - break; - default: + if (getConfigFormatInfo(configID, pixelFormat, depthFormat) != NO_ERROR) { return setError(EGL_BAD_MATCH, EGL_NO_SURFACE); } @@ -1351,32 +1399,7 @@ static EGLSurface createPbufferSurface(EGLDisplay dpy, EGLConfig config, int32_t depthFormat; int32_t pixelFormat; - switch(configID) { - case 0: - pixelFormat = GGL_PIXEL_FORMAT_RGB_565; - depthFormat = 0; - break; - case 1: - pixelFormat = GGL_PIXEL_FORMAT_RGB_565; - depthFormat = GGL_PIXEL_FORMAT_Z_16; - break; - case 2: - pixelFormat = GGL_PIXEL_FORMAT_RGBA_8888; - depthFormat = 0; - break; - case 3: - pixelFormat = GGL_PIXEL_FORMAT_RGBA_8888; - depthFormat = GGL_PIXEL_FORMAT_Z_16; - break; - case 4: - pixelFormat = GGL_PIXEL_FORMAT_A_8; - depthFormat = 0; - break; - case 5: - pixelFormat = GGL_PIXEL_FORMAT_A_8; - depthFormat = GGL_PIXEL_FORMAT_Z_16; - break; - default: + if (getConfigFormatInfo(configID, pixelFormat, depthFormat) != NO_ERROR) { return setError(EGL_BAD_MATCH, EGL_NO_SURFACE); } @@ -1513,7 +1536,7 @@ EGLBoolean eglChooseConfig( EGLDisplay dpy, const EGLint *attrib_list, numAttributes++; EGLint attr = *attrib_list++; EGLint val = *attrib_list++; - for (int i=0 ; i<numConfigs ; i++) { + for (int i=0 ; possibleMatch && i<numConfigs ; i++) { if (!(possibleMatch & (1<<i))) continue; if (isAttributeMatching(i, attr, val) == 0) { @@ -1523,15 +1546,15 @@ EGLBoolean eglChooseConfig( EGLDisplay dpy, const EGLint *attrib_list, } // now, handle the attributes which have a useful default value - for (size_t j=0 ; j<NELEM(config_defaults) ; j++) { - // see if this attribute was specified, if not apply its + for (size_t j=0 ; possibleMatch && j<NELEM(config_defaults) ; j++) { + // see if this attribute was specified, if not, apply its // default value if (binarySearch<config_pair_t>( (config_pair_t const*)attrib_list, 0, numAttributes-1, config_defaults[j].key) < 0) { - for (int i=0 ; i<numConfigs ; i++) { + for (int i=0 ; possibleMatch && i<numConfigs ; i++) { if (!(possibleMatch & (1<<i))) continue; if (isAttributeMatching(i, diff --git a/opengl/libagl/matrix.cpp b/opengl/libagl/matrix.cpp index 21ef50e6b622..3c5097708648 100644 --- a/opengl/libagl/matrix.cpp +++ b/opengl/libagl/matrix.cpp @@ -741,20 +741,19 @@ void point4__generic(transform_t const* mx, vec4_t* lhs, vec4_t const* rhs) { void point4__mvui(transform_t const* mx, vec4_t* lhs, vec4_t const* rhs) { // this used for transforming light positions back to object space. - // Lights have 3 components positions, so w is always 1. - // however, it is used as a switch for directional lights, so we need + // w is used as a switch for directional lights, so we need // to preserve it. const GLfixed* const m = mx->matrix.m; const GLfixed rx = rhs->x; const GLfixed ry = rhs->y; const GLfixed rz = rhs->z; - lhs->x = mla3a(rx, m[ 0], ry, m[ 4], rz, m[ 8], m[12]); - lhs->y = mla3a(rx, m[ 1], ry, m[ 5], rz, m[ 9], m[13]); - lhs->z = mla3a(rx, m[ 2], ry, m[ 6], rz, m[10], m[14]); - lhs->w = rhs->w; + const GLfixed rw = rhs->w; + lhs->x = mla4(rx, m[ 0], ry, m[ 4], rz, m[ 8], rw, m[12]); + lhs->y = mla4(rx, m[ 1], ry, m[ 5], rz, m[ 9], rw, m[13]); + lhs->z = mla4(rx, m[ 2], ry, m[ 6], rz, m[10], rw, m[14]); + lhs->w = rw; } - void point2__nop(transform_t const*, vec4_t* lhs, vec4_t const* rhs) { lhs->z = 0; lhs->w = 0x10000; diff --git a/opengl/libagl/texture.cpp b/opengl/libagl/texture.cpp index 90e6d2946a72..13d078e2a3d8 100644 --- a/opengl/libagl/texture.cpp +++ b/opengl/libagl/texture.cpp @@ -1252,6 +1252,11 @@ void glTexSubImage2D( ogles_error(c, GL_INVALID_OPERATION); return; } + + if (format != tex->internalformat) { + ogles_error(c, GL_INVALID_OPERATION); + return; + } if ((xoffset + width > GLsizei(surface.width)) || (yoffset + height > GLsizei(surface.height))) { ogles_error(c, GL_INVALID_VALUE); diff --git a/opengl/libs/Android.mk b/opengl/libs/Android.mk index 9578452486a9..6d20e80a823d 100644 --- a/opengl/libs/Android.mk +++ b/opengl/libs/Android.mk @@ -32,6 +32,10 @@ ifeq ($(TARGET_BOARD_PLATFORM),msm7k) LOCAL_CFLAGS += -DADRENO130=1 endif +ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true) + LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER +endif + include $(BUILD_SHARED_LIBRARY) installed_libEGL := $(LOCAL_INSTALLED_MODULE) @@ -78,6 +82,10 @@ LOCAL_CFLAGS += -DLOG_TAG=\"libGLESv1\" LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES LOCAL_CFLAGS += -fvisibility=hidden +ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true) + LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER +endif + include $(BUILD_SHARED_LIBRARY) @@ -107,4 +115,8 @@ LOCAL_CFLAGS += -DLOG_TAG=\"libGLESv2\" LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES LOCAL_CFLAGS += -fvisibility=hidden +ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true) + LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER +endif + include $(BUILD_SHARED_LIBRARY) diff --git a/opengl/libs/EGL/Loader.cpp b/opengl/libs/EGL/Loader.cpp index 7e7da1bd506d..5d6ac26a99b5 100644 --- a/opengl/libs/EGL/Loader.cpp +++ b/opengl/libs/EGL/Loader.cpp @@ -128,7 +128,7 @@ const char* Loader::getTag(int dpy, int impl) return 0; } -void* Loader::open(EGLNativeDisplayType display, int impl, gl_hooks_t* hooks) +void* Loader::open(EGLNativeDisplayType display, int impl, egl_connection_t* cnx) { /* * TODO: if we don't find display/0, then use 0/0 @@ -144,22 +144,22 @@ void* Loader::open(EGLNativeDisplayType display, int impl, gl_hooks_t* hooks) char const* tag = getTag(index, impl); if (tag) { snprintf(path, PATH_MAX, format, "GLES", tag); - dso = load_driver(path, hooks, EGL | GLESv1_CM | GLESv2); + dso = load_driver(path, cnx, EGL | GLESv1_CM | GLESv2); if (dso) { hnd = new driver_t(dso); } else { // Always load EGL first snprintf(path, PATH_MAX, format, "EGL", tag); - dso = load_driver(path, hooks, EGL); + dso = load_driver(path, cnx, EGL); if (dso) { hnd = new driver_t(dso); // TODO: make this more automated snprintf(path, PATH_MAX, format, "GLESv1_CM", tag); - hnd->set( load_driver(path, hooks, GLESv1_CM), GLESv1_CM ); + hnd->set( load_driver(path, cnx, GLESv1_CM), GLESv1_CM ); snprintf(path, PATH_MAX, format, "GLESv2", tag); - hnd->set( load_driver(path, hooks, GLESv2), GLESv2 ); + hnd->set( load_driver(path, cnx, GLESv2), GLESv2 ); } } } @@ -223,7 +223,7 @@ void Loader::init_api(void* dso, } void *Loader::load_driver(const char* driver_absolute_path, - gl_hooks_t* hooks, uint32_t mask) + egl_connection_t* cnx, uint32_t mask) { if (access(driver_absolute_path, R_OK)) { // this happens often, we don't want to log an error @@ -245,7 +245,7 @@ void *Loader::load_driver(const char* driver_absolute_path, LOGE_IF(!getProcAddress, "can't find eglGetProcAddress() in %s", driver_absolute_path); - gl_hooks_t::egl_t* egl = &hooks->egl; + egl_t* egl = &cnx->egl; __eglMustCastToProperFunctionPointerType* curr = (__eglMustCastToProperFunctionPointerType*)egl; char const * const * api = egl_names; @@ -266,14 +266,16 @@ void *Loader::load_driver(const char* driver_absolute_path, } if (mask & GLESv1_CM) { - init_api(dso, gl_names, - (__eglMustCastToProperFunctionPointerType*)&hooks->gl, - getProcAddress); + init_api(dso, gl_names, + (__eglMustCastToProperFunctionPointerType*) + &cnx->hooks[GLESv1_INDEX]->gl, + getProcAddress); } if (mask & GLESv2) { - init_api(dso, gl2_names, - (__eglMustCastToProperFunctionPointerType*)&hooks->gl2, + init_api(dso, gl_names, + (__eglMustCastToProperFunctionPointerType*) + &cnx->hooks[GLESv2_INDEX]->gl, getProcAddress); } diff --git a/opengl/libs/EGL/Loader.h b/opengl/libs/EGL/Loader.h index 69f6dd5c2722..8659b0b69be5 100644 --- a/opengl/libs/EGL/Loader.h +++ b/opengl/libs/EGL/Loader.h @@ -32,7 +32,7 @@ namespace android { // ---------------------------------------------------------------------------- -struct gl_hooks_t; +struct egl_connection_t; class Loader : public Singleton<Loader> { @@ -69,12 +69,12 @@ class Loader : public Singleton<Loader> public: ~Loader(); - void* open(EGLNativeDisplayType display, int impl, gl_hooks_t* hooks); + void* open(EGLNativeDisplayType display, int impl, egl_connection_t* cnx); status_t close(void* driver); private: Loader(); - void *load_driver(const char* driver, gl_hooks_t* hooks, uint32_t mask); + void *load_driver(const char* driver, egl_connection_t* cnx, uint32_t mask); static __attribute__((noinline)) void init_api(void* dso, diff --git a/opengl/libs/EGL/egl.cpp b/opengl/libs/EGL/egl.cpp index d1ddcd39a8be..c22c21b89e6b 100644 --- a/opengl/libs/EGL/egl.cpp +++ b/opengl/libs/EGL/egl.cpp @@ -164,7 +164,7 @@ struct egl_display_t { }; uint32_t magic; - DisplayImpl disp[IMPL_NUM_DRIVERS_IMPLEMENTATIONS]; + DisplayImpl disp[IMPL_NUM_IMPLEMENTATIONS]; EGLint numTotalConfigs; volatile int32_t refs; @@ -195,8 +195,9 @@ struct egl_context_t : public egl_object_t typedef egl_object_t::LocalRef<egl_context_t, EGLContext> Ref; egl_context_t(EGLDisplay dpy, EGLContext context, - int impl, egl_connection_t const* cnx) - : dpy(dpy), context(context), read(0), draw(0), impl(impl), cnx(cnx) + int impl, egl_connection_t const* cnx, int version) + : dpy(dpy), context(context), read(0), draw(0), impl(impl), cnx(cnx), + version(version) { } EGLDisplay dpy; @@ -205,6 +206,7 @@ struct egl_context_t : public egl_object_t EGLSurface draw; int impl; egl_connection_t const* cnx; + int version; }; struct egl_image_t : public egl_object_t @@ -218,7 +220,7 @@ struct egl_image_t : public egl_object_t } EGLDisplay dpy; EGLConfig context; - EGLImageKHR images[IMPL_NUM_DRIVERS_IMPLEMENTATIONS]; + EGLImageKHR images[IMPL_NUM_IMPLEMENTATIONS]; }; typedef egl_surface_t::Ref SurfaceRef; @@ -236,14 +238,15 @@ struct tls_t // ---------------------------------------------------------------------------- -egl_connection_t gEGLImpl[IMPL_NUM_DRIVERS_IMPLEMENTATIONS]; +egl_connection_t gEGLImpl[IMPL_NUM_IMPLEMENTATIONS]; static egl_display_t gDisplay[NUM_DISPLAYS]; static pthread_mutex_t gThreadLocalStorageKeyMutex = PTHREAD_MUTEX_INITIALIZER; static pthread_key_t gEGLThreadLocalStorageKey = -1; // ---------------------------------------------------------------------------- -EGLAPI gl_hooks_t gHooks[IMPL_NUM_IMPLEMENTATIONS]; +EGLAPI gl_hooks_t gHooks[2][IMPL_NUM_IMPLEMENTATIONS]; +EGLAPI gl_hooks_t gHooksNoContext; EGLAPI pthread_key_t gGLWrapperKey = -1; // ---------------------------------------------------------------------------- @@ -434,10 +437,10 @@ static void early_egl_init(void) #endif uint32_t addr = (uint32_t)((void*)gl_no_context); android_memset32( - (uint32_t*)(void*)&gHooks[IMPL_NO_CONTEXT], + (uint32_t*)(void*)&gHooksNoContext, addr, - sizeof(gHooks[IMPL_NO_CONTEXT])); - setGlThreadSpecific(&gHooks[IMPL_NO_CONTEXT]); + sizeof(gHooksNoContext)); + setGlThreadSpecific(&gHooksNoContext); } static pthread_once_t once_control = PTHREAD_ONCE_INIT; @@ -479,7 +482,7 @@ static egl_connection_t* validate_display_config( if (!dp) return setError(EGL_BAD_DISPLAY, (egl_connection_t*)NULL); impl = uintptr_t(config)>>24; - if (uint32_t(impl) >= IMPL_NUM_DRIVERS_IMPLEMENTATIONS) { + if (uint32_t(impl) >= IMPL_NUM_IMPLEMENTATIONS) { return setError(EGL_BAD_CONFIG, (egl_connection_t*)NULL); } index = uintptr_t(config) & 0xFFFFFF; @@ -559,10 +562,11 @@ EGLBoolean egl_init_drivers_locked() cnx = &gEGLImpl[IMPL_SOFTWARE]; if (cnx->dso == 0) { - cnx->hooks = &gHooks[IMPL_SOFTWARE]; - cnx->dso = loader.open(EGL_DEFAULT_DISPLAY, 0, cnx->hooks); + cnx->hooks[GLESv1_INDEX] = &gHooks[GLESv1_INDEX][IMPL_SOFTWARE]; + cnx->hooks[GLESv2_INDEX] = &gHooks[GLESv2_INDEX][IMPL_SOFTWARE]; + cnx->dso = loader.open(EGL_DEFAULT_DISPLAY, 0, cnx); if (cnx->dso) { - EGLDisplay dpy = cnx->hooks->egl.eglGetDisplay(EGL_DEFAULT_DISPLAY); + EGLDisplay dpy = cnx->egl.eglGetDisplay(EGL_DEFAULT_DISPLAY); LOGE_IF(dpy==EGL_NO_DISPLAY, "No EGLDisplay for software EGL!"); d->disp[IMPL_SOFTWARE].dpy = dpy; if (dpy == EGL_NO_DISPLAY) { @@ -577,10 +581,11 @@ EGLBoolean egl_init_drivers_locked() char value[PROPERTY_VALUE_MAX]; property_get("debug.egl.hw", value, "1"); if (atoi(value) != 0) { - cnx->hooks = &gHooks[IMPL_HARDWARE]; - cnx->dso = loader.open(EGL_DEFAULT_DISPLAY, 1, cnx->hooks); + cnx->hooks[GLESv1_INDEX] = &gHooks[GLESv1_INDEX][IMPL_HARDWARE]; + cnx->hooks[GLESv2_INDEX] = &gHooks[GLESv2_INDEX][IMPL_HARDWARE]; + cnx->dso = loader.open(EGL_DEFAULT_DISPLAY, 1, cnx); if (cnx->dso) { - EGLDisplay dpy = cnx->hooks->egl.eglGetDisplay(EGL_DEFAULT_DISPLAY); + EGLDisplay dpy = cnx->egl.eglGetDisplay(EGL_DEFAULT_DISPLAY); LOGE_IF(dpy==EGL_NO_DISPLAY, "No EGLDisplay for hardware EGL!"); d->disp[IMPL_HARDWARE].dpy = dpy; if (dpy == EGL_NO_DISPLAY) { @@ -645,12 +650,12 @@ EGLBoolean eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor) return EGL_TRUE; } - setGlThreadSpecific(&gHooks[IMPL_NO_CONTEXT]); + setGlThreadSpecific(&gHooksNoContext); // initialize each EGL and // build our own extension string first, based on the extension we know // and the extension supported by our client implementation - for (int i=0 ; i<IMPL_NUM_DRIVERS_IMPLEMENTATIONS ; i++) { + for (int i=0 ; i<IMPL_NUM_IMPLEMENTATIONS ; i++) { egl_connection_t* const cnx = &gEGLImpl[i]; cnx->major = -1; cnx->minor = -1; @@ -668,13 +673,13 @@ EGLBoolean eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor) */ if (i == IMPL_HARDWARE) { dp->disp[i].dpy = - cnx->hooks->egl.eglGetDisplay(EGL_DEFAULT_DISPLAY); + cnx->egl.eglGetDisplay(EGL_DEFAULT_DISPLAY); } #endif EGLDisplay idpy = dp->disp[i].dpy; - if (cnx->hooks->egl.eglInitialize(idpy, &cnx->major, &cnx->minor)) { + if (cnx->egl.eglInitialize(idpy, &cnx->major, &cnx->minor)) { //LOGD("initialized %d dpy=%p, ver=%d.%d, cnx=%p", // i, idpy, cnx->major, cnx->minor, cnx); @@ -683,29 +688,29 @@ EGLBoolean eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor) // get the query-strings for this display for each implementation dp->disp[i].queryString.vendor = - cnx->hooks->egl.eglQueryString(idpy, EGL_VENDOR); + cnx->egl.eglQueryString(idpy, EGL_VENDOR); dp->disp[i].queryString.version = - cnx->hooks->egl.eglQueryString(idpy, EGL_VERSION); + cnx->egl.eglQueryString(idpy, EGL_VERSION); dp->disp[i].queryString.extensions = - cnx->hooks->egl.eglQueryString(idpy, EGL_EXTENSIONS); + cnx->egl.eglQueryString(idpy, EGL_EXTENSIONS); dp->disp[i].queryString.clientApi = - cnx->hooks->egl.eglQueryString(idpy, EGL_CLIENT_APIS); + cnx->egl.eglQueryString(idpy, EGL_CLIENT_APIS); } else { LOGW("%d: eglInitialize(%p) failed (%s)", i, idpy, - egl_strerror(cnx->hooks->egl.eglGetError())); + egl_strerror(cnx->egl.eglGetError())); } } EGLBoolean res = EGL_FALSE; - for (int i=0 ; i<IMPL_NUM_DRIVERS_IMPLEMENTATIONS ; i++) { + for (int i=0 ; i<IMPL_NUM_IMPLEMENTATIONS ; i++) { egl_connection_t* const cnx = &gEGLImpl[i]; if (cnx->dso && cnx->major>=0 && cnx->minor>=0) { EGLint n; - if (cnx->hooks->egl.eglGetConfigs(dp->disp[i].dpy, 0, 0, &n)) { + if (cnx->egl.eglGetConfigs(dp->disp[i].dpy, 0, 0, &n)) { dp->disp[i].config = (EGLConfig*)malloc(sizeof(EGLConfig)*n); if (dp->disp[i].config) { - if (cnx->hooks->egl.eglGetConfigs( + if (cnx->egl.eglGetConfigs( dp->disp[i].dpy, dp->disp[i].config, n, &dp->disp[i].numConfigs)) { @@ -742,12 +747,12 @@ EGLBoolean eglTerminate(EGLDisplay dpy) return EGL_TRUE; EGLBoolean res = EGL_FALSE; - for (int i=0 ; i<IMPL_NUM_DRIVERS_IMPLEMENTATIONS ; i++) { + for (int i=0 ; i<IMPL_NUM_IMPLEMENTATIONS ; i++) { egl_connection_t* const cnx = &gEGLImpl[i]; if (cnx->dso && dp->disp[i].state == egl_display_t::INITIALIZED) { - if (cnx->hooks->egl.eglTerminate(dp->disp[i].dpy) == EGL_FALSE) { + if (cnx->egl.eglTerminate(dp->disp[i].dpy) == EGL_FALSE) { LOGW("%d: eglTerminate(%p) failed (%s)", i, dp->disp[i].dpy, - egl_strerror(cnx->hooks->egl.eglGetError())); + egl_strerror(cnx->egl.eglGetError())); } // REVISIT: it's unclear what to do if eglTerminate() fails free(dp->disp[i].config); @@ -784,7 +789,7 @@ EGLBoolean eglGetConfigs( EGLDisplay dpy, return EGL_TRUE; } GLint n = 0; - for (int j=0 ; j<IMPL_NUM_DRIVERS_IMPLEMENTATIONS ; j++) { + for (int j=0 ; j<IMPL_NUM_IMPLEMENTATIONS ; j++) { for (int i=0 ; i<dp->disp[j].numConfigs && config_size ; i++) { *configs++ = MAKE_CONFIG(j, i); config_size--; @@ -841,7 +846,7 @@ EGLBoolean eglChooseConfig( EGLDisplay dpy, const EGLint *attrib_list, egl_connection_t* const cnx = &gEGLImpl[i]; if (cnx->dso) { - cnx->hooks->egl.eglGetConfigAttrib( + cnx->egl.eglGetConfigAttrib( dp->disp[i].dpy, dp->disp[i].config[index], EGL_CONFIG_ID, &configId); @@ -851,12 +856,12 @@ EGLBoolean eglChooseConfig( EGLDisplay dpy, const EGLint *attrib_list, // At this point, the only configuration that can match is // dp->configs[i][index], however, we don't know if it would be // rejected because of the other attributes, so we do have to call - // cnx->hooks->egl.eglChooseConfig() -- but we don't have to loop + // cnx->egl.eglChooseConfig() -- but we don't have to loop // through all the EGLimpl[]. // We also know we can only get a single config back, and we know // which one. - res = cnx->hooks->egl.eglChooseConfig( + res = cnx->egl.eglChooseConfig( dp->disp[i].dpy, attrib_list, configs, config_size, &n); if (res && n>0) { // n has to be 0 or 1, by construction, and we already know @@ -872,10 +877,10 @@ EGLBoolean eglChooseConfig( EGLDisplay dpy, const EGLint *attrib_list, return res; } - for (int i=0 ; i<IMPL_NUM_DRIVERS_IMPLEMENTATIONS ; i++) { + for (int i=0 ; i<IMPL_NUM_IMPLEMENTATIONS ; i++) { egl_connection_t* const cnx = &gEGLImpl[i]; if (cnx->dso) { - if (cnx->hooks->egl.eglChooseConfig( + if (cnx->egl.eglChooseConfig( dp->disp[i].dpy, attrib_list, configs, config_size, &n)) { if (configs) { // now we need to convert these client EGLConfig to our @@ -917,7 +922,7 @@ EGLBoolean eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, *value = configToUniqueId(dp, i, index); return EGL_TRUE; } - return cnx->hooks->egl.eglGetConfigAttrib( + return cnx->egl.eglGetConfigAttrib( dp->disp[i].dpy, dp->disp[i].config[index], attribute, value); } @@ -933,7 +938,7 @@ EGLSurface eglCreateWindowSurface( EGLDisplay dpy, EGLConfig config, int i=0, index=0; egl_connection_t* cnx = validate_display_config(dpy, config, dp, i, index); if (cnx) { - EGLSurface surface = cnx->hooks->egl.eglCreateWindowSurface( + EGLSurface surface = cnx->egl.eglCreateWindowSurface( dp->disp[i].dpy, dp->disp[i].config[index], window, attrib_list); if (surface != EGL_NO_SURFACE) { egl_surface_t* s = new egl_surface_t(dpy, surface, i, cnx); @@ -951,7 +956,7 @@ EGLSurface eglCreatePixmapSurface( EGLDisplay dpy, EGLConfig config, int i=0, index=0; egl_connection_t* cnx = validate_display_config(dpy, config, dp, i, index); if (cnx) { - EGLSurface surface = cnx->hooks->egl.eglCreatePixmapSurface( + EGLSurface surface = cnx->egl.eglCreatePixmapSurface( dp->disp[i].dpy, dp->disp[i].config[index], pixmap, attrib_list); if (surface != EGL_NO_SURFACE) { egl_surface_t* s = new egl_surface_t(dpy, surface, i, cnx); @@ -968,7 +973,7 @@ EGLSurface eglCreatePbufferSurface( EGLDisplay dpy, EGLConfig config, int i=0, index=0; egl_connection_t* cnx = validate_display_config(dpy, config, dp, i, index); if (cnx) { - EGLSurface surface = cnx->hooks->egl.eglCreatePbufferSurface( + EGLSurface surface = cnx->egl.eglCreatePbufferSurface( dp->disp[i].dpy, dp->disp[i].config[index], attrib_list); if (surface != EGL_NO_SURFACE) { egl_surface_t* s = new egl_surface_t(dpy, surface, i, cnx); @@ -988,7 +993,7 @@ EGLBoolean eglDestroySurface(EGLDisplay dpy, EGLSurface surface) egl_display_t const * const dp = get_display(dpy); egl_surface_t * const s = get_surface(surface); - EGLBoolean result = s->cnx->hooks->egl.eglDestroySurface( + EGLBoolean result = s->cnx->egl.eglDestroySurface( dp->disp[s->impl].dpy, s->surface); if (result == EGL_TRUE) { _s.terminate(); @@ -1007,7 +1012,7 @@ EGLBoolean eglQuerySurface( EGLDisplay dpy, EGLSurface surface, egl_display_t const * const dp = get_display(dpy); egl_surface_t const * const s = get_surface(surface); - return s->cnx->hooks->egl.eglQuerySurface( + return s->cnx->egl.eglQuerySurface( dp->disp[s->impl].dpy, s->surface, attribute, value); } @@ -1022,11 +1027,26 @@ EGLContext eglCreateContext(EGLDisplay dpy, EGLConfig config, int i=0, index=0; egl_connection_t* cnx = validate_display_config(dpy, config, dp, i, index); if (cnx) { - EGLContext context = cnx->hooks->egl.eglCreateContext( + EGLContext context = cnx->egl.eglCreateContext( dp->disp[i].dpy, dp->disp[i].config[index], share_list, attrib_list); if (context != EGL_NO_CONTEXT) { - egl_context_t* c = new egl_context_t(dpy, context, i, cnx); + // figure out if it's a GLESv1 or GLESv2 + int version = 0; + if (attrib_list) { + while (*attrib_list != EGL_NONE) { + GLint attr = *attrib_list++; + GLint value = *attrib_list++; + if (attr == EGL_CONTEXT_CLIENT_VERSION) { + if (value == 1) { + version = GLESv1_INDEX; + } else if (value == 2) { + version = GLESv2_INDEX; + } + } + }; + } + egl_context_t* c = new egl_context_t(dpy, context, i, cnx, version); return c; } } @@ -1042,7 +1062,7 @@ EGLBoolean eglDestroyContext(EGLDisplay dpy, EGLContext ctx) return EGL_FALSE; egl_display_t const * const dp = get_display(dpy); egl_context_t * const c = get_context(ctx); - EGLBoolean result = c->cnx->hooks->egl.eglDestroyContext( + EGLBoolean result = c->cnx->egl.eglDestroyContext( dp->disp[c->impl].dpy, c->context); if (result == EGL_TRUE) { _c.terminate(); @@ -1122,10 +1142,10 @@ EGLBoolean eglMakeCurrent( EGLDisplay dpy, EGLSurface draw, EGLBoolean result; if (c) { - result = c->cnx->hooks->egl.eglMakeCurrent( + result = c->cnx->egl.eglMakeCurrent( dp->disp[c->impl].dpy, impl_draw, impl_read, impl_ctx); } else { - result = cur_c->cnx->hooks->egl.eglMakeCurrent( + result = cur_c->cnx->egl.eglMakeCurrent( dp->disp[cur_c->impl].dpy, impl_draw, impl_read, impl_ctx); } @@ -1138,11 +1158,11 @@ EGLBoolean eglMakeCurrent( EGLDisplay dpy, EGLSurface draw, // cur_c has to be valid here (but could be terminated) if (ctx != EGL_NO_CONTEXT) { - setGlThreadSpecific(c->cnx->hooks); + setGlThreadSpecific(c->cnx->hooks[c->version]); setContext(ctx); _c.acquire(); } else { - setGlThreadSpecific(&gHooks[IMPL_NO_CONTEXT]); + setGlThreadSpecific(&gHooksNoContext); setContext(EGL_NO_CONTEXT); } _cur_c.release(); @@ -1171,7 +1191,7 @@ EGLBoolean eglQueryContext( EGLDisplay dpy, EGLContext ctx, egl_display_t const * const dp = get_display(dpy); egl_context_t * const c = get_context(ctx); - return c->cnx->hooks->egl.eglQueryContext( + return c->cnx->egl.eglQueryContext( dp->disp[c->impl].dpy, c->context, attribute, value); } @@ -1231,7 +1251,7 @@ EGLBoolean eglWaitGL(void) egl_connection_t* const cnx = &gEGLImpl[c->impl]; if (!cnx->dso) return setError(EGL_BAD_CONTEXT, EGL_FALSE); - res = cnx->hooks->egl.eglWaitGL(); + res = cnx->egl.eglWaitGL(); } return res; } @@ -1251,7 +1271,7 @@ EGLBoolean eglWaitNative(EGLint engine) egl_connection_t* const cnx = &gEGLImpl[c->impl]; if (!cnx->dso) return setError(EGL_BAD_CONTEXT, EGL_FALSE); - res = cnx->hooks->egl.eglWaitNative(engine); + res = cnx->egl.eglWaitNative(engine); } return res; } @@ -1259,11 +1279,11 @@ EGLBoolean eglWaitNative(EGLint engine) EGLint eglGetError(void) { EGLint result = EGL_SUCCESS; - for (int i=0 ; i<IMPL_NUM_DRIVERS_IMPLEMENTATIONS ; i++) { + for (int i=0 ; i<IMPL_NUM_IMPLEMENTATIONS ; i++) { EGLint err = EGL_SUCCESS; egl_connection_t* const cnx = &gEGLImpl[i]; if (cnx->dso) - err = cnx->hooks->egl.eglGetError(); + err = cnx->egl.eglGetError(); if (err!=EGL_SUCCESS && result==EGL_SUCCESS) result = err; } @@ -1294,11 +1314,11 @@ __eglMustCastToProperFunctionPointerType eglGetProcAddress(const char *procname) addr = 0; int slot = -1; - for (int i=0 ; i<IMPL_NUM_DRIVERS_IMPLEMENTATIONS ; i++) { + for (int i=0 ; i<IMPL_NUM_IMPLEMENTATIONS ; i++) { egl_connection_t* const cnx = &gEGLImpl[i]; if (cnx->dso) { - if (cnx->hooks->egl.eglGetProcAddress) { - addr = cnx->hooks->egl.eglGetProcAddress(procname); + if (cnx->egl.eglGetProcAddress) { + addr = cnx->egl.eglGetProcAddress(procname); if (addr) { if (slot == -1) { slot = 0; // XXX: find free slot @@ -1307,7 +1327,7 @@ __eglMustCastToProperFunctionPointerType eglGetProcAddress(const char *procname) break; } } - cnx->hooks->ext.extensions[slot] = addr; + //cnx->hooks->ext.extensions[slot] = addr; } } } @@ -1347,7 +1367,7 @@ EGLBoolean eglSwapBuffers(EGLDisplay dpy, EGLSurface draw) return EGL_FALSE; egl_display_t const * const dp = get_display(dpy); egl_surface_t const * const s = get_surface(draw); - return s->cnx->hooks->egl.eglSwapBuffers(dp->disp[s->impl].dpy, s->surface); + return s->cnx->egl.eglSwapBuffers(dp->disp[s->impl].dpy, s->surface); } EGLBoolean eglCopyBuffers( EGLDisplay dpy, EGLSurface surface, @@ -1360,7 +1380,7 @@ EGLBoolean eglCopyBuffers( EGLDisplay dpy, EGLSurface surface, return EGL_FALSE; egl_display_t const * const dp = get_display(dpy); egl_surface_t const * const s = get_surface(surface); - return s->cnx->hooks->egl.eglCopyBuffers( + return s->cnx->egl.eglCopyBuffers( dp->disp[s->impl].dpy, s->surface, target); } @@ -1395,8 +1415,8 @@ EGLBoolean eglSurfaceAttrib( return EGL_FALSE; egl_display_t const * const dp = get_display(dpy); egl_surface_t const * const s = get_surface(surface); - if (s->cnx->hooks->egl.eglSurfaceAttrib) { - return s->cnx->hooks->egl.eglSurfaceAttrib( + if (s->cnx->egl.eglSurfaceAttrib) { + return s->cnx->egl.eglSurfaceAttrib( dp->disp[s->impl].dpy, s->surface, attribute, value); } return setError(EGL_BAD_SURFACE, EGL_FALSE); @@ -1412,8 +1432,8 @@ EGLBoolean eglBindTexImage( return EGL_FALSE; egl_display_t const * const dp = get_display(dpy); egl_surface_t const * const s = get_surface(surface); - if (s->cnx->hooks->egl.eglBindTexImage) { - return s->cnx->hooks->egl.eglBindTexImage( + if (s->cnx->egl.eglBindTexImage) { + return s->cnx->egl.eglBindTexImage( dp->disp[s->impl].dpy, s->surface, buffer); } return setError(EGL_BAD_SURFACE, EGL_FALSE); @@ -1429,8 +1449,8 @@ EGLBoolean eglReleaseTexImage( return EGL_FALSE; egl_display_t const * const dp = get_display(dpy); egl_surface_t const * const s = get_surface(surface); - if (s->cnx->hooks->egl.eglReleaseTexImage) { - return s->cnx->hooks->egl.eglReleaseTexImage( + if (s->cnx->egl.eglReleaseTexImage) { + return s->cnx->egl.eglReleaseTexImage( dp->disp[s->impl].dpy, s->surface, buffer); } return setError(EGL_BAD_SURFACE, EGL_FALSE); @@ -1442,11 +1462,11 @@ EGLBoolean eglSwapInterval(EGLDisplay dpy, EGLint interval) if (!dp) return setError(EGL_BAD_DISPLAY, EGL_FALSE); EGLBoolean res = EGL_TRUE; - for (int i=0 ; i<IMPL_NUM_DRIVERS_IMPLEMENTATIONS ; i++) { + for (int i=0 ; i<IMPL_NUM_IMPLEMENTATIONS ; i++) { egl_connection_t* const cnx = &gEGLImpl[i]; if (cnx->dso) { - if (cnx->hooks->egl.eglSwapInterval) { - if (cnx->hooks->egl.eglSwapInterval( + if (cnx->egl.eglSwapInterval) { + if (cnx->egl.eglSwapInterval( dp->disp[i].dpy, interval) == EGL_FALSE) { res = EGL_FALSE; } @@ -1475,10 +1495,10 @@ EGLBoolean eglWaitClient(void) egl_connection_t* const cnx = &gEGLImpl[c->impl]; if (!cnx->dso) return setError(EGL_BAD_CONTEXT, EGL_FALSE); - if (cnx->hooks->egl.eglWaitClient) { - res = cnx->hooks->egl.eglWaitClient(); + if (cnx->egl.eglWaitClient) { + res = cnx->egl.eglWaitClient(); } else { - res = cnx->hooks->egl.eglWaitGL(); + res = cnx->egl.eglWaitGL(); } } return res; @@ -1492,11 +1512,11 @@ EGLBoolean eglBindAPI(EGLenum api) // bind this API on all EGLs EGLBoolean res = EGL_TRUE; - for (int i=0 ; i<IMPL_NUM_DRIVERS_IMPLEMENTATIONS ; i++) { + for (int i=0 ; i<IMPL_NUM_IMPLEMENTATIONS ; i++) { egl_connection_t* const cnx = &gEGLImpl[i]; if (cnx->dso) { - if (cnx->hooks->egl.eglBindAPI) { - if (cnx->hooks->egl.eglBindAPI(api) == EGL_FALSE) { + if (cnx->egl.eglBindAPI) { + if (cnx->egl.eglBindAPI(api) == EGL_FALSE) { res = EGL_FALSE; } } @@ -1511,13 +1531,13 @@ EGLenum eglQueryAPI(void) return setError(EGL_BAD_PARAMETER, EGL_FALSE); } - for (int i=0 ; i<IMPL_NUM_DRIVERS_IMPLEMENTATIONS ; i++) { + for (int i=0 ; i<IMPL_NUM_IMPLEMENTATIONS ; i++) { egl_connection_t* const cnx = &gEGLImpl[i]; if (cnx->dso) { - if (cnx->hooks->egl.eglQueryAPI) { + if (cnx->egl.eglQueryAPI) { // the first one we find is okay, because they all // should be the same - return cnx->hooks->egl.eglQueryAPI(); + return cnx->egl.eglQueryAPI(); } } } @@ -1527,11 +1547,11 @@ EGLenum eglQueryAPI(void) EGLBoolean eglReleaseThread(void) { - for (int i=0 ; i<IMPL_NUM_DRIVERS_IMPLEMENTATIONS ; i++) { + for (int i=0 ; i<IMPL_NUM_IMPLEMENTATIONS ; i++) { egl_connection_t* const cnx = &gEGLImpl[i]; if (cnx->dso) { - if (cnx->hooks->egl.eglReleaseThread) { - cnx->hooks->egl.eglReleaseThread(); + if (cnx->egl.eglReleaseThread) { + cnx->egl.eglReleaseThread(); } } } @@ -1547,8 +1567,8 @@ EGLSurface eglCreatePbufferFromClientBuffer( int i=0, index=0; egl_connection_t* cnx = validate_display_config(dpy, config, dp, i, index); if (!cnx) return EGL_FALSE; - if (cnx->hooks->egl.eglCreatePbufferFromClientBuffer) { - return cnx->hooks->egl.eglCreatePbufferFromClientBuffer( + if (cnx->egl.eglCreatePbufferFromClientBuffer) { + return cnx->egl.eglCreatePbufferFromClientBuffer( dp->disp[i].dpy, buftype, buffer, dp->disp[i].config[index], attrib_list); } @@ -1571,8 +1591,8 @@ EGLBoolean eglLockSurfaceKHR(EGLDisplay dpy, EGLSurface surface, egl_display_t const * const dp = get_display(dpy); egl_surface_t const * const s = get_surface(surface); - if (s->cnx->hooks->egl.eglLockSurfaceKHR) { - return s->cnx->hooks->egl.eglLockSurfaceKHR( + if (s->cnx->egl.eglLockSurfaceKHR) { + return s->cnx->egl.eglLockSurfaceKHR( dp->disp[s->impl].dpy, s->surface, attrib_list); } return setError(EGL_BAD_DISPLAY, EGL_FALSE); @@ -1589,8 +1609,8 @@ EGLBoolean eglUnlockSurfaceKHR(EGLDisplay dpy, EGLSurface surface) egl_display_t const * const dp = get_display(dpy); egl_surface_t const * const s = get_surface(surface); - if (s->cnx->hooks->egl.eglUnlockSurfaceKHR) { - return s->cnx->hooks->egl.eglUnlockSurfaceKHR( + if (s->cnx->egl.eglUnlockSurfaceKHR) { + return s->cnx->egl.eglUnlockSurfaceKHR( dp->disp[s->impl].dpy, s->surface); } return setError(EGL_BAD_DISPLAY, EGL_FALSE); @@ -1607,7 +1627,7 @@ EGLImageKHR eglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenum target, egl_display_t const * const dp = get_display(dpy); egl_context_t * const c = get_context(ctx); // since we have an EGLContext, we know which implementation to use - EGLImageKHR image = c->cnx->hooks->egl.eglCreateImageKHR( + EGLImageKHR image = c->cnx->egl.eglCreateImageKHR( dp->disp[c->impl].dpy, c->context, target, buffer, attrib_list); if (image == EGL_NO_IMAGE_KHR) return image; @@ -1621,17 +1641,22 @@ EGLImageKHR eglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenum target, if (dp == 0) { return setError(EGL_BAD_DISPLAY, EGL_NO_IMAGE_KHR); } - // since we don't have a way to know which implementation to call, - // we're calling all of them - EGLImageKHR implImages[IMPL_NUM_DRIVERS_IMPLEMENTATIONS]; + /* Since we don't have a way to know which implementation to call, + * we're calling all of them. If at least one of the implementation + * succeeded, this is a success. + */ + + EGLint currentError = eglGetError(); + + EGLImageKHR implImages[IMPL_NUM_IMPLEMENTATIONS]; bool success = false; - for (int i=0 ; i<IMPL_NUM_DRIVERS_IMPLEMENTATIONS ; i++) { + for (int i=0 ; i<IMPL_NUM_IMPLEMENTATIONS ; i++) { egl_connection_t* const cnx = &gEGLImpl[i]; implImages[i] = EGL_NO_IMAGE_KHR; if (cnx->dso) { - if (cnx->hooks->egl.eglCreateImageKHR) { - implImages[i] = cnx->hooks->egl.eglCreateImageKHR( + if (cnx->egl.eglCreateImageKHR) { + implImages[i] = cnx->egl.eglCreateImageKHR( dp->disp[i].dpy, ctx, target, buffer, attrib_list); if (implImages[i] != EGL_NO_IMAGE_KHR) { success = true; @@ -1639,9 +1664,24 @@ EGLImageKHR eglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenum target, } } } - if (!success) + + if (!success) { + // failure, if there was an error when we entered this function, + // the error flag must not be updated. + // Otherwise, the error is whatever happened in the implementation + // that faulted. + if (currentError != EGL_SUCCESS) { + setError(currentError, EGL_NO_IMAGE_KHR); + } return EGL_NO_IMAGE_KHR; - + } else { + // In case of success, we need to clear all error flags + // (especially those caused by the implementation that didn't + // succeed). TODO: we could avoid this if we knew this was + // a "full" success (all implementation succeeded). + eglGetError(); + } + egl_image_t* result = new egl_image_t(dpy, ctx); memcpy(result->images, implImages, sizeof(implImages)); return (EGLImageKHR)result; @@ -1660,12 +1700,12 @@ EGLBoolean eglDestroyImageKHR(EGLDisplay dpy, EGLImageKHR img) egl_image_t* image = get_image(img); bool success = false; - for (int i=0 ; i<IMPL_NUM_DRIVERS_IMPLEMENTATIONS ; i++) { + for (int i=0 ; i<IMPL_NUM_IMPLEMENTATIONS ; i++) { egl_connection_t* const cnx = &gEGLImpl[i]; if (image->images[i] != EGL_NO_IMAGE_KHR) { if (cnx->dso) { - if (cnx->hooks->egl.eglCreateImageKHR) { - if (cnx->hooks->egl.eglDestroyImageKHR( + if (cnx->egl.eglCreateImageKHR) { + if (cnx->egl.eglDestroyImageKHR( dp->disp[i].dpy, image->images[i])) { success = true; } @@ -1696,8 +1736,8 @@ EGLBoolean eglSetSwapRectangleANDROID(EGLDisplay dpy, EGLSurface draw, return EGL_FALSE; egl_display_t const * const dp = get_display(dpy); egl_surface_t const * const s = get_surface(draw); - if (s->cnx->hooks->egl.eglSetSwapRectangleANDROID) { - return s->cnx->hooks->egl.eglSetSwapRectangleANDROID( + if (s->cnx->egl.eglSetSwapRectangleANDROID) { + return s->cnx->egl.eglSetSwapRectangleANDROID( dp->disp[s->impl].dpy, s->surface, left, top, width, height); } return setError(EGL_BAD_DISPLAY, NULL); @@ -1712,8 +1752,8 @@ EGLClientBuffer eglGetRenderBufferANDROID(EGLDisplay dpy, EGLSurface draw) return 0; egl_display_t const * const dp = get_display(dpy); egl_surface_t const * const s = get_surface(draw); - if (s->cnx->hooks->egl.eglGetRenderBufferANDROID) { - return s->cnx->hooks->egl.eglGetRenderBufferANDROID( + if (s->cnx->egl.eglGetRenderBufferANDROID) { + return s->cnx->egl.eglGetRenderBufferANDROID( dp->disp[s->impl].dpy, s->surface); } return setError(EGL_BAD_DISPLAY, (EGLClientBuffer*)0); diff --git a/opengl/libs/EGL/hooks.cpp b/opengl/libs/EGL/hooks.cpp index 224636669e10..72ad6b37b8e2 100644 --- a/opengl/libs/EGL/hooks.cpp +++ b/opengl/libs/EGL/hooks.cpp @@ -41,14 +41,7 @@ void gl_unimplemented() { #define EGL_ENTRY(_r, _api, ...) #_api, char const * const gl_names[] = { - #include "GLES_CM/gl_entries.in" - #include "GLES_CM/glext_entries.in" - NULL -}; - -char const * const gl2_names[] = { - #include "GLES2/gl2_entries.in" - #include "GLES2/gl2ext_entries.in" + #include "entries.in" NULL }; diff --git a/opengl/libs/GLES2/gl2.cpp b/opengl/libs/GLES2/gl2.cpp index e5358c345808..b8e328316a54 100644 --- a/opengl/libs/GLES2/gl2.cpp +++ b/opengl/libs/GLES2/gl2.cpp @@ -41,22 +41,30 @@ using namespace android; #if USE_FAST_TLS_KEY + #ifdef HAVE_ARM_TLS_REGISTER + #define GET_TLS(reg) \ + "mrc p15, 0, " #reg ", c13, c0, 3 \n" + #else + #define GET_TLS(reg) \ + "mov " #reg ", #0xFFFF0FFF \n" \ + "ldr " #reg ", [" #reg ", #-15] \n" + #endif + #define API_ENTRY(_api) __attribute__((naked)) _api #define CALL_GL_API(_api, ...) \ asm volatile( \ - "mov r12, #0xFFFF0FFF \n" \ - "ldr r12, [r12, #-15] \n" \ + GET_TLS(r12) \ "ldr r12, [r12, %[tls]] \n" \ "cmp r12, #0 \n" \ "ldrne pc, [r12, %[api]] \n" \ "bx lr \n" \ : \ : [tls] "J"(TLS_SLOT_OPENGL_API*4), \ - [api] "J"(__builtin_offsetof(gl_hooks_t, gl2._api)) \ + [api] "J"(__builtin_offsetof(gl_hooks_t, gl._api)) \ : \ ); - + #define CALL_GL_API_RETURN(_api, ...) \ CALL_GL_API(_api, __VA_ARGS__) \ return 0; // placate gcc's warnings. never reached. @@ -66,11 +74,11 @@ using namespace android; #define API_ENTRY(_api) _api #define CALL_GL_API(_api, ...) \ - gl_hooks_t::gl2_t const * const _c = &getGlThreadSpecific()->gl2; \ + gl_hooks_t::gl_t const * const _c = &getGlThreadSpecific()->gl; \ _c->_api(__VA_ARGS__) #define CALL_GL_API_RETURN(_api, ...) \ - gl_hooks_t::gl2_t const * const _c = &getGlThreadSpecific()->gl2; \ + gl_hooks_t::gl_t const * const _c = &getGlThreadSpecific()->gl; \ return _c->_api(__VA_ARGS__) #endif diff --git a/opengl/libs/GLES2/gl2_entries.in b/opengl/libs/GLES2/gl2_entries.in deleted file mode 100644 index 6a41b94fc6e1..000000000000 --- a/opengl/libs/GLES2/gl2_entries.in +++ /dev/null @@ -1,142 +0,0 @@ -GL_ENTRY(void, glActiveTexture, GLenum texture) -GL_ENTRY(void, glAttachShader, GLuint program, GLuint shader) -GL_ENTRY(void, glBindAttribLocation, GLuint program, GLuint index, const char* name) -GL_ENTRY(void, glBindBuffer, GLenum target, GLuint buffer) -GL_ENTRY(void, glBindFramebuffer, GLenum target, GLuint framebuffer) -GL_ENTRY(void, glBindRenderbuffer, GLenum target, GLuint renderbuffer) -GL_ENTRY(void, glBindTexture, GLenum target, GLuint texture) -GL_ENTRY(void, glBlendColor, GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) -GL_ENTRY(void, glBlendEquation, GLenum mode ) -GL_ENTRY(void, glBlendEquationSeparate, GLenum modeRGB, GLenum modeAlpha) -GL_ENTRY(void, glBlendFunc, GLenum sfactor, GLenum dfactor) -GL_ENTRY(void, glBlendFuncSeparate, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) -GL_ENTRY(void, glBufferData, GLenum target, GLsizeiptr size, const void* data, GLenum usage) -GL_ENTRY(void, glBufferSubData, GLenum target, GLintptr offset, GLsizeiptr size, const void* data) -GL_ENTRY(GLenum, glCheckFramebufferStatus, GLenum target) -GL_ENTRY(void, glClear, GLbitfield mask) -GL_ENTRY(void, glClearColor, GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) -GL_ENTRY(void, glClearDepthf, GLclampf depth) -GL_ENTRY(void, glClearStencil, GLint s) -GL_ENTRY(void, glColorMask, GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) -GL_ENTRY(void, glCompileShader, GLuint shader) -GL_ENTRY(void, glCompressedTexImage2D, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data) -GL_ENTRY(void, glCompressedTexSubImage2D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data) -GL_ENTRY(void, glCopyTexImage2D, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) -GL_ENTRY(void, glCopyTexSubImage2D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) -GL_ENTRY(GLuint, glCreateProgram, void) -GL_ENTRY(GLuint, glCreateShader, GLenum type) -GL_ENTRY(void, glCullFace, GLenum mode) -GL_ENTRY(void, glDeleteBuffers, GLsizei n, const GLuint* buffers) -GL_ENTRY(void, glDeleteFramebuffers, GLsizei n, const GLuint* framebuffers) -GL_ENTRY(void, glDeleteProgram, GLuint program) -GL_ENTRY(void, glDeleteRenderbuffers, GLsizei n, const GLuint* renderbuffers) -GL_ENTRY(void, glDeleteShader, GLuint shader) -GL_ENTRY(void, glDeleteTextures, GLsizei n, const GLuint* textures) -GL_ENTRY(void, glDepthFunc, GLenum func) -GL_ENTRY(void, glDepthMask, GLboolean flag) -GL_ENTRY(void, glDepthRangef, GLclampf zNear, GLclampf zFar) -GL_ENTRY(void, glDetachShader, GLuint program, GLuint shader) -GL_ENTRY(void, glDisable, GLenum cap) -GL_ENTRY(void, glDisableVertexAttribArray, GLuint index) -GL_ENTRY(void, glDrawArrays, GLenum mode, GLint first, GLsizei count) -GL_ENTRY(void, glDrawElements, GLenum mode, GLsizei count, GLenum type, const void* indices) -GL_ENTRY(void, glEnable, GLenum cap) -GL_ENTRY(void, glEnableVertexAttribArray, GLuint index) -GL_ENTRY(void, glFinish, void) -GL_ENTRY(void, glFlush, void) -GL_ENTRY(void, glFramebufferRenderbuffer, GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) -GL_ENTRY(void, glFramebufferTexture2D, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) -GL_ENTRY(void, glFrontFace, GLenum mode) -GL_ENTRY(void, glGenBuffers, GLsizei n, GLuint* buffers) -GL_ENTRY(void, glGenerateMipmap, GLenum target) -GL_ENTRY(void, glGenFramebuffers, GLsizei n, GLuint* framebuffers) -GL_ENTRY(void, glGenRenderbuffers, GLsizei n, GLuint* renderbuffers) -GL_ENTRY(void, glGenTextures, GLsizei n, GLuint* textures) -GL_ENTRY(void, glGetActiveAttrib, GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name) -GL_ENTRY(void, glGetActiveUniform, GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name) -GL_ENTRY(void, glGetAttachedShaders, GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) -GL_ENTRY(int, glGetAttribLocation, GLuint program, const char* name) -GL_ENTRY(void, glGetBooleanv, GLenum pname, GLboolean* params) -GL_ENTRY(void, glGetBufferParameteriv, GLenum target, GLenum pname, GLint* params) -GL_ENTRY(GLenum, glGetError, void) -GL_ENTRY(void, glGetFloatv, GLenum pname, GLfloat* params) -GL_ENTRY(void, glGetFramebufferAttachmentParameteriv, GLenum target, GLenum attachment, GLenum pname, GLint* params) -GL_ENTRY(void, glGetIntegerv, GLenum pname, GLint* params) -GL_ENTRY(void, glGetProgramiv, GLuint program, GLenum pname, GLint* params) -GL_ENTRY(void, glGetProgramInfoLog, GLuint program, GLsizei bufsize, GLsizei* length, char* infolog) -GL_ENTRY(void, glGetRenderbufferParameteriv, GLenum target, GLenum pname, GLint* params) -GL_ENTRY(void, glGetShaderiv, GLuint shader, GLenum pname, GLint* params) -GL_ENTRY(void, glGetShaderInfoLog, GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog) -GL_ENTRY(void, glGetShaderPrecisionFormat, GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) -GL_ENTRY(void, glGetShaderSource, GLuint shader, GLsizei bufsize, GLsizei* length, char* source) -GL_ENTRY(const GLubyte*, glGetString, GLenum name) -GL_ENTRY(void, glGetTexParameterfv, GLenum target, GLenum pname, GLfloat* params) -GL_ENTRY(void, glGetTexParameteriv, GLenum target, GLenum pname, GLint* params) -GL_ENTRY(void, glGetUniformfv, GLuint program, GLint location, GLfloat* params) -GL_ENTRY(void, glGetUniformiv, GLuint program, GLint location, GLint* params) -GL_ENTRY(int, glGetUniformLocation, GLuint program, const char* name) -GL_ENTRY(void, glGetVertexAttribfv, GLuint index, GLenum pname, GLfloat* params) -GL_ENTRY(void, glGetVertexAttribiv, GLuint index, GLenum pname, GLint* params) -GL_ENTRY(void, glGetVertexAttribPointerv, GLuint index, GLenum pname, void** pointer) -GL_ENTRY(void, glHint, GLenum target, GLenum mode) -GL_ENTRY(GLboolean, glIsBuffer, GLuint buffer) -GL_ENTRY(GLboolean, glIsEnabled, GLenum cap) -GL_ENTRY(GLboolean, glIsFramebuffer, GLuint framebuffer) -GL_ENTRY(GLboolean, glIsProgram, GLuint program) -GL_ENTRY(GLboolean, glIsRenderbuffer, GLuint renderbuffer) -GL_ENTRY(GLboolean, glIsShader, GLuint shader) -GL_ENTRY(GLboolean, glIsTexture, GLuint texture) -GL_ENTRY(void, glLineWidth, GLfloat width) -GL_ENTRY(void, glLinkProgram, GLuint program) -GL_ENTRY(void, glPixelStorei, GLenum pname, GLint param) -GL_ENTRY(void, glPolygonOffset, GLfloat factor, GLfloat units) -GL_ENTRY(void, glReadPixels, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels) -GL_ENTRY(void, glReleaseShaderCompiler, void) -GL_ENTRY(void, glRenderbufferStorage, GLenum target, GLenum internalformat, GLsizei width, GLsizei height) -GL_ENTRY(void, glSampleCoverage, GLclampf value, GLboolean invert) -GL_ENTRY(void, glScissor, GLint x, GLint y, GLsizei width, GLsizei height) -GL_ENTRY(void, glShaderBinary, GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length) -GL_ENTRY(void, glShaderSource, GLuint shader, GLsizei count, const char** string, const GLint* length) -GL_ENTRY(void, glStencilFunc, GLenum func, GLint ref, GLuint mask) -GL_ENTRY(void, glStencilFuncSeparate, GLenum face, GLenum func, GLint ref, GLuint mask) -GL_ENTRY(void, glStencilMask, GLuint mask) -GL_ENTRY(void, glStencilMaskSeparate, GLenum face, GLuint mask) -GL_ENTRY(void, glStencilOp, GLenum fail, GLenum zfail, GLenum zpass) -GL_ENTRY(void, glStencilOpSeparate, GLenum face, GLenum fail, GLenum zfail, GLenum zpass) -GL_ENTRY(void, glTexImage2D, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels) -GL_ENTRY(void, glTexParameterf, GLenum target, GLenum pname, GLfloat param) -GL_ENTRY(void, glTexParameterfv, GLenum target, GLenum pname, const GLfloat* params) -GL_ENTRY(void, glTexParameteri, GLenum target, GLenum pname, GLint param) -GL_ENTRY(void, glTexParameteriv, GLenum target, GLenum pname, const GLint* params) -GL_ENTRY(void, glTexSubImage2D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels) -GL_ENTRY(void, glUniform1f, GLint location, GLfloat x) -GL_ENTRY(void, glUniform1fv, GLint location, GLsizei count, const GLfloat* v) -GL_ENTRY(void, glUniform1i, GLint location, GLint x) -GL_ENTRY(void, glUniform1iv, GLint location, GLsizei count, const GLint* v) -GL_ENTRY(void, glUniform2f, GLint location, GLfloat x, GLfloat y) -GL_ENTRY(void, glUniform2fv, GLint location, GLsizei count, const GLfloat* v) -GL_ENTRY(void, glUniform2i, GLint location, GLint x, GLint y) -GL_ENTRY(void, glUniform2iv, GLint location, GLsizei count, const GLint* v) -GL_ENTRY(void, glUniform3f, GLint location, GLfloat x, GLfloat y, GLfloat z) -GL_ENTRY(void, glUniform3fv, GLint location, GLsizei count, const GLfloat* v) -GL_ENTRY(void, glUniform3i, GLint location, GLint x, GLint y, GLint z) -GL_ENTRY(void, glUniform3iv, GLint location, GLsizei count, const GLint* v) -GL_ENTRY(void, glUniform4f, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -GL_ENTRY(void, glUniform4fv, GLint location, GLsizei count, const GLfloat* v) -GL_ENTRY(void, glUniform4i, GLint location, GLint x, GLint y, GLint z, GLint w) -GL_ENTRY(void, glUniform4iv, GLint location, GLsizei count, const GLint* v) -GL_ENTRY(void, glUniformMatrix2fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) -GL_ENTRY(void, glUniformMatrix3fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) -GL_ENTRY(void, glUniformMatrix4fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) -GL_ENTRY(void, glUseProgram, GLuint program) -GL_ENTRY(void, glValidateProgram, GLuint program) -GL_ENTRY(void, glVertexAttrib1f, GLuint indx, GLfloat x) -GL_ENTRY(void, glVertexAttrib1fv, GLuint indx, const GLfloat* values) -GL_ENTRY(void, glVertexAttrib2f, GLuint indx, GLfloat x, GLfloat y) -GL_ENTRY(void, glVertexAttrib2fv, GLuint indx, const GLfloat* values) -GL_ENTRY(void, glVertexAttrib3f, GLuint indx, GLfloat x, GLfloat y, GLfloat z) -GL_ENTRY(void, glVertexAttrib3fv, GLuint indx, const GLfloat* values) -GL_ENTRY(void, glVertexAttrib4f, GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -GL_ENTRY(void, glVertexAttrib4fv, GLuint indx, const GLfloat* values) -GL_ENTRY(void, glVertexAttribPointer, GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr) -GL_ENTRY(void, glViewport, GLint x, GLint y, GLsizei width, GLsizei height) diff --git a/opengl/libs/GLES2/gl2ext_entries.in b/opengl/libs/GLES2/gl2ext_entries.in deleted file mode 100644 index e608f5d33668..000000000000 --- a/opengl/libs/GLES2/gl2ext_entries.in +++ /dev/null @@ -1,35 +0,0 @@ -GL_ENTRY(void, glEGLImageTargetTexture2DOES, GLenum target, GLeglImageOES image) -GL_ENTRY(void, glEGLImageTargetRenderbufferStorageOES, GLenum target, GLeglImageOES image) -GL_ENTRY(void, glGetProgramBinaryOES, GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary) -GL_ENTRY(void, glProgramBinaryOES, GLuint program, GLenum binaryFormat, const void *binary, GLint length) -GL_ENTRY(void*, glMapBufferOES, GLenum target, GLenum access) -GL_ENTRY(GLboolean, glUnmapBufferOES, GLenum target) -GL_ENTRY(void, glGetBufferPointervOES, GLenum target, GLenum pname, void** params) -GL_ENTRY(void, glTexImage3DOES, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void* pixels) -GL_ENTRY(void, glTexSubImage3DOES, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void* pixels) -GL_ENTRY(void, glCopyTexSubImage3DOES, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) -GL_ENTRY(void, glCompressedTexImage3DOES, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* data) -GL_ENTRY(void, glCompressedTexSubImage3DOES, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data) -GL_ENTRY(void, glFramebufferTexture3DOES, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) -GL_ENTRY(void, glGetPerfMonitorGroupsAMD, GLint *numGroups, GLsizei groupsSize, GLuint *groups) -GL_ENTRY(void, glGetPerfMonitorCountersAMD, GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters) -GL_ENTRY(void, glGetPerfMonitorGroupStringAMD, GLuint group, GLsizei bufSize, GLsizei *length, char *groupString) -GL_ENTRY(void, glGetPerfMonitorCounterStringAMD, GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, char *counterString) -GL_ENTRY(void, glGetPerfMonitorCounterInfoAMD, GLuint group, GLuint counter, GLenum pname, void *data) -GL_ENTRY(void, glGenPerfMonitorsAMD, GLsizei n, GLuint *monitors) -GL_ENTRY(void, glDeletePerfMonitorsAMD, GLsizei n, GLuint *monitors) -GL_ENTRY(void, glSelectPerfMonitorCountersAMD, GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList) -GL_ENTRY(void, glBeginPerfMonitorAMD, GLuint monitor) -GL_ENTRY(void, glEndPerfMonitorAMD, GLuint monitor) -GL_ENTRY(void, glGetPerfMonitorCounterDataAMD, GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten) -GL_ENTRY(void, glDeleteFencesNV, GLsizei n, const GLuint *fences) -GL_ENTRY(void, glGenFencesNV, GLsizei n, GLuint *fences) -GL_ENTRY(GLboolean, glIsFenceNV, GLuint fence) -GL_ENTRY(GLboolean, glTestFenceNV, GLuint fence) -GL_ENTRY(void, glGetFenceivNV, GLuint fence, GLenum pname, GLint *params) -GL_ENTRY(void, glFinishFenceNV, GLuint fence) -GL_ENTRY(void, glSetFenceNV, GLuint fence, GLenum condition) -GL_ENTRY(void, glGetDriverControlsQCOM, GLint *num, GLsizei size, GLuint *driverControls) -GL_ENTRY(void, glGetDriverControlStringQCOM, GLuint driverControl, GLsizei bufSize, GLsizei *length, char *driverControlString) -GL_ENTRY(void, glEnableDriverControlQCOM, GLuint driverControl) -GL_ENTRY(void, glDisableDriverControlQCOM, GLuint driverControl) diff --git a/opengl/libs/GLES_CM/gl.cpp b/opengl/libs/GLES_CM/gl.cpp index 1e4c13668756..0c9352ec7544 100644 --- a/opengl/libs/GLES_CM/gl.cpp +++ b/opengl/libs/GLES_CM/gl.cpp @@ -76,12 +76,20 @@ void glVertexPointerBounds(GLint size, GLenum type, #if USE_FAST_TLS_KEY && !CHECK_FOR_GL_ERRORS + #ifdef HAVE_ARM_TLS_REGISTER + #define GET_TLS(reg) \ + "mrc p15, 0, " #reg ", c13, c0, 3 \n" + #else + #define GET_TLS(reg) \ + "mov " #reg ", #0xFFFF0FFF \n" \ + "ldr " #reg ", [" #reg ", #-15] \n" + #endif + #define API_ENTRY(_api) __attribute__((naked)) _api #define CALL_GL_API(_api, ...) \ asm volatile( \ - "mov r12, #0xFFFF0FFF \n" \ - "ldr r12, [r12, #-15] \n" \ + GET_TLS(r12) \ "ldr r12, [r12, %[tls]] \n" \ "cmp r12, #0 \n" \ "ldrne pc, [r12, %[api]] \n" \ @@ -91,7 +99,7 @@ void glVertexPointerBounds(GLint size, GLenum type, [api] "J"(__builtin_offsetof(gl_hooks_t, gl._api)) \ : \ ); - + #define CALL_GL_API_RETURN(_api, ...) \ CALL_GL_API(_api, __VA_ARGS__) \ return 0; // placate gcc's warnings. never reached. diff --git a/opengl/libs/GLES_CM/gl_entries.in b/opengl/libs/GLES_CM/gl_entries.in deleted file mode 100644 index d7cc5da86bff..000000000000 --- a/opengl/libs/GLES_CM/gl_entries.in +++ /dev/null @@ -1,145 +0,0 @@ -GL_ENTRY(void, glAlphaFunc, GLenum func, GLclampf ref) -GL_ENTRY(void, glClearColor, GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) -GL_ENTRY(void, glClearDepthf, GLclampf depth) -GL_ENTRY(void, glClipPlanef, GLenum plane, const GLfloat *equation) -GL_ENTRY(void, glColor4f, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) -GL_ENTRY(void, glDepthRangef, GLclampf zNear, GLclampf zFar) -GL_ENTRY(void, glFogf, GLenum pname, GLfloat param) -GL_ENTRY(void, glFogfv, GLenum pname, const GLfloat *params) -GL_ENTRY(void, glFrustumf, GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) -GL_ENTRY(void, glGetClipPlanef, GLenum pname, GLfloat eqn[4]) -GL_ENTRY(void, glGetFloatv, GLenum pname, GLfloat *params) -GL_ENTRY(void, glGetLightfv, GLenum light, GLenum pname, GLfloat *params) -GL_ENTRY(void, glGetMaterialfv, GLenum face, GLenum pname, GLfloat *params) -GL_ENTRY(void, glGetTexEnvfv, GLenum env, GLenum pname, GLfloat *params) -GL_ENTRY(void, glGetTexParameterfv, GLenum target, GLenum pname, GLfloat *params) -GL_ENTRY(void, glLightModelf, GLenum pname, GLfloat param) -GL_ENTRY(void, glLightModelfv, GLenum pname, const GLfloat *params) -GL_ENTRY(void, glLightf, GLenum light, GLenum pname, GLfloat param) -GL_ENTRY(void, glLightfv, GLenum light, GLenum pname, const GLfloat *params) -GL_ENTRY(void, glLineWidth, GLfloat width) -GL_ENTRY(void, glLoadMatrixf, const GLfloat *m) -GL_ENTRY(void, glMaterialf, GLenum face, GLenum pname, GLfloat param) -GL_ENTRY(void, glMaterialfv, GLenum face, GLenum pname, const GLfloat *params) -GL_ENTRY(void, glMultMatrixf, const GLfloat *m) -GL_ENTRY(void, glMultiTexCoord4f, GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) -GL_ENTRY(void, glNormal3f, GLfloat nx, GLfloat ny, GLfloat nz) -GL_ENTRY(void, glOrthof, GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) -GL_ENTRY(void, glPointParameterf, GLenum pname, GLfloat param) -GL_ENTRY(void, glPointParameterfv, GLenum pname, const GLfloat *params) -GL_ENTRY(void, glPointSize, GLfloat size) -GL_ENTRY(void, glPolygonOffset, GLfloat factor, GLfloat units) -GL_ENTRY(void, glRotatef, GLfloat angle, GLfloat x, GLfloat y, GLfloat z) -GL_ENTRY(void, glScalef, GLfloat x, GLfloat y, GLfloat z) -GL_ENTRY(void, glTexEnvf, GLenum target, GLenum pname, GLfloat param) -GL_ENTRY(void, glTexEnvfv, GLenum target, GLenum pname, const GLfloat *params) -GL_ENTRY(void, glTexParameterf, GLenum target, GLenum pname, GLfloat param) -GL_ENTRY(void, glTexParameterfv, GLenum target, GLenum pname, const GLfloat *params) -GL_ENTRY(void, glTranslatef, GLfloat x, GLfloat y, GLfloat z) -GL_ENTRY(void, glActiveTexture, GLenum texture) -GL_ENTRY(void, glAlphaFuncx, GLenum func, GLclampx ref) -GL_ENTRY(void, glBindBuffer, GLenum target, GLuint buffer) -GL_ENTRY(void, glBindTexture, GLenum target, GLuint texture) -GL_ENTRY(void, glBlendFunc, GLenum sfactor, GLenum dfactor) -GL_ENTRY(void, glBufferData, GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage) -GL_ENTRY(void, glBufferSubData, GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data) -GL_ENTRY(void, glClear, GLbitfield mask) -GL_ENTRY(void, glClearColorx, GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha) -GL_ENTRY(void, glClearDepthx, GLclampx depth) -GL_ENTRY(void, glClearStencil, GLint s) -GL_ENTRY(void, glClientActiveTexture, GLenum texture) -GL_ENTRY(void, glClipPlanex, GLenum plane, const GLfixed *equation) -GL_ENTRY(void, glColor4ub, GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha) -GL_ENTRY(void, glColor4x, GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) -GL_ENTRY(void, glColorMask, GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) -GL_ENTRY(void, glColorPointer, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) -GL_ENTRY(void, glCompressedTexImage2D, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data) -GL_ENTRY(void, glCompressedTexSubImage2D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data) -GL_ENTRY(void, glCopyTexImage2D, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) -GL_ENTRY(void, glCopyTexSubImage2D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) -GL_ENTRY(void, glCullFace, GLenum mode) -GL_ENTRY(void, glDeleteBuffers, GLsizei n, const GLuint *buffers) -GL_ENTRY(void, glDeleteTextures, GLsizei n, const GLuint *textures) -GL_ENTRY(void, glDepthFunc, GLenum func) -GL_ENTRY(void, glDepthMask, GLboolean flag) -GL_ENTRY(void, glDepthRangex, GLclampx zNear, GLclampx zFar) -GL_ENTRY(void, glDisable, GLenum cap) -GL_ENTRY(void, glDisableClientState, GLenum array) -GL_ENTRY(void, glDrawArrays, GLenum mode, GLint first, GLsizei count) -GL_ENTRY(void, glDrawElements, GLenum mode, GLsizei count, GLenum type, const GLvoid *indices) -GL_ENTRY(void, glEnable, GLenum cap) -GL_ENTRY(void, glEnableClientState, GLenum array) -GL_ENTRY(void, glFinish, void) -GL_ENTRY(void, glFlush, void) -GL_ENTRY(void, glFogx, GLenum pname, GLfixed param) -GL_ENTRY(void, glFogxv, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glFrontFace, GLenum mode) -GL_ENTRY(void, glFrustumx, GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) -GL_ENTRY(void, glGetBooleanv, GLenum pname, GLboolean *params) -GL_ENTRY(void, glGetBufferParameteriv, GLenum target, GLenum pname, GLint *params) -GL_ENTRY(void, glGetClipPlanex, GLenum pname, GLfixed eqn[4]) -GL_ENTRY(void, glGenBuffers, GLsizei n, GLuint *buffers) -GL_ENTRY(void, glGenTextures, GLsizei n, GLuint *textures) -GL_ENTRY(GLenum, glGetError, void) -GL_ENTRY(void, glGetFixedv, GLenum pname, GLfixed *params) -GL_ENTRY(void, glGetIntegerv, GLenum pname, GLint *params) -GL_ENTRY(void, glGetLightxv, GLenum light, GLenum pname, GLfixed *params) -GL_ENTRY(void, glGetMaterialxv, GLenum face, GLenum pname, GLfixed *params) -GL_ENTRY(void, glGetPointerv, GLenum pname, void **params) -GL_ENTRY(const GLubyte *, glGetString, GLenum name) -GL_ENTRY(void, glGetTexEnviv, GLenum env, GLenum pname, GLint *params) -GL_ENTRY(void, glGetTexEnvxv, GLenum env, GLenum pname, GLfixed *params) -GL_ENTRY(void, glGetTexParameteriv, GLenum target, GLenum pname, GLint *params) -GL_ENTRY(void, glGetTexParameterxv, GLenum target, GLenum pname, GLfixed *params) -GL_ENTRY(void, glHint, GLenum target, GLenum mode) -GL_ENTRY(GLboolean, glIsBuffer, GLuint buffer) -GL_ENTRY(GLboolean, glIsEnabled, GLenum cap) -GL_ENTRY(GLboolean, glIsTexture, GLuint texture) -GL_ENTRY(void, glLightModelx, GLenum pname, GLfixed param) -GL_ENTRY(void, glLightModelxv, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glLightx, GLenum light, GLenum pname, GLfixed param) -GL_ENTRY(void, glLightxv, GLenum light, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glLineWidthx, GLfixed width) -GL_ENTRY(void, glLoadIdentity, void) -GL_ENTRY(void, glLoadMatrixx, const GLfixed *m) -GL_ENTRY(void, glLogicOp, GLenum opcode) -GL_ENTRY(void, glMaterialx, GLenum face, GLenum pname, GLfixed param) -GL_ENTRY(void, glMaterialxv, GLenum face, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glMatrixMode, GLenum mode) -GL_ENTRY(void, glMultMatrixx, const GLfixed *m) -GL_ENTRY(void, glMultiTexCoord4x, GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q) -GL_ENTRY(void, glNormal3x, GLfixed nx, GLfixed ny, GLfixed nz) -GL_ENTRY(void, glNormalPointer, GLenum type, GLsizei stride, const GLvoid *pointer) -GL_ENTRY(void, glOrthox, GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) -GL_ENTRY(void, glPixelStorei, GLenum pname, GLint param) -GL_ENTRY(void, glPointParameterx, GLenum pname, GLfixed param) -GL_ENTRY(void, glPointParameterxv, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glPointSizex, GLfixed size) -GL_ENTRY(void, glPolygonOffsetx, GLfixed factor, GLfixed units) -GL_ENTRY(void, glPopMatrix, void) -GL_ENTRY(void, glPushMatrix, void) -GL_ENTRY(void, glReadPixels, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels) -GL_ENTRY(void, glRotatex, GLfixed angle, GLfixed x, GLfixed y, GLfixed z) -GL_ENTRY(void, glSampleCoverage, GLclampf value, GLboolean invert) -GL_ENTRY(void, glSampleCoveragex, GLclampx value, GLboolean invert) -GL_ENTRY(void, glScalex, GLfixed x, GLfixed y, GLfixed z) -GL_ENTRY(void, glScissor, GLint x, GLint y, GLsizei width, GLsizei height) -GL_ENTRY(void, glShadeModel, GLenum mode) -GL_ENTRY(void, glStencilFunc, GLenum func, GLint ref, GLuint mask) -GL_ENTRY(void, glStencilMask, GLuint mask) -GL_ENTRY(void, glStencilOp, GLenum fail, GLenum zfail, GLenum zpass) -GL_ENTRY(void, glTexCoordPointer, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) -GL_ENTRY(void, glTexEnvi, GLenum target, GLenum pname, GLint param) -GL_ENTRY(void, glTexEnvx, GLenum target, GLenum pname, GLfixed param) -GL_ENTRY(void, glTexEnviv, GLenum target, GLenum pname, const GLint *params) -GL_ENTRY(void, glTexEnvxv, GLenum target, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glTexImage2D, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels) -GL_ENTRY(void, glTexParameteri, GLenum target, GLenum pname, GLint param) -GL_ENTRY(void, glTexParameterx, GLenum target, GLenum pname, GLfixed param) -GL_ENTRY(void, glTexParameteriv, GLenum target, GLenum pname, const GLint *params) -GL_ENTRY(void, glTexParameterxv, GLenum target, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glTexSubImage2D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels) -GL_ENTRY(void, glTranslatex, GLfixed x, GLfixed y, GLfixed z) -GL_ENTRY(void, glVertexPointer, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) -GL_ENTRY(void, glViewport, GLint x, GLint y, GLsizei width, GLsizei height) -GL_ENTRY(void, glPointSizePointerOES, GLenum type, GLsizei stride, const GLvoid *pointer) diff --git a/opengl/libs/GLES_CM/glext_entries.in b/opengl/libs/GLES_CM/glext_entries.in deleted file mode 100644 index dd09c71db54b..000000000000 --- a/opengl/libs/GLES_CM/glext_entries.in +++ /dev/null @@ -1,90 +0,0 @@ -GL_ENTRY(void, glBlendEquationSeparateOES, GLenum modeRGB, GLenum modeAlpha) -GL_ENTRY(void, glBlendFuncSeparateOES, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) -GL_ENTRY(void, glBlendEquationOES, GLenum mode) -GL_ENTRY(void, glDrawTexsOES, GLshort x, GLshort y, GLshort z, GLshort width, GLshort height) -GL_ENTRY(void, glDrawTexiOES, GLint x, GLint y, GLint z, GLint width, GLint height) -GL_ENTRY(void, glDrawTexxOES, GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height) -GL_ENTRY(void, glDrawTexsvOES, const GLshort *coords) -GL_ENTRY(void, glDrawTexivOES, const GLint *coords) -GL_ENTRY(void, glDrawTexxvOES, const GLfixed *coords) -GL_ENTRY(void, glDrawTexfOES, GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height) -GL_ENTRY(void, glDrawTexfvOES, const GLfloat *coords) -GL_ENTRY(void, glEGLImageTargetTexture2DOES, GLenum target, GLeglImageOES image) -GL_ENTRY(void, glEGLImageTargetRenderbufferStorageOES, GLenum target, GLeglImageOES image) -GL_ENTRY(void, glAlphaFuncxOES, GLenum func, GLclampx ref) -GL_ENTRY(void, glClearColorxOES, GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha) -GL_ENTRY(void, glClearDepthxOES, GLclampx depth) -GL_ENTRY(void, glClipPlanexOES, GLenum plane, const GLfixed *equation) -GL_ENTRY(void, glColor4xOES, GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) -GL_ENTRY(void, glDepthRangexOES, GLclampx zNear, GLclampx zFar) -GL_ENTRY(void, glFogxOES, GLenum pname, GLfixed param) -GL_ENTRY(void, glFogxvOES, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glFrustumxOES, GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) -GL_ENTRY(void, glGetClipPlanexOES, GLenum pname, GLfixed eqn[4]) -GL_ENTRY(void, glGetFixedvOES, GLenum pname, GLfixed *params) -GL_ENTRY(void, glGetLightxvOES, GLenum light, GLenum pname, GLfixed *params) -GL_ENTRY(void, glGetMaterialxvOES, GLenum face, GLenum pname, GLfixed *params) -GL_ENTRY(void, glGetTexEnvxvOES, GLenum env, GLenum pname, GLfixed *params) -GL_ENTRY(void, glGetTexParameterxvOES, GLenum target, GLenum pname, GLfixed *params) -GL_ENTRY(void, glLightModelxOES, GLenum pname, GLfixed param) -GL_ENTRY(void, glLightModelxvOES, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glLightxOES, GLenum light, GLenum pname, GLfixed param) -GL_ENTRY(void, glLightxvOES, GLenum light, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glLineWidthxOES, GLfixed width) -GL_ENTRY(void, glLoadMatrixxOES, const GLfixed *m) -GL_ENTRY(void, glMaterialxOES, GLenum face, GLenum pname, GLfixed param) -GL_ENTRY(void, glMaterialxvOES, GLenum face, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glMultMatrixxOES, const GLfixed *m) -GL_ENTRY(void, glMultiTexCoord4xOES, GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q) -GL_ENTRY(void, glNormal3xOES, GLfixed nx, GLfixed ny, GLfixed nz) -GL_ENTRY(void, glOrthoxOES, GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) -GL_ENTRY(void, glPointParameterxOES, GLenum pname, GLfixed param) -GL_ENTRY(void, glPointParameterxvOES, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glPointSizexOES, GLfixed size) -GL_ENTRY(void, glPolygonOffsetxOES, GLfixed factor, GLfixed units) -GL_ENTRY(void, glRotatexOES, GLfixed angle, GLfixed x, GLfixed y, GLfixed z) -GL_ENTRY(void, glSampleCoveragexOES, GLclampx value, GLboolean invert) -GL_ENTRY(void, glScalexOES, GLfixed x, GLfixed y, GLfixed z) -GL_ENTRY(void, glTexEnvxOES, GLenum target, GLenum pname, GLfixed param) -GL_ENTRY(void, glTexEnvxvOES, GLenum target, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glTexParameterxOES, GLenum target, GLenum pname, GLfixed param) -GL_ENTRY(void, glTexParameterxvOES, GLenum target, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glTranslatexOES, GLfixed x, GLfixed y, GLfixed z) -GL_ENTRY(GLboolean, glIsRenderbufferOES, GLuint renderbuffer) -GL_ENTRY(void, glBindRenderbufferOES, GLenum target, GLuint renderbuffer) -GL_ENTRY(void, glDeleteRenderbuffersOES, GLsizei n, const GLuint* renderbuffers) -GL_ENTRY(void, glGenRenderbuffersOES, GLsizei n, GLuint* renderbuffers) -GL_ENTRY(void, glRenderbufferStorageOES, GLenum target, GLenum internalformat, GLsizei width, GLsizei height) -GL_ENTRY(void, glGetRenderbufferParameterivOES, GLenum target, GLenum pname, GLint* params) -GL_ENTRY(GLboolean, glIsFramebufferOES, GLuint framebuffer) -GL_ENTRY(void, glBindFramebufferOES, GLenum target, GLuint framebuffer) -GL_ENTRY(void, glDeleteFramebuffersOES, GLsizei n, const GLuint* framebuffers) -GL_ENTRY(void, glGenFramebuffersOES, GLsizei n, GLuint* framebuffers) -GL_ENTRY(GLenum, glCheckFramebufferStatusOES, GLenum target) -GL_ENTRY(void, glFramebufferRenderbufferOES, GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) -GL_ENTRY(void, glFramebufferTexture2DOES, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) -GL_ENTRY(void, glGetFramebufferAttachmentParameterivOES, GLenum target, GLenum attachment, GLenum pname, GLint* params) -GL_ENTRY(void, glGenerateMipmapOES, GLenum target) -GL_ENTRY(void*, glMapBufferOES, GLenum target, GLenum access) -GL_ENTRY(GLboolean, glUnmapBufferOES, GLenum target) -GL_ENTRY(void, glGetBufferPointervOES, GLenum target, GLenum pname, void** params) -GL_ENTRY(void, glCurrentPaletteMatrixOES, GLuint matrixpaletteindex) -GL_ENTRY(void, glLoadPaletteFromModelViewMatrixOES, void) -GL_ENTRY(void, glMatrixIndexPointerOES, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) -GL_ENTRY(void, glWeightPointerOES, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) -GL_ENTRY(GLbitfield, glQueryMatrixxOES, GLfixed mantissa[16], GLint exponent[16]) -GL_ENTRY(void, glDepthRangefOES, GLclampf zNear, GLclampf zFar) -GL_ENTRY(void, glFrustumfOES, GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) -GL_ENTRY(void, glOrthofOES, GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) -GL_ENTRY(void, glClipPlanefOES, GLenum plane, const GLfloat *equation) -GL_ENTRY(void, glGetClipPlanefOES, GLenum pname, GLfloat eqn[4]) -GL_ENTRY(void, glClearDepthfOES, GLclampf depth) -GL_ENTRY(void, glTexGenfOES, GLenum coord, GLenum pname, GLfloat param) -GL_ENTRY(void, glTexGenfvOES, GLenum coord, GLenum pname, const GLfloat *params) -GL_ENTRY(void, glTexGeniOES, GLenum coord, GLenum pname, GLint param) -GL_ENTRY(void, glTexGenivOES, GLenum coord, GLenum pname, const GLint *params) -GL_ENTRY(void, glTexGenxOES, GLenum coord, GLenum pname, GLfixed param) -GL_ENTRY(void, glTexGenxvOES, GLenum coord, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glGetTexGenfvOES, GLenum coord, GLenum pname, GLfloat *params) -GL_ENTRY(void, glGetTexGenivOES, GLenum coord, GLenum pname, GLint *params) -GL_ENTRY(void, glGetTexGenxvOES, GLenum coord, GLenum pname, GLfixed *params) diff --git a/opengl/libs/egl_impl.h b/opengl/libs/egl_impl.h index ac286cb21d49..1fba209f7707 100644 --- a/opengl/libs/egl_impl.h +++ b/opengl/libs/egl_impl.h @@ -23,18 +23,19 @@ #include <EGL/eglext.h> #include <EGL/eglplatform.h> +#include "hooks.h" + // ---------------------------------------------------------------------------- namespace android { // ---------------------------------------------------------------------------- -struct gl_hooks_t; - struct egl_connection_t { void * dso; - gl_hooks_t * hooks; + gl_hooks_t * hooks[2]; EGLint major; EGLint minor; + egl_t egl; }; EGLAPI EGLImageKHR egl_get_image_for_current_context(EGLImageKHR image); diff --git a/opengl/libs/entries.in b/opengl/libs/entries.in new file mode 100644 index 000000000000..bbe3e236b2d6 --- /dev/null +++ b/opengl/libs/entries.in @@ -0,0 +1,349 @@ +GL_ENTRY(void, glActiveTexture, GLenum texture) +GL_ENTRY(void, glAlphaFunc, GLenum func, GLclampf ref) +GL_ENTRY(void, glAlphaFuncx, GLenum func, GLclampx ref) +GL_ENTRY(void, glAlphaFuncxOES, GLenum func, GLclampx ref) +GL_ENTRY(void, glAttachShader, GLuint program, GLuint shader) +GL_ENTRY(void, glBeginPerfMonitorAMD, GLuint monitor) +GL_ENTRY(void, glBindAttribLocation, GLuint program, GLuint index, const char* name) +GL_ENTRY(void, glBindBuffer, GLenum target, GLuint buffer) +GL_ENTRY(void, glBindFramebuffer, GLenum target, GLuint framebuffer) +GL_ENTRY(void, glBindFramebufferOES, GLenum target, GLuint framebuffer) +GL_ENTRY(void, glBindRenderbuffer, GLenum target, GLuint renderbuffer) +GL_ENTRY(void, glBindRenderbufferOES, GLenum target, GLuint renderbuffer) +GL_ENTRY(void, glBindTexture, GLenum target, GLuint texture) +GL_ENTRY(void, glBlendColor, GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) +GL_ENTRY(void, glBlendEquation, GLenum mode ) +GL_ENTRY(void, glBlendEquationOES, GLenum mode) +GL_ENTRY(void, glBlendEquationSeparate, GLenum modeRGB, GLenum modeAlpha) +GL_ENTRY(void, glBlendEquationSeparateOES, GLenum modeRGB, GLenum modeAlpha) +GL_ENTRY(void, glBlendFunc, GLenum sfactor, GLenum dfactor) +GL_ENTRY(void, glBlendFuncSeparate, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) +GL_ENTRY(void, glBlendFuncSeparateOES, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) +GL_ENTRY(void, glBufferData, GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage) +GL_ENTRY(void, glBufferSubData, GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data) +GL_ENTRY(GLenum, glCheckFramebufferStatus, GLenum target) +GL_ENTRY(GLenum, glCheckFramebufferStatusOES, GLenum target) +GL_ENTRY(void, glClear, GLbitfield mask) +GL_ENTRY(void, glClearColor, GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) +GL_ENTRY(void, glClearColorx, GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha) +GL_ENTRY(void, glClearColorxOES, GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha) +GL_ENTRY(void, glClearDepthf, GLclampf depth) +GL_ENTRY(void, glClearDepthfOES, GLclampf depth) +GL_ENTRY(void, glClearDepthx, GLclampx depth) +GL_ENTRY(void, glClearDepthxOES, GLclampx depth) +GL_ENTRY(void, glClearStencil, GLint s) +GL_ENTRY(void, glClientActiveTexture, GLenum texture) +GL_ENTRY(void, glClipPlanef, GLenum plane, const GLfloat *equation) +GL_ENTRY(void, glClipPlanefOES, GLenum plane, const GLfloat *equation) +GL_ENTRY(void, glClipPlanex, GLenum plane, const GLfixed *equation) +GL_ENTRY(void, glClipPlanexOES, GLenum plane, const GLfixed *equation) +GL_ENTRY(void, glColor4f, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) +GL_ENTRY(void, glColor4ub, GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha) +GL_ENTRY(void, glColor4x, GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) +GL_ENTRY(void, glColor4xOES, GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) +GL_ENTRY(void, glColorMask, GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) +GL_ENTRY(void, glColorPointer, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) +GL_ENTRY(void, glCompileShader, GLuint shader) +GL_ENTRY(void, glCompressedTexImage2D, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data) +GL_ENTRY(void, glCompressedTexImage3DOES, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* data) +GL_ENTRY(void, glCompressedTexSubImage2D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data) +GL_ENTRY(void, glCompressedTexSubImage3DOES, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data) +GL_ENTRY(void, glCopyTexImage2D, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) +GL_ENTRY(void, glCopyTexSubImage2D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) +GL_ENTRY(void, glCopyTexSubImage3DOES, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) +GL_ENTRY(GLuint, glCreateProgram, void) +GL_ENTRY(GLuint, glCreateShader, GLenum type) +GL_ENTRY(void, glCullFace, GLenum mode) +GL_ENTRY(void, glCurrentPaletteMatrixOES, GLuint matrixpaletteindex) +GL_ENTRY(void, glDeleteBuffers, GLsizei n, const GLuint *buffers) +GL_ENTRY(void, glDeleteFencesNV, GLsizei n, const GLuint *fences) +GL_ENTRY(void, glDeleteFramebuffers, GLsizei n, const GLuint* framebuffers) +GL_ENTRY(void, glDeleteFramebuffersOES, GLsizei n, const GLuint* framebuffers) +GL_ENTRY(void, glDeletePerfMonitorsAMD, GLsizei n, GLuint *monitors) +GL_ENTRY(void, glDeleteProgram, GLuint program) +GL_ENTRY(void, glDeleteRenderbuffers, GLsizei n, const GLuint* renderbuffers) +GL_ENTRY(void, glDeleteRenderbuffersOES, GLsizei n, const GLuint* renderbuffers) +GL_ENTRY(void, glDeleteShader, GLuint shader) +GL_ENTRY(void, glDeleteTextures, GLsizei n, const GLuint *textures) +GL_ENTRY(void, glDepthFunc, GLenum func) +GL_ENTRY(void, glDepthMask, GLboolean flag) +GL_ENTRY(void, glDepthRangef, GLclampf zNear, GLclampf zFar) +GL_ENTRY(void, glDepthRangefOES, GLclampf zNear, GLclampf zFar) +GL_ENTRY(void, glDepthRangex, GLclampx zNear, GLclampx zFar) +GL_ENTRY(void, glDepthRangexOES, GLclampx zNear, GLclampx zFar) +GL_ENTRY(void, glDetachShader, GLuint program, GLuint shader) +GL_ENTRY(void, glDisable, GLenum cap) +GL_ENTRY(void, glDisableClientState, GLenum array) +GL_ENTRY(void, glDisableDriverControlQCOM, GLuint driverControl) +GL_ENTRY(void, glDisableVertexAttribArray, GLuint index) +GL_ENTRY(void, glDrawArrays, GLenum mode, GLint first, GLsizei count) +GL_ENTRY(void, glDrawElements, GLenum mode, GLsizei count, GLenum type, const GLvoid *indices) +GL_ENTRY(void, glDrawTexfOES, GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height) +GL_ENTRY(void, glDrawTexfvOES, const GLfloat *coords) +GL_ENTRY(void, glDrawTexiOES, GLint x, GLint y, GLint z, GLint width, GLint height) +GL_ENTRY(void, glDrawTexivOES, const GLint *coords) +GL_ENTRY(void, glDrawTexsOES, GLshort x, GLshort y, GLshort z, GLshort width, GLshort height) +GL_ENTRY(void, glDrawTexsvOES, const GLshort *coords) +GL_ENTRY(void, glDrawTexxOES, GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height) +GL_ENTRY(void, glDrawTexxvOES, const GLfixed *coords) +GL_ENTRY(void, glEGLImageTargetRenderbufferStorageOES, GLenum target, GLeglImageOES image) +GL_ENTRY(void, glEGLImageTargetTexture2DOES, GLenum target, GLeglImageOES image) +GL_ENTRY(void, glEnable, GLenum cap) +GL_ENTRY(void, glEnableClientState, GLenum array) +GL_ENTRY(void, glEnableDriverControlQCOM, GLuint driverControl) +GL_ENTRY(void, glEnableVertexAttribArray, GLuint index) +GL_ENTRY(void, glEndPerfMonitorAMD, GLuint monitor) +GL_ENTRY(void, glFinish, void) +GL_ENTRY(void, glFinishFenceNV, GLuint fence) +GL_ENTRY(void, glFlush, void) +GL_ENTRY(void, glFogf, GLenum pname, GLfloat param) +GL_ENTRY(void, glFogfv, GLenum pname, const GLfloat *params) +GL_ENTRY(void, glFogx, GLenum pname, GLfixed param) +GL_ENTRY(void, glFogxOES, GLenum pname, GLfixed param) +GL_ENTRY(void, glFogxv, GLenum pname, const GLfixed *params) +GL_ENTRY(void, glFogxvOES, GLenum pname, const GLfixed *params) +GL_ENTRY(void, glFramebufferRenderbuffer, GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) +GL_ENTRY(void, glFramebufferRenderbufferOES, GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) +GL_ENTRY(void, glFramebufferTexture2D, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) +GL_ENTRY(void, glFramebufferTexture2DOES, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) +GL_ENTRY(void, glFramebufferTexture3DOES, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) +GL_ENTRY(void, glFrontFace, GLenum mode) +GL_ENTRY(void, glFrustumf, GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) +GL_ENTRY(void, glFrustumfOES, GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) +GL_ENTRY(void, glFrustumx, GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) +GL_ENTRY(void, glFrustumxOES, GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) +GL_ENTRY(void, glGenBuffers, GLsizei n, GLuint *buffers) +GL_ENTRY(void, glGenFencesNV, GLsizei n, GLuint *fences) +GL_ENTRY(void, glGenFramebuffers, GLsizei n, GLuint* framebuffers) +GL_ENTRY(void, glGenFramebuffersOES, GLsizei n, GLuint* framebuffers) +GL_ENTRY(void, glGenPerfMonitorsAMD, GLsizei n, GLuint *monitors) +GL_ENTRY(void, glGenRenderbuffers, GLsizei n, GLuint* renderbuffers) +GL_ENTRY(void, glGenRenderbuffersOES, GLsizei n, GLuint* renderbuffers) +GL_ENTRY(void, glGenTextures, GLsizei n, GLuint *textures) +GL_ENTRY(void, glGenerateMipmap, GLenum target) +GL_ENTRY(void, glGenerateMipmapOES, GLenum target) +GL_ENTRY(void, glGetActiveAttrib, GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name) +GL_ENTRY(void, glGetActiveUniform, GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name) +GL_ENTRY(void, glGetAttachedShaders, GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) +GL_ENTRY(int, glGetAttribLocation, GLuint program, const char* name) +GL_ENTRY(void, glGetBooleanv, GLenum pname, GLboolean *params) +GL_ENTRY(void, glGetBufferParameteriv, GLenum target, GLenum pname, GLint *params) +GL_ENTRY(void, glGetBufferPointervOES, GLenum target, GLenum pname, void** params) +GL_ENTRY(void, glGetClipPlanef, GLenum pname, GLfloat eqn[4]) +GL_ENTRY(void, glGetClipPlanefOES, GLenum pname, GLfloat eqn[4]) +GL_ENTRY(void, glGetClipPlanex, GLenum pname, GLfixed eqn[4]) +GL_ENTRY(void, glGetClipPlanexOES, GLenum pname, GLfixed eqn[4]) +GL_ENTRY(void, glGetDriverControlStringQCOM, GLuint driverControl, GLsizei bufSize, GLsizei *length, char *driverControlString) +GL_ENTRY(void, glGetDriverControlsQCOM, GLint *num, GLsizei size, GLuint *driverControls) +GL_ENTRY(GLenum, glGetError, void) +GL_ENTRY(void, glGetFenceivNV, GLuint fence, GLenum pname, GLint *params) +GL_ENTRY(void, glGetFixedv, GLenum pname, GLfixed *params) +GL_ENTRY(void, glGetFixedvOES, GLenum pname, GLfixed *params) +GL_ENTRY(void, glGetFloatv, GLenum pname, GLfloat *params) +GL_ENTRY(void, glGetFramebufferAttachmentParameteriv, GLenum target, GLenum attachment, GLenum pname, GLint* params) +GL_ENTRY(void, glGetFramebufferAttachmentParameterivOES, GLenum target, GLenum attachment, GLenum pname, GLint* params) +GL_ENTRY(void, glGetIntegerv, GLenum pname, GLint *params) +GL_ENTRY(void, glGetLightfv, GLenum light, GLenum pname, GLfloat *params) +GL_ENTRY(void, glGetLightxv, GLenum light, GLenum pname, GLfixed *params) +GL_ENTRY(void, glGetLightxvOES, GLenum light, GLenum pname, GLfixed *params) +GL_ENTRY(void, glGetMaterialfv, GLenum face, GLenum pname, GLfloat *params) +GL_ENTRY(void, glGetMaterialxv, GLenum face, GLenum pname, GLfixed *params) +GL_ENTRY(void, glGetMaterialxvOES, GLenum face, GLenum pname, GLfixed *params) +GL_ENTRY(void, glGetPerfMonitorCounterDataAMD, GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten) +GL_ENTRY(void, glGetPerfMonitorCounterInfoAMD, GLuint group, GLuint counter, GLenum pname, void *data) +GL_ENTRY(void, glGetPerfMonitorCounterStringAMD, GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, char *counterString) +GL_ENTRY(void, glGetPerfMonitorCountersAMD, GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters) +GL_ENTRY(void, glGetPerfMonitorGroupStringAMD, GLuint group, GLsizei bufSize, GLsizei *length, char *groupString) +GL_ENTRY(void, glGetPerfMonitorGroupsAMD, GLint *numGroups, GLsizei groupsSize, GLuint *groups) +GL_ENTRY(void, glGetPointerv, GLenum pname, void **params) +GL_ENTRY(void, glGetProgramBinaryOES, GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary) +GL_ENTRY(void, glGetProgramInfoLog, GLuint program, GLsizei bufsize, GLsizei* length, char* infolog) +GL_ENTRY(void, glGetProgramiv, GLuint program, GLenum pname, GLint* params) +GL_ENTRY(void, glGetRenderbufferParameteriv, GLenum target, GLenum pname, GLint* params) +GL_ENTRY(void, glGetRenderbufferParameterivOES, GLenum target, GLenum pname, GLint* params) +GL_ENTRY(void, glGetShaderInfoLog, GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog) +GL_ENTRY(void, glGetShaderPrecisionFormat, GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) +GL_ENTRY(void, glGetShaderSource, GLuint shader, GLsizei bufsize, GLsizei* length, char* source) +GL_ENTRY(void, glGetShaderiv, GLuint shader, GLenum pname, GLint* params) +GL_ENTRY(const GLubyte *, glGetString, GLenum name) +GL_ENTRY(void, glGetTexEnvfv, GLenum env, GLenum pname, GLfloat *params) +GL_ENTRY(void, glGetTexEnviv, GLenum env, GLenum pname, GLint *params) +GL_ENTRY(void, glGetTexEnvxv, GLenum env, GLenum pname, GLfixed *params) +GL_ENTRY(void, glGetTexEnvxvOES, GLenum env, GLenum pname, GLfixed *params) +GL_ENTRY(void, glGetTexGenfvOES, GLenum coord, GLenum pname, GLfloat *params) +GL_ENTRY(void, glGetTexGenivOES, GLenum coord, GLenum pname, GLint *params) +GL_ENTRY(void, glGetTexGenxvOES, GLenum coord, GLenum pname, GLfixed *params) +GL_ENTRY(void, glGetTexParameterfv, GLenum target, GLenum pname, GLfloat *params) +GL_ENTRY(void, glGetTexParameteriv, GLenum target, GLenum pname, GLint *params) +GL_ENTRY(void, glGetTexParameterxv, GLenum target, GLenum pname, GLfixed *params) +GL_ENTRY(void, glGetTexParameterxvOES, GLenum target, GLenum pname, GLfixed *params) +GL_ENTRY(int, glGetUniformLocation, GLuint program, const char* name) +GL_ENTRY(void, glGetUniformfv, GLuint program, GLint location, GLfloat* params) +GL_ENTRY(void, glGetUniformiv, GLuint program, GLint location, GLint* params) +GL_ENTRY(void, glGetVertexAttribPointerv, GLuint index, GLenum pname, void** pointer) +GL_ENTRY(void, glGetVertexAttribfv, GLuint index, GLenum pname, GLfloat* params) +GL_ENTRY(void, glGetVertexAttribiv, GLuint index, GLenum pname, GLint* params) +GL_ENTRY(void, glHint, GLenum target, GLenum mode) +GL_ENTRY(GLboolean, glIsBuffer, GLuint buffer) +GL_ENTRY(GLboolean, glIsEnabled, GLenum cap) +GL_ENTRY(GLboolean, glIsFenceNV, GLuint fence) +GL_ENTRY(GLboolean, glIsFramebuffer, GLuint framebuffer) +GL_ENTRY(GLboolean, glIsFramebufferOES, GLuint framebuffer) +GL_ENTRY(GLboolean, glIsProgram, GLuint program) +GL_ENTRY(GLboolean, glIsRenderbuffer, GLuint renderbuffer) +GL_ENTRY(GLboolean, glIsRenderbufferOES, GLuint renderbuffer) +GL_ENTRY(GLboolean, glIsShader, GLuint shader) +GL_ENTRY(GLboolean, glIsTexture, GLuint texture) +GL_ENTRY(void, glLightModelf, GLenum pname, GLfloat param) +GL_ENTRY(void, glLightModelfv, GLenum pname, const GLfloat *params) +GL_ENTRY(void, glLightModelx, GLenum pname, GLfixed param) +GL_ENTRY(void, glLightModelxOES, GLenum pname, GLfixed param) +GL_ENTRY(void, glLightModelxv, GLenum pname, const GLfixed *params) +GL_ENTRY(void, glLightModelxvOES, GLenum pname, const GLfixed *params) +GL_ENTRY(void, glLightf, GLenum light, GLenum pname, GLfloat param) +GL_ENTRY(void, glLightfv, GLenum light, GLenum pname, const GLfloat *params) +GL_ENTRY(void, glLightx, GLenum light, GLenum pname, GLfixed param) +GL_ENTRY(void, glLightxOES, GLenum light, GLenum pname, GLfixed param) +GL_ENTRY(void, glLightxv, GLenum light, GLenum pname, const GLfixed *params) +GL_ENTRY(void, glLightxvOES, GLenum light, GLenum pname, const GLfixed *params) +GL_ENTRY(void, glLineWidth, GLfloat width) +GL_ENTRY(void, glLineWidthx, GLfixed width) +GL_ENTRY(void, glLineWidthxOES, GLfixed width) +GL_ENTRY(void, glLinkProgram, GLuint program) +GL_ENTRY(void, glLoadIdentity, void) +GL_ENTRY(void, glLoadMatrixf, const GLfloat *m) +GL_ENTRY(void, glLoadMatrixx, const GLfixed *m) +GL_ENTRY(void, glLoadMatrixxOES, const GLfixed *m) +GL_ENTRY(void, glLoadPaletteFromModelViewMatrixOES, void) +GL_ENTRY(void, glLogicOp, GLenum opcode) +GL_ENTRY(void*, glMapBufferOES, GLenum target, GLenum access) +GL_ENTRY(void, glMaterialf, GLenum face, GLenum pname, GLfloat param) +GL_ENTRY(void, glMaterialfv, GLenum face, GLenum pname, const GLfloat *params) +GL_ENTRY(void, glMaterialx, GLenum face, GLenum pname, GLfixed param) +GL_ENTRY(void, glMaterialxOES, GLenum face, GLenum pname, GLfixed param) +GL_ENTRY(void, glMaterialxv, GLenum face, GLenum pname, const GLfixed *params) +GL_ENTRY(void, glMaterialxvOES, GLenum face, GLenum pname, const GLfixed *params) +GL_ENTRY(void, glMatrixIndexPointerOES, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) +GL_ENTRY(void, glMatrixMode, GLenum mode) +GL_ENTRY(void, glMultMatrixf, const GLfloat *m) +GL_ENTRY(void, glMultMatrixx, const GLfixed *m) +GL_ENTRY(void, glMultMatrixxOES, const GLfixed *m) +GL_ENTRY(void, glMultiTexCoord4f, GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) +GL_ENTRY(void, glMultiTexCoord4x, GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q) +GL_ENTRY(void, glMultiTexCoord4xOES, GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q) +GL_ENTRY(void, glNormal3f, GLfloat nx, GLfloat ny, GLfloat nz) +GL_ENTRY(void, glNormal3x, GLfixed nx, GLfixed ny, GLfixed nz) +GL_ENTRY(void, glNormal3xOES, GLfixed nx, GLfixed ny, GLfixed nz) +GL_ENTRY(void, glNormalPointer, GLenum type, GLsizei stride, const GLvoid *pointer) +GL_ENTRY(void, glOrthof, GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) +GL_ENTRY(void, glOrthofOES, GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) +GL_ENTRY(void, glOrthox, GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) +GL_ENTRY(void, glOrthoxOES, GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) +GL_ENTRY(void, glPixelStorei, GLenum pname, GLint param) +GL_ENTRY(void, glPointParameterf, GLenum pname, GLfloat param) +GL_ENTRY(void, glPointParameterfv, GLenum pname, const GLfloat *params) +GL_ENTRY(void, glPointParameterx, GLenum pname, GLfixed param) +GL_ENTRY(void, glPointParameterxOES, GLenum pname, GLfixed param) +GL_ENTRY(void, glPointParameterxv, GLenum pname, const GLfixed *params) +GL_ENTRY(void, glPointParameterxvOES, GLenum pname, const GLfixed *params) +GL_ENTRY(void, glPointSize, GLfloat size) +GL_ENTRY(void, glPointSizePointerOES, GLenum type, GLsizei stride, const GLvoid *pointer) +GL_ENTRY(void, glPointSizex, GLfixed size) +GL_ENTRY(void, glPointSizexOES, GLfixed size) +GL_ENTRY(void, glPolygonOffset, GLfloat factor, GLfloat units) +GL_ENTRY(void, glPolygonOffsetx, GLfixed factor, GLfixed units) +GL_ENTRY(void, glPolygonOffsetxOES, GLfixed factor, GLfixed units) +GL_ENTRY(void, glPopMatrix, void) +GL_ENTRY(void, glProgramBinaryOES, GLuint program, GLenum binaryFormat, const void *binary, GLint length) +GL_ENTRY(void, glPushMatrix, void) +GL_ENTRY(GLbitfield, glQueryMatrixxOES, GLfixed mantissa[16], GLint exponent[16]) +GL_ENTRY(void, glReadPixels, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels) +GL_ENTRY(void, glReleaseShaderCompiler, void) +GL_ENTRY(void, glRenderbufferStorage, GLenum target, GLenum internalformat, GLsizei width, GLsizei height) +GL_ENTRY(void, glRenderbufferStorageOES, GLenum target, GLenum internalformat, GLsizei width, GLsizei height) +GL_ENTRY(void, glRotatef, GLfloat angle, GLfloat x, GLfloat y, GLfloat z) +GL_ENTRY(void, glRotatex, GLfixed angle, GLfixed x, GLfixed y, GLfixed z) +GL_ENTRY(void, glRotatexOES, GLfixed angle, GLfixed x, GLfixed y, GLfixed z) +GL_ENTRY(void, glSampleCoverage, GLclampf value, GLboolean invert) +GL_ENTRY(void, glSampleCoveragex, GLclampx value, GLboolean invert) +GL_ENTRY(void, glSampleCoveragexOES, GLclampx value, GLboolean invert) +GL_ENTRY(void, glScalef, GLfloat x, GLfloat y, GLfloat z) +GL_ENTRY(void, glScalex, GLfixed x, GLfixed y, GLfixed z) +GL_ENTRY(void, glScalexOES, GLfixed x, GLfixed y, GLfixed z) +GL_ENTRY(void, glScissor, GLint x, GLint y, GLsizei width, GLsizei height) +GL_ENTRY(void, glSelectPerfMonitorCountersAMD, GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList) +GL_ENTRY(void, glSetFenceNV, GLuint fence, GLenum condition) +GL_ENTRY(void, glShadeModel, GLenum mode) +GL_ENTRY(void, glShaderBinary, GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length) +GL_ENTRY(void, glShaderSource, GLuint shader, GLsizei count, const char** string, const GLint* length) +GL_ENTRY(void, glStencilFunc, GLenum func, GLint ref, GLuint mask) +GL_ENTRY(void, glStencilFuncSeparate, GLenum face, GLenum func, GLint ref, GLuint mask) +GL_ENTRY(void, glStencilMask, GLuint mask) +GL_ENTRY(void, glStencilMaskSeparate, GLenum face, GLuint mask) +GL_ENTRY(void, glStencilOp, GLenum fail, GLenum zfail, GLenum zpass) +GL_ENTRY(void, glStencilOpSeparate, GLenum face, GLenum fail, GLenum zfail, GLenum zpass) +GL_ENTRY(GLboolean, glTestFenceNV, GLuint fence) +GL_ENTRY(void, glTexCoordPointer, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) +GL_ENTRY(void, glTexEnvf, GLenum target, GLenum pname, GLfloat param) +GL_ENTRY(void, glTexEnvfv, GLenum target, GLenum pname, const GLfloat *params) +GL_ENTRY(void, glTexEnvi, GLenum target, GLenum pname, GLint param) +GL_ENTRY(void, glTexEnviv, GLenum target, GLenum pname, const GLint *params) +GL_ENTRY(void, glTexEnvx, GLenum target, GLenum pname, GLfixed param) +GL_ENTRY(void, glTexEnvxOES, GLenum target, GLenum pname, GLfixed param) +GL_ENTRY(void, glTexEnvxv, GLenum target, GLenum pname, const GLfixed *params) +GL_ENTRY(void, glTexEnvxvOES, GLenum target, GLenum pname, const GLfixed *params) +GL_ENTRY(void, glTexGenfOES, GLenum coord, GLenum pname, GLfloat param) +GL_ENTRY(void, glTexGenfvOES, GLenum coord, GLenum pname, const GLfloat *params) +GL_ENTRY(void, glTexGeniOES, GLenum coord, GLenum pname, GLint param) +GL_ENTRY(void, glTexGenivOES, GLenum coord, GLenum pname, const GLint *params) +GL_ENTRY(void, glTexGenxOES, GLenum coord, GLenum pname, GLfixed param) +GL_ENTRY(void, glTexGenxvOES, GLenum coord, GLenum pname, const GLfixed *params) +GL_ENTRY(void, glTexImage2D, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels) +GL_ENTRY(void, glTexImage3DOES, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void* pixels) +GL_ENTRY(void, glTexParameterf, GLenum target, GLenum pname, GLfloat param) +GL_ENTRY(void, glTexParameterfv, GLenum target, GLenum pname, const GLfloat *params) +GL_ENTRY(void, glTexParameteri, GLenum target, GLenum pname, GLint param) +GL_ENTRY(void, glTexParameteriv, GLenum target, GLenum pname, const GLint *params) +GL_ENTRY(void, glTexParameterx, GLenum target, GLenum pname, GLfixed param) +GL_ENTRY(void, glTexParameterxOES, GLenum target, GLenum pname, GLfixed param) +GL_ENTRY(void, glTexParameterxv, GLenum target, GLenum pname, const GLfixed *params) +GL_ENTRY(void, glTexParameterxvOES, GLenum target, GLenum pname, const GLfixed *params) +GL_ENTRY(void, glTexSubImage2D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels) +GL_ENTRY(void, glTexSubImage3DOES, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void* pixels) +GL_ENTRY(void, glTranslatef, GLfloat x, GLfloat y, GLfloat z) +GL_ENTRY(void, glTranslatex, GLfixed x, GLfixed y, GLfixed z) +GL_ENTRY(void, glTranslatexOES, GLfixed x, GLfixed y, GLfixed z) +GL_ENTRY(void, glUniform1f, GLint location, GLfloat x) +GL_ENTRY(void, glUniform1fv, GLint location, GLsizei count, const GLfloat* v) +GL_ENTRY(void, glUniform1i, GLint location, GLint x) +GL_ENTRY(void, glUniform1iv, GLint location, GLsizei count, const GLint* v) +GL_ENTRY(void, glUniform2f, GLint location, GLfloat x, GLfloat y) +GL_ENTRY(void, glUniform2fv, GLint location, GLsizei count, const GLfloat* v) +GL_ENTRY(void, glUniform2i, GLint location, GLint x, GLint y) +GL_ENTRY(void, glUniform2iv, GLint location, GLsizei count, const GLint* v) +GL_ENTRY(void, glUniform3f, GLint location, GLfloat x, GLfloat y, GLfloat z) +GL_ENTRY(void, glUniform3fv, GLint location, GLsizei count, const GLfloat* v) +GL_ENTRY(void, glUniform3i, GLint location, GLint x, GLint y, GLint z) +GL_ENTRY(void, glUniform3iv, GLint location, GLsizei count, const GLint* v) +GL_ENTRY(void, glUniform4f, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) +GL_ENTRY(void, glUniform4fv, GLint location, GLsizei count, const GLfloat* v) +GL_ENTRY(void, glUniform4i, GLint location, GLint x, GLint y, GLint z, GLint w) +GL_ENTRY(void, glUniform4iv, GLint location, GLsizei count, const GLint* v) +GL_ENTRY(void, glUniformMatrix2fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) +GL_ENTRY(void, glUniformMatrix3fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) +GL_ENTRY(void, glUniformMatrix4fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) +GL_ENTRY(GLboolean, glUnmapBufferOES, GLenum target) +GL_ENTRY(void, glUseProgram, GLuint program) +GL_ENTRY(void, glValidateProgram, GLuint program) +GL_ENTRY(void, glVertexAttrib1f, GLuint indx, GLfloat x) +GL_ENTRY(void, glVertexAttrib1fv, GLuint indx, const GLfloat* values) +GL_ENTRY(void, glVertexAttrib2f, GLuint indx, GLfloat x, GLfloat y) +GL_ENTRY(void, glVertexAttrib2fv, GLuint indx, const GLfloat* values) +GL_ENTRY(void, glVertexAttrib3f, GLuint indx, GLfloat x, GLfloat y, GLfloat z) +GL_ENTRY(void, glVertexAttrib3fv, GLuint indx, const GLfloat* values) +GL_ENTRY(void, glVertexAttrib4f, GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) +GL_ENTRY(void, glVertexAttrib4fv, GLuint indx, const GLfloat* values) +GL_ENTRY(void, glVertexAttribPointer, GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr) +GL_ENTRY(void, glVertexPointer, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) +GL_ENTRY(void, glViewport, GLint x, GLint y, GLsizei width, GLsizei height) +GL_ENTRY(void, glWeightPointerOES, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) diff --git a/opengl/libs/hooks.h b/opengl/libs/hooks.h index 8c0357e87a6e..f47f0930ba52 100644 --- a/opengl/libs/hooks.h +++ b/opengl/libs/hooks.h @@ -60,11 +60,14 @@ const unsigned int NUM_DISPLAYS = 1; enum { IMPL_HARDWARE = 0, IMPL_SOFTWARE, - IMPL_NUM_DRIVERS_IMPLEMENTATIONS, - IMPL_NO_CONTEXT = IMPL_NUM_DRIVERS_IMPLEMENTATIONS, IMPL_NUM_IMPLEMENTATIONS }; +enum { + GLESv1_INDEX = 0, + GLESv2_INDEX = 1, +}; + // ---------------------------------------------------------------------------- // GL / EGL hooks @@ -74,18 +77,14 @@ enum { #define GL_ENTRY(_r, _api, ...) _r (*_api)(__VA_ARGS__); #define EGL_ENTRY(_r, _api, ...) _r (*_api)(__VA_ARGS__); +struct egl_t { + #include "EGL/egl_entries.in" +}; + struct gl_hooks_t { struct gl_t { - #include "GLES_CM/gl_entries.in" - #include "GLES_CM/glext_entries.in" + #include "entries.in" } gl; - struct gl2_t { - #include "GLES2/gl2_entries.in" - #include "GLES2/gl2ext_entries.in" - } gl2; - struct egl_t { - #include "EGL/egl_entries.in" - } egl; struct gl_ext_t { void (*extensions[MAX_NUMBER_OF_GL_EXTENSIONS])(void); } ext; @@ -96,12 +95,12 @@ struct gl_hooks_t { // ---------------------------------------------------------------------------- -extern gl_hooks_t gHooks[IMPL_NUM_IMPLEMENTATIONS]; +extern gl_hooks_t gHooks[2][IMPL_NUM_IMPLEMENTATIONS]; +extern gl_hooks_t gHooksNoContext; extern pthread_key_t gGLWrapperKey; extern "C" void gl_unimplemented(); extern char const * const gl_names[]; -extern char const * const gl2_names[]; extern char const * const egl_names[]; // ---------------------------------------------------------------------------- @@ -125,7 +124,7 @@ static gl_hooks_t const* getGlThreadSpecific() { gl_hooks_t const * volatile * tls_hooks = get_tls_hooks(); gl_hooks_t const* hooks = tls_hooks[TLS_SLOT_OPENGL_API]; if (hooks) return hooks; - return &gHooks[IMPL_NO_CONTEXT]; + return &gHooksNoContext; } #else @@ -137,7 +136,7 @@ static inline void setGlThreadSpecific(gl_hooks_t const *value) { static gl_hooks_t const* getGlThreadSpecific() { gl_hooks_t const* hooks = static_cast<gl_hooks_t*>(pthread_getspecific(gGLWrapperKey)); if (hooks) return hooks; - return &gHooks[IMPL_NO_CONTEXT]; + return &gHooksNoContext; } #endif diff --git a/opengl/libs/tools/genfiles b/opengl/libs/tools/genfiles index 4f8eda46539b..120cb4be8699 100755 --- a/opengl/libs/tools/genfiles +++ b/opengl/libs/tools/genfiles @@ -14,14 +14,20 @@ # See the License for the specific language governing permissions and # limitations under the License. -./glapigen ../../include/GLES/gl.h > ../GLES_CM/gl_api.in -./glentrygen ../../include/GLES/gl.h > ../GLES_CM/gl_entries.in +./glapigen ../../include/GLES/gl.h > ../GLES_CM/gl_api.in +./glapigen ../../include/GLES/glext.h > ../GLES_CM/glext_api.in +./glapigen ../../include/GLES2/gl2.h > ../GLES2/gl2_api.in +./glapigen ../../include/GLES2/gl2ext.h > ../GLES2/gl2ext_api.in -./glapigen ../../include/GLES/glext.h > ../GLES_CM/glext_api.in -./glentrygen ../../include/GLES/glext.h > ../GLES_CM/glext_entries.in +./glentrygen ../../include/GLES/gl.h > /tmp/gl_entries.in +./glentrygen ../../include/GLES/glext.h > /tmp/glext_entries.in +./glentrygen ../../include/GLES2/gl2.h > /tmp/gl2_entries.in +./glentrygen ../../include/GLES2/gl2ext.h > /tmp/gl2ext_entries.in -./glapigen ../../include/GLES2/gl2.h > ../GLES2/gl2_api.in -./glentrygen ../../include/GLES2/gl2.h > ../GLES2/gl2_entries.in - -./glapigen ../../include/GLES2/gl2ext.h > ../GLES2/gl2ext_api.in -./glentrygen ../../include/GLES2/gl2ext.h > ../GLES2/gl2ext_entries.in +cat /tmp/gl_entries.in \ + /tmp/glext_entries.in \ + /tmp/gl2_entries.in \ + /tmp/gl2ext_entries.in \ + | sort -t, -k2 \ + | awk -F, '!_[$2]++' \ + > ../entries.in diff --git a/opengl/tests/linetex/Android.mk b/opengl/tests/linetex/Android.mk new file mode 100644 index 000000000000..6ff248dcce34 --- /dev/null +++ b/opengl/tests/linetex/Android.mk @@ -0,0 +1,17 @@ +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_SRC_FILES:= \ + linetex.cpp + +LOCAL_SHARED_LIBRARIES := \ + libcutils \ + libEGL \ + libGLESv1_CM \ + libui + +LOCAL_MODULE:= test-opengl-linetex + +LOCAL_MODULE_TAGS := optional + +include $(BUILD_EXECUTABLE) diff --git a/opengl/tests/linetex/linetex.cpp b/opengl/tests/linetex/linetex.cpp new file mode 100644 index 000000000000..68429409403b --- /dev/null +++ b/opengl/tests/linetex/linetex.cpp @@ -0,0 +1,116 @@ +/* +** +** Copyright 2006, 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 "fillrate" + +#include <unistd.h> +#include <stdlib.h> +#include <stdio.h> + +#include <EGL/egl.h> +#include <GLES/gl.h> +#include <GLES/glext.h> + +#include <utils/StopWatch.h> +#include <ui/FramebufferNativeWindow.h> +#include <ui/EGLUtils.h> + +using namespace android; + +int main(int argc, char** argv) +{ + EGLint configAttribs[] = { + EGL_DEPTH_SIZE, 0, + EGL_NONE + }; + + EGLint majorVersion; + EGLint minorVersion; + EGLContext context; + EGLConfig config; + EGLSurface surface; + EGLint w, h; + EGLDisplay dpy; + + EGLNativeWindowType window = android_createDisplaySurface(); + + dpy = eglGetDisplay(EGL_DEFAULT_DISPLAY); + eglInitialize(dpy, &majorVersion, &minorVersion); + + status_t err = EGLUtils::selectConfigForNativeWindow( + dpy, configAttribs, window, &config); + if (err) { + fprintf(stderr, "couldn't find an EGLConfig matching the screen format\n"); + return 0; + } + + surface = eglCreateWindowSurface(dpy, config, window, NULL); + context = eglCreateContext(dpy, config, NULL, NULL); + eglMakeCurrent(dpy, surface, surface, context); + eglQuerySurface(dpy, surface, EGL_WIDTH, &w); + eglQuerySurface(dpy, surface, EGL_HEIGHT, &h); + + printf("w=%d, h=%d\n", w, h); + + glBindTexture(GL_TEXTURE_2D, 0); + glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); + glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); + glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); + glDisable(GL_DITHER); + glDisable(GL_BLEND); + glEnable(GL_TEXTURE_2D); + glColor4f(1,1,1,1); + + + // default pack-alignment is 4 + const uint16_t t16[64] = { 0xFFFF, 0, 0xF800, 0, 0x07E0, 0, 0x001F, 0 }; + + const GLfloat vertices[4][2] = { + { w/2, 0 }, + { w/2, h } + }; + + const GLfloat texCoords[4][2] = { + { 0, 0 }, + { 1, 1 } + }; + + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 1, 4, 0, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, t16); + + glViewport(0, 0, w, h); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glOrthof(0, w, 0, h, 0, 1); + + glEnableClientState(GL_VERTEX_ARRAY); + glEnableClientState(GL_TEXTURE_COORD_ARRAY); + glVertexPointer(2, GL_FLOAT, 0, vertices); + glTexCoordPointer(2, GL_FLOAT, 0, texCoords); + + glClearColor(0,0,0,0); + glClear(GL_COLOR_BUFFER_BIT); + glDrawArrays(GL_LINES, 0, 2); + eglSwapBuffers(dpy, surface); + + usleep(5*1000000); + + eglTerminate(dpy); + + return 0; +} diff --git a/opengl/tools/glgen/specs/gles11/checks.spec b/opengl/tools/glgen/specs/gles11/checks.spec index e31a2ce50e03..1468ab9792f8 100644 --- a/opengl/tools/glgen/specs/gles11/checks.spec +++ b/opengl/tools/glgen/specs/gles11/checks.spec @@ -1,61 +1,62 @@ -glClipPlanef check eqn 4
-glClipPlanex check eqn 4
-glGetClipPlanefOES check eqn 4
-glGetClipPlanexOES check eqn 4
-glDeleteBuffers check buffers n
-glDeleteTextures check textures n
-glDrawElements check_AIOOBE indices count
-glFog ifcheck params 1 pname GL_FOG_MODE,GL_FOG_DENSITY,GL_FOG_START,GL_FOG_END ifcheck params 4 pname GL_FOG_COLOR
-glGenBuffers check buffers n
-glGenTextures check textures n
-glGetClipPlane check eqn 4
-glGetIntegerv ifcheck params 1 pname GL_ALPHA_BITS,GL_ALPHA_TEST_FUNC,GL_ALPHA_TEST_REF,GL_BLEND_DST,GL_BLUE_BITS,GL_COLOR_ARRAY_BUFFER_BINDING,GL_COLOR_ARRAY_SIZE,GL_COLOR_ARRAY_STRIDE,GL_COLOR_ARRAY_TYPE,GL_CULL_FACE,GL_DEPTH_BITS,GL_DEPTH_CLEAR_VALUE,GL_DEPTH_FUNC,GL_DEPTH_WRITEMASK,GL_FOG_DENSITY,GL_FOG_END,GL_FOG_MODE,GL_FOG_START,GL_FRONT_FACE,GL_GREEN_BITS,GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES,GL_IMPLEMENTATION_COLOR_READ_TYPE_OES,GL_LIGHT_MODEL_COLOR_CONTROL,GL_LIGHT_MODEL_LOCAL_VIEWER,GL_LIGHT_MODEL_TWO_SIDE,GL_LINE_SMOOTH_HINT,GL_LINE_WIDTH,GL_LOGIC_OP_MODE,GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES,GL_MATRIX_INDEX_ARRAY_SIZE_OES,GL_MATRIX_INDEX_ARRAY_STRIDE_OES,GL_MATRIX_INDEX_ARRAY_TYPE_OES,GL_MATRIX_MODE,GL_MAX_CLIP_PLANES,GL_MAX_ELEMENTS_INDICES,GL_MAX_ELEMENTS_VERTICES,GL_MAX_LIGHTS,GL_MAX_MODELVIEW_STACK_DEPTH,GL_MAX_PALETTE_MATRICES_OES,GL_MAX_PROJECTION_STACK_DEPTH,GL_MAX_TEXTURE_SIZE,GL_MAX_TEXTURE_STACK_DEPTH,GL_MAX_TEXTURE_UNITS,GL_MAX_VERTEX_UNITS_OES,GL_MODELVIEW_STACK_DEPTH,GL_NORMAL_ARRAY_BUFFER_BINDING,GL_NORMAL_ARRAY_STRIDE,GL_NORMAL_ARRAY_TYPE,GL_NUM_COMPRESSED_TEXTURE_FORMATS,GL_PACK_ALIGNMENT,GL_PERSPECTIVE_CORRECTION_HINT,GL_POINT_SIZE,GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES,GL_POINT_SIZE_ARRAY_STRIDE_OES,GL_POINT_SIZE_ARRAY_TYPE_OES,GL_POINT_SMOOTH_HINT,GL_POLYGON_OFFSET_FACTOR,GL_POLYGON_OFFSET_UNITS,GL_PROJECTION_STACK_DEPTH,GL_RED_BITS,GL_SHADE_MODEL,GL_STENCIL_BITS,GL_STENCIL_CLEAR_VALUE,GL_STENCIL_FAIL,GL_STENCIL_FUNC,GL_STENCIL_PASS_DEPTH_FAIL,GL_STENCIL_PASS_DEPTH_PASS,GL_STENCIL_REF,GL_STENCIL_VALUE_MASK,GL_STENCIL_WRITEMASK,GL_SUBPIXEL_BITS,GL_TEXTURE_BINDING_2D,GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING,GL_TEXTURE_COORD_ARRAY_SIZE,GL_TEXTURE_COORD_ARRAY_STRIDE,GL_TEXTURE_COORD_ARRAY_TYPE,GL_TEXTURE_STACK_DEPTH,GL_UNPACK_ALIGNMENT,GL_VERTEX_ARRAY_BUFFER_BINDING,GL_VERTEX_ARRAY_SIZE,GL_VERTEX_ARRAY_STRIDE,GL_VERTEX_ARRAY_TYPE,GL_WEIGHT_ARRAY_BUFFER_BINDING_OES,GL_WEIGHT_ARRAY_SIZE_OES,GL_WEIGHT_ARRAY_STRIDE_OES,GL_WEIGHT_ARRAY_TYPE_OES ifcheck params 2 pname GL_ALIASED_POINT_SIZE_RANGE,GL_ALIASED_LINE_WIDTH_RANGE,GL_DEPTH_RANGE,GL_MAX_VIEWPORT_DIMS,GL_SMOOTH_LINE_WIDTH_RANGE,GL_SMOOTH_POINT_SIZE_RANGE ifcheck params 4 pname GL_COLOR_CLEAR_VALUE,GL_COLOR_WRITEMASK,GL_FOG_COLOR,GL_LIGHT_MODEL_AMBIENT,GL_SCISSOR_BOX,GL_VIEWPORT ifcheck params 16 pname GL_MODELVIEW_MATRIX,GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES,GL_PROJECTION_MATRIX,GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES,GL_TEXTURE_MATRIX,GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES ifcheck params getNumCompressedTextureFormats() pname GL_COMPRESSED_TEXTURE_FORMATS
-glGetLight ifcheck params 1 pname GL_SPOT_EXPONENT,GL_SPOT_CUTOFF,GL_CONSTANT_ATTENUATION,GL_LINEAR_ATTENUATION,GL_QUADRATIC_ATTENUATION ifcheck params 3 pname GL_SPOT_DIRECTION ifcheck params 4 pname GL_AMBIENT,GL_DIFFUSE,GL_SPECULAR,GL_EMISSION
-glGetMaterial ifcheck params 1 pname GL_SHININESS ifcheck params 4 pname GL_AMBIENT,GL_DIFFUSE,GL_SPECULAR,GL_EMISSION,GL_AMBIENT_AND_DIFFUSE
-glGetTexEnv ifcheck params 1 pname GL_TEXTURE_ENV_MODE,GL_COMBINE_RGB,GL_COMBINE_ALPHA ifcheck params 4 pname GL_TEXTURE_ENV_COLOR
-glGetTexParameter check params 1
-glLightModel ifcheck params 1 pname GL_LIGHT_MODEL_TWO_SIDE ifcheck params 4 pname GL_LIGHT_MODEL_AMBIENT
-glLight ifcheck params 1 pname GL_SPOT_EXPONENT,GL_SPOT_CUTOFF,GL_CONSTANT_ATTENUATION,GL_LINEAR_ATTENUATION,GL_QUADRATIC_ATTENUATION ifcheck params 3 pname GL_SPOT_DIRECTION ifcheck params 4 pname GL_AMBIENT,GL_DIFFUSE,GL_SPECULAR,GL_EMISSION
-glLoadMatrix check m 16
-glMaterial ifcheck params 1 pname GL_SHININESS ifcheck params 4 pname GL_AMBIENT,GL_DIFFUSE,GL_SPECULAR,GL_EMISSION,GL_AMBIENT_AND_DIFFUSE
-glMultMatrix check m 16
-glPointParameter check params 1
-glTexEnv ifcheck params 1 pname GL_TEXTURE_ENV_MODE,GL_COMBINE_RGB,GL_COMBINE_ALPHA ifcheck params 4 pname GL_TEXTURE_ENV_COLOR
-glTexImage2D nullAllowed
-glTexSubImage2D nullAllowed
-glBufferData nullAllowed
-glTexParameter check params 1
-glQueryMatrixxOES check mantissa 16 check exponent 16 return -1
-glDrawTexfvOES check coords 5
-glDrawTexivOES check coords 5
-glDrawTexsvOES check coords 5
-glDrawTexxvOES check coords 5
-glBindFramebufferOES unsupported
-glBindRenderbufferOES unsupported
-glBlendEquation unsupported
-glBlendEquationSeparate unsupported
-glBlendFuncSeparate unsupported
-glCheckFramebufferStatusOES unsupported return 0
-glCurrentPaletteMatrixOES unsupported
-glDeleteFramebuffersOES unsupported
-glDeleteRenderbuffersOES unsupported
-glFramebufferRenderbufferOES unsupported
-glFramebufferStorageOES unsupported
-glFramebufferTexture2DOES unsupported
-glGenFramebuffersOES unsupported
-glGenRenderbuffersOES unsupported
-glGenerateMipmapOES unsupported
-glGetBufferParameter unsupported
-glGetFramebufferAttachmentParameterivOES unsupported
-glGetRenderbufferParameterivOES unsupported
-glGetTexGen unsupported
-glIsFramebufferOES unsupported return JNI_FALSE
-glIsRenderbufferOES unsupported return JNI_FALSE
-glLoadPaletteFromModelViewMatrixOES unsupported
-glMatrixIndexPointerOES unsupported
-glRenderbufferStorageOES unsupported return false
-glTexGen unsupported
-glTexGenf unsupported
-glTexGeni unsupported
-glTexGenx unsupported
-glWeightPointerOES unsupported
+glClipPlanef check eqn 4 +glClipPlanex check eqn 4 +glGetClipPlanefOES check eqn 4 +glGetClipPlanexOES check eqn 4 +glDeleteBuffers check buffers n +glDeleteTextures check textures n +glDrawElements check_AIOOBE indices count +glFog ifcheck params 1 pname GL_FOG_MODE,GL_FOG_DENSITY,GL_FOG_START,GL_FOG_END ifcheck params 4 pname GL_FOG_COLOR +glGenBuffers check buffers n +glGenTextures check textures n +glGetClipPlane check eqn 4 +glGetIntegerv ifcheck params 1 pname GL_ALPHA_BITS,GL_ALPHA_TEST_FUNC,GL_ALPHA_TEST_REF,GL_BLEND_DST,GL_BLUE_BITS,GL_COLOR_ARRAY_BUFFER_BINDING,GL_COLOR_ARRAY_SIZE,GL_COLOR_ARRAY_STRIDE,GL_COLOR_ARRAY_TYPE,GL_CULL_FACE,GL_DEPTH_BITS,GL_DEPTH_CLEAR_VALUE,GL_DEPTH_FUNC,GL_DEPTH_WRITEMASK,GL_FOG_DENSITY,GL_FOG_END,GL_FOG_MODE,GL_FOG_START,GL_FRONT_FACE,GL_GREEN_BITS,GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES,GL_IMPLEMENTATION_COLOR_READ_TYPE_OES,GL_LIGHT_MODEL_COLOR_CONTROL,GL_LIGHT_MODEL_LOCAL_VIEWER,GL_LIGHT_MODEL_TWO_SIDE,GL_LINE_SMOOTH_HINT,GL_LINE_WIDTH,GL_LOGIC_OP_MODE,GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES,GL_MATRIX_INDEX_ARRAY_SIZE_OES,GL_MATRIX_INDEX_ARRAY_STRIDE_OES,GL_MATRIX_INDEX_ARRAY_TYPE_OES,GL_MATRIX_MODE,GL_MAX_CLIP_PLANES,GL_MAX_ELEMENTS_INDICES,GL_MAX_ELEMENTS_VERTICES,GL_MAX_LIGHTS,GL_MAX_MODELVIEW_STACK_DEPTH,GL_MAX_PALETTE_MATRICES_OES,GL_MAX_PROJECTION_STACK_DEPTH,GL_MAX_TEXTURE_SIZE,GL_MAX_TEXTURE_STACK_DEPTH,GL_MAX_TEXTURE_UNITS,GL_MAX_VERTEX_UNITS_OES,GL_MODELVIEW_STACK_DEPTH,GL_NORMAL_ARRAY_BUFFER_BINDING,GL_NORMAL_ARRAY_STRIDE,GL_NORMAL_ARRAY_TYPE,GL_NUM_COMPRESSED_TEXTURE_FORMATS,GL_PACK_ALIGNMENT,GL_PERSPECTIVE_CORRECTION_HINT,GL_POINT_SIZE,GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES,GL_POINT_SIZE_ARRAY_STRIDE_OES,GL_POINT_SIZE_ARRAY_TYPE_OES,GL_POINT_SMOOTH_HINT,GL_POLYGON_OFFSET_FACTOR,GL_POLYGON_OFFSET_UNITS,GL_PROJECTION_STACK_DEPTH,GL_RED_BITS,GL_SHADE_MODEL,GL_STENCIL_BITS,GL_STENCIL_CLEAR_VALUE,GL_STENCIL_FAIL,GL_STENCIL_FUNC,GL_STENCIL_PASS_DEPTH_FAIL,GL_STENCIL_PASS_DEPTH_PASS,GL_STENCIL_REF,GL_STENCIL_VALUE_MASK,GL_STENCIL_WRITEMASK,GL_SUBPIXEL_BITS,GL_TEXTURE_BINDING_2D,GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING,GL_TEXTURE_COORD_ARRAY_SIZE,GL_TEXTURE_COORD_ARRAY_STRIDE,GL_TEXTURE_COORD_ARRAY_TYPE,GL_TEXTURE_STACK_DEPTH,GL_UNPACK_ALIGNMENT,GL_VERTEX_ARRAY_BUFFER_BINDING,GL_VERTEX_ARRAY_SIZE,GL_VERTEX_ARRAY_STRIDE,GL_VERTEX_ARRAY_TYPE,GL_WEIGHT_ARRAY_BUFFER_BINDING_OES,GL_WEIGHT_ARRAY_SIZE_OES,GL_WEIGHT_ARRAY_STRIDE_OES,GL_WEIGHT_ARRAY_TYPE_OES ifcheck params 2 pname GL_ALIASED_POINT_SIZE_RANGE,GL_ALIASED_LINE_WIDTH_RANGE,GL_DEPTH_RANGE,GL_MAX_VIEWPORT_DIMS,GL_SMOOTH_LINE_WIDTH_RANGE,GL_SMOOTH_POINT_SIZE_RANGE ifcheck params 4 pname GL_COLOR_CLEAR_VALUE,GL_COLOR_WRITEMASK,GL_FOG_COLOR,GL_LIGHT_MODEL_AMBIENT,GL_SCISSOR_BOX,GL_VIEWPORT ifcheck params 16 pname GL_MODELVIEW_MATRIX,GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES,GL_PROJECTION_MATRIX,GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES,GL_TEXTURE_MATRIX,GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES ifcheck params getNumCompressedTextureFormats() pname GL_COMPRESSED_TEXTURE_FORMATS +glGetLight ifcheck params 1 pname GL_SPOT_EXPONENT,GL_SPOT_CUTOFF,GL_CONSTANT_ATTENUATION,GL_LINEAR_ATTENUATION,GL_QUADRATIC_ATTENUATION ifcheck params 3 pname GL_SPOT_DIRECTION ifcheck params 4 pname GL_AMBIENT,GL_DIFFUSE,GL_SPECULAR,GL_EMISSION +glGetMaterial ifcheck params 1 pname GL_SHININESS ifcheck params 4 pname GL_AMBIENT,GL_DIFFUSE,GL_SPECULAR,GL_EMISSION,GL_AMBIENT_AND_DIFFUSE +glGetTexEnv ifcheck params 1 pname GL_TEXTURE_ENV_MODE,GL_COMBINE_RGB,GL_COMBINE_ALPHA ifcheck params 4 pname GL_TEXTURE_ENV_COLOR +glGetTexParameter check params 1 +glLightModel ifcheck params 1 pname GL_LIGHT_MODEL_TWO_SIDE ifcheck params 4 pname GL_LIGHT_MODEL_AMBIENT +glLight ifcheck params 1 pname GL_SPOT_EXPONENT,GL_SPOT_CUTOFF,GL_CONSTANT_ATTENUATION,GL_LINEAR_ATTENUATION,GL_QUADRATIC_ATTENUATION ifcheck params 3 pname GL_SPOT_DIRECTION ifcheck params 4 pname GL_AMBIENT,GL_DIFFUSE,GL_SPECULAR,GL_EMISSION +glLoadMatrix check m 16 +glMaterial ifcheck params 1 pname GL_SHININESS ifcheck params 4 pname GL_AMBIENT,GL_DIFFUSE,GL_SPECULAR,GL_EMISSION,GL_AMBIENT_AND_DIFFUSE +glMultMatrix check m 16 +glPointParameter check params 1 +glTexEnv ifcheck params 1 pname GL_TEXTURE_ENV_MODE,GL_COMBINE_RGB,GL_COMBINE_ALPHA ifcheck params 4 pname GL_TEXTURE_ENV_COLOR +glTexImage2D nullAllowed +glTexSubImage2D nullAllowed +glBufferData nullAllowed check data size +glBufferSubData check data size +glTexParameter check params 1 +glQueryMatrixxOES check mantissa 16 check exponent 16 return -1 +glDrawTexfvOES check coords 5 +glDrawTexivOES check coords 5 +glDrawTexsvOES check coords 5 +glDrawTexxvOES check coords 5 +glBindFramebufferOES unsupported +glBindRenderbufferOES unsupported +glBlendEquation unsupported +glBlendEquationSeparate unsupported +glBlendFuncSeparate unsupported +glCheckFramebufferStatusOES unsupported return 0 +glCurrentPaletteMatrixOES unsupported +glDeleteFramebuffersOES unsupported +glDeleteRenderbuffersOES unsupported +glFramebufferRenderbufferOES unsupported +glFramebufferStorageOES unsupported +glFramebufferTexture2DOES unsupported +glGenFramebuffersOES unsupported +glGenRenderbuffersOES unsupported +glGenerateMipmapOES unsupported +glGetBufferParameter unsupported +glGetFramebufferAttachmentParameterivOES unsupported +glGetRenderbufferParameterivOES unsupported +glGetTexGen unsupported +glIsFramebufferOES unsupported return JNI_FALSE +glIsRenderbufferOES unsupported return JNI_FALSE +glLoadPaletteFromModelViewMatrixOES unsupported +glMatrixIndexPointerOES unsupported +glRenderbufferStorageOES unsupported return false +glTexGen unsupported +glTexGenf unsupported +glTexGeni unsupported +glTexGenx unsupported +glWeightPointerOES unsupported diff --git a/opengl/tools/glgen/specs/jsr239/glspec-checks b/opengl/tools/glgen/specs/jsr239/glspec-checks index 55840fa10143..063cdc74a44c 100644 --- a/opengl/tools/glgen/specs/jsr239/glspec-checks +++ b/opengl/tools/glgen/specs/jsr239/glspec-checks @@ -1,59 +1,60 @@ -glClipPlanef check equation 4
-glClipPlanex check equation 4
-glDeleteBuffers check buffers n
-glDeleteTextures check textures n
-glDrawElements check_AIOOBE indices count
-glFog ifcheck params 1 pname GL_FOG_MODE,GL_FOG_DENSITY,GL_FOG_START,GL_FOG_END ifcheck params 4 pname GL_FOG_COLOR
-glGenBuffers check buffers n
-glGenTextures check textures n
-glGetClipPlane check eqn 4
-glGetIntegerv ifcheck params 1 pname GL_ALPHA_BITS,GL_ALPHA_TEST_FUNC,GL_ALPHA_TEST_REF,GL_BLEND_DST,GL_BLUE_BITS,GL_COLOR_ARRAY_BUFFER_BINDING,GL_COLOR_ARRAY_SIZE,GL_COLOR_ARRAY_STRIDE,GL_COLOR_ARRAY_TYPE,GL_CULL_FACE,GL_DEPTH_BITS,GL_DEPTH_CLEAR_VALUE,GL_DEPTH_FUNC,GL_DEPTH_WRITEMASK,GL_FOG_DENSITY,GL_FOG_END,GL_FOG_MODE,GL_FOG_START,GL_FRONT_FACE,GL_GREEN_BITS,GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES,GL_IMPLEMENTATION_COLOR_READ_TYPE_OES,GL_LIGHT_MODEL_COLOR_CONTROL,GL_LIGHT_MODEL_LOCAL_VIEWER,GL_LIGHT_MODEL_TWO_SIDE,GL_LINE_SMOOTH_HINT,GL_LINE_WIDTH,GL_LOGIC_OP_MODE,GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES,GL_MATRIX_INDEX_ARRAY_SIZE_OES,GL_MATRIX_INDEX_ARRAY_STRIDE_OES,GL_MATRIX_INDEX_ARRAY_TYPE_OES,GL_MATRIX_MODE,GL_MAX_CLIP_PLANES,GL_MAX_ELEMENTS_INDICES,GL_MAX_ELEMENTS_VERTICES,GL_MAX_LIGHTS,GL_MAX_MODELVIEW_STACK_DEPTH,GL_MAX_PALETTE_MATRICES_OES,GL_MAX_PROJECTION_STACK_DEPTH,GL_MAX_TEXTURE_SIZE,GL_MAX_TEXTURE_STACK_DEPTH,GL_MAX_TEXTURE_UNITS,GL_MAX_VERTEX_UNITS_OES,GL_MODELVIEW_STACK_DEPTH,GL_NORMAL_ARRAY_BUFFER_BINDING,GL_NORMAL_ARRAY_STRIDE,GL_NORMAL_ARRAY_TYPE,GL_NUM_COMPRESSED_TEXTURE_FORMATS,GL_PACK_ALIGNMENT,GL_PERSPECTIVE_CORRECTION_HINT,GL_POINT_SIZE,GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES,GL_POINT_SIZE_ARRAY_STRIDE_OES,GL_POINT_SIZE_ARRAY_TYPE_OES,GL_POINT_SMOOTH_HINT,GL_POLYGON_OFFSET_FACTOR,GL_POLYGON_OFFSET_UNITS,GL_PROJECTION_STACK_DEPTH,GL_RED_BITS,GL_SHADE_MODEL,GL_STENCIL_BITS,GL_STENCIL_CLEAR_VALUE,GL_STENCIL_FAIL,GL_STENCIL_FUNC,GL_STENCIL_PASS_DEPTH_FAIL,GL_STENCIL_PASS_DEPTH_PASS,GL_STENCIL_REF,GL_STENCIL_VALUE_MASK,GL_STENCIL_WRITEMASK,GL_SUBPIXEL_BITS,GL_TEXTURE_BINDING_2D,GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING,GL_TEXTURE_COORD_ARRAY_SIZE,GL_TEXTURE_COORD_ARRAY_STRIDE,GL_TEXTURE_COORD_ARRAY_TYPE,GL_TEXTURE_STACK_DEPTH,GL_UNPACK_ALIGNMENT,GL_VERTEX_ARRAY_BUFFER_BINDING,GL_VERTEX_ARRAY_SIZE,GL_VERTEX_ARRAY_STRIDE,GL_VERTEX_ARRAY_TYPE,GL_WEIGHT_ARRAY_BUFFER_BINDING_OES,GL_WEIGHT_ARRAY_SIZE_OES,GL_WEIGHT_ARRAY_STRIDE_OES,GL_WEIGHT_ARRAY_TYPE_OES ifcheck params 2 pname GL_ALIASED_POINT_SIZE_RANGE,GL_ALIASED_LINE_WIDTH_RANGE,GL_DEPTH_RANGE,GL_MAX_VIEWPORT_DIMS,GL_SMOOTH_LINE_WIDTH_RANGE,GL_SMOOTH_POINT_SIZE_RANGE ifcheck params 4 pname GL_COLOR_CLEAR_VALUE,GL_COLOR_WRITEMASK,GL_FOG_COLOR,GL_LIGHT_MODEL_AMBIENT,GL_SCISSOR_BOX,GL_VIEWPORT ifcheck params 16 pname GL_MODELVIEW_MATRIX,GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES,GL_PROJECTION_MATRIX,GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES,GL_TEXTURE_MATRIX,GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES ifcheck params getNumCompressedTextureFormats() pname GL_COMPRESSED_TEXTURE_FORMATS
-glGetLight ifcheck params 1 pname GL_SPOT_EXPONENT,GL_SPOT_CUTOFF,GL_CONSTANT_ATTENUATION,GL_LINEAR_ATTENUATION,GL_QUADRATIC_ATTENUATION ifcheck params 3 pname GL_SPOT_DIRECTION ifcheck params 4 pname GL_AMBIENT,GL_DIFFUSE,GL_SPECULAR,GL_EMISSION
-glGetMaterial ifcheck params 1 pname GL_SHININESS ifcheck params 4 pname GL_AMBIENT,GL_DIFFUSE,GL_SPECULAR,GL_EMISSION,GL_AMBIENT_AND_DIFFUSE
-glGetTexEnv ifcheck params 1 pname GL_TEXTURE_ENV_MODE,GL_COMBINE_RGB,GL_COMBINE_ALPHA ifcheck params 4 pname GL_TEXTURE_ENV_COLOR
-glGetTexParameter check params 1
-glLightModel ifcheck params 1 pname GL_LIGHT_MODEL_TWO_SIDE ifcheck params 4 pname GL_LIGHT_MODEL_AMBIENT
-glLight ifcheck params 1 pname GL_SPOT_EXPONENT,GL_SPOT_CUTOFF,GL_CONSTANT_ATTENUATION,GL_LINEAR_ATTENUATION,GL_QUADRATIC_ATTENUATION ifcheck params 3 pname GL_SPOT_DIRECTION ifcheck params 4 pname GL_AMBIENT,GL_DIFFUSE,GL_SPECULAR,GL_EMISSION
-glLoadMatrix check m 16
-glMaterial ifcheck params 1 pname GL_SHININESS ifcheck params 4 pname GL_AMBIENT,GL_DIFFUSE,GL_SPECULAR,GL_EMISSION,GL_AMBIENT_AND_DIFFUSE
-glMultMatrix check m 16
-glPointParameter check params 1
-glTexEnv ifcheck params 1 pname GL_TEXTURE_ENV_MODE,GL_COMBINE_RGB,GL_COMBINE_ALPHA ifcheck params 4 pname GL_TEXTURE_ENV_COLOR
-glTexImage2D nullAllowed
-glTexSubImage2D nullAllowed
-glBufferData nullAllowed
-glTexParameter check params 1
-glQueryMatrixxOES check mantissa 16 check exponent 16 return -1
-glDrawTexfvOES check coords 5
-glDrawTexivOES check coords 5
-glDrawTexsvOES check coords 5
-glDrawTexxvOES check coords 5
-glBindFramebufferOES unsupported
-glBindRenderbufferOES unsupported
-glBlendEquation unsupported
-glBlendEquationSeparate unsupported
-glBlendFuncSeparate unsupported
-glCheckFramebufferStatusOES unsupported return 0
-glCurrentPaletteMatrixOES unsupported
-glDeleteFramebuffersOES unsupported
-glDeleteRenderbuffersOES unsupported
-glFramebufferRenderbufferOES unsupported
-glFramebufferStorageOES unsupported
-glFramebufferTexture2DOES unsupported
-glGenFramebuffersOES unsupported
-glGenRenderbuffersOES unsupported
-glGenerateMipmapOES unsupported
-glGetBufferParameter unsupported
-glGetFramebufferAttachmentParameterivOES unsupported
-glGetRenderbufferParameterivOES unsupported
-glGetTexGen unsupported
-glIsFramebufferOES unsupported return JNI_FALSE
-glIsRenderbufferOES unsupported return JNI_FALSE
-glLoadPaletteFromModelViewMatrixOES unsupported
-glMatrixIndexPointerOES unsupported
-glRenderbufferStorageOES unsupported return false
-glTexGen unsupported
-glTexGenf unsupported
-glTexGeni unsupported
-glTexGenx unsupported
-glWeightPointerOES unsupported
+glClipPlanef check equation 4 +glClipPlanex check equation 4 +glDeleteBuffers check buffers n +glDeleteTextures check textures n +glDrawElements check_AIOOBE indices count +glFog ifcheck params 1 pname GL_FOG_MODE,GL_FOG_DENSITY,GL_FOG_START,GL_FOG_END ifcheck params 4 pname GL_FOG_COLOR +glGenBuffers check buffers n +glGenTextures check textures n +glGetClipPlane check eqn 4 +glGetIntegerv ifcheck params 1 pname GL_ALPHA_BITS,GL_ALPHA_TEST_FUNC,GL_ALPHA_TEST_REF,GL_BLEND_DST,GL_BLUE_BITS,GL_COLOR_ARRAY_BUFFER_BINDING,GL_COLOR_ARRAY_SIZE,GL_COLOR_ARRAY_STRIDE,GL_COLOR_ARRAY_TYPE,GL_CULL_FACE,GL_DEPTH_BITS,GL_DEPTH_CLEAR_VALUE,GL_DEPTH_FUNC,GL_DEPTH_WRITEMASK,GL_FOG_DENSITY,GL_FOG_END,GL_FOG_MODE,GL_FOG_START,GL_FRONT_FACE,GL_GREEN_BITS,GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES,GL_IMPLEMENTATION_COLOR_READ_TYPE_OES,GL_LIGHT_MODEL_COLOR_CONTROL,GL_LIGHT_MODEL_LOCAL_VIEWER,GL_LIGHT_MODEL_TWO_SIDE,GL_LINE_SMOOTH_HINT,GL_LINE_WIDTH,GL_LOGIC_OP_MODE,GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES,GL_MATRIX_INDEX_ARRAY_SIZE_OES,GL_MATRIX_INDEX_ARRAY_STRIDE_OES,GL_MATRIX_INDEX_ARRAY_TYPE_OES,GL_MATRIX_MODE,GL_MAX_CLIP_PLANES,GL_MAX_ELEMENTS_INDICES,GL_MAX_ELEMENTS_VERTICES,GL_MAX_LIGHTS,GL_MAX_MODELVIEW_STACK_DEPTH,GL_MAX_PALETTE_MATRICES_OES,GL_MAX_PROJECTION_STACK_DEPTH,GL_MAX_TEXTURE_SIZE,GL_MAX_TEXTURE_STACK_DEPTH,GL_MAX_TEXTURE_UNITS,GL_MAX_VERTEX_UNITS_OES,GL_MODELVIEW_STACK_DEPTH,GL_NORMAL_ARRAY_BUFFER_BINDING,GL_NORMAL_ARRAY_STRIDE,GL_NORMAL_ARRAY_TYPE,GL_NUM_COMPRESSED_TEXTURE_FORMATS,GL_PACK_ALIGNMENT,GL_PERSPECTIVE_CORRECTION_HINT,GL_POINT_SIZE,GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES,GL_POINT_SIZE_ARRAY_STRIDE_OES,GL_POINT_SIZE_ARRAY_TYPE_OES,GL_POINT_SMOOTH_HINT,GL_POLYGON_OFFSET_FACTOR,GL_POLYGON_OFFSET_UNITS,GL_PROJECTION_STACK_DEPTH,GL_RED_BITS,GL_SHADE_MODEL,GL_STENCIL_BITS,GL_STENCIL_CLEAR_VALUE,GL_STENCIL_FAIL,GL_STENCIL_FUNC,GL_STENCIL_PASS_DEPTH_FAIL,GL_STENCIL_PASS_DEPTH_PASS,GL_STENCIL_REF,GL_STENCIL_VALUE_MASK,GL_STENCIL_WRITEMASK,GL_SUBPIXEL_BITS,GL_TEXTURE_BINDING_2D,GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING,GL_TEXTURE_COORD_ARRAY_SIZE,GL_TEXTURE_COORD_ARRAY_STRIDE,GL_TEXTURE_COORD_ARRAY_TYPE,GL_TEXTURE_STACK_DEPTH,GL_UNPACK_ALIGNMENT,GL_VERTEX_ARRAY_BUFFER_BINDING,GL_VERTEX_ARRAY_SIZE,GL_VERTEX_ARRAY_STRIDE,GL_VERTEX_ARRAY_TYPE,GL_WEIGHT_ARRAY_BUFFER_BINDING_OES,GL_WEIGHT_ARRAY_SIZE_OES,GL_WEIGHT_ARRAY_STRIDE_OES,GL_WEIGHT_ARRAY_TYPE_OES ifcheck params 2 pname GL_ALIASED_POINT_SIZE_RANGE,GL_ALIASED_LINE_WIDTH_RANGE,GL_DEPTH_RANGE,GL_MAX_VIEWPORT_DIMS,GL_SMOOTH_LINE_WIDTH_RANGE,GL_SMOOTH_POINT_SIZE_RANGE ifcheck params 4 pname GL_COLOR_CLEAR_VALUE,GL_COLOR_WRITEMASK,GL_FOG_COLOR,GL_LIGHT_MODEL_AMBIENT,GL_SCISSOR_BOX,GL_VIEWPORT ifcheck params 16 pname GL_MODELVIEW_MATRIX,GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES,GL_PROJECTION_MATRIX,GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES,GL_TEXTURE_MATRIX,GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES ifcheck params getNumCompressedTextureFormats() pname GL_COMPRESSED_TEXTURE_FORMATS +glGetLight ifcheck params 1 pname GL_SPOT_EXPONENT,GL_SPOT_CUTOFF,GL_CONSTANT_ATTENUATION,GL_LINEAR_ATTENUATION,GL_QUADRATIC_ATTENUATION ifcheck params 3 pname GL_SPOT_DIRECTION ifcheck params 4 pname GL_AMBIENT,GL_DIFFUSE,GL_SPECULAR,GL_EMISSION +glGetMaterial ifcheck params 1 pname GL_SHININESS ifcheck params 4 pname GL_AMBIENT,GL_DIFFUSE,GL_SPECULAR,GL_EMISSION,GL_AMBIENT_AND_DIFFUSE +glGetTexEnv ifcheck params 1 pname GL_TEXTURE_ENV_MODE,GL_COMBINE_RGB,GL_COMBINE_ALPHA ifcheck params 4 pname GL_TEXTURE_ENV_COLOR +glGetTexParameter check params 1 +glLightModel ifcheck params 1 pname GL_LIGHT_MODEL_TWO_SIDE ifcheck params 4 pname GL_LIGHT_MODEL_AMBIENT +glLight ifcheck params 1 pname GL_SPOT_EXPONENT,GL_SPOT_CUTOFF,GL_CONSTANT_ATTENUATION,GL_LINEAR_ATTENUATION,GL_QUADRATIC_ATTENUATION ifcheck params 3 pname GL_SPOT_DIRECTION ifcheck params 4 pname GL_AMBIENT,GL_DIFFUSE,GL_SPECULAR,GL_EMISSION +glLoadMatrix check m 16 +glMaterial ifcheck params 1 pname GL_SHININESS ifcheck params 4 pname GL_AMBIENT,GL_DIFFUSE,GL_SPECULAR,GL_EMISSION,GL_AMBIENT_AND_DIFFUSE +glMultMatrix check m 16 +glPointParameter check params 1 +glTexEnv ifcheck params 1 pname GL_TEXTURE_ENV_MODE,GL_COMBINE_RGB,GL_COMBINE_ALPHA ifcheck params 4 pname GL_TEXTURE_ENV_COLOR +glTexImage2D nullAllowed +glTexSubImage2D nullAllowed +glBufferData nullAllowed check data size +glBufferSubData check data size +glTexParameter check params 1 +glQueryMatrixxOES check mantissa 16 check exponent 16 return -1 +glDrawTexfvOES check coords 5 +glDrawTexivOES check coords 5 +glDrawTexsvOES check coords 5 +glDrawTexxvOES check coords 5 +glBindFramebufferOES unsupported +glBindRenderbufferOES unsupported +glBlendEquation unsupported +glBlendEquationSeparate unsupported +glBlendFuncSeparate unsupported +glCheckFramebufferStatusOES unsupported return 0 +glCurrentPaletteMatrixOES unsupported +glDeleteFramebuffersOES unsupported +glDeleteRenderbuffersOES unsupported +glFramebufferRenderbufferOES unsupported +glFramebufferStorageOES unsupported +glFramebufferTexture2DOES unsupported +glGenFramebuffersOES unsupported +glGenRenderbuffersOES unsupported +glGenerateMipmapOES unsupported +glGetBufferParameter unsupported +glGetFramebufferAttachmentParameterivOES unsupported +glGetRenderbufferParameterivOES unsupported +glGetTexGen unsupported +glIsFramebufferOES unsupported return JNI_FALSE +glIsRenderbufferOES unsupported return JNI_FALSE +glLoadPaletteFromModelViewMatrixOES unsupported +glMatrixIndexPointerOES unsupported +glRenderbufferStorageOES unsupported return false +glTexGen unsupported +glTexGenf unsupported +glTexGeni unsupported +glTexGenx unsupported +glWeightPointerOES unsupported diff --git a/opengl/tools/glgen/src/JniCodeEmitter.java b/opengl/tools/glgen/src/JniCodeEmitter.java index 73403575cf28..2cdb244c33c4 100644 --- a/opengl/tools/glgen/src/JniCodeEmitter.java +++ b/opengl/tools/glgen/src/JniCodeEmitter.java @@ -893,7 +893,7 @@ public class JniCodeEmitter { ") getDirectBufferPointer(_env, " + cname + "_buf);"); String iii = " "; - out.println(iii + indent + "if ( ! " + cname + " ) {"); + out.println(iii + indent + "if ( ! " + cname + " ) {"); out.println(iii + iii + indent + "return;"); out.println(iii + indent + "}"); } else { @@ -907,13 +907,13 @@ public class JniCodeEmitter { ");"); } + emitNativeBoundsChecks(cfunc, cname, out, true, + emitExceptionCheck, + offset, remaining, nullAllowed ? " " : " "); + if (nullAllowed) { out.println(indent + "}"); } - - emitNativeBoundsChecks(cfunc, cname, out, true, - emitExceptionCheck, - offset, remaining, " "); } } } diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsHelper.java index 3b91a383adb9..153a5ea76b5e 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsHelper.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsHelper.java @@ -45,7 +45,6 @@ public class SettingsHelper { private boolean mSilent; private boolean mVibrate; - private boolean mHasAutoBrightness; public SettingsHelper(Context context) { mContext = context; @@ -54,9 +53,6 @@ public class SettingsHelper { mContentService = ContentResolver.getContentService(); mPowerManager = IPowerManager.Stub.asInterface( ServiceManager.getService("power")); - - mHasAutoBrightness = context.getResources().getBoolean( - com.android.internal.R.bool.config_automatic_brightness_available); } /** @@ -71,18 +67,6 @@ public class SettingsHelper { public boolean restoreValue(String name, String value) { if (Settings.System.SCREEN_BRIGHTNESS.equals(name)) { setBrightness(Integer.parseInt(value)); - } else if (Settings.System.SCREEN_BRIGHTNESS_MODE.equals(name)) { - if (mHasAutoBrightness) { - // When setting auto-brightness, must reset the brightness afterwards - try { - int curBrightness = Settings.System.getInt(mContext.getContentResolver(), - Settings.System.SCREEN_BRIGHTNESS); - setAutoBrightness(Integer.parseInt(value) != 0); - setBrightness(curBrightness); - } catch (Settings.SettingNotFoundException e) { - // no brightness setting at all? weird. skip this then. - } - } } else if (Settings.System.SOUND_EFFECTS_ENABLED.equals(name)) { setSoundEffects(Integer.parseInt(value) == 1); } else if (Settings.Secure.LOCATION_PROVIDERS_ALLOWED.equals(name)) { @@ -92,16 +76,6 @@ public class SettingsHelper { return true; } - private void setAutoBrightness(boolean value) { - if (mPowerManager != null) { - try { - mPowerManager.setAutoBrightness(value); - } catch (RemoteException e) { - // unable to reach the power manager; skip - } - } - } - private void setGpsLocation(String value) { final String GPS = LocationManager.GPS_PROVIDER; boolean enabled = diff --git a/packages/SubscribedFeedsProvider/Android.mk b/packages/SubscribedFeedsProvider/Android.mk deleted file mode 100644 index bed6a168655a..000000000000 --- a/packages/SubscribedFeedsProvider/Android.mk +++ /dev/null @@ -1,11 +0,0 @@ -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_MODULE_TAGS := user - -LOCAL_SRC_FILES := $(call all-subdir-java-files) - -LOCAL_PACKAGE_NAME := SubscribedFeedsProvider -LOCAL_CERTIFICATE := platform - -include $(BUILD_PACKAGE) diff --git a/packages/SubscribedFeedsProvider/AndroidManifest.xml b/packages/SubscribedFeedsProvider/AndroidManifest.xml deleted file mode 100644 index a3938bd5f1d5..000000000000 --- a/packages/SubscribedFeedsProvider/AndroidManifest.xml +++ /dev/null @@ -1,35 +0,0 @@ -<manifest xmlns:android="http://schemas.android.com/apk/res/android" - package="com.android.providers.subscribedfeeds" - android:sharedUserId="android.uid.system"> - - <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> - <uses-permission android:name="android.permission.READ_SYNC_SETTINGS" /> - <uses-permission android:name="android.permission.SUBSCRIBED_FEEDS_READ" /> - <uses-permission android:name="android.permission.SUBSCRIBED_FEEDS_WRITE" /> - - <application android:process="system" - android:allowClearUserData="false" - android:icon="@drawable/app_icon" - android:label="@string/app_label"> - <uses-library android:name="com.google.android.gtalkservice" /> - <provider android:name="SubscribedFeedsProvider" - android:authorities="subscribedfeeds" - android:label="@string/provider_label" - android:multiprocess="false" - android:readPermission="android.permission.SUBSCRIBED_FEEDS_READ" - android:writePermission="android.permission.SUBSCRIBED_FEEDS_WRITE" /> - <receiver android:name="SubscribedFeedsBroadcastReceiver"> - <intent-filter> - <action android:name="android.intent.action.REMOTE_INTENT" /> - <category android:name="GSYNC_TICKLE"/> - </intent-filter> - <intent-filter> - <action android:name="android.intent.action.BOOT_COMPLETED" /> - </intent-filter> - <intent-filter> - <action android:name="com.android.subscribedfeeds.action.REFRESH" /> - </intent-filter> - </receiver> - <service android:name="SubscribedFeedsIntentService"/> - </application> -</manifest> diff --git a/packages/SubscribedFeedsProvider/MODULE_LICENSE_APACHE2 b/packages/SubscribedFeedsProvider/MODULE_LICENSE_APACHE2 deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/packages/SubscribedFeedsProvider/MODULE_LICENSE_APACHE2 +++ /dev/null diff --git a/packages/SubscribedFeedsProvider/NOTICE b/packages/SubscribedFeedsProvider/NOTICE deleted file mode 100644 index c5b1efa7aac7..000000000000 --- a/packages/SubscribedFeedsProvider/NOTICE +++ /dev/null @@ -1,190 +0,0 @@ - - Copyright (c) 2005-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. - - 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. - - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - diff --git a/packages/SubscribedFeedsProvider/res/drawable/app_icon.png b/packages/SubscribedFeedsProvider/res/drawable/app_icon.png Binary files differdeleted file mode 100644 index 13d8cdd4644d..000000000000 --- a/packages/SubscribedFeedsProvider/res/drawable/app_icon.png +++ /dev/null diff --git a/packages/SubscribedFeedsProvider/res/values-cs/strings.xml b/packages/SubscribedFeedsProvider/res/values-cs/strings.xml deleted file mode 100644 index 5b06f7b0b17f..000000000000 --- a/packages/SubscribedFeedsProvider/res/values-cs/strings.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- 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. ---> -<resources xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="app_label" msgid="5400580392303600842">"Synchronizace zdrojů"</string> - <string name="provider_label" msgid="3669714991966737047">"Zobrazit odběry"</string> -</resources> diff --git a/packages/SubscribedFeedsProvider/res/values-da/strings.xml b/packages/SubscribedFeedsProvider/res/values-da/strings.xml deleted file mode 100644 index f8867a26e721..000000000000 --- a/packages/SubscribedFeedsProvider/res/values-da/strings.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- 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. ---> -<resources xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="app_label" msgid="5400580392303600842">"Synkroniser feeds"</string> - <string name="provider_label" msgid="3669714991966737047">"Push-abonnementer"</string> -</resources> diff --git a/packages/SubscribedFeedsProvider/res/values-de/strings.xml b/packages/SubscribedFeedsProvider/res/values-de/strings.xml deleted file mode 100644 index 8bfd7219a029..000000000000 --- a/packages/SubscribedFeedsProvider/res/values-de/strings.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- 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. ---> -<resources xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="app_label" msgid="5400580392303600842">"Feedsynchronisierung"</string> - <string name="provider_label" msgid="3669714991966737047">"Push-Abos"</string> -</resources> diff --git a/packages/SubscribedFeedsProvider/res/values-el/strings.xml b/packages/SubscribedFeedsProvider/res/values-el/strings.xml deleted file mode 100644 index 11a3486e55db..000000000000 --- a/packages/SubscribedFeedsProvider/res/values-el/strings.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- 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. ---> -<resources xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="app_label" msgid="5400580392303600842">"Συγχρονισμός ροών δεδομένων"</string> - <string name="provider_label" msgid="3669714991966737047">"Προώθηση συνδρομών"</string> -</resources> diff --git a/packages/SubscribedFeedsProvider/res/values-es-rUS/strings.xml b/packages/SubscribedFeedsProvider/res/values-es-rUS/strings.xml deleted file mode 100644 index 75f1b9f4c0b1..000000000000 --- a/packages/SubscribedFeedsProvider/res/values-es-rUS/strings.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- 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. ---> -<resources xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="app_label" msgid="5400580392303600842">"Canales de sincronización"</string> - <string name="provider_label" msgid="3669714991966737047">"Suscripciones de inserción"</string> -</resources> diff --git a/packages/SubscribedFeedsProvider/res/values-es/strings.xml b/packages/SubscribedFeedsProvider/res/values-es/strings.xml deleted file mode 100644 index 59d169382d44..000000000000 --- a/packages/SubscribedFeedsProvider/res/values-es/strings.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- 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. ---> -<resources xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="app_label" msgid="5400580392303600842">"Sincronización de feeds"</string> - <string name="provider_label" msgid="3669714991966737047">"Enviar suscripciones"</string> -</resources> diff --git a/packages/SubscribedFeedsProvider/res/values-fr/strings.xml b/packages/SubscribedFeedsProvider/res/values-fr/strings.xml deleted file mode 100644 index ab1aae902c1f..000000000000 --- a/packages/SubscribedFeedsProvider/res/values-fr/strings.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- 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. ---> -<resources xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="app_label" msgid="5400580392303600842">"Synchronisation des flux"</string> - <string name="provider_label" msgid="3669714991966737047">"Abonnements Push"</string> -</resources> diff --git a/packages/SubscribedFeedsProvider/res/values-it/strings.xml b/packages/SubscribedFeedsProvider/res/values-it/strings.xml deleted file mode 100644 index 2a6dd54faaa7..000000000000 --- a/packages/SubscribedFeedsProvider/res/values-it/strings.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- 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. ---> -<resources xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="app_label" msgid="5400580392303600842">"Sincronizzazione feed"</string> - <string name="provider_label" msgid="3669714991966737047">"Sottoscrizioni push"</string> -</resources> diff --git a/packages/SubscribedFeedsProvider/res/values-ja/strings.xml b/packages/SubscribedFeedsProvider/res/values-ja/strings.xml deleted file mode 100644 index 6a0812aafd3e..000000000000 --- a/packages/SubscribedFeedsProvider/res/values-ja/strings.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- 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. ---> -<resources xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="app_label" msgid="5400580392303600842">"フィードの同期"</string> - <string name="provider_label" msgid="3669714991966737047">"プッシュ型登録"</string> -</resources> diff --git a/packages/SubscribedFeedsProvider/res/values-ko/strings.xml b/packages/SubscribedFeedsProvider/res/values-ko/strings.xml deleted file mode 100644 index 09127321b219..000000000000 --- a/packages/SubscribedFeedsProvider/res/values-ko/strings.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- 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. ---> -<resources xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="app_label" msgid="5400580392303600842">"피드 동기화"</string> - <string name="provider_label" msgid="3669714991966737047">"구독정보 푸시"</string> -</resources> diff --git a/packages/SubscribedFeedsProvider/res/values-nb/strings.xml b/packages/SubscribedFeedsProvider/res/values-nb/strings.xml deleted file mode 100644 index 30a2c5ea9636..000000000000 --- a/packages/SubscribedFeedsProvider/res/values-nb/strings.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- 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. ---> -<resources xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="app_label" msgid="5400580392303600842">"Strømsynkronisering"</string> - <string name="provider_label" msgid="3669714991966737047">"Push-abonnementer"</string> -</resources> diff --git a/packages/SubscribedFeedsProvider/res/values-nl/strings.xml b/packages/SubscribedFeedsProvider/res/values-nl/strings.xml deleted file mode 100644 index b74e66b72e3b..000000000000 --- a/packages/SubscribedFeedsProvider/res/values-nl/strings.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- 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. ---> -<resources xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="app_label" msgid="5400580392303600842">"Feeds synchroniseren"</string> - <string name="provider_label" msgid="3669714991966737047">"Abonnementen doorvoeren"</string> -</resources> diff --git a/packages/SubscribedFeedsProvider/res/values-pl/strings.xml b/packages/SubscribedFeedsProvider/res/values-pl/strings.xml deleted file mode 100644 index ed6c1d0e1c6c..000000000000 --- a/packages/SubscribedFeedsProvider/res/values-pl/strings.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- 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. ---> -<resources xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="app_label" msgid="5400580392303600842">"Synchronizowanie kanałów"</string> - <string name="provider_label" msgid="3669714991966737047">"Subskrypcje w trybie push"</string> -</resources> diff --git a/packages/SubscribedFeedsProvider/res/values-pt-rPT/strings.xml b/packages/SubscribedFeedsProvider/res/values-pt-rPT/strings.xml deleted file mode 100644 index a52fd202bd7f..000000000000 --- a/packages/SubscribedFeedsProvider/res/values-pt-rPT/strings.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- 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. ---> -<resources xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="app_label" msgid="5400580392303600842">"Sincronizar feeds"</string> - <string name="provider_label" msgid="3669714991966737047">"Subscrições de Emissão"</string> -</resources> diff --git a/packages/SubscribedFeedsProvider/res/values-pt/strings.xml b/packages/SubscribedFeedsProvider/res/values-pt/strings.xml deleted file mode 100644 index 081190dabede..000000000000 --- a/packages/SubscribedFeedsProvider/res/values-pt/strings.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- 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. ---> -<resources xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="app_label" msgid="5400580392303600842">"Sincronizar feeds"</string> - <string name="provider_label" msgid="3669714991966737047">"Enviar inscrições"</string> -</resources> diff --git a/packages/SubscribedFeedsProvider/res/values-ru/strings.xml b/packages/SubscribedFeedsProvider/res/values-ru/strings.xml deleted file mode 100644 index 24ead0aa06c7..000000000000 --- a/packages/SubscribedFeedsProvider/res/values-ru/strings.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- 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. ---> -<resources xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="app_label" msgid="5400580392303600842">"Фиды синхронизации"</string> - <string name="provider_label" msgid="3669714991966737047">"Подписки Push"</string> -</resources> diff --git a/packages/SubscribedFeedsProvider/res/values-sv/strings.xml b/packages/SubscribedFeedsProvider/res/values-sv/strings.xml deleted file mode 100644 index 55499c5a543f..000000000000 --- a/packages/SubscribedFeedsProvider/res/values-sv/strings.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- 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. ---> -<resources xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="app_label" msgid="5400580392303600842">"Synkroniseringsflöden"</string> - <string name="provider_label" msgid="3669714991966737047">"Push-prenumerationer"</string> -</resources> diff --git a/packages/SubscribedFeedsProvider/res/values-tr/strings.xml b/packages/SubscribedFeedsProvider/res/values-tr/strings.xml deleted file mode 100644 index baa333004cc3..000000000000 --- a/packages/SubscribedFeedsProvider/res/values-tr/strings.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- 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. ---> -<resources xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="app_label" msgid="5400580392303600842">"Senkronizasyon Yayınları"</string> - <string name="provider_label" msgid="3669714991966737047">"Abonelik Şart Koş"</string> -</resources> diff --git a/packages/SubscribedFeedsProvider/res/values-zh-rCN/strings.xml b/packages/SubscribedFeedsProvider/res/values-zh-rCN/strings.xml deleted file mode 100644 index 05edb805bb2f..000000000000 --- a/packages/SubscribedFeedsProvider/res/values-zh-rCN/strings.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- 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. ---> -<resources xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="app_label" msgid="5400580392303600842">"同步供稿"</string> - <string name="provider_label" msgid="3669714991966737047">"推送订阅"</string> -</resources> diff --git a/packages/SubscribedFeedsProvider/res/values-zh-rTW/strings.xml b/packages/SubscribedFeedsProvider/res/values-zh-rTW/strings.xml deleted file mode 100644 index 5e5bcc5c4d2e..000000000000 --- a/packages/SubscribedFeedsProvider/res/values-zh-rTW/strings.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- 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. ---> -<resources xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="app_label" msgid="5400580392303600842">"同步資訊提供"</string> - <string name="provider_label" msgid="3669714991966737047">"預先載入訂閱項目"</string> -</resources> diff --git a/packages/SubscribedFeedsProvider/res/values/strings.xml b/packages/SubscribedFeedsProvider/res/values/strings.xml deleted file mode 100644 index c4c2484380a0..000000000000 --- a/packages/SubscribedFeedsProvider/res/values/strings.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- 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. ---> - -<resources> - <!-- Title of the feed synchronization activity. --> - <string name="app_label">Sync Feeds</string> - - <!-- What to show in messaging that refers to this provider, e.g. AccountSyncSettings --> - <string name="provider_label">Push Subscriptions</string> - -</resources> - diff --git a/packages/SubscribedFeedsProvider/src/com/android/providers/subscribedfeeds/SubscribedFeedsBroadcastReceiver.java b/packages/SubscribedFeedsProvider/src/com/android/providers/subscribedfeeds/SubscribedFeedsBroadcastReceiver.java deleted file mode 100644 index ea14307d7def..000000000000 --- a/packages/SubscribedFeedsProvider/src/com/android/providers/subscribedfeeds/SubscribedFeedsBroadcastReceiver.java +++ /dev/null @@ -1,45 +0,0 @@ -/* -** Copyright 2006, 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.providers.subscribedfeeds; - -import android.app.Activity; -import android.content.BroadcastReceiver; -import android.content.Context; -import android.content.Intent; -import android.util.Log; - -/** - * Handles the XMPP_CONNECTED_ACTION intent by updating all the - * subscribed feeds with the new jabber id and initiating a sync - * for all subscriptions. - * - * Handles the TICKLE_ACTION intent by finding the matching - * subscribed feed and intiating a sync for it. - */ -public class SubscribedFeedsBroadcastReceiver extends BroadcastReceiver { - - private static final String TAG = "Sync"; - - public void onReceive(Context context, Intent intent) { - if (Log.isLoggable(TAG, Log.VERBOSE)) Log.v(TAG, "Received intent " + intent); - if (intent.getAction().equals(Intent.ACTION_REMOTE_INTENT)) { - setResultCode(Activity.RESULT_OK); - } - intent.setClass(context, SubscribedFeedsIntentService.class); - context.startService(intent); - } -} diff --git a/packages/SubscribedFeedsProvider/src/com/android/providers/subscribedfeeds/SubscribedFeedsIntentService.java b/packages/SubscribedFeedsProvider/src/com/android/providers/subscribedfeeds/SubscribedFeedsIntentService.java deleted file mode 100644 index 2e910b7cbe91..000000000000 --- a/packages/SubscribedFeedsProvider/src/com/android/providers/subscribedfeeds/SubscribedFeedsIntentService.java +++ /dev/null @@ -1,193 +0,0 @@ -package com.android.providers.subscribedfeeds; - -import android.content.Intent; -import android.content.Context; -import android.content.ContentResolver; -import android.content.ContentValues; -import android.content.SharedPreferences; -import android.util.Log; -import android.util.Config; -import android.util.EventLog; -import android.app.IntentService; -import android.provider.SubscribedFeeds; -import android.provider.SyncConstValue; -import android.database.Cursor; -import android.database.sqlite.SQLiteFullException; -import android.app.AlarmManager; -import android.app.PendingIntent; -import android.os.Bundle; -import android.text.TextUtils; -import android.accounts.Account; - -import java.util.ArrayList; -import java.util.Calendar; - -import com.google.android.collect.Lists; - -/** - * A service to handle various intents asynchronously. - */ -public class SubscribedFeedsIntentService extends IntentService { - private static final String TAG = "Sync"; - - private static final String[] sAccountProjection = - new String[] {SubscribedFeeds.Accounts._SYNC_ACCOUNT, - SubscribedFeeds.Accounts._SYNC_ACCOUNT_TYPE}; - - /** How often to refresh the subscriptions, in milliseconds */ - private static final long SUBSCRIPTION_REFRESH_INTERVAL = 1000L * 60 * 60 * 24; // one day - - private static final String sRefreshTime = "refreshTime"; - - private static final String sSubscribedFeedsPrefs = "subscribedFeeds"; - - private static final String REMOTE_INTENT_ACTION = Intent.ACTION_REMOTE_INTENT; - - private static final String SUBSCRIBED_FEEDS_REFRESH_ACTION = - "com.android.subscribedfeeds.action.REFRESH"; - - private static final int LOG_TICKLE = 2742; - - public SubscribedFeedsIntentService() { - super("SubscribedFeedsIntentService"); - } - - protected void onHandleIntent(Intent intent) { - if (REMOTE_INTENT_ACTION.equals(intent.getAction())) { - boolean fromTrustedServer = intent.getBooleanExtra( - "android.intent.extra.from_trusted_server", false); - if (fromTrustedServer) { - String accountName = intent.getStringExtra("account"); - String token = intent.getStringExtra(Intent.EXTRA_REMOTE_INTENT_TOKEN); - - if (TextUtils.isEmpty(accountName) || TextUtils.isEmpty(token)) { - if (Config.LOGD) { - Log.d(TAG, "Ignoring malformed tickle -- missing account or token."); - } - return; - } - - if (Config.LOGD) { - Log.d(TAG, "Received network tickle for " - + accountName + " - " + token); - } - - handleTickle(this, accountName, token); - } else { - if (Log.isLoggable(TAG, Log.VERBOSE)) { - Log.v(TAG, "Ignoring tickle -- not from trusted server."); - } - } - - } else if (Intent.ACTION_BOOT_COMPLETED.equals( - intent.getAction())) { - if (Config.LOGD) { - Log.d(TAG, "Received boot completed action"); - } - // load the time from the shared preferences and schedule an alarm - long refreshTime = getSharedPreferences( - sSubscribedFeedsPrefs, - Context.MODE_WORLD_READABLE).getLong(sRefreshTime, 0); - scheduleRefresh(this, refreshTime); - } else if (SUBSCRIBED_FEEDS_REFRESH_ACTION.equals(intent.getAction())) { - if (Config.LOGD) { - Log.d(TAG, "Received sSubscribedFeedsRefreshIntent"); - } - handleRefreshAlarm(this); - } - } - private void scheduleRefresh(Context context, long when) { - AlarmManager alarmManager = (AlarmManager) context.getSystemService( - Context.ALARM_SERVICE); - PendingIntent pendingIntent = PendingIntent.getBroadcast(context, - 0, new Intent(SUBSCRIBED_FEEDS_REFRESH_ACTION), 0); - alarmManager.set(AlarmManager.RTC, when, pendingIntent); - } - - private void handleTickle(Context context, String accountName, String feed) { - Cursor c = null; - final String where = SubscribedFeeds.Feeds._SYNC_ACCOUNT + "= ? " - + "and " + SubscribedFeeds.Feeds._SYNC_ACCOUNT_TYPE + "= ? " - + "and " + SubscribedFeeds.Feeds.FEED + "= ?"; - try { - // TODO(fredq) fix the hardcoded type - final Account account = new Account(accountName, "com.google"); - c = context.getContentResolver().query(SubscribedFeeds.Feeds.CONTENT_URI, - null, where, new String[]{account.name, account.type, feed}, null); - if (c.getCount() == 0) { - Log.w(TAG, "received tickle for non-existent feed: " - + "account " + accountName + ", feed " + feed); - EventLog.writeEvent(LOG_TICKLE, "unknown"); - } - while (c.moveToNext()) { - // initiate a sync - String authority = c.getString(c.getColumnIndexOrThrow( - SubscribedFeeds.Feeds.AUTHORITY)); - EventLog.writeEvent(LOG_TICKLE, authority); - if (!ContentResolver.getSyncAutomatically(account, authority)) { - Log.d(TAG, "supressing tickle since provider " + authority - + " is configured to not sync automatically"); - continue; - } - Bundle extras = new Bundle(); - extras.putString("feed", feed); - ContentResolver.requestSync(account, authority, extras); - } - } finally { - if (c != null) c.deactivate(); - } - } - - /** - * Cause all the subscribed feeds to be marked dirty and their - * authtokens to be refreshed, which will result in new authtokens - * being sent to the subscription server. Then reschedules this - * event for one week in the future. - * - * @param context Context we are running within - */ - private void handleRefreshAlarm(Context context) { - // retrieve the list of accounts from the subscribed feeds - ArrayList<Account> accounts = Lists.newArrayList(); - ContentResolver contentResolver = context.getContentResolver(); - Cursor c = contentResolver.query(SubscribedFeeds.Accounts.CONTENT_URI, - sAccountProjection, null, null, null); - try { - while (c.moveToNext()) { - String accountName = c.getString(0); - String accountType = c.getString(1); - accounts.add(new Account(accountName, accountType)); - } - } finally { - c.close(); - } - - // Clear the auth tokens for all these accounts so that we are sure - // they will still be valid until the next time we refresh them. - // TODO(fredq): add this when the google login service is done - - // mark the feeds dirty, by setting the accounts to the same value, - // which will trigger a sync. - try { - ContentValues values = new ContentValues(); - for (Account account : accounts) { - values.put(SyncConstValue._SYNC_ACCOUNT, account.name); - values.put(SyncConstValue._SYNC_ACCOUNT_TYPE, account.type); - contentResolver.update(SubscribedFeeds.Feeds.CONTENT_URI, values, - SubscribedFeeds.Feeds._SYNC_ACCOUNT + "=? AND " - + SubscribedFeeds.Feeds._SYNC_ACCOUNT_TYPE + "=?", - new String[] {account.name, account.type}); - } - } catch (SQLiteFullException e) { - Log.w(TAG, "disk full while trying to mark the feeds as dirty, skipping"); - } - - // Schedule a refresh. - long refreshTime = Calendar.getInstance().getTimeInMillis() + SUBSCRIPTION_REFRESH_INTERVAL; - scheduleRefresh(context, refreshTime); - SharedPreferences.Editor editor = context.getSharedPreferences(sSubscribedFeedsPrefs, - Context.MODE_WORLD_READABLE).edit(); - editor.putLong(sRefreshTime, refreshTime); - editor.commit(); - } -} diff --git a/packages/SubscribedFeedsProvider/src/com/android/providers/subscribedfeeds/SubscribedFeedsProvider.java b/packages/SubscribedFeedsProvider/src/com/android/providers/subscribedfeeds/SubscribedFeedsProvider.java deleted file mode 100644 index 858508285293..000000000000 --- a/packages/SubscribedFeedsProvider/src/com/android/providers/subscribedfeeds/SubscribedFeedsProvider.java +++ /dev/null @@ -1,391 +0,0 @@ -/* -** Copyright 2006, 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.providers.subscribedfeeds; - -import android.accounts.Account; -import android.content.UriMatcher; -import android.content.*; -import android.database.Cursor; -import android.database.DatabaseUtils; -import android.database.sqlite.SQLiteDatabase; -import android.database.sqlite.SQLiteQueryBuilder; -import android.net.Uri; -import android.provider.SubscribedFeeds; -import android.text.TextUtils; -import android.util.Config; -import android.util.Log; - -import java.util.Collections; -import java.util.Map; -import java.util.HashMap; - -/** - * Manages a list of feeds for which this client is interested in receiving - * change notifications. - */ -public class SubscribedFeedsProvider extends AbstractSyncableContentProvider { - private static final String TAG = "SubscribedFeedsProvider"; - private static final String DATABASE_NAME = "subscribedfeeds.db"; - private static final int DATABASE_VERSION = 11; - - private static final int FEEDS = 1; - private static final int FEED_ID = 2; - private static final int DELETED_FEEDS = 3; - private static final int ACCOUNTS = 4; - - private static final Map<String, String> ACCOUNTS_PROJECTION_MAP; - - private static final UriMatcher sURLMatcher = - new UriMatcher(UriMatcher.NO_MATCH); - - private static String sFeedsTable = "feeds"; - private static Uri sFeedsUrl = - Uri.parse("content://subscribedfeeds/feeds/"); - private static String sDeletedFeedsTable = "_deleted_feeds"; - private static Uri sDeletedFeedsUrl = - Uri.parse("content://subscribedfeeds/deleted_feeds/"); - - public SubscribedFeedsProvider() { - super(DATABASE_NAME, DATABASE_VERSION, sFeedsUrl); - } - - static { - sURLMatcher.addURI("subscribedfeeds", "feeds", FEEDS); - sURLMatcher.addURI("subscribedfeeds", "feeds/#", FEED_ID); - sURLMatcher.addURI("subscribedfeeds", "deleted_feeds", DELETED_FEEDS); - sURLMatcher.addURI("subscribedfeeds", "accounts", ACCOUNTS); - } - - @Override - protected boolean upgradeDatabase(SQLiteDatabase db, - int oldVersion, int newVersion) { - Log.w(TAG, "Upgrading database from version " + oldVersion + - " to " + newVersion + - ", which will destroy all old data"); - db.execSQL("DROP TRIGGER IF EXISTS feed_cleanup"); - db.execSQL("DROP TABLE IF EXISTS _deleted_feeds"); - db.execSQL("DROP TABLE IF EXISTS feeds"); - bootstrapDatabase(db); - return false; // this was lossy - } - - @Override - protected void bootstrapDatabase(SQLiteDatabase db) { - super.bootstrapDatabase(db); - db.execSQL("CREATE TABLE feeds (" + - "_id INTEGER PRIMARY KEY," + - "_sync_account TEXT," + // From the sync source - "_sync_account_type TEXT," + // From the sync source - "_sync_id TEXT," + // From the sync source - "_sync_time TEXT," + // From the sync source - "_sync_version TEXT," + // From the sync source - "_sync_local_id INTEGER," + // Used while syncing, - // never stored persistently - "_sync_dirty INTEGER," + // if syncable, set if the record - // has local, unsynced, changes - "_sync_mark INTEGER," + // Used to filter out new rows - "feed TEXT," + - "authority TEXT," + - "service TEXT" + - ");"); - - // Trigger to completely remove feeds data when they're deleted - db.execSQL("CREATE TRIGGER feed_cleanup DELETE ON feeds " + - "WHEN old._sync_id is not null " + - "BEGIN " + - "INSERT INTO _deleted_feeds " + - "(_sync_id, _sync_account, _sync_account_type, _sync_version) " + - "VALUES (old._sync_id, old._sync_account, old._sync_account_type, " + - "old._sync_version);" + - "END"); - - db.execSQL("CREATE TABLE _deleted_feeds (" + - "_sync_version TEXT," + // From the sync source - "_sync_id TEXT," + - (isTemporary() ? "_sync_local_id INTEGER," : "") + // Used while syncing, - "_sync_account TEXT," + - "_sync_account_type TEXT," + - "_sync_mark INTEGER, " + // Used to filter out new rows - "UNIQUE(_sync_id))"); - } - - @Override - protected void onAccountsChanged(Account[] accountsArray) { - super.onAccountsChanged(accountsArray); - for (Account account : accountsArray) { - if (account.type.equals("com.google")) { - ContentResolver.setSyncAutomatically(account, "subscribedfeeds", true); - } - } - } - - @Override - protected void onDatabaseOpened(SQLiteDatabase db) { - db.markTableSyncable("feeds", "_deleted_feeds"); - } - - @Override - protected Iterable<FeedMerger> getMergers() { - return Collections.singletonList(new FeedMerger()); - } - - @Override - public String getType(Uri url) { - int match = sURLMatcher.match(url); - switch (match) { - case FEEDS: - return SubscribedFeeds.Feeds.CONTENT_TYPE; - case FEED_ID: - return SubscribedFeeds.Feeds.CONTENT_ITEM_TYPE; - default: - throw new IllegalArgumentException("Unknown URL"); - } - } - - @Override - public Cursor queryInternal(Uri url, String[] projection, - String selection, String[] selectionArgs, String sortOrder) { - SQLiteQueryBuilder qb = new SQLiteQueryBuilder(); - - - // Generate the body of the query - int match = sURLMatcher.match(url); - - if (Config.LOGV) Log.v(TAG, "SubscribedFeedsProvider.query: url=" + - url + ", match is " + match); - - switch (match) { - case FEEDS: - qb.setTables(sFeedsTable); - break; - case DELETED_FEEDS: - if (!isTemporary()) { - throw new UnsupportedOperationException(); - } - qb.setTables(sDeletedFeedsTable); - break; - case ACCOUNTS: - qb.setTables(sFeedsTable); - qb.setDistinct(true); - qb.setProjectionMap(ACCOUNTS_PROJECTION_MAP); - return qb.query(getDatabase(), projection, selection, selectionArgs, - SubscribedFeeds.Feeds._SYNC_ACCOUNT_TYPE + "," - + SubscribedFeeds.Feeds._SYNC_ACCOUNT, null, sortOrder); - case FEED_ID: - qb.setTables(sFeedsTable); - qb.appendWhere(sFeedsTable + "._id="); - qb.appendWhere(url.getPathSegments().get(1)); - break; - default: - throw new IllegalArgumentException("Unknown URL " + url); - } - - // run the query - return qb.query(getDatabase(), projection, selection, selectionArgs, - null, null, sortOrder); - } - - @Override - public Uri insertInternal(Uri url, ContentValues initialValues) { - final SQLiteDatabase db = getDatabase(); - Uri resultUri = null; - long rowID; - - int match = sURLMatcher.match(url); - switch (match) { - case FEEDS: - ContentValues values = new ContentValues(initialValues); - values.put(SubscribedFeeds.Feeds._SYNC_DIRTY, 1); - rowID = db.insert(sFeedsTable, "feed", values); - if (rowID > 0) { - resultUri = Uri.parse( - "content://subscribedfeeds/feeds/" + rowID); - } - break; - - case DELETED_FEEDS: - if (!isTemporary()) { - throw new UnsupportedOperationException(); - } - rowID = db.insert(sDeletedFeedsTable, "_sync_id", - initialValues); - if (rowID > 0) { - resultUri = Uri.parse( - "content://subscribedfeeds/deleted_feeds/" + rowID); - } - break; - - default: - throw new UnsupportedOperationException( - "Cannot insert into URL: " + url); - } - - return resultUri; - } - - @Override - public int deleteInternal(Uri url, String userWhere, String[] whereArgs) { - final SQLiteDatabase db = getDatabase(); - String changedItemId; - - switch (sURLMatcher.match(url)) { - case FEEDS: - changedItemId = null; - break; - case FEED_ID: - changedItemId = url.getPathSegments().get(1); - break; - default: - throw new UnsupportedOperationException( - "Cannot delete that URL: " + url); - } - - String where = addIdToWhereClause(changedItemId, userWhere); - return db.delete(sFeedsTable, where, whereArgs); - } - - @Override - public int updateInternal(Uri url, ContentValues initialValues, - String userWhere, String[] whereArgs) { - final SQLiteDatabase db = getDatabase(); - ContentValues values = new ContentValues(initialValues); - values.put(SubscribedFeeds.Feeds._SYNC_DIRTY, 1); - - String changedItemId; - switch (sURLMatcher.match(url)) { - case FEEDS: - changedItemId = null; - break; - - case FEED_ID: - changedItemId = url.getPathSegments().get(1); - break; - - default: - throw new UnsupportedOperationException( - "Cannot update URL: " + url); - } - - String where = addIdToWhereClause(changedItemId, userWhere); - return db.update(sFeedsTable, values, where, whereArgs); - } - - private static String addIdToWhereClause(String id, String where) { - if (id != null) { - StringBuilder whereSb = new StringBuilder("_id="); - whereSb.append(id); - if (!TextUtils.isEmpty(where)) { - whereSb.append(" AND ("); - whereSb.append(where); - whereSb.append(')'); - } - return whereSb.toString(); - } else { - return where; - } - } - - private class FeedMerger extends AbstractTableMerger { - private ContentValues mValues = new ContentValues(); - FeedMerger() { - super(getDatabase(), sFeedsTable, sFeedsUrl, sDeletedFeedsTable, sDeletedFeedsUrl); - } - - @Override - protected void notifyChanges() { - getContext().getContentResolver().notifyChange( - sFeedsUrl, null /* data change observer */, - false /* do not sync to network */); - } - - @Override - public void insertRow(ContentProvider diffs, Cursor diffsCursor) { - final SQLiteDatabase db = getDatabase(); - // We don't ever want to add entries from the server, instead - // we want to tell the server to delete any entries we receive - // from the server that aren't already known by the client. - mValues.clear(); - DatabaseUtils.cursorStringToContentValues(diffsCursor, - SubscribedFeeds.Feeds._SYNC_ID, mValues); - DatabaseUtils.cursorStringToContentValues(diffsCursor, - SubscribedFeeds.Feeds._SYNC_ACCOUNT, mValues); - DatabaseUtils.cursorStringToContentValues(diffsCursor, - SubscribedFeeds.Feeds._SYNC_ACCOUNT_TYPE, mValues); - DatabaseUtils.cursorStringToContentValues(diffsCursor, - SubscribedFeeds.Feeds._SYNC_VERSION, mValues); - db.replace(mDeletedTable, SubscribedFeeds.Feeds._SYNC_ID, mValues); - } - - @Override - public void updateRow(long localPersonID, ContentProvider diffs, - Cursor diffsCursor) { - updateOrResolveRow(localPersonID, null, diffs, diffsCursor, false); - } - - @Override - public void resolveRow(long localPersonID, String syncID, - ContentProvider diffs, Cursor diffsCursor) { - updateOrResolveRow(localPersonID, syncID, diffs, diffsCursor, true); - } - - protected void updateOrResolveRow(long localPersonID, String syncID, - ContentProvider diffs, Cursor diffsCursor, boolean conflicts) { - mValues.clear(); - // only copy over the fields that the server owns - DatabaseUtils.cursorStringToContentValues(diffsCursor, - SubscribedFeeds.Feeds._SYNC_ID, mValues); - DatabaseUtils.cursorStringToContentValues(diffsCursor, - SubscribedFeeds.Feeds._SYNC_TIME, mValues); - DatabaseUtils.cursorStringToContentValues(diffsCursor, - SubscribedFeeds.Feeds._SYNC_VERSION, mValues); - mValues.put(SubscribedFeeds.Feeds._SYNC_DIRTY, conflicts ? 1 : 0); - final SQLiteDatabase db = getDatabase(); - db.update(mTable, mValues, - SubscribedFeeds.Feeds._ID + '=' + localPersonID, null); - } - - @Override - public void deleteRow(Cursor localCursor) { - // Since the client is the authority we don't actually delete - // the row when the server says it has been deleted. Instead - // we break the association with the server by clearing out - // the id, time, and version, then we mark it dirty so that - // it will be synced back to the server. - long localPersonId = localCursor.getLong(localCursor.getColumnIndex( - SubscribedFeeds.Feeds._ID)); - mValues.clear(); - mValues.put(SubscribedFeeds.Feeds._SYNC_DIRTY, 1); - mValues.put(SubscribedFeeds.Feeds._SYNC_ID, (String) null); - mValues.put(SubscribedFeeds.Feeds._SYNC_TIME, (Long) null); - mValues.put(SubscribedFeeds.Feeds._SYNC_VERSION, (String) null); - final SQLiteDatabase db = getDatabase(); - db.update(mTable, mValues, SubscribedFeeds.Feeds._ID + '=' + localPersonId, null); - localCursor.moveToNext(); - } - } - - static { - Map<String, String> map; - - map = new HashMap<String, String>(); - ACCOUNTS_PROJECTION_MAP = map; - map.put(SubscribedFeeds.Accounts._COUNT, "COUNT(*) AS _count"); - map.put(SubscribedFeeds.Accounts._SYNC_ACCOUNT, SubscribedFeeds.Accounts._SYNC_ACCOUNT); - map.put(SubscribedFeeds.Accounts._SYNC_ACCOUNT_TYPE, - SubscribedFeeds.Accounts._SYNC_ACCOUNT_TYPE); - } -} diff --git a/packages/VpnServices/res/values-nb/strings.xml b/packages/VpnServices/res/values-nb/strings.xml index 506f99926de0..9aac82867b04 100644 --- a/packages/VpnServices/res/values-nb/strings.xml +++ b/packages/VpnServices/res/values-nb/strings.xml @@ -16,7 +16,7 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <string name="app_label" msgid="4589592829302498102">"VPN-tjenester"</string> - <string name="vpn_notification_title_connected" msgid="8598654486956133580">"<xliff:g id="PROFILENAME">%s</xliff:g> er VPN-tilkoblet"</string> - <string name="vpn_notification_title_disconnected" msgid="6216572264382192027">"<xliff:g id="PROFILENAME">%s</xliff:g> er VPN-frakoblet"</string> + <string name="vpn_notification_title_connected" msgid="8598654486956133580">"Koblet til VPNet <xliff:g id="PROFILENAME">%s</xliff:g>"</string> + <string name="vpn_notification_title_disconnected" msgid="6216572264382192027">"Koblet fra VPNet <xliff:g id="PROFILENAME">%s</xliff:g>"</string> <string name="vpn_notification_hint_disconnected" msgid="1952209867082269429">"Trykk for å koble til et VPN på nytt"</string> </resources> diff --git a/packages/VpnServices/res/values-zh-rCN/strings.xml b/packages/VpnServices/res/values-zh-rCN/strings.xml index 4de0f3862c93..ee8878fa9876 100644 --- a/packages/VpnServices/res/values-zh-rCN/strings.xml +++ b/packages/VpnServices/res/values-zh-rCN/strings.xml @@ -15,8 +15,8 @@ --> <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="app_label" msgid="4589592829302498102">"VPN 服务"</string> - <string name="vpn_notification_title_connected" msgid="8598654486956133580">"<xliff:g id="PROFILENAME">%s</xliff:g> VPN 已连接"</string> - <string name="vpn_notification_title_disconnected" msgid="6216572264382192027">"<xliff:g id="PROFILENAME">%s</xliff:g> VPN 连接已断开"</string> - <string name="vpn_notification_hint_disconnected" msgid="1952209867082269429">"触摸可重新连接 VPN。"</string> + <string name="app_label" msgid="4589592829302498102">"虚拟专用网服务"</string> + <string name="vpn_notification_title_connected" msgid="8598654486956133580">"VPN“<xliff:g id="PROFILENAME">%s</xliff:g>”已连接"</string> + <string name="vpn_notification_title_disconnected" msgid="6216572264382192027">"VPN“<xliff:g id="PROFILENAME">%s</xliff:g>”连接已断开"</string> + <string name="vpn_notification_hint_disconnected" msgid="1952209867082269429">"轻触可重新连接到虚拟专用网。"</string> </resources> diff --git a/services/java/com/android/server/AppWidgetService.java b/services/java/com/android/server/AppWidgetService.java index f8b8ecc91a0a..6bf7102827f5 100644 --- a/services/java/com/android/server/AppWidgetService.java +++ b/services/java/com/android/server/AppWidgetService.java @@ -51,6 +51,7 @@ import java.io.FileOutputStream; import java.io.PrintWriter; import java.util.ArrayList; import java.util.List; +import java.util.Locale; import java.util.HashMap; import java.util.HashSet; @@ -105,6 +106,7 @@ class AppWidgetService extends IAppWidgetService.Stub } Context mContext; + Locale mLocale; PackageManager mPackageManager; AlarmManager mAlarmManager; ArrayList<Provider> mInstalledProviders = new ArrayList<Provider>(); @@ -131,6 +133,11 @@ class AppWidgetService extends IAppWidgetService.Stub mContext.registerReceiver(mBroadcastReceiver, new IntentFilter(Intent.ACTION_BOOT_COMPLETED), null, null); + // Register for configuration changes so we can update the names + // of the widgets when the locale changes. + mContext.registerReceiver(mBroadcastReceiver, + new IntentFilter(Intent.ACTION_CONFIGURATION_CHANGED), null, null); + // Register for broadcasts about package install, etc., so we can // update the provider list. IntentFilter filter = new IntentFilter(); @@ -1046,6 +1053,22 @@ class AppWidgetService extends IAppWidgetService.Stub //Log.d(TAG, "received " + action); if (Intent.ACTION_BOOT_COMPLETED.equals(action)) { sendInitialBroadcasts(); + } else if (Intent.ACTION_CONFIGURATION_CHANGED.equals(action)) { + Locale revised = Locale.getDefault(); + if (revised == null || mLocale == null || + !(revised.equals(mLocale))) { + mLocale = revised; + + synchronized (mAppWidgetIds) { + int N = mInstalledProviders.size(); + for (int i=N-1; i>=0; i--) { + Provider p = mInstalledProviders.get(i); + String pkgName = p.info.provider.getPackageName(); + updateProvidersForPackageLocked(pkgName); + } + saveStateLocked(); + } + } } else { Uri uri = intent.getData(); if (uri == null) { diff --git a/services/java/com/android/server/BackupManagerService.java b/services/java/com/android/server/BackupManagerService.java index 82a7c1c6d90e..c3b591ee64f9 100644 --- a/services/java/com/android/server/BackupManagerService.java +++ b/services/java/com/android/server/BackupManagerService.java @@ -76,6 +76,7 @@ import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; +import java.util.Random; class BackupManagerService extends IBackupManager.Stub { private static final String TAG = "BackupManagerService"; @@ -85,6 +86,9 @@ class BackupManagerService extends IBackupManager.Stub { // trigger an immediate pass. private static final long BACKUP_INTERVAL = AlarmManager.INTERVAL_HOUR; + // Random variation in backup scheduling time to avoid server load spikes + private static final int FUZZ_MILLIS = 5 * 60 * 1000; + // The amount of time between the initial provisioning of the device and // the first backup pass. private static final long FIRST_BACKUP_INTERVAL = 12 * AlarmManager.INTERVAL_HOUR; @@ -1256,9 +1260,20 @@ class BackupManagerService extends IBackupManager.Stub { // ----- Restore handling ----- - private boolean signaturesMatch(Signature[] storedSigs, Signature[] deviceSigs) { + private boolean signaturesMatch(Signature[] storedSigs, PackageInfo target) { + // If the target resides on the system partition, we allow it to restore + // data from the like-named package in a restore set even if the signatures + // do not match. (Unlike general applications, those flashed to the system + // partition will be signed with the device's platform certificate, so on + // different phones the same system app will have different signatures.) + if ((target.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0) { + if (DEBUG) Log.v(TAG, "System app " + target.packageName + " - skipping sig check"); + return true; + } + // Allow unsigned apps, but not signed on one device and unsigned on the other // !!! TODO: is this the right policy? + Signature[] deviceSigs = target.signatures; if (DEBUG) Log.v(TAG, "signaturesMatch(): stored=" + storedSigs + " device=" + deviceSigs); if ((storedSigs == null || storedSigs.length == 0) @@ -1461,7 +1476,7 @@ class BackupManagerService extends IBackupManager.Stub { continue; } - if (!signaturesMatch(metaInfo.signatures, packageInfo.signatures)) { + if (!signaturesMatch(metaInfo.signatures, packageInfo)) { Log.w(TAG, "Signature mismatch restoring " + packageName); EventLog.writeEvent(RESTORE_AGENT_FAILURE_EVENT, packageName, "Signature mismatch"); @@ -1949,9 +1964,15 @@ class BackupManagerService extends IBackupManager.Stub { } private void startBackupAlarmsLocked(long delayBeforeFirstBackup) { - long when = System.currentTimeMillis() + delayBeforeFirstBackup; - mAlarmManager.setInexactRepeating(AlarmManager.RTC_WAKEUP, when, - BACKUP_INTERVAL, mRunBackupIntent); + // We used to use setInexactRepeating(), but that may be linked to + // backups running at :00 more often than not, creating load spikes. + // Schedule at an exact time for now, and also add a bit of "fuzz". + + Random random = new Random(); + long when = System.currentTimeMillis() + delayBeforeFirstBackup + + random.nextInt(FUZZ_MILLIS); + mAlarmManager.setRepeating(AlarmManager.RTC_WAKEUP, when, + BACKUP_INTERVAL + random.nextInt(FUZZ_MILLIS), mRunBackupIntent); mNextBackupPass = when; } diff --git a/services/java/com/android/server/HardwareService.java b/services/java/com/android/server/HardwareService.java index 29c13e04f7f8..3e3cf065bedb 100755 --- a/services/java/com/android/server/HardwareService.java +++ b/services/java/com/android/server/HardwareService.java @@ -52,6 +52,7 @@ public class HardwareService extends IHardwareService.Stub { static final int LIGHT_FLASH_NONE = 0; static final int LIGHT_FLASH_TIMED = 1; + static final int LIGHT_FLASH_HARDWARE = 2; private final LinkedList<Vibration> mVibrations; private Vibration mCurrentVibration; @@ -59,8 +60,6 @@ public class HardwareService extends IHardwareService.Stub { private boolean mAttentionLightOn; private boolean mPulsing; - private boolean mAutoBrightnessAvailable; - private class Vibration implements IBinder.DeathRecipient { private final IBinder mToken; private final long mTimeout; @@ -127,13 +126,10 @@ public class HardwareService extends IHardwareService.Stub { mVibrations = new LinkedList<Vibration>(); mBatteryStats = BatteryStatsService.getService(); - + IntentFilter filter = new IntentFilter(); filter.addAction(Intent.ACTION_SCREEN_OFF); context.registerReceiver(mIntentReceiver, filter); - - mAutoBrightnessAvailable = context.getResources().getBoolean( - com.android.internal.R.bool.config_automatic_brightness_available); } protected void finalize() throws Throwable { @@ -244,15 +240,15 @@ public class HardwareService extends IHardwareService.Stub { Binder.restoreCallingIdentity(identity); } } - + public boolean getFlashlightEnabled() { return Hardware.getFlashlightEnabled(); } - + public void setFlashlightEnabled(boolean on) { - if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.FLASHLIGHT) + if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.FLASHLIGHT) != PackageManager.PERMISSION_GRANTED && - mContext.checkCallingOrSelfPermission(android.Manifest.permission.HARDWARE_TEST) + mContext.checkCallingOrSelfPermission(android.Manifest.permission.HARDWARE_TEST) != PackageManager.PERMISSION_GRANTED) { throw new SecurityException("Requires FLASHLIGHT or HARDWARE_TEST permission"); } @@ -260,9 +256,9 @@ public class HardwareService extends IHardwareService.Stub { } public void enableCameraFlash(int milliseconds) { - if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.CAMERA) + if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED && - mContext.checkCallingOrSelfPermission(android.Manifest.permission.HARDWARE_TEST) + mContext.checkCallingOrSelfPermission(android.Manifest.permission.HARDWARE_TEST) != PackageManager.PERMISSION_GRANTED) { throw new SecurityException("Requires CAMERA or HARDWARE_TEST permission"); } @@ -287,19 +283,13 @@ public class HardwareService extends IHardwareService.Stub { setLight_native(mNativePointer, light, color, mode, onMS, offMS); } - void setAutoBrightness_UNCHECKED(boolean on) { - if (mAutoBrightnessAvailable) { - setAutoBrightness_native(mNativePointer, on); - } - } - - public void setAttentionLight(boolean on) { + public void setAttentionLight(boolean on, int color) { // Not worthy of a permission. We shouldn't have a flashlight permission. synchronized (this) { mAttentionLightOn = on; mPulsing = false; - setLight_native(mNativePointer, LIGHT_ID_ATTENTION, on ? 0xffffffff : 0, - LIGHT_FLASH_NONE, 0, 0); + setLight_native(mNativePointer, LIGHT_ID_ATTENTION, color, + LIGHT_FLASH_HARDWARE, on ? 3 : 0, 0); } } @@ -313,8 +303,8 @@ public class HardwareService extends IHardwareService.Stub { } if (!mAttentionLightOn && !mPulsing) { mPulsing = true; - setLight_native(mNativePointer, LIGHT_ID_ATTENTION, 0xff101010, - LIGHT_FLASH_NONE, 0, 0); + setLight_native(mNativePointer, LIGHT_ID_ATTENTION, 0x00ffffff, + LIGHT_FLASH_HARDWARE, 7, 0); mH.sendMessageDelayed(Message.obtain(mH, 1), 3000); } } @@ -402,7 +392,7 @@ public class HardwareService extends IHardwareService.Stub { private class VibrateThread extends Thread { final Vibration mVibration; boolean mDone; - + VibrateThread(Vibration vib) { mVibration = vib; mWakeLock.acquire(); @@ -436,7 +426,7 @@ public class HardwareService extends IHardwareService.Stub { long duration = 0; while (!mDone) { - // add off-time duration to any accumulated on-time duration + // add off-time duration to any accumulated on-time duration if (index < len) { duration += pattern[index++]; } @@ -489,11 +479,10 @@ public class HardwareService extends IHardwareService.Stub { } } }; - + private static native int init_native(); private static native void finalize_native(int ptr); - private static native void setAutoBrightness_native(int ptr, boolean automatic); private static native void setLight_native(int ptr, int light, int color, int mode, int onMS, int offMS); @@ -501,7 +490,7 @@ public class HardwareService extends IHardwareService.Stub { private final PowerManager.WakeLock mWakeLock; private final IBatteryStats mBatteryStats; - + volatile VibrateThread mThread; private int mNativePointer; diff --git a/services/java/com/android/server/InputDevice.java b/services/java/com/android/server/InputDevice.java index eaad3b7990cc..6eb6242b31bc 100644 --- a/services/java/com/android/server/InputDevice.java +++ b/services/java/com/android/server/InputDevice.java @@ -65,6 +65,7 @@ public class InputDevice { // This is the last generated pointer data, ordered to match // mPointerIds. + boolean mSkipLastPointers; int mLastNumPointers = 0; final int[] mLastData = new int[MotionEvent.NUM_SAMPLE_DATA * MAX_POINTERS]; @@ -511,6 +512,11 @@ public class InputDevice { long curTimeNano, Display display, int orientation, int metaState) { + if (mSkipLastPointers) { + mSkipLastPointers = false; + mLastNumPointers = 0; + } + if (mNextNumPointers <= 0 && mLastNumPointers <= 0) { return null; } diff --git a/services/java/com/android/server/InputMethodManagerService.java b/services/java/com/android/server/InputMethodManagerService.java index 1da2b47d1446..e2e0ba9cc0b9 100644 --- a/services/java/com/android/server/InputMethodManagerService.java +++ b/services/java/com/android/server/InputMethodManagerService.java @@ -41,6 +41,7 @@ import android.content.IntentFilter; import android.content.DialogInterface.OnCancelListener; import android.content.Intent; import android.content.ServiceConnection; +import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.content.pm.ServiceInfo; @@ -366,16 +367,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub // Uh oh, current input method is no longer around! // Pick another one... Log.i(TAG, "Current input method removed: " + curInputMethodId); - List<InputMethodInfo> enabled = getEnabledInputMethodListLocked(); - if (enabled != null && enabled.size() > 0) { - changed = true; - curIm = enabled.get(0); - curInputMethodId = curIm.getId(); - Log.i(TAG, "Switching to: " + curInputMethodId); - Settings.Secure.putString(mContext.getContentResolver(), - Settings.Secure.DEFAULT_INPUT_METHOD, - curInputMethodId); - } else if (curIm != null) { + if (!chooseNewDefaultIME()) { changed = true; curIm = null; curInputMethodId = ""; @@ -389,16 +381,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub } else if (curIm == null) { // We currently don't have a default input method... is // one now available? - List<InputMethodInfo> enabled = getEnabledInputMethodListLocked(); - if (enabled != null && enabled.size() > 0) { - changed = true; - curIm = enabled.get(0); - curInputMethodId = curIm.getId(); - Log.i(TAG, "New default input method: " + curInputMethodId); - Settings.Secure.putString(mContext.getContentResolver(), - Settings.Secure.DEFAULT_INPUT_METHOD, - curInputMethodId); - } + changed = chooseNewDefaultIME(); } if (changed) { @@ -1369,6 +1352,23 @@ public class InputMethodManagerService extends IInputMethodManager.Stub return false; } + private boolean isSystemIme(InputMethodInfo inputMethod) { + return (inputMethod.getServiceInfo().applicationInfo.flags + & ApplicationInfo.FLAG_SYSTEM) != 0; + } + + private boolean chooseNewDefaultIME() { + List<InputMethodInfo> enabled = getEnabledInputMethodListLocked(); + if (enabled != null && enabled.size() > 0) { + Settings.Secure.putString(mContext.getContentResolver(), + Settings.Secure.DEFAULT_INPUT_METHOD, + enabled.get(0).getId()); + return true; + } + + return false; + } + void buildInputMethodListLocked(ArrayList<InputMethodInfo> list, HashMap<String, InputMethodInfo> map) { list.clear(); @@ -1399,6 +1399,11 @@ public class InputMethodManagerService extends IInputMethodManager.Stub list.add(p); map.put(p.getId(), p); + // System IMEs are enabled by default + if (isSystemIme(p)) { + setInputMethodEnabled(p.getId(), true); + } + if (DEBUG) { Log.d(TAG, "Found a third-party input method " + p); } @@ -1409,6 +1414,14 @@ public class InputMethodManagerService extends IInputMethodManager.Stub Log.w(TAG, "Unable to load input method " + compName, e); } } + + String defaultIme = Settings.Secure.getString(mContext + .getContentResolver(), Settings.Secure.DEFAULT_INPUT_METHOD); + if (!map.containsKey(defaultIme)) { + if (chooseNewDefaultIME()) { + updateFromSettingsLocked(); + } + } } // ---------------------------------------------------------------------- diff --git a/services/java/com/android/server/KeyInputQueue.java b/services/java/com/android/server/KeyInputQueue.java index 5d65c714e77c..d68ccfab000c 100644 --- a/services/java/com/android/server/KeyInputQueue.java +++ b/services/java/com/android/server/KeyInputQueue.java @@ -689,7 +689,8 @@ public abstract class KeyInputQueue { ev, curTime, curTimeNano); if (doMotion && ms.mNextNumPointers > 0 - && ms.mLastNumPointers == 0) { + && (ms.mLastNumPointers == 0 + || ms.mSkipLastPointers)) { doMotion = !generateVirtualKeyDown(di, ev, curTime, curTimeNano); } @@ -703,7 +704,7 @@ public abstract class KeyInputQueue { me = ms.generateAbsMotion(di, curTime, curTimeNano, mDisplay, mOrientation, mGlobalMetaState); - if (false) Log.v(TAG, "Absolute: x=" + if (DEBUG_POINTERS) Log.v(TAG, "Absolute: x=" + di.mAbs.mNextData[MotionEvent.SAMPLE_X] + " y=" + di.mAbs.mNextData[MotionEvent.SAMPLE_Y] @@ -729,6 +730,7 @@ public abstract class KeyInputQueue { ms.mLastData, 0, num * MotionEvent.NUM_SAMPLE_DATA); ms.mLastNumPointers = num; + ms.mSkipLastPointers = true; } ms.finish(); diff --git a/services/java/com/android/server/LocationManagerService.java b/services/java/com/android/server/LocationManagerService.java index d1b3bd06c513..bbb43d79d3a2 100644 --- a/services/java/com/android/server/LocationManagerService.java +++ b/services/java/com/android/server/LocationManagerService.java @@ -1709,6 +1709,7 @@ public class LocationManagerService extends ILocationManager.Stub implements Run boolean supportsSpeed, boolean supportsBearing, int powerRequirement, int accuracy) { checkMockPermissionsSafe(); + long identity = Binder.clearCallingIdentity(); synchronized (mLock) { MockProvider provider = new MockProvider(name, this, requiresNetwork, requiresSatellite, @@ -1731,6 +1732,7 @@ public class LocationManagerService extends ILocationManager.Stub implements Run mLastKnownLocation.put(name, null); updateProvidersLocked(); } + Binder.restoreCallingIdentity(identity); } public void removeTestProvider(String provider) { @@ -1740,6 +1742,7 @@ public class LocationManagerService extends ILocationManager.Stub implements Run if (mockProvider == null) { throw new IllegalArgumentException("Provider \"" + provider + "\" unknown"); } + long identity = Binder.clearCallingIdentity(); removeProvider(mProvidersByName.get(provider)); mMockProviders.remove(mockProvider); // reinstall real provider if we were mocking GPS or network provider @@ -1752,6 +1755,7 @@ public class LocationManagerService extends ILocationManager.Stub implements Run } mLastKnownLocation.put(provider, null); updateProvidersLocked(); + Binder.restoreCallingIdentity(identity); } } @@ -1787,6 +1791,7 @@ public class LocationManagerService extends ILocationManager.Stub implements Run if (mockProvider == null) { throw new IllegalArgumentException("Provider \"" + provider + "\" unknown"); } + long identity = Binder.clearCallingIdentity(); if (enabled) { mockProvider.enable(); mEnabledProviders.add(provider); @@ -1797,6 +1802,7 @@ public class LocationManagerService extends ILocationManager.Stub implements Run mDisabledProviders.add(provider); } updateProvidersLocked(); + Binder.restoreCallingIdentity(identity); } } @@ -1807,9 +1813,11 @@ public class LocationManagerService extends ILocationManager.Stub implements Run if (mockProvider == null) { throw new IllegalArgumentException("Provider \"" + provider + "\" unknown"); } + long identity = Binder.clearCallingIdentity(); mEnabledProviders.remove(provider); mDisabledProviders.remove(provider); updateProvidersLocked(); + Binder.restoreCallingIdentity(identity); } } diff --git a/services/java/com/android/server/PackageManagerService.java b/services/java/com/android/server/PackageManagerService.java index 6289d4f8f54e..a83459edaba5 100644 --- a/services/java/com/android/server/PackageManagerService.java +++ b/services/java/com/android/server/PackageManagerService.java @@ -872,6 +872,10 @@ class PackageManagerService extends IPackageManager.Stub { } PackageInfo generatePackageInfo(PackageParser.Package p, int flags) { + if ((flags & PackageManager.GET_UNINSTALLED_PACKAGES) != 0) { + // The package has been uninstalled but has retained data and resources. + return PackageParser.generatePackageInfo(p, null, flags); + } final PackageSetting ps = (PackageSetting)p.mExtras; if (ps == null) { return null; @@ -6340,7 +6344,9 @@ class PackageManagerService extends IPackageManager.Stub { continue; } for (PackageSetting pkg:sus.packages) { - if (pkg.pkg.requestedPermissions.contains(eachPerm)) { + if (pkg.pkg != null && + !pkg.pkg.packageName.equalsIgnoreCase(deletedPs.pkg.packageName) && + pkg.pkg.requestedPermissions.contains(eachPerm)) { used = true; break; } @@ -6355,7 +6361,9 @@ class PackageManagerService extends IPackageManager.Stub { int newGids[] = globalGids; for (String eachPerm : sus.grantedPermissions) { BasePermission bp = mPermissions.get(eachPerm); - newGids = appendInts(newGids, bp.gids); + if (bp != null) { + newGids = appendInts(newGids, bp.gids); + } } sus.gids = newGids; } @@ -6436,12 +6444,17 @@ class PackageManagerService extends IPackageManager.Stub { // Keep the old settings around until we know the new ones have // been successfully written. if (mSettingsFilename.exists()) { - if (mBackupSettingsFilename.exists()) { - mBackupSettingsFilename.delete(); - } - if (!mSettingsFilename.renameTo(mBackupSettingsFilename)) { - Log.w(TAG, "Unable to backup package manager settings, current changes will be lost at reboot"); - return; + // Presence of backup settings file indicates that we failed + // to persist settings earlier. So preserve the older + // backup for future reference since the current settings + // might have been corrupted. + if (!mBackupSettingsFilename.exists()) { + if (!mSettingsFilename.renameTo(mBackupSettingsFilename)) { + Log.w(TAG, "Unable to backup package manager settings, current changes will be lost at reboot"); + return; + } + } else { + Log.w(TAG, "Preserving older settings backup"); } } @@ -6708,6 +6721,13 @@ class PackageManagerService extends IPackageManager.Stub { str = new FileInputStream(mBackupSettingsFilename); mReadMessages.append("Reading from backup settings file\n"); Log.i(TAG, "Reading from backup settings file!"); + if (mSettingsFilename.exists()) { + // If both the backup and settings file exist, we + // ignore the settings since it might have been + // corrupted. + Log.w(TAG, "Cleaning up settings file " + mSettingsFilename); + mSettingsFilename.delete(); + } } catch (java.io.IOException e) { // We'll try for the normal settings file. } diff --git a/services/java/com/android/server/PowerManagerService.java b/services/java/com/android/server/PowerManagerService.java index e1bea37ba839..611a86e3576a 100644 --- a/services/java/com/android/server/PowerManagerService.java +++ b/services/java/com/android/server/PowerManagerService.java @@ -28,6 +28,7 @@ import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.content.pm.PackageManager; +import android.content.res.Resources; import android.database.Cursor; import android.hardware.Sensor; import android.hardware.SensorEvent; @@ -53,6 +54,7 @@ import android.view.WindowManagerPolicy; import static android.provider.Settings.System.DIM_SCREEN; import static android.provider.Settings.System.SCREEN_BRIGHTNESS; import static android.provider.Settings.System.SCREEN_BRIGHTNESS_MODE; +import static android.provider.Settings.System.SCREEN_BRIGHTNESS_MODE_AUTOMATIC; import static android.provider.Settings.System.SCREEN_OFF_TIMEOUT; import static android.provider.Settings.System.STAY_ON_WHILE_PLUGGED_IN; @@ -64,7 +66,7 @@ import java.util.Observable; import java.util.Observer; class PowerManagerService extends IPowerManager.Stub - implements LocalPowerManager, Watchdog.Monitor, SensorEventListener { + implements LocalPowerManager, Watchdog.Monitor { private static final String TAG = "PowerManagerService"; static final String PARTIAL_NAME = "PowerManagerService"; @@ -88,6 +90,12 @@ class PowerManagerService extends IPowerManager.Stub private static final int LONG_KEYLIGHT_DELAY = 6000; // t+6 sec private static final int LONG_DIM_TIME = 7000; // t+N-5 sec + // How long to wait to debounce light sensor changes. + private static final int LIGHT_SENSOR_DELAY = 1000; + + // For debouncing the proximity sensor. + private static final int PROXIMITY_SENSOR_DELAY = 1000; + // trigger proximity if distance is less than 5 cm private static final float PROXIMITY_THRESHOLD = 5.0f; @@ -126,6 +134,8 @@ class PowerManagerService extends IPowerManager.Stub static final boolean ANIMATE_KEYBOARD_LIGHTS = false; static final int ANIM_STEPS = 60/4; + // Slower animation for autobrightness changes + static final int AUTOBRIGHTNESS_ANIM_STEPS = 60; // These magic numbers are the initial state of the LEDs at boot. Ideally // we should read them from the driver, but our current hardware returns 0 @@ -155,6 +165,8 @@ class PowerManagerService extends IPowerManager.Stub private boolean mKeyboardVisible = false; private boolean mUserActivityAllowed = true; private boolean mProximitySensorActive = false; + private int mProximityPendingValue = -1; // -1 == nothing, 0 == inactive, 1 == active + private long mLastProximityEventTime; private int mTotalDelaySetting; private int mKeylightDelay; private int mDimDelay; @@ -189,6 +201,11 @@ class PowerManagerService extends IPowerManager.Stub private BatteryService mBatteryService; private SensorManager mSensorManager; private Sensor mProximitySensor; + private Sensor mLightSensor; + private boolean mLightSensorEnabled; + private float mLightSensorValue = -1; + private float mLightSensorPendingValue = -1; + private int mLightSensorBrightness = -1; private boolean mDimScreen = true; private long mNextTimeout; private volatile int mPokey = 0; @@ -199,6 +216,12 @@ class PowerManagerService extends IPowerManager.Stub private long mScreenOnStartTime; private boolean mPreventScreenOn; private int mScreenBrightnessOverride = -1; + private boolean mUseSoftwareAutoBrightness; + private boolean mAutoBrightessEnabled; + private int[] mAutoBrightnessLevels; + private int[] mLcdBacklightValues; + private int[] mButtonBacklightValues; + private int[] mKeyboardBacklightValues; // Used when logging number and duration of touch-down cycles private long mTotalTouchDownTime; @@ -207,6 +230,7 @@ class PowerManagerService extends IPowerManager.Stub // could be either static or controllable at runtime private static final boolean mSpew = false; + private static final boolean mDebugLightSensor = (false || mSpew); /* static PrintStream mLog; @@ -344,6 +368,9 @@ class PowerManagerService extends IPowerManager.Stub // DIM_SCREEN //mDimScreen = getInt(DIM_SCREEN) != 0; + // SCREEN_BRIGHTNESS_MODE + setScreenBrightnessMode(getInt(SCREEN_BRIGHTNESS_MODE)); + // recalculate everything setScreenOffTimeoutsLocked(); } @@ -415,12 +442,30 @@ class PowerManagerService extends IPowerManager.Stub mScreenOffIntent = new Intent(Intent.ACTION_SCREEN_OFF); mScreenOffIntent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY); - ContentResolver resolver = mContext.getContentResolver(); + Resources resources = mContext.getResources(); + + // read settings for auto-brightness + mUseSoftwareAutoBrightness = resources.getBoolean( + com.android.internal.R.bool.config_automatic_brightness_available); + if (mUseSoftwareAutoBrightness) { + mAutoBrightnessLevels = resources.getIntArray( + com.android.internal.R.array.config_autoBrightnessLevels); + mLcdBacklightValues = resources.getIntArray( + com.android.internal.R.array.config_autoBrightnessLcdBacklightValues); + mButtonBacklightValues = resources.getIntArray( + com.android.internal.R.array.config_autoBrightnessButtonBacklightValues); + mKeyboardBacklightValues = resources.getIntArray( + com.android.internal.R.array.config_autoBrightnessKeyboardBacklightValues); + } + + ContentResolver resolver = mContext.getContentResolver(); Cursor settingsCursor = resolver.query(Settings.System.CONTENT_URI, null, "(" + Settings.System.NAME + "=?) or (" + Settings.System.NAME + "=?) or (" + + Settings.System.NAME + "=?) or (" + Settings.System.NAME + "=?)", - new String[]{STAY_ON_WHILE_PLUGGED_IN, SCREEN_OFF_TIMEOUT, DIM_SCREEN}, + new String[]{STAY_ON_WHILE_PLUGGED_IN, SCREEN_OFF_TIMEOUT, DIM_SCREEN, + SCREEN_BRIGHTNESS_MODE}, null); mSettings = new ContentQueryMap(settingsCursor, Settings.System.NAME, true, mHandler); SettingsObserver settingsObserver = new SettingsObserver(); @@ -441,12 +486,13 @@ class PowerManagerService extends IPowerManager.Stub // And explicitly do the initial update of our cached settings updateGservicesValues(); - // turn everything on - setPowerState(ALL_BRIGHT); - - // set auto brightness mode to user setting - boolean brightnessMode = Settings.System.getInt(resolver, SCREEN_BRIGHTNESS_MODE, 1) != 0; - mHardware.setAutoBrightness_UNCHECKED(brightnessMode); + if (mUseSoftwareAutoBrightness) { + // turn the screen on + setPowerState(SCREEN_BRIGHT); + } else { + // turn everything on + setPowerState(ALL_BRIGHT); + } synchronized (mHandlerThread) { mInitComplete = true; @@ -542,7 +588,11 @@ class PowerManagerService extends IPowerManager.Stub switch (wl.flags & LOCK_MASK) { case PowerManager.FULL_WAKE_LOCK: - wl.minState = (mKeyboardVisible ? ALL_BRIGHT : SCREEN_BUTTON_BRIGHT); + if (mUseSoftwareAutoBrightness) { + wl.minState = SCREEN_BRIGHT; + } else { + wl.minState = (mKeyboardVisible ? ALL_BRIGHT : SCREEN_BUTTON_BRIGHT); + } break; case PowerManager.SCREEN_BRIGHT_WAKE_LOCK: wl.minState = SCREEN_BRIGHT; @@ -840,6 +890,14 @@ class PowerManagerService extends IPowerManager.Stub pw.println(" mStayOnWhilePluggedInScreenDimLock=" + mStayOnWhilePluggedInScreenDimLock); pw.println(" mStayOnWhilePluggedInPartialLock=" + mStayOnWhilePluggedInPartialLock); pw.println(" mPreventScreenOnPartialLock=" + mPreventScreenOnPartialLock); + pw.println(" mProximitySensorActive=" + mProximitySensorActive); + pw.println(" mProximityPendingValue=" + mProximityPendingValue); + pw.println(" mLastProximityEventTime=" + mLastProximityEventTime); + pw.println(" mLightSensorEnabled=" + mLightSensorEnabled); + pw.println(" mLightSensorValue=" + mLightSensorValue); + pw.println(" mLightSensorPendingValue=" + mLightSensorPendingValue); + pw.println(" mUseSoftwareAutoBrightness=" + mUseSoftwareAutoBrightness); + pw.println(" mAutoBrightessEnabled=" + mAutoBrightessEnabled); mScreenBrightness.dump(pw, " mScreenBrightness: "); mKeyboardBrightness.dump(pw, " mKeyboardBrightness: "); mButtonBrightness.dump(pw, " mButtonBrightness: "); @@ -1164,7 +1222,7 @@ class PowerManagerService extends IPowerManager.Stub // Finally, set the flag that prevents the screen from turning on. // (Below, in setPowerState(), we'll check mPreventScreenOn and - // we *won't* call Power.setScreenState(true) if it's set.) + // we *won't* call setScreenStateLocked(true) if it's set.) mPreventScreenOn = true; } else { // (Re)enable the screen. @@ -1182,9 +1240,9 @@ class PowerManagerService extends IPowerManager.Stub Log.d(TAG, "preventScreenOn: turning on after a prior preventScreenOn(true)!"); } - int err = Power.setScreenState(true); + int err = setScreenStateLocked(true); if (err != 0) { - Log.w(TAG, "preventScreenOn: error from Power.setScreenState(): " + err); + Log.w(TAG, "preventScreenOn: error from setScreenStateLocked(): " + err); } } @@ -1239,6 +1297,22 @@ class PowerManagerService extends IPowerManager.Stub } }; + private int setScreenStateLocked(boolean on) { + int err = Power.setScreenState(on); + if (err == 0 && mUseSoftwareAutoBrightness) { + enableLightSensor(on); + if (!on) { + // make sure button and key backlights are off too + mHardware.setLightBrightness_UNCHECKED(HardwareService.LIGHT_ID_BUTTONS, 0); + mHardware.setLightBrightness_UNCHECKED(HardwareService.LIGHT_ID_KEYBOARD, 0); + // clear current value so we will update based on the new conditions + // when the sensor is reenabled. + mLightSensorValue = -1; + } + } + return err; + } + private void setPowerState(int state) { setPowerState(state, false, false); @@ -1271,8 +1345,8 @@ class PowerManagerService extends IPowerManager.Stub if (newState == mPowerState) { return; } - - if (!mDoneBooting) { + + if (!mDoneBooting && !mUseSoftwareAutoBrightness) { newState |= ALL_BRIGHT; } @@ -1327,7 +1401,7 @@ class PowerManagerService extends IPowerManager.Stub reallyTurnScreenOn = false; } if (reallyTurnScreenOn) { - err = Power.setScreenState(true); + err = setScreenStateLocked(true); long identity = Binder.clearCallingIdentity(); try { mBatteryStats.noteScreenBrightness( @@ -1339,7 +1413,7 @@ class PowerManagerService extends IPowerManager.Stub Binder.restoreCallingIdentity(identity); } } else { - Power.setScreenState(false); + setScreenStateLocked(false); // But continue as if we really did turn the screen on... err = 0; } @@ -1384,7 +1458,7 @@ class PowerManagerService extends IPowerManager.Stub EventLog.writeEvent(LOG_POWER_SCREEN_STATE, 0, becauseOfUser ? 1 : 0, mTotalTouchDownTime, mTouchCycles); mLastTouchDown = 0; - int err = Power.setScreenState(false); + int err = setScreenStateLocked(false); if (mScreenOnStartTime != 0) { mScreenOnTime += SystemClock.elapsedRealtime() - mScreenOnStartTime; mScreenOnStartTime = 0; @@ -1693,6 +1767,9 @@ class PowerManagerService extends IPowerManager.Stub try { if (mScreenBrightnessOverride >= 0) { return mScreenBrightnessOverride; + } else if (mLightSensorBrightness >= 0 && mUseSoftwareAutoBrightness + && mAutoBrightessEnabled) { + return mLightSensorBrightness; } final int brightness = Settings.System.getInt(mContext.getContentResolver(), SCREEN_BRIGHTNESS); @@ -1716,6 +1793,8 @@ class PowerManagerService extends IPowerManager.Stub } private void forceUserActivityLocked() { + // cancel animation so userActivity will succeed + mScreenBrightness.animating = false; boolean savedActivityAllowed = mUserActivityAllowed; mUserActivityAllowed = true; userActivity(SystemClock.uptimeMillis(), false); @@ -1755,7 +1834,6 @@ class PowerManagerService extends IPowerManager.Stub return; } - if (false) { if (((mPokey & POKE_LOCK_IGNORE_CHEEK_EVENTS) != 0)) { Log.d(TAG, "userActivity !!!");//, new RuntimeException()); @@ -1773,11 +1851,17 @@ class PowerManagerService extends IPowerManager.Stub + " mProximitySensorActive=" + mProximitySensorActive + " force=" + force); } + // ignore user activity if we are in the process of turning off the screen + if (mScreenBrightness.animating && mScreenBrightness.targetValue == 0) { + Log.d(TAG, "ignoring user activity while turning off screen"); + return; + } if (mLastEventTime <= time || force) { mLastEventTime = time; if ((mUserActivityAllowed && !mProximitySensorActive) || force) { - // Only turn on button backlights if a button was pressed. - if (eventType == BUTTON_EVENT) { + // Only turn on button backlights if a button was pressed + // and auto brightness is disabled + if (eventType == BUTTON_EVENT && !mUseSoftwareAutoBrightness) { mUserState = (mKeyboardVisible ? ALL_BRIGHT : SCREEN_BUTTON_BRIGHT); } else { // don't clear button/keyboard backlights when the screen is touched. @@ -1802,6 +1886,113 @@ class PowerManagerService extends IPowerManager.Stub } } + private int getAutoBrightnessValue(int sensorValue, int[] values) { + try { + int i; + for (i = 0; i < mAutoBrightnessLevels.length; i++) { + if (sensorValue < mAutoBrightnessLevels[i]) { + break; + } + } + return values[i]; + } catch (Exception e) { + // guard against null pointer or index out of bounds errors + Log.e(TAG, "getAutoBrightnessValue", e); + return 255; + } + } + + private Runnable mProximityTask = new Runnable() { + public void run() { + synchronized (mLocks) { + if (mProximityPendingValue != -1) { + proximityChangedLocked(mProximityPendingValue == 1); + mProximityPendingValue = -1; + } + } + } + }; + + private Runnable mAutoBrightnessTask = new Runnable() { + public void run() { + synchronized (mLocks) { + int value = (int)mLightSensorPendingValue; + if (value >= 0) { + mLightSensorPendingValue = -1; + lightSensorChangedLocked(value); + } + } + } + }; + + private void lightSensorChangedLocked(int value) { + if (mDebugLightSensor) { + Log.d(TAG, "lightSensorChangedLocked " + value); + } + + if (mLightSensorValue != value) { + mLightSensorValue = value; + if ((mPowerState & BATTERY_LOW_BIT) == 0) { + int lcdValue = getAutoBrightnessValue(value, mLcdBacklightValues); + int buttonValue = getAutoBrightnessValue(value, mButtonBacklightValues); + int keyboardValue; + if (mKeyboardVisible) { + keyboardValue = getAutoBrightnessValue(value, mKeyboardBacklightValues); + } else { + keyboardValue = 0; + } + mLightSensorBrightness = lcdValue; + + if (mDebugLightSensor) { + Log.d(TAG, "lcdValue " + lcdValue); + Log.d(TAG, "buttonValue " + buttonValue); + Log.d(TAG, "keyboardValue " + keyboardValue); + } + + boolean startAnimation = false; + if (mAutoBrightessEnabled && mScreenBrightnessOverride < 0) { + if (ANIMATE_SCREEN_LIGHTS) { + if (mScreenBrightness.setTargetLocked(lcdValue, + AUTOBRIGHTNESS_ANIM_STEPS, INITIAL_SCREEN_BRIGHTNESS, + (int)mScreenBrightness.curValue)) { + startAnimation = true; + } + } else { + mHardware.setLightBrightness_UNCHECKED(HardwareService.LIGHT_ID_BACKLIGHT, + lcdValue); + } + } + if (ANIMATE_BUTTON_LIGHTS) { + if (mButtonBrightness.setTargetLocked(buttonValue, + AUTOBRIGHTNESS_ANIM_STEPS, INITIAL_BUTTON_BRIGHTNESS, + (int)mButtonBrightness.curValue)) { + startAnimation = true; + } + } else { + mHardware.setLightBrightness_UNCHECKED(HardwareService.LIGHT_ID_BUTTONS, + buttonValue); + } + if (ANIMATE_KEYBOARD_LIGHTS) { + if (mKeyboardBrightness.setTargetLocked(keyboardValue, + AUTOBRIGHTNESS_ANIM_STEPS, INITIAL_BUTTON_BRIGHTNESS, + (int)mKeyboardBrightness.curValue)) { + startAnimation = true; + } + } else { + mHardware.setLightBrightness_UNCHECKED(HardwareService.LIGHT_ID_KEYBOARD, + keyboardValue); + } + if (startAnimation) { + if (mDebugLightSensor) { + Log.i(TAG, "lightSensorChangedLocked scheduling light animator"); + } + mHandler.removeCallbacks(mLightAnimator); + mHandler.post(mLightAnimator); + } + } + } + } + /** * The user requested that we go to sleep (probably with the power button). * This overrides all wake locks that are held. @@ -1865,12 +2056,22 @@ class PowerManagerService extends IPowerManager.Stub if (mSpew) { Log.d(TAG, "setKeyboardVisibility: " + visible); } - mKeyboardVisible = visible; - // don't signal user activity if the screen is off; other code - // will take care of turning on due to a true change to the lid - // switch and synchronized with the lock screen. - if ((mPowerState & SCREEN_ON_BIT) != 0) { - userActivity(SystemClock.uptimeMillis(), false, BUTTON_EVENT, true); + if (mKeyboardVisible != visible) { + mKeyboardVisible = visible; + // don't signal user activity if the screen is off; other code + // will take care of turning on due to a true change to the lid + // switch and synchronized with the lock screen. + if ((mPowerState & SCREEN_ON_BIT) != 0) { + if (mUseSoftwareAutoBrightness) { + // force recompute of backlight values + if (mLightSensorValue >= 0) { + int value = (int)mLightSensorValue; + mLightSensorValue = -1; + lightSensorChangedLocked(value); + } + } + userActivity(SystemClock.uptimeMillis(), false, BUTTON_EVENT, true); + } } } } @@ -1881,7 +2082,21 @@ class PowerManagerService extends IPowerManager.Stub public void enableUserActivity(boolean enabled) { synchronized (mLocks) { mUserActivityAllowed = enabled; - mLastEventTime = SystemClock.uptimeMillis(); // we might need to pass this in + } + } + + private void setScreenBrightnessMode(int mode) { + boolean enabled = (mode == SCREEN_BRIGHTNESS_MODE_AUTOMATIC); + if (mUseSoftwareAutoBrightness && mAutoBrightessEnabled != enabled) { + mAutoBrightessEnabled = enabled; + if (screenIsOn()) { + // force recompute of backlight values + if (mLightSensorValue >= 0) { + int value = (int)mLightSensorValue; + mLightSensorValue = -1; + lightSensorChangedLocked(value); + } + } } } @@ -2031,6 +2246,14 @@ class PowerManagerService extends IPowerManager.Stub } void systemReady() { + mSensorManager = new SensorManager(mHandlerThread.getLooper()); + mProximitySensor = mSensorManager.getDefaultSensor(Sensor.TYPE_PROXIMITY); + // don't bother with the light sensor if auto brightness is handled in hardware + if (mUseSoftwareAutoBrightness) { + mLightSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_LIGHT); + enableLightSensor(true); + } + synchronized (mLocks) { Log.d(TAG, "system ready!"); mDoneBooting = true; @@ -2058,8 +2281,6 @@ class PowerManagerService extends IPowerManager.Stub | PowerManager.FULL_WAKE_LOCK | PowerManager.SCREEN_DIM_WAKE_LOCK; - // call getSensorManager() to make sure mProximitySensor is initialized - getSensorManager(); if (mProximitySensor != null) { result |= PowerManager.PROXIMITY_SCREEN_OFF_WAKE_LOCK; } @@ -2072,7 +2293,8 @@ class PowerManagerService extends IPowerManager.Stub // Don't let applications turn the screen all the way off brightness = Math.max(brightness, Power.BRIGHTNESS_DIM); mHardware.setLightBrightness_UNCHECKED(HardwareService.LIGHT_ID_BACKLIGHT, brightness); - mHardware.setLightBrightness_UNCHECKED(HardwareService.LIGHT_ID_KEYBOARD, brightness); + mHardware.setLightBrightness_UNCHECKED(HardwareService.LIGHT_ID_KEYBOARD, + (mKeyboardVisible ? brightness : 0)); mHardware.setLightBrightness_UNCHECKED(HardwareService.LIGHT_ID_BUTTONS, brightness); long identity = Binder.clearCallingIdentity(); try { @@ -2087,76 +2309,149 @@ class PowerManagerService extends IPowerManager.Stub if (ANIMATE_SCREEN_LIGHTS) { mScreenBrightness.curValue = brightness; mScreenBrightness.animating = false; + mScreenBrightness.targetValue = -1; } if (ANIMATE_KEYBOARD_LIGHTS) { mKeyboardBrightness.curValue = brightness; mKeyboardBrightness.animating = false; + mKeyboardBrightness.targetValue = -1; } if (ANIMATE_BUTTON_LIGHTS) { mButtonBrightness.curValue = brightness; mButtonBrightness.animating = false; + mButtonBrightness.targetValue = -1; } } - public void setAutoBrightness(boolean on) { - mContext.enforceCallingOrSelfPermission(android.Manifest.permission.DEVICE_POWER, null); - mHardware.setAutoBrightness_UNCHECKED(on); - } - - private SensorManager getSensorManager() { - if (mSensorManager == null) { - mSensorManager = new SensorManager(mHandlerThread.getLooper()); - mProximitySensor = mSensorManager.getDefaultSensor(Sensor.TYPE_PROXIMITY); - } - return mSensorManager; - } - private void enableProximityLockLocked() { if (mSpew) { Log.d(TAG, "enableProximityLockLocked"); } - mSensorManager.registerListener(this, mProximitySensor, SensorManager.SENSOR_DELAY_NORMAL); + // clear calling identity so sensor manager battery stats are accurate + long identity = Binder.clearCallingIdentity(); + try { + mSensorManager.registerListener(mProximityListener, mProximitySensor, + SensorManager.SENSOR_DELAY_NORMAL); + } finally { + Binder.restoreCallingIdentity(identity); + } } private void disableProximityLockLocked() { if (mSpew) { Log.d(TAG, "disableProximityLockLocked"); } - mSensorManager.unregisterListener(this); - synchronized (mLocks) { - if (mProximitySensorActive) { - mProximitySensorActive = false; - forceUserActivityLocked(); + // clear calling identity so sensor manager battery stats are accurate + long identity = Binder.clearCallingIdentity(); + try { + mSensorManager.unregisterListener(mProximityListener); + mHandler.removeCallbacks(mProximityTask); + } finally { + Binder.restoreCallingIdentity(identity); + } + if (mProximitySensorActive) { + mProximitySensorActive = false; + forceUserActivityLocked(); + } + } + + private void proximityChangedLocked(boolean active) { + if (mSpew) { + Log.d(TAG, "proximityChangedLocked, active: " + active); + } + if (mProximityCount <= 0) { + Log.d(TAG, "Ignoring proximity change after last proximity lock is released"); + return; + } + if (active) { + goToSleepLocked(SystemClock.uptimeMillis()); + mProximitySensorActive = true; + } else { + // proximity sensor negative events trigger as user activity. + // temporarily set mUserActivityAllowed to true so this will work + // even when the keyguard is on. + mProximitySensorActive = false; + forceUserActivityLocked(); + } + } + + private void enableLightSensor(boolean enable) { + if (mDebugLightSensor) { + Log.d(TAG, "enableLightSensor " + enable); + } + if (mSensorManager != null && mLightSensorEnabled != enable) { + mLightSensorEnabled = enable; + // clear calling identity so sensor manager battery stats are accurate + long identity = Binder.clearCallingIdentity(); + try { + if (enable) { + mSensorManager.registerListener(mLightListener, mLightSensor, + SensorManager.SENSOR_DELAY_NORMAL); + } else { + mSensorManager.unregisterListener(mLightListener); + mHandler.removeCallbacks(mAutoBrightnessTask); + } + } finally { + Binder.restoreCallingIdentity(identity); } } } - public void onSensorChanged(SensorEvent event) { - long milliseconds = event.timestamp / 1000000; - synchronized (mLocks) { - float distance = event.values[0]; - // compare against getMaximumRange to support sensors that only return 0 or 1 - if (distance >= 0.0 && distance < PROXIMITY_THRESHOLD && - distance < mProximitySensor.getMaximumRange()) { - if (mSpew) { - Log.d(TAG, "onSensorChanged: proximity active, distance: " + distance); + SensorEventListener mProximityListener = new SensorEventListener() { + public void onSensorChanged(SensorEvent event) { + long milliseconds = event.timestamp / 1000000; + synchronized (mLocks) { + float distance = event.values[0]; + long timeSinceLastEvent = milliseconds - mLastProximityEventTime; + mLastProximityEventTime = milliseconds; + mHandler.removeCallbacks(mProximityTask); + + // compare against getMaximumRange to support sensors that only return 0 or 1 + boolean active = (distance >= 0.0 && distance < PROXIMITY_THRESHOLD && + distance < mProximitySensor.getMaximumRange()); + + if (timeSinceLastEvent < PROXIMITY_SENSOR_DELAY) { + // enforce delaying atleast PROXIMITY_SENSOR_DELAY before processing + mProximityPendingValue = (active ? 1 : 0); + mHandler.postDelayed(mProximityTask, PROXIMITY_SENSOR_DELAY - timeSinceLastEvent); + } else { + // process the value immediately + mProximityPendingValue = -1; + proximityChangedLocked(active); } - goToSleepLocked(milliseconds); - mProximitySensorActive = true; - } else { - // proximity sensor negative events trigger as user activity. - // temporarily set mUserActivityAllowed to true so this will work - // even when the keyguard is on. - if (mSpew) { - Log.d(TAG, "onSensorChanged: proximity inactive, distance: " + distance); + } + } + + public void onAccuracyChanged(Sensor sensor, int accuracy) { + // ignore + } + }; + + SensorEventListener mLightListener = new SensorEventListener() { + public void onSensorChanged(SensorEvent event) { + synchronized (mLocks) { + int value = (int)event.values[0]; + if (mDebugLightSensor) { + Log.d(TAG, "onSensorChanged: light value: " + value); + } + mHandler.removeCallbacks(mAutoBrightnessTask); + if (mLightSensorValue != value) { + if (mLightSensorValue == -1) { + // process the value immediately + lightSensorChangedLocked(value); + } else { + // delay processing to debounce the sensor + mLightSensorPendingValue = value; + mHandler.postDelayed(mAutoBrightnessTask, LIGHT_SENSOR_DELAY); + } + } else { + mLightSensorPendingValue = -1; } - mProximitySensorActive = false; - forceUserActivityLocked(); } } - } - public void onAccuracyChanged(Sensor sensor, int accuracy) { - // ignore - } + public void onAccuracyChanged(Sensor sensor, int accuracy) { + // ignore + } + }; } diff --git a/services/java/com/android/server/TelephonyRegistry.java b/services/java/com/android/server/TelephonyRegistry.java index 101b075e2256..47cb6adce87a 100644 --- a/services/java/com/android/server/TelephonyRegistry.java +++ b/services/java/com/android/server/TelephonyRegistry.java @@ -477,7 +477,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { private void broadcastServiceStateChanged(ServiceState state) { long ident = Binder.clearCallingIdentity(); try { - mBatteryStats.noteAirplaneMode(state.getState() == ServiceState.STATE_POWER_OFF); + mBatteryStats.notePhoneState(state.getState()); } catch (RemoteException re) { // Can't do much } finally { diff --git a/services/java/com/android/server/WindowManagerService.java b/services/java/com/android/server/WindowManagerService.java index 20b01d2d745a..d3645c35ffa5 100644 --- a/services/java/com/android/server/WindowManagerService.java +++ b/services/java/com/android/server/WindowManagerService.java @@ -63,6 +63,7 @@ import android.graphics.Rect; import android.graphics.Region; import android.os.BatteryStats; import android.os.Binder; +import android.os.Bundle; import android.os.Debug; import android.os.Handler; import android.os.IBinder; @@ -430,10 +431,8 @@ public class WindowManagerService extends IWindowManager.Stub // to another, and this is the higher one in Z-order. WindowState mUpperWallpaperTarget = null; int mWallpaperAnimLayerAdjustment; - float mLastWallpaperX; - float mLastWallpaperY; - // Lock for waiting for the wallpaper. - final Object mWaitingOnWallpaperLock = new Object(); + float mLastWallpaperX = -1; + float mLastWallpaperY = -1; // This is set when we are waiting for a wallpaper to tell us it is done // changing its scroll position. WindowState mWaitingOnWallpaper; @@ -1464,8 +1463,12 @@ public class WindowManagerService extends IWindowManager.Stub } if (visible) { - mLastWallpaperX = mWallpaperTarget.mWallpaperX; - mLastWallpaperY = mWallpaperTarget.mWallpaperY; + if (mWallpaperTarget.mWallpaperX >= 0) { + mLastWallpaperX = mWallpaperTarget.mWallpaperX; + } + if (mWallpaperTarget.mWallpaperY >= 0) { + mLastWallpaperY = mWallpaperTarget.mWallpaperY; + } } // Start stepping backwards from here, ensuring that our wallpaper windows @@ -1566,34 +1569,32 @@ public class WindowManagerService extends IWindowManager.Stub boolean sync) { boolean changed = false; boolean rawChanged = false; - if (mLastWallpaperX >= 0) { - int availw = wallpaperWin.mFrame.right-wallpaperWin.mFrame.left-dw; - int offset = availw > 0 ? -(int)(availw*mLastWallpaperX+.5f) : 0; - changed = wallpaperWin.mXOffset != offset; - if (changed) { - if (DEBUG_WALLPAPER) Log.v(TAG, "Update wallpaper " - + wallpaperWin + " x: " + offset); - wallpaperWin.mXOffset = offset; - } - if (wallpaperWin.mWallpaperX != mLastWallpaperX) { - wallpaperWin.mWallpaperX = mLastWallpaperX; - rawChanged = true; - } + float wpx = mLastWallpaperX >= 0 ? mLastWallpaperX : 0.5f; + int availw = wallpaperWin.mFrame.right-wallpaperWin.mFrame.left-dw; + int offset = availw > 0 ? -(int)(availw*wpx+.5f) : 0; + changed = wallpaperWin.mXOffset != offset; + if (changed) { + if (DEBUG_WALLPAPER) Log.v(TAG, "Update wallpaper " + + wallpaperWin + " x: " + offset); + wallpaperWin.mXOffset = offset; + } + if (wallpaperWin.mWallpaperX != wpx) { + wallpaperWin.mWallpaperX = wpx; + rawChanged = true; } - if (mLastWallpaperY >= 0) { - int availh = wallpaperWin.mFrame.bottom-wallpaperWin.mFrame.top-dh; - int offset = availh > 0 ? -(int)(availh*mLastWallpaperY+.5f) : 0; - if (wallpaperWin.mYOffset != offset) { - if (DEBUG_WALLPAPER) Log.v(TAG, "Update wallpaper " - + wallpaperWin + " y: " + offset); - changed = true; - wallpaperWin.mYOffset = offset; - } - if (wallpaperWin.mWallpaperY != mLastWallpaperY) { - wallpaperWin.mWallpaperY = mLastWallpaperY; - rawChanged = true; - } + float wpy = mLastWallpaperY >= 0 ? mLastWallpaperY : 0.5f; + int availh = wallpaperWin.mFrame.bottom-wallpaperWin.mFrame.top-dh; + offset = availh > 0 ? -(int)(availh*wpy+.5f) : 0; + if (wallpaperWin.mYOffset != offset) { + if (DEBUG_WALLPAPER) Log.v(TAG, "Update wallpaper " + + wallpaperWin + " y: " + offset); + changed = true; + wallpaperWin.mYOffset = offset; + } + if (wallpaperWin.mWallpaperY != wpy) { + wallpaperWin.mWallpaperY = wpy; + rawChanged = true; } if (rawChanged) { @@ -1602,34 +1603,30 @@ public class WindowManagerService extends IWindowManager.Stub + wallpaperWin + " x=" + wallpaperWin.mWallpaperX + " y=" + wallpaperWin.mWallpaperY); if (sync) { - synchronized (mWaitingOnWallpaperLock) { - mWaitingOnWallpaper = wallpaperWin; - } + mWaitingOnWallpaper = wallpaperWin; } wallpaperWin.mClient.dispatchWallpaperOffsets( wallpaperWin.mWallpaperX, wallpaperWin.mWallpaperY, sync); if (sync) { - synchronized (mWaitingOnWallpaperLock) { - if (mWaitingOnWallpaper != null) { - long start = SystemClock.uptimeMillis(); - if ((mLastWallpaperTimeoutTime+WALLPAPER_TIMEOUT_RECOVERY) - < start) { - try { - if (DEBUG_WALLPAPER) Log.v(TAG, - "Waiting for offset complete..."); - mWaitingOnWallpaperLock.wait(WALLPAPER_TIMEOUT); - } catch (InterruptedException e) { - } - if (DEBUG_WALLPAPER) Log.v(TAG, "Offset complete!"); - if ((start+WALLPAPER_TIMEOUT) - < SystemClock.uptimeMillis()) { - Log.i(TAG, "Timeout waiting for wallpaper to offset: " - + wallpaperWin); - mLastWallpaperTimeoutTime = start; - } + if (mWaitingOnWallpaper != null) { + long start = SystemClock.uptimeMillis(); + if ((mLastWallpaperTimeoutTime+WALLPAPER_TIMEOUT_RECOVERY) + < start) { + try { + if (DEBUG_WALLPAPER) Log.v(TAG, + "Waiting for offset complete..."); + mWindowMap.wait(WALLPAPER_TIMEOUT); + } catch (InterruptedException e) { + } + if (DEBUG_WALLPAPER) Log.v(TAG, "Offset complete!"); + if ((start+WALLPAPER_TIMEOUT) + < SystemClock.uptimeMillis()) { + Log.i(TAG, "Timeout waiting for wallpaper to offset: " + + wallpaperWin); + mLastWallpaperTimeoutTime = start; } - mWaitingOnWallpaper = null; } + mWaitingOnWallpaper = null; } } } catch (RemoteException e) { @@ -1640,16 +1637,16 @@ public class WindowManagerService extends IWindowManager.Stub } void wallpaperOffsetsComplete(IBinder window) { - synchronized (mWaitingOnWallpaperLock) { + synchronized (mWindowMap) { if (mWaitingOnWallpaper != null && mWaitingOnWallpaper.mClient.asBinder() == window) { mWaitingOnWallpaper = null; - mWaitingOnWallpaperLock.notifyAll(); + mWindowMap.notifyAll(); } } } - boolean updateWallpaperOffsetLocked(boolean sync) { + boolean updateWallpaperOffsetLocked(WindowState changingTarget, boolean sync) { final int dw = mDisplay.getWidth(); final int dh = mDisplay.getHeight(); @@ -1657,22 +1654,31 @@ public class WindowManagerService extends IWindowManager.Stub WindowState target = mWallpaperTarget; if (target != null) { - mLastWallpaperX = target.mWallpaperX; - mLastWallpaperY = target.mWallpaperY; - int curTokenIndex = mWallpaperTokens.size(); - while (curTokenIndex > 0) { - curTokenIndex--; - WindowToken token = mWallpaperTokens.get(curTokenIndex); - int curWallpaperIndex = token.windows.size(); - while (curWallpaperIndex > 0) { - curWallpaperIndex--; - WindowState wallpaper = token.windows.get(curWallpaperIndex); - if (updateWallpaperOffsetLocked(wallpaper, dw, dh, sync)) { - wallpaper.computeShownFrameLocked(); - changed = true; - // We only want to be synchronous with one wallpaper. - sync = false; - } + if (target.mWallpaperX >= 0) { + mLastWallpaperX = target.mWallpaperX; + } else if (changingTarget.mWallpaperX >= 0) { + mLastWallpaperX = changingTarget.mWallpaperX; + } + if (target.mWallpaperY >= 0) { + mLastWallpaperY = target.mWallpaperY; + } else if (changingTarget.mWallpaperY >= 0) { + mLastWallpaperY = changingTarget.mWallpaperY; + } + } + + int curTokenIndex = mWallpaperTokens.size(); + while (curTokenIndex > 0) { + curTokenIndex--; + WindowToken token = mWallpaperTokens.get(curTokenIndex); + int curWallpaperIndex = token.windows.size(); + while (curWallpaperIndex > 0) { + curWallpaperIndex--; + WindowState wallpaper = token.windows.get(curWallpaperIndex); + if (updateWallpaperOffsetLocked(wallpaper, dw, dh, sync)) { + wallpaper.computeShownFrameLocked(); + changed = true; + // We only want to be synchronous with one wallpaper. + sync = false; } } } @@ -2179,13 +2185,51 @@ public class WindowManagerService extends IWindowManager.Stub if (window.mWallpaperX != x || window.mWallpaperY != y) { window.mWallpaperX = x; window.mWallpaperY = y; - - if (mWallpaperTarget == window) { - if (updateWallpaperOffsetLocked(true)) { - performLayoutAndPlaceSurfacesLocked(); + if (updateWallpaperOffsetLocked(window, true)) { + performLayoutAndPlaceSurfacesLocked(); + } + } + } + + void wallpaperCommandComplete(IBinder window, Bundle result) { + synchronized (mWindowMap) { + if (mWaitingOnWallpaper != null && + mWaitingOnWallpaper.mClient.asBinder() == window) { + mWaitingOnWallpaper = null; + mWindowMap.notifyAll(); + } + } + } + + public Bundle sendWindowWallpaperCommandLocked(WindowState window, + String action, int x, int y, int z, Bundle extras, boolean sync) { + if (window == mWallpaperTarget || window == mLowerWallpaperTarget + || window == mUpperWallpaperTarget) { + boolean doWait = sync; + int curTokenIndex = mWallpaperTokens.size(); + while (curTokenIndex > 0) { + curTokenIndex--; + WindowToken token = mWallpaperTokens.get(curTokenIndex); + int curWallpaperIndex = token.windows.size(); + while (curWallpaperIndex > 0) { + curWallpaperIndex--; + WindowState wallpaper = token.windows.get(curWallpaperIndex); + try { + wallpaper.mClient.dispatchWallpaperCommand(action, + x, y, z, extras, sync); + // We only want to be synchronous with one wallpaper. + sync = false; + } catch (RemoteException e) { + } } } + + if (doWait) { + // XXX Need to wait for result. + } } + + return null; } public int relayoutWindow(Session session, IWindow client, @@ -6219,6 +6263,13 @@ public class WindowManagerService extends IWindowManager.Stub lt.sample("2 got event ", System.nanoTime() - ev.whenNano); } + if (lastKey != null && !mPolicy.allowKeyRepeat()) { + // cancel key repeat at the request of the policy. + lastKey = null; + downTime = 0; + lastKeyTime = curTime; + nextKeyTime = curTime + LONG_WAIT; + } try { if (ev != null) { curTime = SystemClock.uptimeMillis(); @@ -6550,6 +6601,24 @@ public class WindowManagerService extends IWindowManager.Stub WindowManagerService.this.wallpaperOffsetsComplete(window); } + public Bundle sendWallpaperCommand(IBinder window, String action, int x, int y, + int z, Bundle extras, boolean sync) { + synchronized(mWindowMap) { + long ident = Binder.clearCallingIdentity(); + try { + return sendWindowWallpaperCommandLocked( + windowForClientLocked(this, window), + action, x, y, z, extras, sync); + } finally { + Binder.restoreCallingIdentity(ident); + } + } + } + + public void wallpaperCommandComplete(IBinder window, Bundle result) { + WindowManagerService.this.wallpaperCommandComplete(window, result); + } + void windowAddedLocked() { if (mSurfaceSession == null) { if (localLOGV) Log.v( @@ -9234,6 +9303,15 @@ public class WindowManagerService extends IWindowManager.Stub & WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER) != 0) { wallpaperMayChange = true; } + if (changed && !forceHiding + && (mCurrentFocus == null) + && (mFocusedApp != null)) { + // It's possible that the last focus recalculation left no + // current focused window even though the app has come to the + // foreground already. In this case, we make sure to recalculate + // focus when we show a window. + focusMayChange = true; + } } mPolicy.animatingWindowLw(w, attrs); @@ -9551,6 +9629,10 @@ public class WindowManagerService extends IWindowManager.Stub moveInputMethodWindowsIfNeededLocked(false); wallpaperMayChange = true; mLayoutNeeded = true; + // Since the window list has been rebuilt, focus might + // have to be recomputed since the actual order of windows + // might have changed again. + focusMayChange = true; } int adjResult = 0; @@ -9575,7 +9657,8 @@ public class WindowManagerService extends IWindowManager.Stub WindowState w = (WindowState)mWindows.get(i); if (w.mSurface != null) { final WindowManager.LayoutParams attrs = w.mAttrs; - if (mPolicy.doesForceHide(w, attrs)) { + if (mPolicy.doesForceHide(w, attrs) && w.isVisibleLw()) { + if (DEBUG_FOCUS) Log.i(TAG, "win=" + w + " force hides other windows"); forceHiding = true; } else if (mPolicy.canBeForceHidden(w, attrs)) { if (!w.mAnimating) { diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java index e1e8beae7dd2..c3aeca42ede6 100644 --- a/services/java/com/android/server/am/ActivityManagerService.java +++ b/services/java/com/android/server/am/ActivityManagerService.java @@ -2705,13 +2705,31 @@ public final class ActivityManagerService extends ActivityManagerNative implemen // Have the window manager re-evaluate the orientation of // the screen based on the new activity order. - Configuration config = mWindowManager.updateOrientationFromAppTokens( - mConfiguration, - next.mayFreezeScreenLocked(next.app) ? next : null); - if (config != null) { - next.frozenBeforeDestroy = true; - } - if (!updateConfigurationLocked(config, next)) { + boolean updated; + synchronized (this) { + Configuration config = mWindowManager.updateOrientationFromAppTokens( + mConfiguration, + next.mayFreezeScreenLocked(next.app) ? next : null); + if (config != null) { + /* + * Explicitly restore the locale to the one from the + * old configuration, since the one that comes back from + * the window manager has the default (boot) locale. + * + * It looks like previously the locale picker only worked + * by coincidence: usually it would do its setting of + * the locale after the activity transition, so it didn't + * matter that this lost it. With the synchronized + * block now keeping them from happening at the same time, + * this one always would happen second and undo what the + * locale picker had just done. + */ + config.locale = mConfiguration.locale; + next.frozenBeforeDestroy = true; + } + updated = updateConfigurationLocked(config, next); + } + if (!updated) { // The configuration update wasn't able to keep the existing // instance of the activity, and instead started a new one. // We should be all done, but let's just make sure our activity @@ -5742,7 +5760,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen public String getCallingPackage(IBinder token) { synchronized (this) { HistoryRecord r = getCallingRecordLocked(token); - return r != null && r.app != null ? r.app.processName : null; + return r != null && r.app != null ? r.info.packageName : null; } } @@ -7164,7 +7182,6 @@ public final class ActivityManagerService extends ActivityManagerNative implemen if (DEBUG_TRANSITION) Log.v(TAG, "Prepare to back transition: task=" + task); - mWindowManager.prepareAppTransition(WindowManagerPolicy.TRANSIT_TASK_TO_BACK); final int N = mHistory.size(); int bottom = 0; @@ -7194,7 +7211,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen mNoAnimActivities.add(r); } } else { - mWindowManager.prepareAppTransition(WindowManagerPolicy.TRANSIT_TASK_TO_FRONT); + mWindowManager.prepareAppTransition(WindowManagerPolicy.TRANSIT_TASK_TO_BACK); } mWindowManager.moveAppTokensToBottom(moved); if (VALIDATE_TOKENS) { diff --git a/services/java/com/android/server/am/BatteryStatsService.java b/services/java/com/android/server/am/BatteryStatsService.java index 61537f56155f..d59aeada22d8 100644 --- a/services/java/com/android/server/am/BatteryStatsService.java +++ b/services/java/com/android/server/am/BatteryStatsService.java @@ -16,6 +16,7 @@ package com.android.server.am; +import android.bluetooth.BluetoothHeadset; import android.content.Context; import android.os.Binder; import android.os.IBinder; @@ -23,7 +24,6 @@ import android.os.Parcel; import android.os.Process; import android.os.ServiceManager; import android.telephony.SignalStrength; -import android.telephony.TelephonyManager; import android.util.Log; import com.android.internal.app.IBatteryStats; @@ -51,6 +51,9 @@ public final class BatteryStatsService extends IBatteryStats.Stub { mContext = context; ServiceManager.addService("batteryinfo", asBinder()); mStats.setNumSpeedSteps(new PowerProfile(mContext).getNumSpeedSteps()); + mStats.setRadioScanningTimeout(mContext.getResources().getInteger( + com.android.internal.R.integer.config_radioScanningTimeout) + * 1000L); } public void shutdown() { @@ -195,10 +198,10 @@ public final class BatteryStatsService extends IBatteryStats.Stub { } } - public void noteAirplaneMode(boolean airplaneMode) { + public void notePhoneState(int state) { enforceCallingPermission(); synchronized (mStats) { - mStats.noteAirplaneModeLocked(airplaneMode); + mStats.notePhoneStateLocked(state); } } @@ -260,9 +263,10 @@ public final class BatteryStatsService extends IBatteryStats.Stub { public void noteBluetoothOn() { enforceCallingPermission(); + BluetoothHeadset headset = new BluetoothHeadset(mContext, null); synchronized (mStats) { mStats.noteBluetoothOnLocked(); - mStats.setBtHeadset(new android.bluetooth.BluetoothHeadset(mContext, null)); + mStats.setBtHeadset(headset); } } diff --git a/services/java/com/android/server/status/StatusBarService.java b/services/java/com/android/server/status/StatusBarService.java index fe761eaa62d8..8d739041622f 100644 --- a/services/java/com/android/server/status/StatusBarService.java +++ b/services/java/com/android/server/status/StatusBarService.java @@ -140,7 +140,7 @@ public class StatusBarService extends IStatusBar.Stub boolean down = event.getAction() == KeyEvent.ACTION_DOWN; switch (event.getKeyCode()) { case KeyEvent.KEYCODE_BACK: - if (down) { + if (!down) { StatusBarService.this.deactivate(); } return true; @@ -692,6 +692,7 @@ public class StatusBarService extends IStatusBar.Stub mTicker.addEntry(n, StatusBarIcon.getIcon(mContext, data), n.tickerText); } } + updateExpandedViewPos(EXPANDED_LEAVE_ALONE); } // icon @@ -950,7 +951,9 @@ public class StatusBarService extends IStatusBar.Stub panelSlightlyVisible(true); updateExpandedViewPos(EXPANDED_LEAVE_ALONE); - mExpandedDialog.show(); + mExpandedParams.flags &= ~WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE; + mExpandedParams.flags |= WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM; + mExpandedDialog.getWindow().setAttributes(mExpandedParams); mExpandedView.requestFocus(View.FOCUS_FORWARD); mTrackingView.setVisibility(View.VISIBLE); @@ -973,15 +976,24 @@ public class StatusBarService extends IStatusBar.Stub } void animateCollapse() { - if (SPEW) Log.d(TAG, "Animate collapse: expanded=" + mExpanded - + " expanded visible=" + mExpandedVisible); + if (SPEW) { + Log.d(TAG, "animateCollapse(): mExpanded=" + mExpanded + + " mExpandedVisible=" + mExpandedVisible + + " mAnimating=" + mAnimating + + " mAnimVel=" + mAnimVel); + } if (!mExpandedVisible) { return; } - prepareTracking(mDisplay.getHeight()-1); - performFling(mDisplay.getHeight()-1, -2000.0f, true); + if (mAnimating) { + return; + } + + int y = mDisplay.getHeight()-1; + prepareTracking(y); + performFling(y, -2000.0f, true); } void performExpand() { @@ -1018,7 +1030,9 @@ public class StatusBarService extends IStatusBar.Stub } mExpandedVisible = false; panelSlightlyVisible(false); - mExpandedDialog.hide(); + mExpandedParams.flags |= WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE; + mExpandedParams.flags &= ~WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM; + mExpandedDialog.getWindow().setAttributes(mExpandedParams); mTrackingView.setVisibility(View.GONE); if ((mDisabled & StatusBarManager.DISABLE_NOTIFICATION_ICONS) == 0) { @@ -1047,6 +1061,7 @@ public class StatusBarService extends IStatusBar.Stub else if (mAnimY < mStatusBarView.getHeight()) { if (SPEW) Log.d(TAG, "Animation completed to collapsed state."); mAnimating = false; + updateExpandedViewPos(0); performCollapse(); } else { @@ -1096,7 +1111,7 @@ public class StatusBarService extends IStatusBar.Stub mTracking = true; mVelocityTracker = VelocityTracker.obtain(); boolean opening = !mExpanded; - if (!mExpanded) { + if (opening) { mAnimAccel = 2000.0f; mAnimVel = 200; mAnimY = mStatusBarView.getHeight(); @@ -1111,16 +1126,13 @@ public class StatusBarService extends IStatusBar.Stub mAnimating = true; mHandler.sendMessageAtTime(mHandler.obtainMessage(MSG_ANIMATE_REVEAL), mCurAnimationTime); + makeExpandedVisible(); } else { // it's open, close it? if (mAnimating) { mAnimating = false; mHandler.removeMessages(MSG_ANIMATE); } - } - if (opening) { - makeExpandedVisible(); - } else { updateExpandedViewPos(y + mViewDelta); } } @@ -1502,17 +1514,18 @@ public class StatusBarService extends IStatusBar.Stub } } + final int disph = mDisplay.getHeight(); lp = mExpandedDialog.getWindow().getAttributes(); lp.width = ViewGroup.LayoutParams.FILL_PARENT; lp.height = ViewGroup.LayoutParams.WRAP_CONTENT; lp.x = 0; - lp.y = 0; + mTrackingPosition = lp.y = -disph; // sufficiently large negative lp.type = WindowManager.LayoutParams.TYPE_STATUS_BAR_PANEL; lp.flags = WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN | WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL - | WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM - | WindowManager.LayoutParams.FLAG_DITHER; + | WindowManager.LayoutParams.FLAG_DITHER + | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE; lp.format = pixelFormat; lp.gravity = Gravity.TOP | Gravity.FILL_HORIZONTAL; lp.setTitle("StatusBarExpanded"); @@ -1525,7 +1538,6 @@ public class StatusBarService extends IStatusBar.Stub new ViewGroup.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)); mExpandedDialog.show(); - mExpandedDialog.hide(); FrameLayout hack = (FrameLayout)mExpandedView.getParent(); hack.setForeground(null); } @@ -1547,20 +1559,29 @@ public class StatusBarService extends IStatusBar.Stub void updateExpandedViewPos(int expandedPosition) { if (SPEW) { - Log.d(TAG, "updateExpandedViewPos before pos=" + expandedPosition + Log.d(TAG, "updateExpandedViewPos before expandedPosition=" + expandedPosition + " mTrackingParams.y=" + mTrackingParams.y + " mTrackingPosition=" + mTrackingPosition); } - // If the expanded view is not visible, there is no reason to do - // any work. + int h = mStatusBarView.getHeight(); + int disph = mDisplay.getHeight(); + + // If the expanded view is not visible, make sure they're still off screen. + // Maybe the view was resized. if (!mExpandedVisible) { + if (mTrackingView != null) { + mTrackingPosition = mTrackingParams.y = -disph; + WindowManagerImpl.getDefault().updateViewLayout(mTrackingView, mTrackingParams); + } + if (mExpandedParams != null) { + mExpandedParams.y = -disph; + mExpandedDialog.getWindow().setAttributes(mExpandedParams); + } return; } - + // tracking view... - int h = mStatusBarView.getHeight(); - int disph = mDisplay.getHeight(); int pos; if (expandedPosition == EXPANDED_FULL_OPEN) { pos = h; @@ -1671,7 +1692,7 @@ public class StatusBarService extends IStatusBar.Stub private View.OnClickListener mClearButtonListener = new View.OnClickListener() { public void onClick(View v) { mNotificationCallbacks.onClearAll(); - performCollapse(); + addPendingOp(OP_EXPAND, null, false); } }; diff --git a/services/java/com/android/server/status/TrackingPatternView.java b/services/java/com/android/server/status/TrackingPatternView.java index 0ae9984cb348..4cb8eff5043a 100644 --- a/services/java/com/android/server/status/TrackingPatternView.java +++ b/services/java/com/android/server/status/TrackingPatternView.java @@ -55,8 +55,6 @@ public class TrackingPatternView extends View { final int textureWidth = mTextureWidth; final int textureHeight = mTextureHeight; - Log.d("TrackingPatternView", "width=" + width + " textureWidth=" + textureWidth); - int x = 0; int y; diff --git a/services/jni/com_android_server_HardwareService.cpp b/services/jni/com_android_server_HardwareService.cpp index a17e29fbf60d..22d4bd8766e8 100644 --- a/services/jni/com_android_server_HardwareService.cpp +++ b/services/jni/com_android_server_HardwareService.cpp @@ -100,18 +100,6 @@ static void finalize_native(JNIEnv *env, jobject clazz, int ptr) free(devices); } -static void setAutoBrightness_native(JNIEnv *env, jobject clazz, int ptr, - jboolean automatic) -{ - Devices* devices = (Devices*)ptr; - - if (devices->lights[LIGHT_INDEX_BACKLIGHT] == NULL) { - return; - } - - devices->lights[LIGHT_INDEX_BACKLIGHT]->set_als_mode(automatic ? 0 : 1); -} - static void setLight_native(JNIEnv *env, jobject clazz, int ptr, int light, int colorARGB, int flashMode, int onMS, int offMS) { @@ -146,7 +134,6 @@ static void vibratorOff(JNIEnv *env, jobject clazz) static JNINativeMethod method_table[] = { { "init_native", "()I", (void*)init_native }, { "finalize_native", "(I)V", (void*)finalize_native }, - { "setAutoBrightness_native", "(IZ)V", (void*)setAutoBrightness_native }, { "setLight_native", "(IIIIII)V", (void*)setLight_native }, { "vibratorOn", "(J)V", (void*)vibratorOn }, { "vibratorOff", "()V", (void*)vibratorOff } diff --git a/telephony/java/android/telephony/SmsManager.java b/telephony/java/android/telephony/SmsManager.java index 80de074eaddb..312272272f85 100644 --- a/telephony/java/android/telephony/SmsManager.java +++ b/telephony/java/android/telephony/SmsManager.java @@ -360,7 +360,9 @@ public final class SmsManager { // List contains all records, including "free" records (null) if (data != null) { SmsMessage sms = SmsMessage.createFromEfRecord(i+1, data.getBytes()); - messages.add(sms); + if (sms != null) { + messages.add(sms); + } } } } diff --git a/telephony/java/android/telephony/SmsMessage.java b/telephony/java/android/telephony/SmsMessage.java index 7a105121a942..b8ea4c028114 100644 --- a/telephony/java/android/telephony/SmsMessage.java +++ b/telephony/java/android/telephony/SmsMessage.java @@ -218,7 +218,7 @@ public class SmsMessage { index, data); } - return new SmsMessage(wrappedMessage); + return wrappedMessage != null ? new SmsMessage(wrappedMessage) : null; } /** diff --git a/telephony/java/android/telephony/cdma/CdmaCellLocation.java b/telephony/java/android/telephony/cdma/CdmaCellLocation.java index 676fba75df1c..7ef77479a377 100644 --- a/telephony/java/android/telephony/cdma/CdmaCellLocation.java +++ b/telephony/java/android/telephony/cdma/CdmaCellLocation.java @@ -24,19 +24,35 @@ import android.telephony.CellLocation; */ public class CdmaCellLocation extends CellLocation { private int mBaseStationId = -1; - private int mBaseStationLatitude = -1; - private int mBaseStationLongitude = -1; + + /** + * Latitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0. + * It is represented in units of 0.25 seconds and ranges from -1296000 + * to 1296000, both values inclusive (corresponding to a range of -90 + * to +90 degrees). Integer.MAX_VALUE is considered invalid value. + */ + private int mBaseStationLatitude = Integer.MAX_VALUE; + + /** + * Longitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0. + * It is represented in units of 0.25 seconds and ranges from -2592000 + * to 2592000, both values inclusive (corresponding to a range of -180 + * to +180 degrees). Integer.MAX_VALUE is considered invalid value. + */ + private int mBaseStationLongitude = Integer.MAX_VALUE; + private int mSystemId = -1; private int mNetworkId = -1; /** * Empty constructor. - * Initializes the BID, SID, NID and base station latitude and longitude to -1. + * Initializes the BID, SID, NID and base station latitude and longitude + * to invalid values. */ public CdmaCellLocation() { this.mBaseStationId = -1; - this.mBaseStationLatitude = -1; - this.mBaseStationLongitude = -1; + this.mBaseStationLatitude = Integer.MAX_VALUE; + this.mBaseStationLongitude = Integer.MAX_VALUE; this.mSystemId = -1; this.mNetworkId = -1; } @@ -60,14 +76,14 @@ public class CdmaCellLocation extends CellLocation { } /** - * @return cdma base station latitude, -1 if unknown + * @return cdma base station latitude, Integer.MAX_VALUE if unknown */ public int getBaseStationLatitude() { return this.mBaseStationLatitude; } /** - * @return cdma base station longitude, -1 if unknown + * @return cdma base station longitude, Integer.MAX_VALUE if unknown */ public int getBaseStationLongitude() { return this.mBaseStationLongitude; @@ -88,12 +104,12 @@ public class CdmaCellLocation extends CellLocation { } /** - * Invalidate this object. The cell location data is set to -1. + * Invalidate this object. The cell location data is set to invalid values. */ public void setStateInvalid() { this.mBaseStationId = -1; - this.mBaseStationLatitude = -1; - this.mBaseStationLongitude = -1; + this.mBaseStationLatitude = Integer.MAX_VALUE; + this.mBaseStationLongitude = Integer.MAX_VALUE; this.mSystemId = -1; this.mNetworkId = -1; } diff --git a/telephony/java/com/android/internal/telephony/CommandsInterface.java b/telephony/java/com/android/internal/telephony/CommandsInterface.java index 5777cad08ad6..1d9f10a96e03 100644 --- a/telephony/java/com/android/internal/telephony/CommandsInterface.java +++ b/telephony/java/com/android/internal/telephony/CommandsInterface.java @@ -148,6 +148,7 @@ public interface CommandsInterface { static final int CDMA_SMS_FAIL_CAUSE_INVALID_TELESERVICE_ID = 4; static final int CDMA_SMS_FAIL_CAUSE_RESOURCE_SHORTAGE = 35; static final int CDMA_SMS_FAIL_CAUSE_OTHER_TERMINAL_PROBLEM = 39; + static final int CDMA_SMS_FAIL_CAUSE_ENCODING_PROBLEM = 96; //***** Methods diff --git a/telephony/java/com/android/internal/telephony/GsmAlphabet.java b/telephony/java/com/android/internal/telephony/GsmAlphabet.java index 461b69454215..ebdd2207db6f 100644 --- a/telephony/java/com/android/internal/telephony/GsmAlphabet.java +++ b/telephony/java/com/android/internal/telephony/GsmAlphabet.java @@ -658,7 +658,7 @@ public class GsmAlphabet { charToGsm.put('Z', i++); charToGsm.put('\u00c4', i++); charToGsm.put('\u00d6', i++); - charToGsm.put('\u0147', i++); + charToGsm.put('\u00d1', i++); charToGsm.put('\u00dc', i++); charToGsm.put('\u00a7', i++); diff --git a/telephony/java/com/android/internal/telephony/SMSDispatcher.java b/telephony/java/com/android/internal/telephony/SMSDispatcher.java index d26a092f16a2..53c0bef05551 100644 --- a/telephony/java/com/android/internal/telephony/SMSDispatcher.java +++ b/telephony/java/com/android/internal/telephony/SMSDispatcher.java @@ -303,6 +303,7 @@ public abstract class SMSDispatcher extends Handler { notifyAndAcknowledgeLastIncomingSms(handled, result, null); } } catch (RuntimeException ex) { + Log.e(TAG, "Exception dispatching message", ex); notifyAndAcknowledgeLastIncomingSms(false, Intents.RESULT_SMS_GENERIC_ERROR, null); } diff --git a/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java b/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java index 22fbe8bf1a30..3548cad95cb6 100755 --- a/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java +++ b/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java @@ -80,6 +80,10 @@ public class CDMAPhone extends PhoneBase { static final String LOG_TAG = "CDMA"; private static final boolean DBG = true; + // Min values used to by needsActivation + private static final String UNACTIVATED_MIN2_VALUE = "000000"; + private static final String UNACTIVATED_MIN_VALUE = "1111110111"; + // Default Emergency Callback Mode exit timer private static final int DEFAULT_ECM_EXIT_TIMER_VALUE = 300000; @@ -848,6 +852,26 @@ public class CDMAPhone extends PhoneBase { mRuimRecords.setVoiceMessageWaiting(1, mwi); } + /** + * Returns true if CDMA OTA Service Provisioning needs to be performed. + */ + /* package */ boolean + needsOtaServiceProvisioning() { + String cdmaMin = getCdmaMin(); + boolean needsProvisioning; + if (cdmaMin == null || (cdmaMin.length() < 6)) { + if (DBG) Log.d(LOG_TAG, "needsOtaServiceProvisioning: illegal cdmaMin='" + + cdmaMin + "' assume provisioning needed."); + needsProvisioning = true; + } else { + needsProvisioning = (cdmaMin.equals(UNACTIVATED_MIN_VALUE) + || cdmaMin.substring(0,6).equals(UNACTIVATED_MIN2_VALUE)) + || SystemProperties.getBoolean("test_cdma_setup", false); + } + if (DBG) Log.d(LOG_TAG, "needsOtaServiceProvisioning: ret=" + needsProvisioning); + return needsProvisioning; + } + @Override public void exitEmergencyCallbackMode() { if (mWakeLock.isHeld()) { diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java b/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java index c695dd74d7a5..9bc5e8ed4830 100644 --- a/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java +++ b/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java @@ -81,7 +81,7 @@ public final class CdmaDataConnectionTracker extends DataConnectionTracker { private boolean mPendingRestartRadio = false; private static final int TIME_DELAYED_TO_RESTART_RADIO = - SystemProperties.getInt("ro.cdma.timetoradiorestart", 20000); + SystemProperties.getInt("ro.cdma.timetoradiorestart", 60000); /** * Pool size of CdmaDataConnection objects. @@ -330,7 +330,8 @@ public final class CdmaDataConnectionTracker extends DataConnectionTracker { phone.getState() == Phone.State.IDLE ) && isDataAllowed() && desiredPowerState - && !mPendingRestartRadio) { + && !mPendingRestartRadio + && !mCdmaPhone.needsOtaServiceProvisioning()) { return setupData(reason); @@ -348,7 +349,8 @@ public final class CdmaDataConnectionTracker extends DataConnectionTracker { " dataOnRoamingEnable=" + getDataOnRoamingEnabled() + " desiredPowerState=" + desiredPowerState + " PendingRestartRadio=" + mPendingRestartRadio + - " MasterDataEnabled=" + mMasterDataEnabled); + " MasterDataEnabled=" + mMasterDataEnabled + + " needsOtaServiceProvisioning=" + mCdmaPhone.needsOtaServiceProvisioning()); } return false; } diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaSMSDispatcher.java b/telephony/java/com/android/internal/telephony/cdma/CdmaSMSDispatcher.java index 7baf7705ede9..c16b04d08b50 100644 --- a/telephony/java/com/android/internal/telephony/cdma/CdmaSMSDispatcher.java +++ b/telephony/java/com/android/internal/telephony/cdma/CdmaSMSDispatcher.java @@ -100,6 +100,7 @@ final class CdmaSMSDispatcher extends SMSDispatcher { // If sms is null, means there was a parsing error. if (smsb == null) { + Log.e(TAG, "dispatchMessage: message is null"); return Intents.RESULT_SMS_GENERIC_ERROR; } @@ -480,7 +481,7 @@ final class CdmaSMSDispatcher extends SMSDispatcher { return CommandsInterface.CDMA_SMS_FAIL_CAUSE_INVALID_TELESERVICE_ID; case Intents.RESULT_SMS_GENERIC_ERROR: default: - return CommandsInterface.CDMA_SMS_FAIL_CAUSE_OTHER_TERMINAL_PROBLEM; + return CommandsInterface.CDMA_SMS_FAIL_CAUSE_ENCODING_PROBLEM; } } } diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java b/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java index a410f0e0e779..3051e2facc0c 100644 --- a/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java +++ b/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java @@ -350,29 +350,35 @@ final class CdmaServiceStateTracker extends ServiceStateTracker { if (ar.exception == null) { String states[] = (String[])ar.result; int baseStationId = -1; - int baseStationLongitude = -1; - int baseStationLatitude = -1; - - int baseStationData[] = { - -1, // baseStationId - -1, // baseStationLatitude - -1 // baseStationLongitude - }; - - if (states.length == 3) { - for(int i = 0; i < states.length; i++) { - try { - if (states[i] != null && states[i].length() > 0) { - baseStationData[i] = Integer.parseInt(states[i], 16); - } - } catch (NumberFormatException ex) { - Log.w(LOG_TAG, "error parsing cell location data: " + ex); + int baseStationLatitude = Integer.MAX_VALUE; + int baseStationLongitude = Integer.MAX_VALUE; + int systemId = -1; + int networkId = -1; + + if (states.length > 9) { + try { + if (states[4] != null) { + baseStationId = Integer.parseInt(states[4]); + } + if (states[5] != null) { + baseStationLatitude = Integer.parseInt(states[5]); + } + if (states[6] != null) { + baseStationLongitude = Integer.parseInt(states[6]); + } + if (states[8] != null) { + systemId = Integer.parseInt(states[8]); } + if (states[9] != null) { + networkId = Integer.parseInt(states[9]); + } + } catch (NumberFormatException ex) { + Log.w(LOG_TAG, "error parsing cell location data: " + ex); } } - cellLoc.setCellLocationData(baseStationData[0], - baseStationData[1], baseStationData[2]); + cellLoc.setCellLocationData(baseStationId, baseStationLatitude, + baseStationLongitude, systemId, networkId); phone.notifyLocationChanged(); } @@ -640,8 +646,8 @@ final class CdmaServiceStateTracker extends ServiceStateTracker { int registrationState = 4; //[0] registrationState int radioTechnology = -1; //[3] radioTechnology int baseStationId = -1; //[4] baseStationId - int baseStationLatitude = -1; //[5] baseStationLatitude - int baseStationLongitude = -1; //[6] baseStationLongitude + int baseStationLatitude = Integer.MAX_VALUE; //[5] baseStationLatitude + int baseStationLongitude = Integer.MAX_VALUE; //[6] baseStationLongitude int cssIndicator = 0; //[7] init with 0, because it is treated as a boolean int systemId = 0; //[8] systemId int networkId = 0; //[9] networkId @@ -652,20 +658,43 @@ final class CdmaServiceStateTracker extends ServiceStateTracker { if (states.length == 14) { try { - registrationState = Integer.parseInt(states[0]); - radioTechnology = Integer.parseInt(states[3]); - baseStationId = Integer.parseInt(states[4]); - baseStationLatitude = Integer.parseInt(states[5], 16); - baseStationLongitude = Integer.parseInt(states[6], 16); - cssIndicator = Integer.parseInt(states[7]); - systemId = Integer.parseInt(states[8]); - networkId = Integer.parseInt(states[9]); - roamingIndicator = Integer.parseInt(states[10]); - systemIsInPrl = Integer.parseInt(states[11]); - defaultRoamingIndicator = Integer.parseInt(states[12]); - reasonForDenial = Integer.parseInt(states[13]); - } - catch(NumberFormatException ex) { + if (states[0] != null) { + registrationState = Integer.parseInt(states[0]); + } + if (states[3] != null) { + radioTechnology = Integer.parseInt(states[3]); + } + if (states[4] != null) { + baseStationId = Integer.parseInt(states[4]); + } + if (states[5] != null) { + baseStationLatitude = Integer.parseInt(states[5]); + } + if (states[6] != null) { + baseStationLongitude = Integer.parseInt(states[6]); + } + if (states[7] != null) { + cssIndicator = Integer.parseInt(states[7]); + } + if (states[8] != null) { + systemId = Integer.parseInt(states[8]); + } + if (states[9] != null) { + networkId = Integer.parseInt(states[9]); + } + if (states[10] != null) { + roamingIndicator = Integer.parseInt(states[10]); + } + if (states[11] != null) { + systemIsInPrl = Integer.parseInt(states[11]); + } + if (states[12] != null) { + defaultRoamingIndicator = Integer.parseInt(states[12]); + } + if (states[13] != null) { + reasonForDenial = Integer.parseInt(states[13]); + } + } catch (NumberFormatException ex) { Log.w(LOG_TAG, "error parsing RegistrationState: " + ex); } } else { diff --git a/telephony/java/com/android/internal/telephony/cdma/sms/BearerData.java b/telephony/java/com/android/internal/telephony/cdma/sms/BearerData.java index 721729d9bf27..c7032aca0a71 100644 --- a/telephony/java/com/android/internal/telephony/cdma/sms/BearerData.java +++ b/telephony/java/com/android/internal/telephony/cdma/sms/BearerData.java @@ -16,6 +16,10 @@ package com.android.internal.telephony.cdma.sms; +import static android.telephony.SmsMessage.ENCODING_16BIT; +import static android.telephony.SmsMessage.MAX_USER_DATA_BYTES; +import static android.telephony.SmsMessage.MAX_USER_DATA_BYTES_WITH_HEADER; + import android.util.Log; import android.util.SparseIntArray; @@ -417,6 +421,21 @@ public final class BearerData { } else { ted = com.android.internal.telephony.gsm.SmsMessage.calculateLength( msg, force7BitEncoding); + if (ted.msgCount == 1 && ted.codeUnitSize == SmsMessage.ENCODING_7BIT) { + // We don't support single-segment EMS, so calculate for 16-bit + // TODO: Consider supporting single-segment EMS + ted.codeUnitCount = msg.length(); + int octets = ted.codeUnitCount * 2; + if (octets > MAX_USER_DATA_BYTES) { + ted.msgCount = (octets / MAX_USER_DATA_BYTES_WITH_HEADER) + 1; + ted.codeUnitsRemaining = (MAX_USER_DATA_BYTES_WITH_HEADER + - (octets % MAX_USER_DATA_BYTES_WITH_HEADER))/2; + } else { + ted.msgCount = 1; + ted.codeUnitsRemaining = (MAX_USER_DATA_BYTES - octets)/2; + } + ted.codeUnitSize = ENCODING_16BIT; + } } return ted; } diff --git a/telephony/java/com/android/internal/telephony/cdma/sms/CdmaSmsAddress.java b/telephony/java/com/android/internal/telephony/cdma/sms/CdmaSmsAddress.java index f49b5029189b..5f2e561b687f 100644 --- a/telephony/java/com/android/internal/telephony/cdma/sms/CdmaSmsAddress.java +++ b/telephony/java/com/android/internal/telephony/cdma/sms/CdmaSmsAddress.java @@ -135,7 +135,7 @@ public class CdmaSmsAddress extends SmsAddress { }; private static final char[] numericCharsSugar = { - '(', ')', ' ', '-', '+', '.' + '(', ')', ' ', '-', '+', '.', '/', '\\' }; private static final SparseBooleanArray numericCharDialableMap = new SparseBooleanArray ( diff --git a/telephony/java/com/android/internal/telephony/gsm/ApnSetting.java b/telephony/java/com/android/internal/telephony/gsm/ApnSetting.java index dc6f92de31bd..8d807fd22bd3 100644 --- a/telephony/java/com/android/internal/telephony/gsm/ApnSetting.java +++ b/telephony/java/com/android/internal/telephony/gsm/ApnSetting.java @@ -31,6 +31,7 @@ public class ApnSetting { String mmsPort; String user; String password; + int authType; String[] types; int id; String numeric; @@ -38,7 +39,7 @@ public class ApnSetting { ApnSetting(int id, String numeric, String carrier, String apn, String proxy, String port, String mmsc, String mmsProxy, String mmsPort, - String user, String password, String[] types) { + String user, String password, int authType, String[] types) { this.id = id; this.numeric = numeric; this.carrier = carrier; @@ -50,6 +51,7 @@ public class ApnSetting { this.mmsPort = mmsPort; this.user = user; this.password = password; + this.authType = authType; this.types = types; } @@ -63,7 +65,8 @@ public class ApnSetting { .append(", ").append(mmsc) .append(", ").append(mmsProxy) .append(", ").append(mmsPort) - .append(", ").append(port); + .append(", ").append(port) + .append(", ").append(authType); for (String t : types) { sb.append(", ").append(t); } diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java index ffd6dd38c95b..d014a7efa706 100644 --- a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java +++ b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java @@ -556,6 +556,7 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker { cursor.getString(cursor.getColumnIndexOrThrow(Telephony.Carriers.MMSPORT)), cursor.getString(cursor.getColumnIndexOrThrow(Telephony.Carriers.USER)), cursor.getString(cursor.getColumnIndexOrThrow(Telephony.Carriers.PASSWORD)), + cursor.getInt(cursor.getColumnIndexOrThrow(Telephony.Carriers.AUTH_TYPE)), types); result.add(apn); } while (cursor.moveToNext()); diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmMmiCode.java b/telephony/java/com/android/internal/telephony/gsm/GsmMmiCode.java index 18e6375a1392..bcbd127497b2 100644 --- a/telephony/java/com/android/internal/telephony/gsm/GsmMmiCode.java +++ b/telephony/java/com/android/internal/telephony/gsm/GsmMmiCode.java @@ -595,7 +595,8 @@ public final class GsmMmiCode extends Handler implements MmiCode { } int isSettingUnconditionalVoice = - ((reason == CommandsInterface.CF_REASON_UNCONDITIONAL) && + (((reason == CommandsInterface.CF_REASON_UNCONDITIONAL) || + (reason == CommandsInterface.CF_REASON_ALL)) && (((serviceClass & CommandsInterface.SERVICE_CLASS_VOICE) != 0) || (serviceClass == CommandsInterface.SERVICE_CLASS_NONE))) ? 1 : 0; diff --git a/telephony/java/com/android/internal/telephony/gsm/PdpConnection.java b/telephony/java/com/android/internal/telephony/gsm/PdpConnection.java index 224419e931de..cb85002c9d86 100644 --- a/telephony/java/com/android/internal/telephony/gsm/PdpConnection.java +++ b/telephony/java/com/android/internal/telephony/gsm/PdpConnection.java @@ -84,9 +84,11 @@ public class PdpConnection extends DataConnection { lastFailCause = FailCause.NONE; receivedDisconnectReq = false; - int authType = (apn.user != null) ? RILConstants.SETUP_DATA_AUTH_PAP_CHAP : - RILConstants.SETUP_DATA_AUTH_NONE; - + int authType = apn.authType; + if (authType == -1) { + authType = (apn.user != null) ? RILConstants.SETUP_DATA_AUTH_PAP_CHAP : + RILConstants.SETUP_DATA_AUTH_NONE; + } phone.mCM.setupDataCall(Integer.toString(RILConstants.SETUP_DATA_TECH_GSM), Integer.toString(RILConstants.DATA_PROFILE_DEFAULT), apn.apn, apn.user, apn.password, Integer.toString(authType), diff --git a/test-runner/android/test/InstrumentationTestRunner.java b/test-runner/android/test/InstrumentationTestRunner.java index b9978d65dd8b..773d7a95468c 100644 --- a/test-runner/android/test/InstrumentationTestRunner.java +++ b/test-runner/android/test/InstrumentationTestRunner.java @@ -227,17 +227,22 @@ public class InstrumentationTestRunner extends Instrumentation implements TestSu */ private static final String REPORT_KEY_COVERAGE_PATH = "coverageFilePath"; /** + * If included at the start of reporting keys, this prefix marks the key as a performance + * metric. + */ + private static final String REPORT_KEY_PREFIX = "performance."; + /** * If included in the status or final bundle sent to an IInstrumentationWatcher, this key * reports the cpu time in milliseconds of the current test. */ private static final String REPORT_KEY_PERF_CPU_TIME = - "performance." + PerformanceCollector.METRIC_KEY_CPU_TIME; + REPORT_KEY_PREFIX + PerformanceCollector.METRIC_KEY_CPU_TIME; /** * If included in the status or final bundle sent to an IInstrumentationWatcher, this key * reports the run time in milliseconds of the current test. */ private static final String REPORT_KEY_PERF_EXECUTION_TIME = - "performance." + PerformanceCollector.METRIC_KEY_EXECUTION_TIME; + REPORT_KEY_PREFIX + PerformanceCollector.METRIC_KEY_EXECUTION_TIME; /** * The test is starting. @@ -739,11 +744,9 @@ public class InstrumentationTestRunner extends Instrumentation implements TestSu } public void writeEndSnapshot(Bundle results) { - // Copy all snapshot data fields as type long into mResults, which - // is outputted via Instrumentation.finish - for (String key : results.keySet()) { - mResults.putLong(key, results.getLong(key)); - } + // Copy all snapshot data fields into mResults, which is outputted + // via Instrumentation.finish + mResults.putAll(results); } public void writeStartTiming(String label) { @@ -768,6 +771,18 @@ public class InstrumentationTestRunner extends Instrumentation implements TestSu } } + public void writeMeasurement(String label, long value) { + mTestResult.putLong(REPORT_KEY_PREFIX + label, value); + } + + public void writeMeasurement(String label, float value) { + mTestResult.putFloat(REPORT_KEY_PREFIX + label, value); + } + + public void writeMeasurement(String label, String value) { + mTestResult.putString(REPORT_KEY_PREFIX + label, value); + } + // TODO report the end of the cycle } } diff --git a/tests/AndroidTests/src/com/android/unit_tests/AppCacheTest.java b/tests/AndroidTests/src/com/android/unit_tests/AppCacheTest.java index fb1b9ad5bcff..f2f7743c002a 100755 --- a/tests/AndroidTests/src/com/android/unit_tests/AppCacheTest.java +++ b/tests/AndroidTests/src/com/android/unit_tests/AppCacheTest.java @@ -137,7 +137,8 @@ public class AppCacheTest extends AndroidTestCase { verifyTestFiles1(cacheDir, "testtmpdir", 5); } - @LargeTest + // TODO: flaky test + // @LargeTest public void testFreeApplicationCacheSomeFiles() throws Exception { StatFs st = new StatFs("/data"); long blks1 = getFreeStorageBlks(st); diff --git a/tests/AndroidTests/src/com/android/unit_tests/HeapTest.java b/tests/AndroidTests/src/com/android/unit_tests/HeapTest.java index d51cc26ef3fb..f6ae6f65a40b 100644 --- a/tests/AndroidTests/src/com/android/unit_tests/HeapTest.java +++ b/tests/AndroidTests/src/com/android/unit_tests/HeapTest.java @@ -541,7 +541,8 @@ public class HeapTest extends TestCase { } } - @SmallTest + // TODO: flaky test + //@SmallTest public void testExternalOomeLarge() { /* Just shy of the typical max heap size so that it will actually * try to allocate it instead of short-circuiting. diff --git a/tests/AndroidTests/src/com/android/unit_tests/activity/LifecycleTest.java b/tests/AndroidTests/src/com/android/unit_tests/activity/LifecycleTest.java index 80904da5f0d7..069b697d373f 100644 --- a/tests/AndroidTests/src/com/android/unit_tests/activity/LifecycleTest.java +++ b/tests/AndroidTests/src/com/android/unit_tests/activity/LifecycleTest.java @@ -51,8 +51,8 @@ public class LifecycleTest extends ActivityTestsBase { } //Marking flaky until bug 1164344 is fixed. - @FlakyTest(tolerance=2) - @LargeTest + // @FlakyTest(tolerance=2) + // @LargeTest public void testScreen() throws Exception { mIntent = mTopIntent; runLaunchpad(LaunchpadActivity.LIFECYCLE_SCREEN); diff --git a/tests/AndroidTests/src/com/android/unit_tests/os/PerformanceCollectorTest.java b/tests/AndroidTests/src/com/android/unit_tests/os/PerformanceCollectorTest.java index 1a0c2d18698f..25b6e0ef05dc 100644 --- a/tests/AndroidTests/src/com/android/unit_tests/os/PerformanceCollectorTest.java +++ b/tests/AndroidTests/src/com/android/unit_tests/os/PerformanceCollectorTest.java @@ -19,8 +19,9 @@ package com.android.unit_tests.os; import android.os.Bundle; import android.os.Parcelable; import android.os.PerformanceCollector; +import android.os.Process; import android.os.PerformanceCollector.PerformanceResultsWriter; -import android.test.suitebuilder.annotation.LargeTest; +import android.test.suitebuilder.annotation.SmallTest; import java.lang.reflect.Field; import java.util.ArrayList; @@ -44,6 +45,7 @@ public class PerformanceCollectorTest extends TestCase { mPerfCollector = null; } + @SmallTest public void testBeginSnapshotNoWriter() throws Exception { mPerfCollector.beginSnapshot("testBeginSnapshotNoWriter"); @@ -54,15 +56,16 @@ public class PerformanceCollectorTest extends TestCase { assertEquals(2, snapshot.size()); } - @LargeTest + @SmallTest public void testEndSnapshotNoWriter() throws Exception { mPerfCollector.beginSnapshot("testEndSnapshotNoWriter"); - sleepForRandomLongPeriod(); + workForRandomLongPeriod(); Bundle snapshot = mPerfCollector.endSnapshot(); verifySnapshotBundle(snapshot); } + @SmallTest public void testStartTimingNoWriter() throws Exception { mPerfCollector.startTiming("testStartTimingNoWriter"); @@ -73,21 +76,23 @@ public class PerformanceCollectorTest extends TestCase { verifyTimingBundle(measurement, new ArrayList<String>()); } + @SmallTest public void testAddIterationNoWriter() throws Exception { mPerfCollector.startTiming("testAddIterationNoWriter"); - sleepForRandomTinyPeriod(); + workForRandomTinyPeriod(); Bundle iteration = mPerfCollector.addIteration("timing1"); verifyIterationBundle(iteration, "timing1"); } + @SmallTest public void testStopTimingNoWriter() throws Exception { mPerfCollector.startTiming("testStopTimingNoWriter"); - sleepForRandomTinyPeriod(); + workForRandomTinyPeriod(); mPerfCollector.addIteration("timing2"); - sleepForRandomTinyPeriod(); + workForRandomTinyPeriod(); mPerfCollector.addIteration("timing3"); - sleepForRandomShortPeriod(); + workForRandomShortPeriod(); Bundle timing = mPerfCollector.stopTiming("timing4"); ArrayList<String> labels = new ArrayList<String>(); @@ -97,6 +102,7 @@ public class PerformanceCollectorTest extends TestCase { verifyTimingBundle(timing, labels); } + @SmallTest public void testBeginSnapshot() throws Exception { MockPerformanceResultsWriter writer = new MockPerformanceResultsWriter(); mPerfCollector.setPerformanceResultsWriter(writer); @@ -110,19 +116,20 @@ public class PerformanceCollectorTest extends TestCase { assertEquals(2, snapshot.size()); } - @LargeTest + @SmallTest public void testEndSnapshot() throws Exception { MockPerformanceResultsWriter writer = new MockPerformanceResultsWriter(); mPerfCollector.setPerformanceResultsWriter(writer); mPerfCollector.beginSnapshot("testEndSnapshot"); - sleepForRandomLongPeriod(); + workForRandomLongPeriod(); Bundle snapshot1 = mPerfCollector.endSnapshot(); Bundle snapshot2 = writer.snapshotResults; - assertTrue(snapshot1.equals(snapshot2)); + assertEqualsBundle(snapshot1, snapshot2); verifySnapshotBundle(snapshot1); } + @SmallTest public void testStartTiming() throws Exception { MockPerformanceResultsWriter writer = new MockPerformanceResultsWriter(); mPerfCollector.setPerformanceResultsWriter(writer); @@ -136,21 +143,23 @@ public class PerformanceCollectorTest extends TestCase { verifyTimingBundle(measurement, new ArrayList<String>()); } + @SmallTest public void testAddIteration() throws Exception { mPerfCollector.startTiming("testAddIteration"); - sleepForRandomTinyPeriod(); + workForRandomTinyPeriod(); Bundle iteration = mPerfCollector.addIteration("timing5"); verifyIterationBundle(iteration, "timing5"); } + @SmallTest public void testStopTiming() throws Exception { mPerfCollector.startTiming("testStopTiming"); - sleepForRandomTinyPeriod(); + workForRandomTinyPeriod(); mPerfCollector.addIteration("timing6"); - sleepForRandomTinyPeriod(); + workForRandomTinyPeriod(); mPerfCollector.addIteration("timing7"); - sleepForRandomShortPeriod(); + workForRandomShortPeriod(); Bundle timing = mPerfCollector.stopTiming("timing8"); ArrayList<String> labels = new ArrayList<String>(); @@ -160,27 +169,90 @@ public class PerformanceCollectorTest extends TestCase { verifyTimingBundle(timing, labels); } - @LargeTest + @SmallTest + public void testAddMeasurementLong() throws Exception { + MockPerformanceResultsWriter writer = new MockPerformanceResultsWriter(); + mPerfCollector.setPerformanceResultsWriter(writer); + mPerfCollector.startTiming("testAddMeasurementLong"); + mPerfCollector.addMeasurement("testAddMeasurementLongZero", 0); + mPerfCollector.addMeasurement("testAddMeasurementLongPos", 348573); + mPerfCollector.addMeasurement("testAddMeasurementLongNeg", -19354); + mPerfCollector.stopTiming(""); + + assertEquals("testAddMeasurementLong", writer.timingLabel); + Bundle results = writer.timingResults; + assertEquals(4, results.size()); + assertTrue(results.containsKey("testAddMeasurementLongZero")); + assertEquals(0, results.getLong("testAddMeasurementLongZero")); + assertTrue(results.containsKey("testAddMeasurementLongPos")); + assertEquals(348573, results.getLong("testAddMeasurementLongPos")); + assertTrue(results.containsKey("testAddMeasurementLongNeg")); + assertEquals(-19354, results.getLong("testAddMeasurementLongNeg")); + } + + @SmallTest + public void testAddMeasurementFloat() throws Exception { + MockPerformanceResultsWriter writer = new MockPerformanceResultsWriter(); + mPerfCollector.setPerformanceResultsWriter(writer); + mPerfCollector.startTiming("testAddMeasurementFloat"); + mPerfCollector.addMeasurement("testAddMeasurementFloatZero", 0.0f); + mPerfCollector.addMeasurement("testAddMeasurementFloatPos", 348573.345f); + mPerfCollector.addMeasurement("testAddMeasurementFloatNeg", -19354.093f); + mPerfCollector.stopTiming(""); + + assertEquals("testAddMeasurementFloat", writer.timingLabel); + Bundle results = writer.timingResults; + assertEquals(4, results.size()); + assertTrue(results.containsKey("testAddMeasurementFloatZero")); + assertEquals(0.0f, results.getFloat("testAddMeasurementFloatZero")); + assertTrue(results.containsKey("testAddMeasurementFloatPos")); + assertEquals(348573.345f, results.getFloat("testAddMeasurementFloatPos")); + assertTrue(results.containsKey("testAddMeasurementFloatNeg")); + assertEquals(-19354.093f, results.getFloat("testAddMeasurementFloatNeg")); + } + + @SmallTest + public void testAddMeasurementString() throws Exception { + MockPerformanceResultsWriter writer = new MockPerformanceResultsWriter(); + mPerfCollector.setPerformanceResultsWriter(writer); + mPerfCollector.startTiming("testAddMeasurementString"); + mPerfCollector.addMeasurement("testAddMeasurementStringNull", null); + mPerfCollector.addMeasurement("testAddMeasurementStringEmpty", ""); + mPerfCollector.addMeasurement("testAddMeasurementStringNonEmpty", "Hello World"); + mPerfCollector.stopTiming(""); + + assertEquals("testAddMeasurementString", writer.timingLabel); + Bundle results = writer.timingResults; + assertEquals(4, results.size()); + assertTrue(results.containsKey("testAddMeasurementStringNull")); + assertNull(results.getString("testAddMeasurementStringNull")); + assertTrue(results.containsKey("testAddMeasurementStringEmpty")); + assertEquals("", results.getString("testAddMeasurementStringEmpty")); + assertTrue(results.containsKey("testAddMeasurementStringNonEmpty")); + assertEquals("Hello World", results.getString("testAddMeasurementStringNonEmpty")); + } + + @SmallTest public void testSimpleSequence() throws Exception { MockPerformanceResultsWriter writer = new MockPerformanceResultsWriter(); mPerfCollector.setPerformanceResultsWriter(writer); mPerfCollector.beginSnapshot("testSimpleSequence"); mPerfCollector.startTiming("testSimpleSequenceTiming"); - sleepForRandomTinyPeriod(); + workForRandomTinyPeriod(); mPerfCollector.addIteration("iteration1"); - sleepForRandomTinyPeriod(); + workForRandomTinyPeriod(); mPerfCollector.addIteration("iteration2"); - sleepForRandomTinyPeriod(); + workForRandomTinyPeriod(); mPerfCollector.addIteration("iteration3"); - sleepForRandomTinyPeriod(); + workForRandomTinyPeriod(); mPerfCollector.addIteration("iteration4"); - sleepForRandomShortPeriod(); + workForRandomShortPeriod(); Bundle timing = mPerfCollector.stopTiming("iteration5"); - sleepForRandomLongPeriod(); + workForRandomLongPeriod(); Bundle snapshot1 = mPerfCollector.endSnapshot(); Bundle snapshot2 = writer.snapshotResults; - assertTrue(snapshot1.equals(snapshot2)); + assertEqualsBundle(snapshot1, snapshot2); verifySnapshotBundle(snapshot1); ArrayList<String> labels = new ArrayList<String>(); @@ -192,59 +264,59 @@ public class PerformanceCollectorTest extends TestCase { verifyTimingBundle(timing, labels); } - @LargeTest + @SmallTest public void testLongSequence() throws Exception { MockPerformanceResultsWriter writer = new MockPerformanceResultsWriter(); mPerfCollector.setPerformanceResultsWriter(writer); mPerfCollector.beginSnapshot("testLongSequence"); mPerfCollector.startTiming("testLongSequenceTiming1"); - sleepForRandomTinyPeriod(); + workForRandomTinyPeriod(); mPerfCollector.addIteration("iteration1"); - sleepForRandomTinyPeriod(); + workForRandomTinyPeriod(); mPerfCollector.addIteration("iteration2"); - sleepForRandomShortPeriod(); + workForRandomShortPeriod(); Bundle timing1 = mPerfCollector.stopTiming("iteration3"); - sleepForRandomLongPeriod(); + workForRandomLongPeriod(); mPerfCollector.startTiming("testLongSequenceTiming2"); - sleepForRandomTinyPeriod(); + workForRandomTinyPeriod(); mPerfCollector.addIteration("iteration4"); - sleepForRandomTinyPeriod(); + workForRandomTinyPeriod(); mPerfCollector.addIteration("iteration5"); - sleepForRandomShortPeriod(); + workForRandomShortPeriod(); Bundle timing2 = mPerfCollector.stopTiming("iteration6"); - sleepForRandomLongPeriod(); + workForRandomLongPeriod(); mPerfCollector.startTiming("testLongSequenceTiming3"); - sleepForRandomTinyPeriod(); + workForRandomTinyPeriod(); mPerfCollector.addIteration("iteration7"); - sleepForRandomTinyPeriod(); + workForRandomTinyPeriod(); mPerfCollector.addIteration("iteration8"); - sleepForRandomShortPeriod(); + workForRandomShortPeriod(); Bundle timing3 = mPerfCollector.stopTiming("iteration9"); - sleepForRandomLongPeriod(); + workForRandomLongPeriod(); mPerfCollector.startTiming("testLongSequenceTiming4"); - sleepForRandomTinyPeriod(); + workForRandomTinyPeriod(); mPerfCollector.addIteration("iteration10"); - sleepForRandomTinyPeriod(); + workForRandomTinyPeriod(); mPerfCollector.addIteration("iteration11"); - sleepForRandomShortPeriod(); + workForRandomShortPeriod(); Bundle timing4 = mPerfCollector.stopTiming("iteration12"); - sleepForRandomLongPeriod(); + workForRandomLongPeriod(); mPerfCollector.startTiming("testLongSequenceTiming5"); - sleepForRandomTinyPeriod(); + workForRandomTinyPeriod(); mPerfCollector.addIteration("iteration13"); - sleepForRandomTinyPeriod(); + workForRandomTinyPeriod(); mPerfCollector.addIteration("iteration14"); - sleepForRandomShortPeriod(); + workForRandomShortPeriod(); Bundle timing5 = mPerfCollector.stopTiming("iteration15"); - sleepForRandomLongPeriod(); + workForRandomLongPeriod(); Bundle snapshot1 = mPerfCollector.endSnapshot(); Bundle snapshot2 = writer.snapshotResults; - assertTrue(snapshot1.equals(snapshot2)); + assertEqualsBundle(snapshot1, snapshot2); verifySnapshotBundle(snapshot1); ArrayList<String> labels1 = new ArrayList<String>(); @@ -278,57 +350,53 @@ public class PerformanceCollectorTest extends TestCase { * Verify that snapshotting and timing do not interfere w/ each other, * by staggering calls to snapshot and timing functions. */ - @LargeTest + @SmallTest public void testOutOfOrderSequence() { MockPerformanceResultsWriter writer = new MockPerformanceResultsWriter(); mPerfCollector.setPerformanceResultsWriter(writer); mPerfCollector.startTiming("testOutOfOrderSequenceTiming"); - sleepForRandomShortPeriod(); + workForRandomShortPeriod(); mPerfCollector.beginSnapshot("testOutOfOrderSequenceSnapshot"); - sleepForRandomShortPeriod(); + workForRandomShortPeriod(); Bundle timing1 = mPerfCollector.stopTiming("timing1"); - sleepForRandomShortPeriod(); + workForRandomShortPeriod(); Bundle snapshot1 = mPerfCollector.endSnapshot(); Bundle timing2 = writer.timingResults; Bundle snapshot2 = writer.snapshotResults; - assertTrue(snapshot1.equals(snapshot2)); + assertEqualsBundle(snapshot1, snapshot2); verifySnapshotBundle(snapshot1); - assertTrue(timing1.equals(timing2)); + assertEqualsBundle(timing1, timing2); ArrayList<String> labels = new ArrayList<String>(); labels.add("timing1"); verifyTimingBundle(timing1, labels); } - private void sleepForRandomPeriod(int minDuration, int maxDuration) { + private void workForRandomPeriod(int minDuration, int maxDuration) { Random random = new Random(); int period = minDuration + random.nextInt(maxDuration - minDuration); - int slept = 0; - // Generate random positive amount of work, so cpu time is measurable in + long start = Process.getElapsedCpuTime(); + // Generate positive amount of work, so cpu time is measurable in // milliseconds - while (slept < period) { - int step = random.nextInt(minDuration/5); - try { - Thread.sleep(step); - } catch (InterruptedException e ) { - // eat the exception + while (Process.getElapsedCpuTime() - start < period) { + for (int i = 0, temp = 0; i < 50; i++ ) { + temp += i; } - slept += step; } } - private void sleepForRandomTinyPeriod() { - sleepForRandomPeriod(25, 50); + private void workForRandomTinyPeriod() { + workForRandomPeriod(2, 5); } - private void sleepForRandomShortPeriod() { - sleepForRandomPeriod(100, 250); + private void workForRandomShortPeriod() { + workForRandomPeriod(10, 25); } - private void sleepForRandomLongPeriod() { - sleepForRandomPeriod(500, 1000); + private void workForRandomLongPeriod() { + workForRandomPeriod(50, 100); } private void verifySnapshotBundle(Bundle snapshot) { @@ -409,6 +477,13 @@ public class PerformanceCollectorTest extends TestCase { } } + private void assertEqualsBundle(Bundle b1, Bundle b2) { + assertEquals(b1.keySet(), b2.keySet()); + for (String key : b1.keySet()) { + assertEquals(b1.get(key), b2.get(key)); + } + } + private Object readPrivateField(String fieldName, Object object) throws Exception { Field f = object.getClass().getDeclaredField(fieldName); f.setAccessible(true); @@ -427,7 +502,7 @@ public class PerformanceCollectorTest extends TestCase { } public void writeEndSnapshot(Bundle results) { - snapshotResults = results; + snapshotResults.putAll(results); } public void writeStartTiming(String label) { @@ -435,7 +510,19 @@ public class PerformanceCollectorTest extends TestCase { } public void writeStopTiming(Bundle results) { - timingResults = results; + timingResults.putAll(results); + } + + public void writeMeasurement(String label, long value) { + timingResults.putLong(label, value); + } + + public void writeMeasurement(String label, float value) { + timingResults.putFloat(label, value); + } + + public void writeMeasurement(String label, String value) { + timingResults.putString(label, value); } } } diff --git a/tests/CoreTests/android/core/MathTest.java b/tests/CoreTests/android/core/MathTest.java index 50009db7bf02..64c8c1e3d079 100644 --- a/tests/CoreTests/android/core/MathTest.java +++ b/tests/CoreTests/android/core/MathTest.java @@ -687,7 +687,8 @@ public class MathTest extends TestCase { /** * @tests java.lang.Math#tanh(double) */ - @SmallTest + // TODO: Known failure, temporarily remove from SmallSuite + // @SmallTest public void testTanhD() { // Test for special situations assertTrue("Should return NaN", Double.isNaN(Math.tanh(Double.NaN))); diff --git a/tests/CoreTests/android/core/StrictMathTest.java b/tests/CoreTests/android/core/StrictMathTest.java index 92e6cb6463fb..c98c91d32dea 100644 --- a/tests/CoreTests/android/core/StrictMathTest.java +++ b/tests/CoreTests/android/core/StrictMathTest.java @@ -709,7 +709,8 @@ public class StrictMathTest extends TestCase { /** * @tests java.lang.StrictMath#tanh(double) */ - @SmallTest + // TODO: Known failure, temporarily remove from small suite + // @SmallTest public void testTanhD() { // Test for special situations assertTrue(Double.isNaN(StrictMath.tanh(Double.NaN))); diff --git a/tests/DumpRenderTree/assets/results/layout_tests_crashed.txt b/tests/DumpRenderTree/assets/results/layout_tests_crashed.txt index e69de29bb2d1..89439d3dfa7b 100644 --- a/tests/DumpRenderTree/assets/results/layout_tests_crashed.txt +++ b/tests/DumpRenderTree/assets/results/layout_tests_crashed.txt @@ -0,0 +1,4 @@ +/sdcard/android/layout_tests/http/tests/xmlhttprequest/basic-auth.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/failed-auth.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/cross-origin-authorization.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/cross-origin-no-authorization.html diff --git a/tests/DumpRenderTree/assets/results/layout_tests_failed.txt b/tests/DumpRenderTree/assets/results/layout_tests_failed.txt index af7658b3deef..5b64b9a52807 100644 --- a/tests/DumpRenderTree/assets/results/layout_tests_failed.txt +++ b/tests/DumpRenderTree/assets/results/layout_tests_failed.txt @@ -27,19 +27,12 @@ /sdcard/android/layout_tests/accessibility/aria-label.html /sdcard/android/layout_tests/accessibility/textarea-line-for-index.html /sdcard/android/layout_tests/accessibility/nochildren-elements.html -/sdcard/android/layout_tests/animations/play-state.html -/sdcard/android/layout_tests/animations/animation-start-event-destroy-renderer.html -/sdcard/android/layout_tests/animations/import.html /sdcard/android/layout_tests/animations/keyframes-to-missing.html /sdcard/android/layout_tests/animations/animation-hit-test.html -/sdcard/android/layout_tests/animations/keyframes-comma-separated.html /sdcard/android/layout_tests/animations/animation-hit-test-transform.html -/sdcard/android/layout_tests/animations/keyframes-rule.html /sdcard/android/layout_tests/animations/animation-controller-drt-api.html /sdcard/android/layout_tests/animations/keyframes-from-missing.html -/sdcard/android/layout_tests/animations/animation-end-event-destroy-renderer.html /sdcard/android/layout_tests/animations/change-keyframes-name.html -/sdcard/android/layout_tests/animations/keyframes-out-of-order.html /sdcard/android/layout_tests/animations/change-keyframes.html /sdcard/android/layout_tests/editing/style/remove-underline-from-stylesheet.html /sdcard/android/layout_tests/editing/style/remove-underline-in-bold.html @@ -168,6 +161,7 @@ /sdcard/android/layout_tests/fast/encoding/utf-32-little-endian-nobom.xml /sdcard/android/layout_tests/fast/encoding/char-encoding-mac.html /sdcard/android/layout_tests/fast/encoding/charset-koi8-u.html +/sdcard/android/layout_tests/fast/workers/worker-location.html /sdcard/android/layout_tests/fast/selectors/lang-inheritance.html /sdcard/android/layout_tests/fast/selectors/lang-vs-xml-lang.html /sdcard/android/layout_tests/fast/selectors/lang-inheritance2.html @@ -228,6 +222,7 @@ /sdcard/android/layout_tests/fast/events/arrow-keys-on-body.html /sdcard/android/layout_tests/fast/events/ondragenter.html /sdcard/android/layout_tests/fast/events/pointer-events.html +/sdcard/android/layout_tests/fast/events/scroll-to-anchor-in-overflow-hidden.html /sdcard/android/layout_tests/fast/events/autoscroll-nonscrollable-iframe-in-scrollable-div.html /sdcard/android/layout_tests/fast/events/keypress-focus-change.html /sdcard/android/layout_tests/fast/events/key-events-in-input-text.html @@ -285,7 +280,9 @@ /sdcard/android/layout_tests/fast/dom/navigator-detached-no-crash.html /sdcard/android/layout_tests/fast/dom/object-embed-plugin-scripting.html /sdcard/android/layout_tests/fast/dom/node-filter-gc.html +/sdcard/android/layout_tests/fast/dom/noscript-canvas-in-created-html-document.html /sdcard/android/layout_tests/fast/dom/getClientRects.html +/sdcard/android/layout_tests/fast/dom/null-document-location-href-put-crash.html /sdcard/android/layout_tests/fast/dom/prototype-inheritance-2.html /sdcard/android/layout_tests/fast/dom/location-new-window-no-crash.html /sdcard/android/layout_tests/fast/dom/gc-9.html @@ -437,15 +434,8 @@ /sdcard/android/layout_tests/fast/css/resize-single-axis.html /sdcard/android/layout_tests/fast/css/percent-character-as-value.html /sdcard/android/layout_tests/fast/css/uri-token-parsing.html -/sdcard/android/layout_tests/fast/css/mask-missing-image-crash.html -/sdcard/android/layout_tests/fast/css/parse-timing-function-crash.html -/sdcard/android/layout_tests/fast/css/background-position-inherit.html -/sdcard/android/layout_tests/fast/css/readonly-pseudoclass-opera-003.html /sdcard/android/layout_tests/fast/css/zoom-body-scroll.html -/sdcard/android/layout_tests/fast/css/font-family-builtins.html /sdcard/android/layout_tests/fast/css/invalid-percentage-property.html -/sdcard/android/layout_tests/fast/css/remove-shorthand.html -/sdcard/android/layout_tests/fast/css/overflow-property.html /sdcard/android/layout_tests/fast/parser/external-entities-in-xslt.xml /sdcard/android/layout_tests/fast/parser/xml-declaration-missing-ending-mark.html /sdcard/android/layout_tests/fast/parser/tabindex-parsing.html @@ -458,6 +448,7 @@ /sdcard/android/layout_tests/fast/loader/local-iFrame-source-from-local.html /sdcard/android/layout_tests/fast/loader/null-request-after-willSendRequest.html /sdcard/android/layout_tests/fast/loader/stop-provisional-loads.html +/sdcard/android/layout_tests/fast/loader/location-port.html /sdcard/android/layout_tests/fast/loader/user-style-sheet-resource-load-callbacks.html /sdcard/android/layout_tests/fast/loader/policy-delegate-action-hit-test-zoomed.html /sdcard/android/layout_tests/fast/loader/subframe-navigate-during-main-frame-load.html @@ -532,11 +523,372 @@ /sdcard/android/layout_tests/fast/frames/frame-length-fractional.html /sdcard/android/layout_tests/fast/frames/iframe-name-and-id.html /sdcard/android/layout_tests/fast/loading/subframe-removes-itself.html +/sdcard/android/layout_tests/http/tests/media/video-seekable-stall.html +/sdcard/android/layout_tests/http/tests/media/remove-while-loading.html +/sdcard/android/layout_tests/http/tests/media/video-play-stall.html +/sdcard/android/layout_tests/http/tests/media/video-play-stall-seek.html +/sdcard/android/layout_tests/http/tests/plugins/npapi-response-headers.html +/sdcard/android/layout_tests/http/tests/plugins/get-url.html +/sdcard/android/layout_tests/http/tests/plugins/interrupted-get-url.html +/sdcard/android/layout_tests/http/tests/plugins/post-url-file.html +/sdcard/android/layout_tests/http/tests/plugins/cross-frame-object-access.html +/sdcard/android/layout_tests/http/tests/plugins/local-geturl-from-remote.html +/sdcard/android/layout_tests/http/tests/plugins/geturlnotify-from-npp-destroystream.html +/sdcard/android/layout_tests/http/tests/mime/standard-mode-does-not-load-stylesheet-with-text-plain-and-css-extension.html +/sdcard/android/layout_tests/http/tests/mime/standard-mode-does-not-load-stylesheet-with-text-plain.html +/sdcard/android/layout_tests/http/tests/local/drag-over-remote-content.html +/sdcard/android/layout_tests/http/tests/misc/image-blocked-src-change.html +/sdcard/android/layout_tests/http/tests/misc/acid3.html +/sdcard/android/layout_tests/http/tests/misc/dns-prefetch-control.html +/sdcard/android/layout_tests/http/tests/misc/will-send-request-returns-null-on-redirect.html +/sdcard/android/layout_tests/http/tests/misc/isindex-formdata.html +/sdcard/android/layout_tests/http/tests/misc/image-blocked-src-no-change.html +/sdcard/android/layout_tests/http/tests/misc/policy-delegate-called-twice.html +/sdcard/android/layout_tests/http/tests/misc/window-dot-stop.html +/sdcard/android/layout_tests/http/tests/misc/css-reject-any-type-in-strict-mode.html +/sdcard/android/layout_tests/http/tests/misc/favicon-loads-with-images-disabled.html +/sdcard/android/layout_tests/http/tests/misc/SVGFont-delayed-load.html +/sdcard/android/layout_tests/http/tests/misc/location-test-xsl-style-sheet.xml +/sdcard/android/layout_tests/http/tests/misc/redirect-to-external-url.html +/sdcard/android/layout_tests/http/tests/misc/submit-get-in-utf7.html +/sdcard/android/layout_tests/http/tests/cookies/simple-cookies-max-age.html +/sdcard/android/layout_tests/http/tests/cookies/simple-cookies-expired.html +/sdcard/android/layout_tests/http/tests/cookies/multiple-cookies.html +/sdcard/android/layout_tests/http/tests/wml/access-target-path-deny.html +/sdcard/android/layout_tests/http/tests/wml/post-data-to-server.html +/sdcard/android/layout_tests/http/tests/wml/go-task-get-method-accept-charset.html +/sdcard/android/layout_tests/http/tests/wml/access-target.html +/sdcard/android/layout_tests/http/tests/wml/access-target-domain-deny.html +/sdcard/android/layout_tests/http/tests/wml/go-task-post-method-accept-charset.html +/sdcard/android/layout_tests/http/tests/wml/go-task-get-method.html +/sdcard/android/layout_tests/http/tests/wml/go-task-post-method.html +/sdcard/android/layout_tests/http/tests/navigation/success200-reload.html +/sdcard/android/layout_tests/http/tests/navigation/redirect-cycle.html +/sdcard/android/layout_tests/http/tests/navigation/reload-subframe-frame.html +/sdcard/android/layout_tests/http/tests/navigation/window-open-adds-history-item.html +/sdcard/android/layout_tests/http/tests/navigation/success200-goback.html +/sdcard/android/layout_tests/http/tests/navigation/timerredirect-basic.html +/sdcard/android/layout_tests/http/tests/navigation/lockedhistory-iframe.html +/sdcard/android/layout_tests/http/tests/navigation/document-location-click-timeout.html +/sdcard/android/layout_tests/http/tests/navigation/post-goback2.html +/sdcard/android/layout_tests/http/tests/navigation/onload-navigation-iframe-timeout.html +/sdcard/android/layout_tests/http/tests/navigation/location-assign-adds-history-item.html +/sdcard/android/layout_tests/http/tests/navigation/anchor-goback.html +/sdcard/android/layout_tests/http/tests/navigation/redirect-load-no-form-restoration.html +/sdcard/android/layout_tests/http/tests/navigation/metaredirect-subframeload.html +/sdcard/android/layout_tests/http/tests/navigation/javascriptlink-subframeload.html +/sdcard/android/layout_tests/http/tests/navigation/metaredirect-basic.html +/sdcard/android/layout_tests/http/tests/navigation/success200-subframeload.html +/sdcard/android/layout_tests/http/tests/navigation/post-goback-same-url.html +/sdcard/android/layout_tests/http/tests/navigation/restore-form-state-https.html +/sdcard/android/layout_tests/http/tests/navigation/success200-frames.html +/sdcard/android/layout_tests/http/tests/navigation/redirect302-basic.html +/sdcard/android/layout_tests/http/tests/navigation/document-location-mouseover.html +/sdcard/android/layout_tests/http/tests/navigation/redirect302-goback.html +/sdcard/android/layout_tests/http/tests/navigation/anchor-subframeload.html +/sdcard/android/layout_tests/http/tests/navigation/target-frame-from-window.html +/sdcard/android/layout_tests/http/tests/navigation/slowmetaredirect-basic.html +/sdcard/android/layout_tests/http/tests/navigation/reload-subframe-iframe.html +/sdcard/android/layout_tests/http/tests/navigation/success200-loadsame.html +/sdcard/android/layout_tests/http/tests/navigation/relativeanchor-basic.html +/sdcard/android/layout_tests/http/tests/navigation/redirect302-subframeload.html +/sdcard/android/layout_tests/http/tests/navigation/relativeanchor-goback.html +/sdcard/android/layout_tests/http/tests/navigation/metaredirect-goback.html +/sdcard/android/layout_tests/http/tests/navigation/redirect302-frames.html +/sdcard/android/layout_tests/http/tests/navigation/multiple-back-forward-entries.html +/sdcard/android/layout_tests/http/tests/navigation/javascriptlink-goback.html +/sdcard/android/layout_tests/http/tests/navigation/success200-basic.html +/sdcard/android/layout_tests/http/tests/navigation/postredirect-goback2.html +/sdcard/android/layout_tests/http/tests/navigation/timerredirect-goback.html +/sdcard/android/layout_tests/http/tests/navigation/location-href-set-adds-history-item.html +/sdcard/android/layout_tests/http/tests/navigation/anchor-basic.html +/sdcard/android/layout_tests/http/tests/navigation/document-location-click.html +/sdcard/android/layout_tests/http/tests/navigation/onload-navigation-iframe.html +/sdcard/android/layout_tests/http/tests/navigation/relativeanchor-frames.html +/sdcard/android/layout_tests/http/tests/navigation/metaredirect-frames.html +/sdcard/android/layout_tests/http/tests/navigation/location-replace-adds-history-item.html +/sdcard/android/layout_tests/http/tests/navigation/success200-frames-loadsame.html +/sdcard/android/layout_tests/http/tests/navigation/back-to-slow-frame.html +/sdcard/android/layout_tests/http/tests/navigation/new-window-redirect-history.html +/sdcard/android/layout_tests/http/tests/navigation/javascriptlink-basic.html +/sdcard/android/layout_tests/http/tests/navigation/timerredirect-subframeload.html +/sdcard/android/layout_tests/http/tests/navigation/location-set-adds-history-item.html +/sdcard/android/layout_tests/http/tests/navigation/onload-navigation-iframe-2.html +/sdcard/android/layout_tests/http/tests/navigation/reload-subframe-object.html +/sdcard/android/layout_tests/http/tests/navigation/timerredirect-frames.html +/sdcard/android/layout_tests/http/tests/navigation/slowtimerredirect-basic.html +/sdcard/android/layout_tests/http/tests/navigation/window-open-adds-history-item2.html +/sdcard/android/layout_tests/http/tests/navigation/document-location-onload.html +/sdcard/android/layout_tests/http/tests/history/redirect-meta-refresh-2-seconds.html +/sdcard/android/layout_tests/http/tests/history/redirect-js-location-assign-before-load.html +/sdcard/android/layout_tests/http/tests/history/redirect-js-location-href-0-seconds.html +/sdcard/android/layout_tests/http/tests/history/redirect-js-location-href-2-seconds.html +/sdcard/android/layout_tests/http/tests/history/redirect-js-form-submit-0-seconds.html +/sdcard/android/layout_tests/http/tests/history/redirect-js-form-submit-2-seconds.html +/sdcard/android/layout_tests/http/tests/history/redirect-js-location-0-seconds.html +/sdcard/android/layout_tests/http/tests/history/redirect-js-location-2-seconds.html +/sdcard/android/layout_tests/http/tests/history/redirect-js-location-href-before-load.html +/sdcard/android/layout_tests/http/tests/history/redirect-js-location-replace-0-seconds.html +/sdcard/android/layout_tests/http/tests/history/redirect-js-location-replace-2-seconds.html +/sdcard/android/layout_tests/http/tests/history/redirect-js-document-location-0-seconds.html +/sdcard/android/layout_tests/http/tests/history/redirect-js-document-location-2-seconds.html +/sdcard/android/layout_tests/http/tests/history/redirect-js-form-submit-before-load.html +/sdcard/android/layout_tests/http/tests/history/redirect-js-location-assign-0-seconds.html +/sdcard/android/layout_tests/http/tests/history/redirect-js-location-assign-2-seconds.html +/sdcard/android/layout_tests/http/tests/history/redirect-js-location-before-load.html +/sdcard/android/layout_tests/http/tests/history/redirect-js-location-replace-before-load.html +/sdcard/android/layout_tests/http/tests/history/redirect-js-document-location-before-load.html +/sdcard/android/layout_tests/http/tests/history/redirect-meta-refresh-0-seconds.html +/sdcard/android/layout_tests/http/tests/cache/subresource-expiration.html +/sdcard/android/layout_tests/http/tests/appcache/local-content.html +/sdcard/android/layout_tests/http/tests/appcache/max-size.html +/sdcard/android/layout_tests/http/tests/security/aboutBlank/xss-DENIED-set-opener.html +/sdcard/android/layout_tests/http/tests/security/aboutBlank/xss-DENIED-navigate-opener-javascript-url.html +/sdcard/android/layout_tests/http/tests/security/aboutBlank/xss-DENIED-navigate-opener-document-write.html +/sdcard/android/layout_tests/http/tests/security/dataURL/xss-DENIED-from-javascript-url-window-open.html +/sdcard/android/layout_tests/http/tests/security/dataURL/xss-DENIED-to-data-url-sub-frame-2-level.html +/sdcard/android/layout_tests/http/tests/security/dataURL/xss-DENIED-from-data-url-in-foreign-domain-subframe.html +/sdcard/android/layout_tests/http/tests/security/dataURL/xss-DENIED-from-data-url-in-foreign-domain-window-open.html +/sdcard/android/layout_tests/http/tests/security/dataURL/xss-DENIED-to-data-url-in-foreign-domain-subframe-location-change.html +/sdcard/android/layout_tests/http/tests/security/dataURL/xss-DENIED-from-data-url-sub-frame.html +/sdcard/android/layout_tests/http/tests/security/dataURL/xss-DENIED-to-data-url-in-foreign-domain-subframe.html +/sdcard/android/layout_tests/http/tests/security/dataURL/xss-DENIED-to-data-url-in-foreign-domain-window-open.html +/sdcard/android/layout_tests/http/tests/security/dataURL/xss-DENIED-from-data-url-sub-frame-2-level.html +/sdcard/android/layout_tests/http/tests/security/dataURL/xss-DENIED-to-data-url-sub-frame-uppercase.html +/sdcard/android/layout_tests/http/tests/security/dataURL/xss-DENIED-to-data-url-window-open.html +/sdcard/android/layout_tests/http/tests/security/dataURL/xss-DENIED-from-data-url-sub-frame-to-data-url-sub-frame.html +/sdcard/android/layout_tests/http/tests/security/dataURL/xss-DENIED-from-data-url-to-data-url.html +/sdcard/android/layout_tests/http/tests/security/dataURL/xss-DENIED-to-data-url-from-data-url.html +/sdcard/android/layout_tests/http/tests/security/dataURL/xss-DENIED-to-data-url-sub-frame.html +/sdcard/android/layout_tests/http/tests/security/clipboard/clipboard-file-access.html +/sdcard/android/layout_tests/http/tests/security/isolatedWorld/image-prototype.html +/sdcard/android/layout_tests/http/tests/security/isolatedWorld/body-properties.html +/sdcard/android/layout_tests/http/tests/security/isolatedWorld/number-prototype.html +/sdcard/android/layout_tests/http/tests/security/isolatedWorld/body-prototype.html +/sdcard/android/layout_tests/http/tests/security/isolatedWorld/global-variables.html +/sdcard/android/layout_tests/http/tests/security/isolatedWorld/location-prototype.html +/sdcard/android/layout_tests/http/tests/security/isolatedWorld/image-properties.html +/sdcard/android/layout_tests/http/tests/security/isolatedWorld/document-open.html +/sdcard/android/layout_tests/http/tests/security/isolatedWorld/document-prototype.html +/sdcard/android/layout_tests/http/tests/security/isolatedWorld/window-properties.html +/sdcard/android/layout_tests/http/tests/security/isolatedWorld/location-properties.html +/sdcard/android/layout_tests/http/tests/security/isolatedWorld/all-window-prototypes.html +/sdcard/android/layout_tests/http/tests/security/isolatedWorld/click-event.html +/sdcard/android/layout_tests/http/tests/security/isolatedWorld/all-window-properties.html +/sdcard/android/layout_tests/http/tests/security/isolatedWorld/document-properties.html +/sdcard/android/layout_tests/http/tests/security/isolatedWorld/string-prototype.html +/sdcard/android/layout_tests/http/tests/security/isolatedWorld/object-prototype.html +/sdcard/android/layout_tests/http/tests/security/listener/xss-window-onclick-addEventListener.html +/sdcard/android/layout_tests/http/tests/security/listener/xss-window-onclick-shortcut.html +/sdcard/android/layout_tests/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-allow.html +/sdcard/android/layout_tests/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-deny.html +/sdcard/android/layout_tests/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-in-body.html +/sdcard/android/layout_tests/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag.html +/sdcard/android/layout_tests/http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-allow.html +/sdcard/android/layout_tests/http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-deny.html +/sdcard/android/layout_tests/http/tests/security/XFrameOptions/x-frame-options-deny.html +/sdcard/android/layout_tests/http/tests/security/frameNavigation/xss-ALLOWED-targeted-subframe-navigation-change.html +/sdcard/android/layout_tests/http/tests/security/frameNavigation/xss-DENIED-targeted-link-navigation.html +/sdcard/android/layout_tests/http/tests/security/frameNavigation/xss-DENIED-plugin-navigation.html +/sdcard/android/layout_tests/http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-setAttributeNode.html +/sdcard/android/layout_tests/http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-setAttributeNodeNS.html +/sdcard/android/layout_tests/http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-setAttribute.html +/sdcard/android/layout_tests/http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-setAttributeNS.html +/sdcard/android/layout_tests/http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-setAttributeNode.html +/sdcard/android/layout_tests/http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-setAttributeNodeNS.html +/sdcard/android/layout_tests/http/tests/security/javascriptURL/xss-ALLOWED-from-javascript-url-sub-frame-2-level.html +/sdcard/android/layout_tests/http/tests/security/javascriptURL/xss-ALLOWED-from-javascript-url-to-javscript-url.html +/sdcard/android/layout_tests/http/tests/security/javascriptURL/xss-ALLOWED-to-javascript-url-from-javscript-url.html +/sdcard/android/layout_tests/http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-getAttribute-value.html +/sdcard/android/layout_tests/http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-htmldom.html +/sdcard/android/layout_tests/http/tests/security/javascriptURL/xss-ALLOWED-to-javascript-url-sub-frame-2-level.html +/sdcard/android/layout_tests/http/tests/security/javascriptURL/xss-ALLOWED-from-javascript-url-window-open.html +/sdcard/android/layout_tests/http/tests/security/javascriptURL/xss-DENIED-from-javascript-url-in-foreign-domain-window-open.html +/sdcard/android/layout_tests/http/tests/security/javascriptURL/javascriptURL-execution-context-frame-location-htmldom.html +/sdcard/android/layout_tests/http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-getAttribute-value.html +/sdcard/android/layout_tests/http/tests/security/javascriptURL/xss-ALLOWED-from-javascript-url-sub-frame.html +/sdcard/android/layout_tests/http/tests/security/javascriptURL/xss-ALLOWED-from-javascript-url-sub-frame-to-javascript-url-sub-frame.html +/sdcard/android/layout_tests/http/tests/security/javascriptURL/xss-DENIED-to-javascript-url-in-foreign-domain-subframe.html +/sdcard/android/layout_tests/http/tests/security/javascriptURL/xss-ALLOWED-to-javascript-url-window-open.html +/sdcard/android/layout_tests/http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-htmldom.html +/sdcard/android/layout_tests/http/tests/security/javascriptURL/xss-DENIED-to-javascript-url-in-foreign-domain-window-open.html +/sdcard/android/layout_tests/http/tests/security/javascriptURL/xss-ALLOWED-to-javascript-url-sub-frame.html +/sdcard/android/layout_tests/http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-setAttribute.html +/sdcard/android/layout_tests/http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-setAttributeNS.html +/sdcard/android/layout_tests/http/tests/security/javascriptURL/xss-DENIED-from-javascript-url-in-foreign-domain-subframe.html +/sdcard/android/layout_tests/http/tests/security/originHeader/origin-header-for-empty.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/base-href-null-char.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/base-href-control-char.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/faux-script1.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/javascript-link-control-char.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-convoluted.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/dom-write-location.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/javascript-link-HTML-entities-control-char.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/object-embed-tag-control-char.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/javascript-link-null-char.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/anchor-url-dom-write-location.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/link-onclick-ampersand.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-with-source-double-quote.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-with-source-no-quote.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/base-href-safe3.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/http-equiv-utf-7-encoded.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/link-onclick-control-char.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/base-href-scheme-relative.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-open-redirect.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/object-embed-tag-null-char.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/faux-script3.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/link-onclick-entities.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-post.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/embed-tag-control-char.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/property-escape.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-post-null-char.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/javascript-link-HTML-entities.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-null-char.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-addslashes-single-quote.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/dom-write-innerHTML.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-with-source-entities.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/dom-write-location-inline-event.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/malformed-HTML.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/javascript-link-ampersand.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/link-onclick.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/anchor-url-dom-write-location-inline-event.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/base-href-safe2.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/anchor-url-dom-write-location-inline-event-null-char.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/dom-write-URL.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-redirect.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/object-tag.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-addslashes-backslash.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/dom-write-location-javascript-URL.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/embed-tag.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/faux-script2.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/anchor-url-dom-write-location-javascript-URL.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-with-source-relative-scheme.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/img-onerror-tricky.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/javascript-link-HTML-entities-named.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/javascript-link-HTML-entities-null-char.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-addslashes-null-char.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/link-opens-new-window.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-utf-7-encoded.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-utf-7.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-with-source.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-addslashes-double-quote.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-safe.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/link-onclick-null-char.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/javascript-link.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-control-char.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-with-source-null-char.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/iframe-javascript-url.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-src-redirect-safe.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-with-source-control-char.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/get-from-iframe.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/inline-event-HTML-entities.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/post-from-iframe.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-post-control-char.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/object-embed-tag.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/base-href.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-entities.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/base-href-safe.html +/sdcard/android/layout_tests/http/tests/security/xssAuditor/embed-tag-null-char.html +/sdcard/android/layout_tests/http/tests/security/cross-frame-access-location-get-override.html +/sdcard/android/layout_tests/http/tests/security/protocol-compare-case-insensitive.html +/sdcard/android/layout_tests/http/tests/security/xss-DENIED-xsl-external-entity.xml +/sdcard/android/layout_tests/http/tests/security/cross-frame-access-history-get-override.html +/sdcard/android/layout_tests/http/tests/security/cross-frame-access-get-override.html +/sdcard/android/layout_tests/http/tests/security/cross-origin-xsl-BLOCKED.html +/sdcard/android/layout_tests/http/tests/security/local-iFrame-from-remote.html +/sdcard/android/layout_tests/http/tests/security/credentials-in-referer.html +/sdcard/android/layout_tests/http/tests/security/xss-DENIED-xsl-external-entity-redirect.xml +/sdcard/android/layout_tests/http/tests/security/local-video-poster-from-remote.html +/sdcard/android/layout_tests/http/tests/security/local-CSS-from-remote.html +/sdcard/android/layout_tests/http/tests/security/local-user-CSS-from-remote.html +/sdcard/android/layout_tests/http/tests/security/cross-frame-access-object-prototype.html +/sdcard/android/layout_tests/http/tests/security/dataTransfer-set-data-file-url.html +/sdcard/android/layout_tests/http/tests/security/cross-frame-access-enumeration.html +/sdcard/android/layout_tests/http/tests/security/host-compare-case-insensitive.html +/sdcard/android/layout_tests/http/tests/security/xss-DENIED-xsl-document.xml +/sdcard/android/layout_tests/http/tests/security/cross-frame-access-protocol.html +/sdcard/android/layout_tests/http/tests/security/cross-frame-access-private-browsing.html +/sdcard/android/layout_tests/http/tests/security/feed-urls-from-remote.html +/sdcard/android/layout_tests/http/tests/security/cross-frame-access-put.html +/sdcard/android/layout_tests/http/tests/security/canvas-remote-read-svg-image.html +/sdcard/android/layout_tests/http/tests/security/window-properties-clear-domain.html +/sdcard/android/layout_tests/http/tests/security/cross-frame-access-callback-explicit-domain-DENY.html +/sdcard/android/layout_tests/http/tests/security/cross-frame-access-get.html +/sdcard/android/layout_tests/http/tests/security/cross-frame-access-port.html +/sdcard/android/layout_tests/http/tests/security/cross-frame-access-document-direct.html +/sdcard/android/layout_tests/http/tests/security/window-properties-pass.html +/sdcard/android/layout_tests/http/tests/security/local-video-src-from-remote.html +/sdcard/android/layout_tests/http/tests/security/cross-frame-access-history-put.html +/sdcard/android/layout_tests/http/tests/security/cross-frame-access-child-explicit-domain.html +/sdcard/android/layout_tests/http/tests/security/local-video-source-from-remote.html +/sdcard/android/layout_tests/http/tests/security/drag-over-remote-content-iframe.html +/sdcard/android/layout_tests/http/tests/security/local-JavaScript-from-remote.html +/sdcard/android/layout_tests/http/tests/security/cross-frame-access-parent-explicit-domain.html +/sdcard/android/layout_tests/http/tests/security/cross-frame-access-location-put.html +/sdcard/android/layout_tests/http/tests/security/cross-frame-access-history-get.html +/sdcard/android/layout_tests/http/tests/security/cross-frame-access-get-custom-property-cached.html +/sdcard/android/layout_tests/http/tests/security/cross-frame-access-location-get.html +/sdcard/android/layout_tests/http/tests/security/cross-frame-access-delete.html +/sdcard/android/layout_tests/http/tests/security/xss-DENIED-xsl-document-redirect.xml +/sdcard/android/layout_tests/http/tests/security/cross-frame-access-protocol-explicit-domain.html +/sdcard/android/layout_tests/http/tests/security/window-properties-clear-port.html +/sdcard/android/layout_tests/http/tests/security/frame-loading-via-document-write.html +/sdcard/android/layout_tests/http/tests/security/cross-frame-access-port-explicit-domain.html +/sdcard/android/layout_tests/http/tests/security/local-image-from-remote.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/workers/methods-async.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/workers/methods.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/web-apps/008.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/methods-async.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/methods.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/uri-resolution-opera-open-005.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/upload-onload-event.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/small-chunks-response-text.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/access-control-basic-non-simple-allow-async.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/uri-resolution-opera-open-009.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/frame-unload-abort-crash.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/access-control-basic-non-simple-deny-cached.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/xmlhttprequest-unsafe-redirect.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/uri-resolution-opera-open-006.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/upload-onprogress-event.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/access-control-basic-allow.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/cache-override.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/xhr-onunload.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/methods-lower-case.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/uri-resolution-opera-open-007.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/svg-created-by-xhr-disallowed-in-dashboard.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/uri-resolution-opera-open-004.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/xmlhttprequest-missing-file-exception.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/cookies.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/uri-resolution-opera-open-010.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/redirect-cross-origin-tripmine.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/origin-header-same-origin-get-sync.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/response-encoding.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/frame-load-cancelled-abort.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/upload-progress-events.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/xml-encoding.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/default-content-type-dashboard.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/abort-should-cancel-load.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/access-control-basic-whitelist-request-headers.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/uri-resolution-opera-open-008.html +/sdcard/android/layout_tests/http/tests/loading/preload-img-test.html +/sdcard/android/layout_tests/http/tests/loading/gmail-assert-on-load.html +/sdcard/android/layout_tests/http/tests/loading/text-content-type-with-binary-extension.html +/sdcard/android/layout_tests/http/tests/loading/basic.html +/sdcard/android/layout_tests/http/tests/loading/slow-parsing-subframe.html +/sdcard/android/layout_tests/http/tests/loading/deleted-host-in-resource-load-delegate-callback.html +/sdcard/android/layout_tests/http/tests/loading/bad-scheme-subframe.html +/sdcard/android/layout_tests/http/tests/loading/location-hash-reload-cycle.html +/sdcard/android/layout_tests/http/tests/loading/bad-server-subframe.html +/sdcard/android/layout_tests/http/tests/loading/empty-subframe.html +/sdcard/android/layout_tests/http/tests/loading/redirect-methods.html /sdcard/android/layout_tests/media/video-error-does-not-exist.html /sdcard/android/layout_tests/media/audio-constructor.html +/sdcard/android/layout_tests/media/video-play-empty-events.html /sdcard/android/layout_tests/media/video-append-source.html /sdcard/android/layout_tests/media/media-load-event.html /sdcard/android/layout_tests/media/unsupported-rtsp.html +/sdcard/android/layout_tests/media/video-dom-autoplay.html /sdcard/android/layout_tests/media/video-currentTime-set2.html /sdcard/android/layout_tests/media/video-muted.html /sdcard/android/layout_tests/media/progress-event.html @@ -558,25 +910,33 @@ /sdcard/android/layout_tests/media/video-controls-zoomed.html /sdcard/android/layout_tests/media/video-src-invalid-remove.html /sdcard/android/layout_tests/media/video-volume.html +/sdcard/android/layout_tests/media/video-size.html /sdcard/android/layout_tests/media/controls-right-click-on-timebar.html /sdcard/android/layout_tests/media/video-currentTime.html /sdcard/android/layout_tests/media/audio-constructor-autobuffer.html /sdcard/android/layout_tests/media/broken-video.html /sdcard/android/layout_tests/media/video-buffered.html +/sdcard/android/layout_tests/media/video-load-readyState.html /sdcard/android/layout_tests/media/video-load-networkState.html /sdcard/android/layout_tests/media/unsupported-tracks.html /sdcard/android/layout_tests/media/video-source-add-src.html /sdcard/android/layout_tests/media/video-seek-past-end-paused.html +/sdcard/android/layout_tests/media/media-startTime.html /sdcard/android/layout_tests/media/video-source-error.html +/sdcard/android/layout_tests/media/video-autoplay.html /sdcard/android/layout_tests/media/video-controls.html /sdcard/android/layout_tests/media/video-canvas-source.html +/sdcard/android/layout_tests/media/video-timeupdate-during-playback.html /sdcard/android/layout_tests/media/video-currentTime-set.html +/sdcard/android/layout_tests/media/controls-css-overload.html /sdcard/android/layout_tests/media/video-source-type-params.html /sdcard/android/layout_tests/media/event-attributes.html /sdcard/android/layout_tests/media/audio-data-url.html /sdcard/android/layout_tests/media/video-src-plus-source.html /sdcard/android/layout_tests/media/video-no-autoplay.html +/sdcard/android/layout_tests/media/video-pause-empty-events.html /sdcard/android/layout_tests/media/video-document-types.html +/sdcard/android/layout_tests/media/video-src-remove.html /sdcard/android/layout_tests/media/audio-delete-while-slider-thumb-clicked.html /sdcard/android/layout_tests/media/video-error-abort.html /sdcard/android/layout_tests/media/video-size-intrinsic-scale.html @@ -625,8 +985,6 @@ /sdcard/android/layout_tests/transitions/transition-hit-test.html /sdcard/android/layout_tests/transitions/opacity-transition-zindex.html /sdcard/android/layout_tests/transitions/interrupted-all-transition.html -/sdcard/android/layout_tests/transitions/mask-transitions.html -/sdcard/android/layout_tests/transitions/zero-duration-with-non-zero-delay-start.html /sdcard/android/layout_tests/transitions/hang-with-bad-transition-list.html /sdcard/android/layout_tests/transitions/zero-duration-with-non-zero-delay-end.html /sdcard/android/layout_tests/transitions/remove-transition-style.html diff --git a/tests/DumpRenderTree/assets/results/layout_tests_nontext.txt b/tests/DumpRenderTree/assets/results/layout_tests_nontext.txt index 121b5a142a5f..665ef078233f 100644 --- a/tests/DumpRenderTree/assets/results/layout_tests_nontext.txt +++ b/tests/DumpRenderTree/assets/results/layout_tests_nontext.txt @@ -3233,6 +3233,34 @@ /sdcard/android/layout_tests/fonts/fantasy.html /sdcard/android/layout_tests/fonts/serif.html /sdcard/android/layout_tests/fonts/sans-serif.html +/sdcard/android/layout_tests/http/tests/webarchive/test-css-url-encoding-shift-jis.html +/sdcard/android/layout_tests/http/tests/webarchive/test-css-url-encoding.html +/sdcard/android/layout_tests/http/tests/webarchive/test-css-url-encoding-utf-8.html +/sdcard/android/layout_tests/http/tests/webarchive/test-preload-resources.html +/sdcard/android/layout_tests/http/tests/multipart/invalid-image-data.html +/sdcard/android/layout_tests/http/tests/multipart/invalid-image-data-standalone.html +/sdcard/android/layout_tests/http/tests/local/file-url-sent-as-referer.html +/sdcard/android/layout_tests/http/tests/misc/location-replace-crossdomain.html +/sdcard/android/layout_tests/http/tests/misc/acid2.html +/sdcard/android/layout_tests/http/tests/misc/acid2-pixel.html +/sdcard/android/layout_tests/http/tests/misc/favicon-as-image.html +/sdcard/android/layout_tests/http/tests/misc/generated-content-inside-table.html +/sdcard/android/layout_tests/http/tests/misc/willCacheResponse-delegate-callback.html +/sdcard/android/layout_tests/http/tests/misc/iframe404.html +/sdcard/android/layout_tests/http/tests/misc/frame-access-during-load.html +/sdcard/android/layout_tests/http/tests/navigation/postredirect-goback1.html +/sdcard/android/layout_tests/http/tests/navigation/error404-subframeload.html +/sdcard/android/layout_tests/http/tests/navigation/error404-basic.html +/sdcard/android/layout_tests/http/tests/navigation/anchor-frames.html +/sdcard/android/layout_tests/http/tests/navigation/postredirect-basic.html +/sdcard/android/layout_tests/http/tests/navigation/post-goback1.html +/sdcard/android/layout_tests/http/tests/navigation/post-basic.html +/sdcard/android/layout_tests/http/tests/navigation/post-frames.html +/sdcard/android/layout_tests/http/tests/navigation/error404-goback.html +/sdcard/android/layout_tests/http/tests/navigation/javascriptlink-frames.html +/sdcard/android/layout_tests/http/tests/navigation/postredirect-frames.html +/sdcard/android/layout_tests/http/tests/navigation/error404-frames.html +/sdcard/android/layout_tests/http/tests/loading/simple-subframe.html /sdcard/android/layout_tests/media/video-display-toggle.html /sdcard/android/layout_tests/media/video-transformed.html /sdcard/android/layout_tests/media/video-empty-source.html diff --git a/tests/DumpRenderTree/assets/results/layout_tests_passed.txt b/tests/DumpRenderTree/assets/results/layout_tests_passed.txt index b40a21e2b3f1..942b6479f948 100644 --- a/tests/DumpRenderTree/assets/results/layout_tests_passed.txt +++ b/tests/DumpRenderTree/assets/results/layout_tests_passed.txt @@ -1,15 +1,20 @@ /sdcard/android/layout_tests/accessibility/non-native-image-crash.html /sdcard/android/layout_tests/animations/animation-css-rule-types.html /sdcard/android/layout_tests/animations/animation-events-create.html +/sdcard/android/layout_tests/animations/play-state.html +/sdcard/android/layout_tests/animations/animation-start-event-destroy-renderer.html /sdcard/android/layout_tests/animations/combo-transform-translate+scale.html /sdcard/android/layout_tests/animations/transform-origin-vs-functions.html /sdcard/android/layout_tests/animations/simultaneous-start-transform.html /sdcard/android/layout_tests/animations/lineheight-animation.html +/sdcard/android/layout_tests/animations/import.html /sdcard/android/layout_tests/animations/simultaneous-start-left.html /sdcard/android/layout_tests/animations/fill-unset-properties.html /sdcard/android/layout_tests/animations/multiple-keyframes.html /sdcard/android/layout_tests/animations/change-one-anim.html +/sdcard/android/layout_tests/animations/keyframes-comma-separated.html /sdcard/android/layout_tests/animations/matrix-anim.html +/sdcard/android/layout_tests/animations/keyframes-rule.html /sdcard/android/layout_tests/animations/generic-from-to.html /sdcard/android/layout_tests/animations/big-rotation.html /sdcard/android/layout_tests/animations/keyframe-timing-functions.html @@ -18,11 +23,13 @@ /sdcard/android/layout_tests/animations/animation-iteration-event-destroy-renderer.html /sdcard/android/layout_tests/animations/keyframes.html /sdcard/android/layout_tests/animations/multiple-animations.html +/sdcard/android/layout_tests/animations/animation-end-event-destroy-renderer.html /sdcard/android/layout_tests/animations/transition-and-animation-2.html /sdcard/android/layout_tests/animations/import-crash.html /sdcard/android/layout_tests/animations/empty-keyframes.html /sdcard/android/layout_tests/animations/width-using-ems.html /sdcard/android/layout_tests/animations/combo-transform-rotate+scale.html +/sdcard/android/layout_tests/animations/keyframes-out-of-order.html /sdcard/android/layout_tests/css1/units/zero-duration-without-units.html /sdcard/android/layout_tests/css2.1/atrule_longest_match.html /sdcard/android/layout_tests/css3/khtml-background-size-0x0-bmp.html @@ -1231,6 +1238,23 @@ /sdcard/android/layout_tests/fast/cookies/local-file-can-set-cookies.html /sdcard/android/layout_tests/fast/css-generated-content/empty-content-with-float-crash.html /sdcard/android/layout_tests/fast/css-generated-content/reset-content-to-initial.html +/sdcard/android/layout_tests/fast/workers/worker-close.html +/sdcard/android/layout_tests/fast/workers/worker-context-gc.html +/sdcard/android/layout_tests/fast/workers/worker-constructor.html +/sdcard/android/layout_tests/fast/workers/worker-timeout.html +/sdcard/android/layout_tests/fast/workers/worker-messageport.html +/sdcard/android/layout_tests/fast/workers/worker-gc.html +/sdcard/android/layout_tests/fast/workers/worker-replace-self.html +/sdcard/android/layout_tests/fast/workers/worker-event-listener.html +/sdcard/android/layout_tests/fast/workers/worker-cloneport.html +/sdcard/android/layout_tests/fast/workers/worker-call.html +/sdcard/android/layout_tests/fast/workers/worker-messageport-gc.html +/sdcard/android/layout_tests/fast/workers/stress-js-execution.html +/sdcard/android/layout_tests/fast/workers/worker-terminate.html +/sdcard/android/layout_tests/fast/workers/use-machine-stack.html +/sdcard/android/layout_tests/fast/workers/worker-navigator.html +/sdcard/android/layout_tests/fast/workers/worker-script-error.html +/sdcard/android/layout_tests/fast/workers/worker-replace-global-constructor.html /sdcard/android/layout_tests/fast/transforms/container-transform-crash.html /sdcard/android/layout_tests/fast/leaks/001.html /sdcard/android/layout_tests/fast/leaks/002.html @@ -1291,7 +1315,6 @@ /sdcard/android/layout_tests/fast/events/onerror-bubbling.html /sdcard/android/layout_tests/fast/events/keydown-remove-frame.html /sdcard/android/layout_tests/fast/events/message-channel-gc-3.html -/sdcard/android/layout_tests/fast/events/scroll-to-anchor-in-overflow-hidden.html /sdcard/android/layout_tests/fast/events/event-targets.html /sdcard/android/layout_tests/fast/events/space-scroll-event.html /sdcard/android/layout_tests/fast/events/onload-after-document-close-no-subresource.html @@ -1943,14 +1966,12 @@ /sdcard/android/layout_tests/fast/dom/image-object.html /sdcard/android/layout_tests/fast/dom/gc-5.html /sdcard/android/layout_tests/fast/dom/cssTarget-crash.html -/sdcard/android/layout_tests/fast/dom/noscript-canvas-in-created-html-document.html /sdcard/android/layout_tests/fast/dom/DOMParser-assign-variable.html /sdcard/android/layout_tests/fast/dom/offset-parent-positioned-and-inline.html /sdcard/android/layout_tests/fast/dom/timer-clear-interval-in-handler.html /sdcard/android/layout_tests/fast/dom/implementation-createHTMLDocument.html /sdcard/android/layout_tests/fast/dom/iframe-document.html /sdcard/android/layout_tests/fast/dom/document-all-input.html -/sdcard/android/layout_tests/fast/dom/null-document-location-href-put-crash.html /sdcard/android/layout_tests/fast/dom/getelementsbytagnamens-mixed-namespaces.html /sdcard/android/layout_tests/fast/dom/object-plugin-hides-properties.html /sdcard/android/layout_tests/fast/dom/gc-2.html @@ -2344,6 +2365,13 @@ /sdcard/android/layout_tests/fast/css/webkit-marquee-speed-unit-in-quirksmode.html /sdcard/android/layout_tests/fast/css/CSSPrimitiveValue-exceptions.html /sdcard/android/layout_tests/fast/css/empty-script.html +/sdcard/android/layout_tests/fast/css/mask-missing-image-crash.html +/sdcard/android/layout_tests/fast/css/parse-timing-function-crash.html +/sdcard/android/layout_tests/fast/css/background-position-inherit.html +/sdcard/android/layout_tests/fast/css/readonly-pseudoclass-opera-003.html +/sdcard/android/layout_tests/fast/css/font-family-builtins.html +/sdcard/android/layout_tests/fast/css/remove-shorthand.html +/sdcard/android/layout_tests/fast/css/overflow-property.html /sdcard/android/layout_tests/fast/css/pseudo-required-optional-005.html /sdcard/android/layout_tests/fast/css/min-device-aspect-ratio.html /sdcard/android/layout_tests/fast/css/nested-rule-parent-sheet.html @@ -2417,7 +2445,6 @@ /sdcard/android/layout_tests/fast/history/subframe-is-visited.html /sdcard/android/layout_tests/fast/loader/early-load-cancel.html /sdcard/android/layout_tests/fast/loader/iframe-recursive-synchronous-load.html -/sdcard/android/layout_tests/fast/loader/location-port.html /sdcard/android/layout_tests/fast/loader/local-css-allowed-in-strict-mode.html /sdcard/android/layout_tests/fast/loader/url-strip-cr-lf-tab.html /sdcard/android/layout_tests/fast/loader/hashchange-event.html @@ -2513,33 +2540,301 @@ /sdcard/android/layout_tests/fast/reflections/teardown-crash.html /sdcard/android/layout_tests/fast/reflections/reflection-computed-style.html /sdcard/android/layout_tests/fast/reflections/reflection-overflow-scroll.html -/sdcard/android/layout_tests/media/video-play-empty-events.html +/sdcard/android/layout_tests/http/tests/multipart/win-boundary-crash.html +/sdcard/android/layout_tests/http/tests/multipart/stop-crash.html +/sdcard/android/layout_tests/http/tests/mime/standard-mode-loads-stylesheet-with-text-css-and-invalid-type.html +/sdcard/android/layout_tests/http/tests/mime/standard-mode-loads-stylesheet-with-empty-content-type.html +/sdcard/android/layout_tests/http/tests/mime/standard-mode-loads-stylesheet-with-charset-and-css-extension.html +/sdcard/android/layout_tests/http/tests/mime/standard-mode-loads-stylesheet-with-charset.html +/sdcard/android/layout_tests/http/tests/local/style-access-before-stylesheet-loaded.html +/sdcard/android/layout_tests/http/tests/local/stylesheet-and-script-load-order-http.html +/sdcard/android/layout_tests/http/tests/local/link-stylesheet-preferred.html +/sdcard/android/layout_tests/http/tests/local/stylesheet-and-script-load-order.html +/sdcard/android/layout_tests/http/tests/misc/uncacheable-script-repeated.html +/sdcard/android/layout_tests/http/tests/misc/embedCrasher.html +/sdcard/android/layout_tests/http/tests/misc/multiple-submit.html +/sdcard/android/layout_tests/http/tests/misc/empty-file-formdata.html +/sdcard/android/layout_tests/http/tests/misc/submit-post-in-utf7.html +/sdcard/android/layout_tests/http/tests/misc/text-refresh.html +/sdcard/android/layout_tests/http/tests/misc/window-open-then-write.html +/sdcard/android/layout_tests/http/tests/misc/submit-post-in-utf16be.html +/sdcard/android/layout_tests/http/tests/misc/frame-default-enc-same-domain.html +/sdcard/android/layout_tests/http/tests/misc/submit-post-in-utf32le.html +/sdcard/android/layout_tests/http/tests/misc/iframe-domain-test.html +/sdcard/android/layout_tests/http/tests/misc/frame-default-enc-different-domain.html +/sdcard/android/layout_tests/http/tests/misc/css-accept-any-type.html +/sdcard/android/layout_tests/http/tests/misc/url-in-utf7.html +/sdcard/android/layout_tests/http/tests/misc/submit-get-in-utf32be.html +/sdcard/android/layout_tests/http/tests/misc/meta-refresh-stray-single-quote.html +/sdcard/android/layout_tests/http/tests/misc/canvas-pattern-from-incremental-image.html +/sdcard/android/layout_tests/http/tests/misc/submit-get-in-utf16le.html +/sdcard/android/layout_tests/http/tests/misc/url-in-utf32be.html +/sdcard/android/layout_tests/http/tests/misc/timer-vs-loading.html +/sdcard/android/layout_tests/http/tests/misc/font-face-in-multiple-segmented-faces.html +/sdcard/android/layout_tests/http/tests/misc/url-in-utf16le.html +/sdcard/android/layout_tests/http/tests/misc/refresh-meta-with-newline.html +/sdcard/android/layout_tests/http/tests/misc/post-submit-button.html +/sdcard/android/layout_tests/http/tests/misc/redirect-to-about-blank.html +/sdcard/android/layout_tests/http/tests/misc/javascript-url-stop-loaders.html +/sdcard/android/layout_tests/http/tests/misc/iframe-invalid-source-crash.html +/sdcard/android/layout_tests/http/tests/misc/slow-preload-cancel.html +/sdcard/android/layout_tests/http/tests/misc/object-image-error-with-onload.html +/sdcard/android/layout_tests/http/tests/misc/image-error.html +/sdcard/android/layout_tests/http/tests/misc/referrer.html +/sdcard/android/layout_tests/http/tests/misc/cached-scripts.html +/sdcard/android/layout_tests/http/tests/misc/empty-cookie.html +/sdcard/android/layout_tests/http/tests/misc/submit-post-in-utf32be.html +/sdcard/android/layout_tests/http/tests/misc/missing-style-sheet.html +/sdcard/android/layout_tests/http/tests/misc/submit-post-in-utf16le.html +/sdcard/android/layout_tests/http/tests/misc/submit-get-in-utf16be.html +/sdcard/android/layout_tests/http/tests/misc/DOMContentLoaded-event.html +/sdcard/android/layout_tests/http/tests/misc/onload-remove-iframe-crash-2.html +/sdcard/android/layout_tests/http/tests/misc/submit-get-in-utf32le.html +/sdcard/android/layout_tests/http/tests/misc/object-image-error.html +/sdcard/android/layout_tests/http/tests/misc/createElementNamespace3.html +/sdcard/android/layout_tests/http/tests/misc/url-in-utf16be.html +/sdcard/android/layout_tests/http/tests/misc/url-in-utf32le.html +/sdcard/android/layout_tests/http/tests/misc/crash-multiple-family-fontface.html +/sdcard/android/layout_tests/http/tests/misc/BOM-override-script.html +/sdcard/android/layout_tests/http/tests/misc/createElementNamespace1.xml +/sdcard/android/layout_tests/http/tests/workers/text-encoding.html +/sdcard/android/layout_tests/http/tests/workers/worker-redirect.html +/sdcard/android/layout_tests/http/tests/workers/worker-importScripts.html +/sdcard/android/layout_tests/http/tests/cookies/double-quoted-value-with-semi-colon.html +/sdcard/android/layout_tests/http/tests/uri/resolve-encoding-relative.html +/sdcard/android/layout_tests/http/tests/uri/escaped-entity.html +/sdcard/android/layout_tests/http/tests/uri/utf8-path.html +/sdcard/android/layout_tests/http/tests/navigation/changing-frame-hierarchy-in-onload.html +/sdcard/android/layout_tests/http/tests/navigation/fallback-anchor-reload.html +/sdcard/android/layout_tests/http/tests/navigation/back-send-referrer.html +/sdcard/android/layout_tests/http/tests/incremental/slow-utf8-css.html +/sdcard/android/layout_tests/http/tests/incremental/frame-focus-before-load.html +/sdcard/android/layout_tests/http/tests/appcache/crash-when-navigating-away-then-back.html +/sdcard/android/layout_tests/http/tests/appcache/offline-access.html +/sdcard/android/layout_tests/http/tests/appcache/update-cache.html +/sdcard/android/layout_tests/http/tests/appcache/manifest-with-empty-file.html +/sdcard/android/layout_tests/http/tests/appcache/simple.html +/sdcard/android/layout_tests/http/tests/appcache/wrong-signature-2.html +/sdcard/android/layout_tests/http/tests/appcache/top-frame-3.html +/sdcard/android/layout_tests/http/tests/appcache/online-whitelist.html +/sdcard/android/layout_tests/http/tests/appcache/fallback.html +/sdcard/android/layout_tests/http/tests/appcache/different-origin-manifest.html +/sdcard/android/layout_tests/http/tests/appcache/empty-manifest.html +/sdcard/android/layout_tests/http/tests/appcache/manifest-redirect.html +/sdcard/android/layout_tests/http/tests/appcache/navigating-away-while-cache-attempt-in-progress.html +/sdcard/android/layout_tests/http/tests/appcache/top-frame-4.html +/sdcard/android/layout_tests/http/tests/appcache/wrong-signature.html +/sdcard/android/layout_tests/http/tests/appcache/fail-on-update.html +/sdcard/android/layout_tests/http/tests/appcache/foreign-iframe-main.html +/sdcard/android/layout_tests/http/tests/appcache/xhr-foreign-resource.html +/sdcard/android/layout_tests/http/tests/appcache/manifest-containing-itself.html +/sdcard/android/layout_tests/http/tests/appcache/resource-redirect.html +/sdcard/android/layout_tests/http/tests/appcache/idempotent-update.html +/sdcard/android/layout_tests/http/tests/appcache/top-frame-1.html +/sdcard/android/layout_tests/http/tests/appcache/main-resource-hash.html +/sdcard/android/layout_tests/http/tests/appcache/manifest-parsing.html +/sdcard/android/layout_tests/http/tests/appcache/404-manifest.html +/sdcard/android/layout_tests/http/tests/appcache/wrong-content-type.html +/sdcard/android/layout_tests/http/tests/appcache/resource-redirect-2.html +/sdcard/android/layout_tests/http/tests/appcache/top-frame-2.html +/sdcard/android/layout_tests/http/tests/appcache/404-resource.html +/sdcard/android/layout_tests/http/tests/appcache/remove-cache.html +/sdcard/android/layout_tests/http/tests/appcache/manifest-redirect-2.html +/sdcard/android/layout_tests/http/tests/appcache/reload.html +/sdcard/android/layout_tests/http/tests/appcache/cyrillic-uri.html +/sdcard/android/layout_tests/http/tests/security/aboutBlank/security-context-alias.html +/sdcard/android/layout_tests/http/tests/security/aboutBlank/security-context-write.html +/sdcard/android/layout_tests/http/tests/security/aboutBlank/security-context-grandchildren-alias.html +/sdcard/android/layout_tests/http/tests/security/aboutBlank/security-context-with-base-tag.html +/sdcard/android/layout_tests/http/tests/security/aboutBlank/security-context.html +/sdcard/android/layout_tests/http/tests/security/aboutBlank/window-open-self-about-blank.html +/sdcard/android/layout_tests/http/tests/security/aboutBlank/security-context-grandchildren.html +/sdcard/android/layout_tests/http/tests/security/aboutBlank/security-context-grandchildren-writeln-lexical.html +/sdcard/android/layout_tests/http/tests/security/aboutBlank/security-context-window-open.html +/sdcard/android/layout_tests/http/tests/security/aboutBlank/security-context-grandchildren-write-lexical.html +/sdcard/android/layout_tests/http/tests/security/aboutBlank/security-context-grandchildren-lexical.html +/sdcard/android/layout_tests/http/tests/security/aboutBlank/security-context-writeln.html +/sdcard/android/layout_tests/http/tests/security/cookies/document-open.html +/sdcard/android/layout_tests/http/tests/security/cookies/create-document.html +/sdcard/android/layout_tests/http/tests/security/cookies/assign-document-url.html +/sdcard/android/layout_tests/http/tests/security/cookies/basic.html +/sdcard/android/layout_tests/http/tests/security/cookies/base-tag.html +/sdcard/android/layout_tests/http/tests/security/cookies/base-about-blank.html +/sdcard/android/layout_tests/http/tests/security/cookies/xmlhttprequest.html +/sdcard/android/layout_tests/http/tests/security/listener/xss-JSTargetNode-onclick-shortcut.html +/sdcard/android/layout_tests/http/tests/security/listener/xss-XMLHttpRequest-shortcut.html +/sdcard/android/layout_tests/http/tests/security/listener/xss-JSTargetNode-onclick-addEventListener.html +/sdcard/android/layout_tests/http/tests/security/listener/xss-XMLHttpRequest-addEventListener.html +/sdcard/android/layout_tests/http/tests/security/MessagePort/event-listener-context.html +/sdcard/android/layout_tests/http/tests/security/postMessage/delivery-order.html +/sdcard/android/layout_tests/http/tests/security/postMessage/data-url-sends-null-origin.html +/sdcard/android/layout_tests/http/tests/security/postMessage/origin-unaffected-by-base-tag.html +/sdcard/android/layout_tests/http/tests/security/postMessage/origin-unaffected-by-document-domain.html +/sdcard/android/layout_tests/http/tests/security/postMessage/javascript-page-still-sends-origin.html +/sdcard/android/layout_tests/http/tests/security/postMessage/invalid-origin-throws-exception.html +/sdcard/android/layout_tests/http/tests/security/postMessage/target-origin.html +/sdcard/android/layout_tests/http/tests/security/frameNavigation/context-for-window-open.html +/sdcard/android/layout_tests/http/tests/security/frameNavigation/context-for-location.html +/sdcard/android/layout_tests/http/tests/security/frameNavigation/not-opener.html +/sdcard/android/layout_tests/http/tests/security/frameNavigation/opener.html +/sdcard/android/layout_tests/http/tests/security/frameNavigation/context-for-location-assign.html +/sdcard/android/layout_tests/http/tests/security/frameNavigation/context-for-location-href.html +/sdcard/android/layout_tests/http/tests/security/frameNavigation/xss-ALLOWED-parent-navigation-change.html +/sdcard/android/layout_tests/http/tests/security/originHeader/origin-header-for-get.html +/sdcard/android/layout_tests/http/tests/security/originHeader/origin-header-for-https.html +/sdcard/android/layout_tests/http/tests/security/originHeader/origin-header-for-post.html +/sdcard/android/layout_tests/http/tests/security/originHeader/origin-header-for-data.html +/sdcard/android/layout_tests/http/tests/security/xss-DENIED-assign-location-hash.html +/sdcard/android/layout_tests/http/tests/security/cross-frame-access-history-prototype.html +/sdcard/android/layout_tests/http/tests/security/xss-DENIED-synchronous-form.html +/sdcard/android/layout_tests/http/tests/security/canvas-remote-read-redirect-to-remote-image.html +/sdcard/android/layout_tests/http/tests/security/xss-DENIED-assign-location-nonstandardProperty.html +/sdcard/android/layout_tests/http/tests/security/xss-DENIED-assign-location-pathname.html +/sdcard/android/layout_tests/http/tests/security/cross-frame-access-frames.html +/sdcard/android/layout_tests/http/tests/security/object-literals.html +/sdcard/android/layout_tests/http/tests/security/cross-frame-access-location-prototype.html +/sdcard/android/layout_tests/http/tests/security/xss-DENIED-assign-location-search.html +/sdcard/android/layout_tests/http/tests/security/cross-frame-access-selection.html +/sdcard/android/layout_tests/http/tests/security/cross-frame-access-name-getter.html +/sdcard/android/layout_tests/http/tests/security/cross-frame-access-call.html +/sdcard/android/layout_tests/http/tests/security/xss-DENIED-assign-location-reload.html +/sdcard/android/layout_tests/http/tests/security/xss-DENIED-invalid-domain-change.html +/sdcard/android/layout_tests/http/tests/security/canvas-remote-read-remote-image.html +/sdcard/android/layout_tests/http/tests/security/xss-DENIED-assign-location-protocol.html +/sdcard/android/layout_tests/http/tests/security/cross-frame-access-first-time.html +/sdcard/android/layout_tests/http/tests/security/xss-eval.html +/sdcard/android/layout_tests/http/tests/security/cross-frame-access-DOMImplementation.html +/sdcard/android/layout_tests/http/tests/security/xss-DENIED-assign-location-hostname.html +/sdcard/android/layout_tests/http/tests/security/cross-frame-access-custom.html +/sdcard/android/layout_tests/http/tests/security/xss-DENIED-assign-location-host.html +/sdcard/android/layout_tests/http/tests/security/cross-frame-access-callback-explicit-domain-ALLOW.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/workers/xmlhttprequest-file-not-found.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/workers/abort-exception-assert.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/workers/close.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/web-apps/010.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/web-apps/002.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/web-apps/012.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/web-apps/004.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/web-apps/014.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/web-apps/018.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/web-apps/002-simple.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/web-apps/001.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/web-apps/011.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/web-apps/003.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/web-apps/013.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/web-apps/005.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/web-apps/015.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/web-apps/007.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/cross-site-denied-response.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/encode-request-url.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/access-control-basic-allow-async.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/access-control-basic-non-simple-allow.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/access-control-basic-allow-preflight-cache.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/inject-header.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/xmlhttprequest-LSProgressEvent-ProgressEvent-should-match.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/origin-header-same-origin-post-async.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/access-control-basic-denied.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/origin-header-cross-origin-post-sync.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/xmlhttprequest-InvalidStateException-getAllRequestHeaders.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/simple-cross-origin-denied-events-post-sync.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/binary-x-user-defined.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/onloadstart-event.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/xmlhttprequest-no-content-length-onProgress.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/readystatechange.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/xmlhttprequest-contenttype-empty.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/access-control-basic-post-fail-non-simple-content-type.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/xmlhttprequest-forbidden-methods-exception.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/access-control-basic-allow-preflight-cache-invalidation-by-method.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/serialize-document.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/onerror-event.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/close-window.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/redirect-cross-origin-post-sync.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/detaching-frame-2.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/encode-request-url-2.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/set-dangerous-headers.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/event-target.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/xmlhttprequest-addEventListener-onProgress.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/send-on-abort.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/document-domain-set.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/access-control-basic-allow-preflight-cache-timeout.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/xmlhttprequest-responseXML-exception.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/cross-site-denied-response-sync.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/upload-onloadstart-event.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/supported-xml-content-types.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/simple-cross-origin-denied-events.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/request-encoding.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/zero-length-response.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/connection-error-sync.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/access-control-basic-allow-access-control-origin-header-data-url.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/access-control-basic-allow-preflight-cache-invalidation-by-header.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/redirect-cross-origin.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/access-control-basic-allow-star.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/xmlhttprequest-crlf-getAllResponseHeader.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/event-listener-gc.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/interactive-state.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/state-after-network-error.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/abort-crash.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/get-dangerous-headers.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/xmlhttprequest-image-not-loaded.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/exceptions.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/xmlhttprequest-test-send-flag.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/origin-header-cross-origin-post-async.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/referer.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/xmlhttprequest-invalidHeader-getRequestHeader.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/infoOnProgressEvent.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/access-control-basic-allow-access-control-origin-header.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/docLoaderFrame.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/simple-cross-origin-denied-events-sync.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/post-content-type.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/access-control-basic-whitelist-response-headers.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/onabort-event.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/origin-header-same-origin-get-async.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/detaching-frame.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/redirect-cross-origin-sync.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/access-control-basic-get-fail-non-simple.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/zero-length-response-sync.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/access-control-basic-denied-preflight-cache.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/authorization-header.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/xmlhttprequest-post-crash.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/origin-header-cross-origin-get-sync.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/origin-header-cross-origin-get-async.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/redirect-cross-origin-sync-double.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/xmlhttprequest-abort-readyState-shouldDispatchEvent.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/xmlhttprequest-responseText-exception.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/redirect-cross-origin-2.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/xmlhttprequest-abort-readyState-shouldNotDispatchEvent.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/status-after-abort.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/XMLHttpRequestException.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/xmlhttprequest-onProgress-open-should-zero-length.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/broken-xml-encoding.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/simple-cross-origin-denied-events-post.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/extra-parameters.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/xmlhttprequest-multiple-open.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/xmlhttprequest-InvalidStateException-getRequestHeader.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/origin-header-same-origin-post-sync.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/cross-site-denied-response-sync-2.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/request-from-popup.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/redirect-cross-origin-post.html +/sdcard/android/layout_tests/http/tests/xmlhttprequest/simple-cross-origin-progress-events.html +/sdcard/android/layout_tests/http/tests/messaging/cross-domain-message-event-dispatch.html +/sdcard/android/layout_tests/http/tests/messaging/cross-domain-message-send.html /sdcard/android/layout_tests/media/constructors.html -/sdcard/android/layout_tests/media/video-dom-autoplay.html /sdcard/android/layout_tests/media/video-poster.html /sdcard/android/layout_tests/media/video-source-media.html /sdcard/android/layout_tests/media/video-controls-with-mutation-event-handler.html /sdcard/android/layout_tests/media/video-src-set.html /sdcard/android/layout_tests/media/video-display-none-crash.html -/sdcard/android/layout_tests/media/video-size.html /sdcard/android/layout_tests/media/video-width-height.html /sdcard/android/layout_tests/media/video-source.html -/sdcard/android/layout_tests/media/video-load-readyState.html /sdcard/android/layout_tests/media/fallback.html /sdcard/android/layout_tests/media/remove-from-document-no-load.html /sdcard/android/layout_tests/media/before-load-member-access.html /sdcard/android/layout_tests/media/video-play-pause-events.html -/sdcard/android/layout_tests/media/media-startTime.html -/sdcard/android/layout_tests/media/video-autoplay.html -/sdcard/android/layout_tests/media/video-timeupdate-during-playback.html /sdcard/android/layout_tests/media/media-constants.html /sdcard/android/layout_tests/media/video-src-source.html -/sdcard/android/layout_tests/media/controls-css-overload.html -/sdcard/android/layout_tests/media/video-pause-empty-events.html /sdcard/android/layout_tests/media/video-play-pause-exception.html /sdcard/android/layout_tests/media/video-dom-autobuffer.html /sdcard/android/layout_tests/media/video-seek-no-src-exception.html -/sdcard/android/layout_tests/media/video-src-remove.html /sdcard/android/layout_tests/media/video-src.html /sdcard/android/layout_tests/plugins/createScriptableObject-before-start.html /sdcard/android/layout_tests/plugins/return-error-from-new-stream-callback-in-full-frame-plugin.html @@ -2601,6 +2896,8 @@ /sdcard/android/layout_tests/transitions/zero-duration-without-units.html /sdcard/android/layout_tests/transitions/min-max-width-height-transitions.html /sdcard/android/layout_tests/transitions/shorthand-transitions.html +/sdcard/android/layout_tests/transitions/mask-transitions.html +/sdcard/android/layout_tests/transitions/zero-duration-with-non-zero-delay-start.html /sdcard/android/layout_tests/transitions/zero-duration-in-list.html /sdcard/android/layout_tests/transitions/shorthand-border-transitions.html /sdcard/android/layout_tests/transitions/inherit-other-props.html diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/FileFilter.java b/tests/DumpRenderTree/src/com/android/dumprendertree/FileFilter.java index 395e57208310..32219fad6397 100644 --- a/tests/DumpRenderTree/src/com/android/dumprendertree/FileFilter.java +++ b/tests/DumpRenderTree/src/com/android/dumprendertree/FileFilter.java @@ -79,8 +79,7 @@ public class FileFilter { "profiler", // profiler is not supported "svg", // svg is not supported "platform", // platform specific - "http", // requires local http(s) server - "fast/workers", + "http/wml", }; static final String [] ignoreTestList = { diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoRunner.java b/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoRunner.java index e00d3ad290b1..283b98cdf357 100755 --- a/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoRunner.java +++ b/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoRunner.java @@ -65,14 +65,15 @@ public class LayoutTestsAutoRunner extends InstrumentationTestRunner { } catch (Exception e) { } } - + String r = (String)icicle.get("rebaseline"); this.mRebaseline = (r != null && r.toLowerCase().equals("true")); - super.onCreate(icicle); - + String logtime = (String) icicle.get("logtime"); this.mLogtime = (logtime != null && logtime.toLowerCase().equals("true")); + + super.onCreate(icicle); } public String mTestPath = null; diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/ReliabilityTest.java b/tests/DumpRenderTree/src/com/android/dumprendertree/ReliabilityTest.java index 50b7c3f86872..9bc09628c8c4 100644 --- a/tests/DumpRenderTree/src/com/android/dumprendertree/ReliabilityTest.java +++ b/tests/DumpRenderTree/src/com/android/dumprendertree/ReliabilityTest.java @@ -74,6 +74,8 @@ public class ReliabilityTest extends ActivityInstrumentationTestCase2<Reliabilit Intent intent = new Intent(runner.getContext(), ReliabilityTestActivity.class); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + ReliabilityTestActivity activity = (ReliabilityTestActivity)runner.startActivitySync( + intent); //read from BufferedReader instead of populating a list in advance, //this will avoid excessive memory usage in case of a large list while((url = listReader.readLine()) != null) { @@ -83,8 +85,6 @@ public class ReliabilityTest extends ActivityInstrumentationTestCase2<Reliabilit start = System.currentTimeMillis(); Log.v(LOGTAG, "Testing URL: " + url); FsUtils.updateTestStatus(TEST_STATUS_FILE, url); - ReliabilityTestActivity activity = (ReliabilityTestActivity)runner.startActivitySync( - intent); activity.reset(); //use message to send new URL to avoid interacting with //WebView in non-UI thread @@ -110,11 +110,11 @@ public class ReliabilityTest extends ActivityInstrumentationTestCase2<Reliabilit if(runner.mLogtime) { writeLoadTime(url, activity.getPageLoadTime()); } - activity.finish(); System.runFinalization(); System.gc(); System.gc(); } + activity.finish(); FsUtils.updateTestStatus(TEST_STATUS_FILE, TEST_DONE); // activity.finish(); listReader.close(); diff --git a/tests/FrameworkTest/tests/src/com/android/frameworktest/focus/ScrollingThroughListOfFocusablesTest.java b/tests/FrameworkTest/tests/src/com/android/frameworktest/focus/ScrollingThroughListOfFocusablesTest.java index 07916ee83d3c..6fa95331735b 100644 --- a/tests/FrameworkTest/tests/src/com/android/frameworktest/focus/ScrollingThroughListOfFocusablesTest.java +++ b/tests/FrameworkTest/tests/src/com/android/frameworktest/focus/ScrollingThroughListOfFocusablesTest.java @@ -67,7 +67,8 @@ public class ScrollingThroughListOfFocusablesTest extends InstrumentationTestCas assertEquals(mNumRowsPerItem, mActivity.getNumRowsPerItem()); } - @MediumTest + // TODO: needs to be adjusted to pass on non-HVGA displays + // @MediumTest public void testScrollingDownInFirstItem() throws Exception { for (int i = 0; i < mNumRowsPerItem; i++) { diff --git a/tests/FrameworkTest/tests/src/com/android/frameworktest/gridview/touch/GridTouchVerticalSpacingStackFromBottomTest.java b/tests/FrameworkTest/tests/src/com/android/frameworktest/gridview/touch/GridTouchVerticalSpacingStackFromBottomTest.java index 3937c435947a..cc8fa6e09b6f 100644 --- a/tests/FrameworkTest/tests/src/com/android/frameworktest/gridview/touch/GridTouchVerticalSpacingStackFromBottomTest.java +++ b/tests/FrameworkTest/tests/src/com/android/frameworktest/gridview/touch/GridTouchVerticalSpacingStackFromBottomTest.java @@ -70,7 +70,8 @@ public class GridTouchVerticalSpacingStackFromBottomTest extends ActivityInstrum newLastChild.getId()); } - @LargeTest + // TODO: needs to be adjusted to pass on non-HVGA displays + // @LargeTest public void testShortScroll() { View firstChild = mGridView.getChildAt(0); if (firstChild.getTop() < this.mGridView.getListPaddingTop()) { @@ -91,7 +92,8 @@ public class GridTouchVerticalSpacingStackFromBottomTest extends ActivityInstrum newLastChild.getId()); } - @LargeTest + // TODO: needs to be adjusted to pass on non-HVGA displays + // @LargeTest public void testLongScroll() { View firstChild = mGridView.getChildAt(0); if (firstChild.getTop() < mGridView.getListPaddingTop()) { diff --git a/tests/FrameworkTest/tests/src/com/android/frameworktest/gridview/touch/GridTouchVerticalSpacingTest.java b/tests/FrameworkTest/tests/src/com/android/frameworktest/gridview/touch/GridTouchVerticalSpacingTest.java index 0b3990925942..355c5a41c7c9 100644 --- a/tests/FrameworkTest/tests/src/com/android/frameworktest/gridview/touch/GridTouchVerticalSpacingTest.java +++ b/tests/FrameworkTest/tests/src/com/android/frameworktest/gridview/touch/GridTouchVerticalSpacingTest.java @@ -67,7 +67,8 @@ public class GridTouchVerticalSpacingTest extends ActivityInstrumentationTestCas assertEquals("Wrong view in first position", 0, newFirstChild.getId()); } - @LargeTest + // TODO: needs to be adjusted to pass on non-HVGA displays + // @LargeTest public void testShortScroll() { View firstChild = mGridView.getChildAt(0); View lastChild = mGridView.getChildAt(mGridView.getChildCount() - 1); @@ -83,7 +84,8 @@ public class GridTouchVerticalSpacingTest extends ActivityInstrumentationTestCas assertEquals("Wrong view in first position", 0, newFirstChild.getId()); } - @LargeTest + // TODO: needs to be adjusted to pass on non-HVGA displays + // @LargeTest public void testLongScroll() { View lastChild = mGridView.getChildAt(mGridView.getChildCount() - 1); diff --git a/tests/FrameworkTest/tests/src/com/android/frameworktest/layout/table/FixedWidthTest.java b/tests/FrameworkTest/tests/src/com/android/frameworktest/layout/table/FixedWidthTest.java index a54d503cd1bc..3ca03b73735c 100644 --- a/tests/FrameworkTest/tests/src/com/android/frameworktest/layout/table/FixedWidthTest.java +++ b/tests/FrameworkTest/tests/src/com/android/frameworktest/layout/table/FixedWidthTest.java @@ -53,13 +53,15 @@ public class FixedWidthTest extends ActivityInstrumentationTestCase<FixedWidth> assertNotNull(mNonFixedWidth); } - @MediumTest + // TODO: needs to be adjusted to pass on non-HVGA displays + // @MediumTest public void testFixedWidth() throws Exception { assertEquals(150, mFixedWidth.getWidth()); assertEquals(mFixedWidth.getWidth(), mNonFixedWidth.getWidth()); } - @MediumTest + // TODO: needs to be adjusted to pass on non-HVGA displays + // @MediumTest public void testFixedHeight() throws Exception { assertEquals(48, mFixedHeight.getHeight()); } diff --git a/tests/FrameworkTest/tests/src/com/android/frameworktest/listview/touch/ListOfTouchablesTest.java b/tests/FrameworkTest/tests/src/com/android/frameworktest/listview/touch/ListOfTouchablesTest.java index f8b384dc321f..39c0e459e02b 100644 --- a/tests/FrameworkTest/tests/src/com/android/frameworktest/listview/touch/ListOfTouchablesTest.java +++ b/tests/FrameworkTest/tests/src/com/android/frameworktest/listview/touch/ListOfTouchablesTest.java @@ -52,7 +52,8 @@ public class ListOfTouchablesTest extends ActivityInstrumentationTestCase<ListOf assertNotNull(mListView); } - @LargeTest + // TODO: needs to be adjusted to pass on non-HVGA displays + // @LargeTest public void testShortScroll() { View firstChild = mListView.getChildAt(0); View lastChild = mListView.getChildAt(mListView.getChildCount() - 1); @@ -68,7 +69,8 @@ public class ListOfTouchablesTest extends ActivityInstrumentationTestCase<ListOf assertEquals("Wrong view in first position", 0, newFirstChild.getId()); } - @LargeTest + // TODO: needs to be adjusted to pass on non-HVGA displays + // @LargeTest public void testLongScroll() { View lastChild = mListView.getChildAt(mListView.getChildCount() - 1); diff --git a/tests/FrameworkTest/tests/src/com/android/frameworktest/listview/touch/ListTouchBottomGravityManyTest.java b/tests/FrameworkTest/tests/src/com/android/frameworktest/listview/touch/ListTouchBottomGravityManyTest.java index d271564f4ee9..4e62a4d28d2b 100644 --- a/tests/FrameworkTest/tests/src/com/android/frameworktest/listview/touch/ListTouchBottomGravityManyTest.java +++ b/tests/FrameworkTest/tests/src/com/android/frameworktest/listview/touch/ListTouchBottomGravityManyTest.java @@ -112,7 +112,8 @@ public class ListTouchBottomGravityManyTest extends ActivityInstrumentationTestC newLastChild.getId()); } - @LargeTest + // TODO: needs to be adjusted to pass on non-HVGA displays + // @LargeTest public void testShortScroll() { View firstChild = mListView.getChildAt(0); if (firstChild.getTop() < this.mListView.getListPaddingTop()) { @@ -133,7 +134,8 @@ public class ListTouchBottomGravityManyTest extends ActivityInstrumentationTestC newLastChild.getId()); } - @LargeTest + // TODO: needs to be adjusted to pass on non-HVGA displays + // @LargeTest public void testLongScroll() { View firstChild = mListView.getChildAt(0); if (firstChild.getTop() < mListView.getListPaddingTop()) { diff --git a/tests/FrameworkTest/tests/src/com/android/frameworktest/listview/touch/ListTouchManyTest.java b/tests/FrameworkTest/tests/src/com/android/frameworktest/listview/touch/ListTouchManyTest.java index ef085f84664c..3066d8d858fd 100644 --- a/tests/FrameworkTest/tests/src/com/android/frameworktest/listview/touch/ListTouchManyTest.java +++ b/tests/FrameworkTest/tests/src/com/android/frameworktest/listview/touch/ListTouchManyTest.java @@ -159,7 +159,8 @@ public class ListTouchManyTest extends ActivityInstrumentationTestCase<ListTopGr assertEquals("Wrong view in first position", 0, newFirstChild.getId()); } - @LargeTest + // TODO: needs to be adjusted to pass on non-HVGA displays + // @LargeTest public void testShortScroll() { View firstChild = mListView.getChildAt(0); View lastChild = mListView.getChildAt(mListView.getChildCount() - 1); @@ -175,7 +176,8 @@ public class ListTouchManyTest extends ActivityInstrumentationTestCase<ListTopGr assertEquals("Wrong view in first position", 0, newFirstChild.getId()); } - @LargeTest + // TODO: needs to be adjusted to pass on non-HVGA displays + // @LargeTest public void testLongScroll() { View lastChild = mListView.getChildAt(mListView.getChildCount() - 1); diff --git a/tests/FrameworkTest/tests/src/com/android/frameworktest/view/BigCacheTest.java b/tests/FrameworkTest/tests/src/com/android/frameworktest/view/BigCacheTest.java index 02d5283fa35b..8c5dc60503eb 100644 --- a/tests/FrameworkTest/tests/src/com/android/frameworktest/view/BigCacheTest.java +++ b/tests/FrameworkTest/tests/src/com/android/frameworktest/view/BigCacheTest.java @@ -60,7 +60,8 @@ public class BigCacheTest extends ActivityInstrumentationTestCase<BigCache> { assertNotNull(createCacheForView(mTiny)); } - @MediumTest + // TODO: needs to be adjusted to pass on non-HVGA displays + // @MediumTest public void testDrawingCacheAboveMaximumSize() throws Exception { final int max = ViewConfiguration.get(getActivity()).getScaledMaximumDrawingCacheSize(); assertTrue(mLarge.getWidth() * mLarge.getHeight() * 2 > max); diff --git a/tests/FrameworkTest/tests/src/com/android/frameworktest/view/IncludeTest.java b/tests/FrameworkTest/tests/src/com/android/frameworktest/view/IncludeTest.java index dd1382daf7d2..2e0a18a3c65b 100644 --- a/tests/FrameworkTest/tests/src/com/android/frameworktest/view/IncludeTest.java +++ b/tests/FrameworkTest/tests/src/com/android/frameworktest/view/IncludeTest.java @@ -66,7 +66,8 @@ public class IncludeTest extends ActivityInstrumentationTestCase<Include> { assertEquals("Included button should be invisible", View.INVISIBLE, button1.getVisibility()); } - @MediumTest + // TODO: needs to be adjusted to pass on non-HVGA displays + // @MediumTest public void testIncludedWithSize() throws Exception { final Include activity = getActivity(); final View button1 = activity.findViewById(R.id.included_button_with_size); diff --git a/tests/StatusBar/AndroidManifest.xml b/tests/StatusBar/AndroidManifest.xml index 9bba79c2b9b6..21fb951fca49 100644 --- a/tests/StatusBar/AndroidManifest.xml +++ b/tests/StatusBar/AndroidManifest.xml @@ -1,6 +1,7 @@ <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.statusbartest"> <uses-permission android:name="android.permission.DEVICE_POWER" /> + <uses-permission android:name="android.permission.WAKE_LOCK" /> <uses-permission android:name="android.permission.STATUS_BAR" /> <uses-permission android:name="android.permission.EXPAND_STATUS_BAR" /> <uses-permission android:name="android.permission.VIBRATE" /> diff --git a/tests/StatusBar/src/com/android/statusbartest/NotificationTestList.java b/tests/StatusBar/src/com/android/statusbartest/NotificationTestList.java index a88183cffdca..f2ddd0fd55c0 100644 --- a/tests/StatusBar/src/com/android/statusbartest/NotificationTestList.java +++ b/tests/StatusBar/src/com/android/statusbartest/NotificationTestList.java @@ -58,6 +58,27 @@ public class NotificationTestList extends TestActivity } private Test[] mTests = new Test[] { + new Test("Off and sound") { + public void run() { + PowerManager pm = (PowerManager)NotificationTestList.this.getSystemService("power"); + PowerManager.WakeLock wl = + pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "sound"); + wl.acquire(); + + pm.goToSleep(SystemClock.uptimeMillis()); + + Notification n = new Notification(); + n.sound = Uri.parse("file:///sdcard/virtual-void.mp3"); + Log.d(TAG, "n.sound=" + n.sound); + + mNM.notify(1, n); + + Log.d(TAG, "releasing wake lock"); + wl.release(); + Log.d(TAG, "released wake lock"); + } + }, + new Test("No view") { public void run() { Notification n = new Notification(R.drawable.icon1, "No view", diff --git a/tools/aapt/Bundle.h b/tools/aapt/Bundle.h index 234e5b23d7b6..1ac13f216f6d 100644 --- a/tools/aapt/Bundle.h +++ b/tools/aapt/Bundle.h @@ -80,11 +80,13 @@ public: void setValues(bool val) { mValues = val; } int getCompressionMethod(void) const { return mCompressionMethod; } void setCompressionMethod(int val) { mCompressionMethod = val; } + bool getJunkPath(void) const { return mJunkPath; } + void setJunkPath(bool val) { mJunkPath = val; } const char* getOutputAPKFile() const { return mOutputAPKFile; } void setOutputAPKFile(const char* val) { mOutputAPKFile = val; } - /* - * Input options. + /* + * Input options. */ const char* getAssetSourceDir() const { return mAssetSourceDir; } void setAssetSourceDir(const char* dir) { mAssetSourceDir = dir; } @@ -119,7 +121,7 @@ public: void setVersionCode(const char* val) { mVersionCode = val; } const char* getVersionName() const { return mVersionName; } void setVersionName(const char* val) { mVersionName = val; } - + /* * Set and get the file specification. * @@ -161,6 +163,7 @@ private: bool mPseudolocalize; bool mValues; int mCompressionMethod; + bool mJunkPath; const char* mOutputAPKFile; const char* mAssetSourceDir; const char* mProguardFile; @@ -173,13 +176,13 @@ private: android::Vector<const char*> mJarFiles; android::Vector<const char*> mNoCompressExtensions; android::Vector<const char*> mResourceSourceDirs; - + const char* mMinSdkVersion; const char* mTargetSdkVersion; const char* mMaxSdkVersion; const char* mVersionCode; const char* mVersionName; - + /* file specification */ int mArgc; char* const* mArgv; diff --git a/tools/aapt/Command.cpp b/tools/aapt/Command.cpp index 47423418e8b2..1a536d6a8085 100644 --- a/tools/aapt/Command.cpp +++ b/tools/aapt/Command.cpp @@ -848,7 +848,7 @@ int doDump(Bundle* bundle) printf("uses-feature:'android.hardware.camera'\n"); printf("uses-feature:'android.hardware.camera.autofocus'\n"); } - + if (hasMainActivity) { printf("main\n"); } @@ -997,8 +997,15 @@ int doAdd(Bundle* bundle) printf(" '%s'... (from gzip)\n", fileName); result = zip->addGzip(fileName, String8(fileName).getBasePath().string(), NULL); } else { - printf(" '%s'...\n", fileName); - result = zip->add(fileName, bundle->getCompressionMethod(), NULL); + if (bundle->getJunkPath()) { + String8 storageName = String8(fileName).getPathLeaf(); + printf(" '%s' as '%s'...\n", fileName, storageName.string()); + result = zip->add(fileName, storageName.string(), + bundle->getCompressionMethod(), NULL); + } else { + printf(" '%s'...\n", fileName); + result = zip->add(fileName, bundle->getCompressionMethod(), NULL); + } } if (result != NO_ERROR) { fprintf(stderr, "Unable to add '%s' to '%s'", bundle->getFileSpecEntry(i), zipFileName); diff --git a/tools/aapt/Main.cpp b/tools/aapt/Main.cpp index e61010cd695f..98286c02d7e7 100644 --- a/tools/aapt/Main.cpp +++ b/tools/aapt/Main.cpp @@ -99,6 +99,7 @@ void usage(void) " -f force overwrite of existing files\n" " -g specify a pixel tolerance to force images to grayscale, default 0\n" " -j specify a jar or zip file containing classes to include\n" + " -k junk path of file(s) added\n" " -m make package directories under location specified by -J\n" #if 0 " -p pseudolocalize the default configuration\n" @@ -236,6 +237,9 @@ int main(int argc, char* const argv[]) bundle.setGrayscaleTolerance(tolerance); printf("%s: Images with deviation <= %d will be forced to grayscale.\n", prog, tolerance); break; + case 'k': + bundle.setJunkPath(true); + break; case 'm': bundle.setMakePackageDirs(true); break; diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java index d28a15149ec9..f0223e83522a 100644 --- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java +++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java @@ -36,6 +36,7 @@ import android.graphics.Rect; import android.graphics.Region; import android.graphics.Typeface; import android.graphics.drawable.Drawable; +import android.os.Bundle; import android.os.Handler; import android.os.IBinder; import android.os.Looper; @@ -1069,6 +1070,18 @@ public final class Bridge implements ILayoutBridge { } @SuppressWarnings("unused") + public Bundle sendWallpaperCommand(IBinder window, String action, int x, int y, + int z, Bundle extras, boolean sync) { + // pass for now. + return null; + } + + @SuppressWarnings("unused") + public void wallpaperCommandComplete(IBinder window, Bundle result) { + // pass for now. + } + + @SuppressWarnings("unused") public void closeSystemDialogs(String reason) { // pass for now. } @@ -1132,6 +1145,12 @@ public final class Bridge implements ILayoutBridge { } @SuppressWarnings("unused") + public void dispatchWallpaperCommand(String action, int x, int y, + int z, Bundle extras, boolean sync) { + // pass for now. + } + + @SuppressWarnings("unused") public void closeSystemDialogs(String reason) { // pass for now. } diff --git a/tools/layoutlib/bridge/tests/com/android/layoutlib/bridge/BridgeXmlBlockParserTest.java b/tools/layoutlib/bridge/tests/com/android/layoutlib/bridge/BridgeXmlBlockParserTest.java index 9e2987a4d33e..db1262f8b19b 100644 --- a/tools/layoutlib/bridge/tests/com/android/layoutlib/bridge/BridgeXmlBlockParserTest.java +++ b/tools/layoutlib/bridge/tests/com/android/layoutlib/bridge/BridgeXmlBlockParserTest.java @@ -41,7 +41,7 @@ public class BridgeXmlBlockParserTest extends TestCase { parser = new BridgeXmlBlockParser(parser, null, false /* platformResourceFlag */); InputStream input = this.getClass().getClassLoader().getResourceAsStream( - "/com/android/layoutlib/testdata/layout1.xml"); + "com/android/layoutlib/testdata/layout1.xml"); parser.setInput(input, null /*encoding*/); assertEquals(XmlPullParser.START_DOCUMENT, parser.next()); diff --git a/tools/layoutlib/bridge/tests/com/android/layoutlib/bridge/NinePatchTest.java b/tools/layoutlib/bridge/tests/com/android/layoutlib/bridge/NinePatchTest.java index 5314976ff89a..d5993dbb7f37 100644 --- a/tools/layoutlib/bridge/tests/com/android/layoutlib/bridge/NinePatchTest.java +++ b/tools/layoutlib/bridge/tests/com/android/layoutlib/bridge/NinePatchTest.java @@ -13,7 +13,7 @@ public class NinePatchTest extends TestCase { @Override protected void setUp() throws Exception { URL url = this.getClass().getClassLoader().getResource( - "/com/android/layoutlib/testdata/button.9.png"); + "com/android/layoutlib/testdata/button.9.png"); mPatch = NinePatch.load(url, false /* convert */); } diff --git a/wifi/java/android/net/wifi/WifiStateTracker.java b/wifi/java/android/net/wifi/WifiStateTracker.java index 2c0d0f1fa964..b7d3a6e5d4de 100644 --- a/wifi/java/android/net/wifi/WifiStateTracker.java +++ b/wifi/java/android/net/wifi/WifiStateTracker.java @@ -90,6 +90,7 @@ public class WifiStateTracker extends NetworkStateTracker { */ private static final int EVENT_DRIVER_STATE_CHANGED = 12; private static final int EVENT_PASSWORD_KEY_MAY_BE_INCORRECT = 13; + private static final int EVENT_MAYBE_START_SCAN_POST_DISCONNECT = 14; /** * Interval in milliseconds between polling for connection @@ -126,6 +127,14 @@ public class WifiStateTracker extends NetworkStateTracker { private static final int RECONNECT_DELAY_MSECS = 2000; /** + * When the supplicant disconnects from an AP it sometimes forgets + * to restart scanning. Wait this delay before asking it to start + * scanning (in case it forgot). 15 sec is the standard delay between + * scans. + */ + private static final int KICKSTART_SCANNING_DELAY_MSECS = 15000; + + /** * The maximum number of times we will retry a connection to an access point * for which we have failed in acquiring an IP address from DHCP. A value of * N means that we will make N+1 connection attempts in all. @@ -149,6 +158,14 @@ public class WifiStateTracker extends NetworkStateTracker { private int mNumSupplicantLoopIterations = 0; /** + * The current number of supplicant state changes. This is used to determine + * if we've received any new info since we found out it was DISCONNECTED or + * INACTIVE. If we haven't for X ms, we then request a scan - it should have + * done that automatically, but sometimes some firmware does not. + */ + private int mNumSupplicantStateChanges = 0; + + /** * True if we received an event that that a password-key may be incorrect. * If the next incoming supplicant state change event is DISCONNECT, * broadcast a message that we have a possible password error and disable @@ -831,7 +848,16 @@ public class WifiStateTracker extends NetworkStateTracker { } break; + case EVENT_MAYBE_START_SCAN_POST_DISCONNECT: + // Only do this if we haven't gotten a new supplicant status since the timer + // started + if (mNumSupplicantStateChanges == msg.arg1) { + WifiNative.scanCommand(false); // do a passive scan + } + break; + case EVENT_SUPPLICANT_STATE_CHANGED: + mNumSupplicantStateChanges++; SupplicantStateChangeResult supplicantStateResult = (SupplicantStateChangeResult) msg.obj; SupplicantState newState = supplicantStateResult.state; @@ -850,6 +876,17 @@ public class WifiStateTracker extends NetworkStateTracker { int networkId = supplicantStateResult.networkId; /* + * If we get disconnect or inactive we need to start our + * watchdog timer to start a scan + */ + if (newState == SupplicantState.DISCONNECTED || + newState == SupplicantState.INACTIVE) { + sendMessageDelayed(obtainMessage(EVENT_MAYBE_START_SCAN_POST_DISCONNECT, + mNumSupplicantStateChanges, 0), KICKSTART_SCANNING_DELAY_MSECS); + } + + + /* * Did we get to DISCONNECTED state due to an * authentication (password) failure? */ |