Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cb0db030 authored by Akwasi Boateng's avatar Akwasi Boateng Committed by Android Git Automerger
Browse files

Merge branch 'ics-mr1-plus-aosp' of...

Merge branch 'ics-mr1-plus-aosp' of ssh://android-git:29418/platform/frameworks/base into ics-mr1-plus-aosp
parents 0c71e5ed 2b510192
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@
#include <surfaceflinger/ISurfaceComposerClient.h>

#include <core/SkBitmap.h>
#include <core/SkStream.h>
#include <images/SkImageDecoder.h>

#include <GLES/gl.h>
@@ -150,9 +151,15 @@ status_t BootAnimation::initTexture(void* buffer, size_t len)
    //StopWatch watch("blah");

    SkBitmap bitmap;
    SkImageDecoder::DecodeMemory(buffer, len,
            &bitmap, SkBitmap::kRGB_565_Config,
    SkMemoryStream  stream(buffer, len);
    SkImageDecoder* codec = SkImageDecoder::Factory(&stream);
    codec->setDitherImage(false);
    if (codec) {
        codec->decode(&stream, &bitmap,
                SkBitmap::kRGB_565_Config,
                SkImageDecoder::kDecodePixels_Mode);
        delete codec;
    }

    // ensure we can call getPixels(). No need to call unlock, since the
    // bitmap will go out of scope when we return from this method.
+9 −0
Original line number Diff line number Diff line
@@ -657,6 +657,15 @@ public class LayoutTransition {
     */
    private void setupChangeAnimation(final ViewGroup parent, final int changeReason,
            Animator baseAnimator, final long duration, final View child) {

        // If we already have a listener for this child, then we've already set up the
        // changing animation we need. Multiple calls for a child may occur when several
        // add/remove operations are run at once on a container; each one will trigger
        // changes for the existing children in the container.
        if (layoutChangeListenerMap.get(child) != null) {
            return;
        }

        // Make a copy of the appropriate animation
        final Animator anim = baseAnimator.clone();

+22 −11
Original line number Diff line number Diff line
@@ -213,6 +213,10 @@ public class WallpaperManager {
            mHandler.sendEmptyMessage(MSG_CLEAR_WALLPAPER);
        }

        public Handler getHandler() {
            return mHandler;
        }

        public Bitmap peekWallpaperBitmap(Context context, boolean returnDefault) {
            synchronized (this) {
                if (mWallpaper != null) {
@@ -619,15 +623,22 @@ public class WallpaperManager {
     * @param yOffset The offset along the Y dimension, from 0 to 1.
     */
    public void setWallpaperOffsets(IBinder windowToken, float xOffset, float yOffset) {
        final IBinder fWindowToken = windowToken;
        final float fXOffset = xOffset;
        final float fYOffset = yOffset;
        sGlobals.getHandler().post(new Runnable() {
            public void run() {
                try {
                    //Log.v(TAG, "Sending new wallpaper offsets from app...");
                    ViewRootImpl.getWindowSession(mContext.getMainLooper()).setWallpaperPosition(
                    windowToken, xOffset, yOffset, mWallpaperXStep, mWallpaperYStep);
                            fWindowToken, fXOffset, fYOffset, mWallpaperXStep, mWallpaperYStep);
                    //Log.v(TAG, "...app returning after sending offsets!");
                } catch (RemoteException e) {
                    // Ignore.
                }
            }
        });
    }

    /**
     * For applications that use multiple virtual screens showing a wallpaper,
+22 −1
Original line number Diff line number Diff line
@@ -464,6 +464,19 @@ public class NetworkStats implements Parcelable {
     * time, and that none of them have disappeared.
     */
    public NetworkStats subtract(NetworkStats value) throws NonMonotonicException {
        return subtract(value, false);
    }

    /**
     * Subtract the given {@link NetworkStats}, effectively leaving the delta
     * between two snapshots in time. Assumes that statistics rows collect over
     * time, and that none of them have disappeared.
     *
     * @param clampNonMonotonic When non-monotonic stats are found, just clamp
     *            to 0 instead of throwing {@link NonMonotonicException}.
     */
    public NetworkStats subtract(NetworkStats value, boolean clampNonMonotonic)
            throws NonMonotonicException {
        final long deltaRealtime = this.elapsedRealtime - value.elapsedRealtime;
        if (deltaRealtime < 0) {
            throw new NonMonotonicException(this, value);
@@ -497,9 +510,17 @@ public class NetworkStats implements Parcelable {

                if (entry.rxBytes < 0 || entry.rxPackets < 0 || entry.txBytes < 0
                        || entry.txPackets < 0 || entry.operations < 0) {
                    if (clampNonMonotonic) {
                        entry.rxBytes = Math.max(entry.rxBytes, 0);
                        entry.rxPackets = Math.max(entry.rxPackets, 0);
                        entry.txBytes = Math.max(entry.txBytes, 0);
                        entry.txPackets = Math.max(entry.txPackets, 0);
                        entry.operations = Math.max(entry.operations, 0);
                    } else {
                        throw new NonMonotonicException(this, i, value, j);
                    }
                }
            }

            result.addValues(entry);
        }
+21 −0
Original line number Diff line number Diff line
@@ -315,6 +315,27 @@ class GLES20Canvas extends HardwareCanvas {

    private static native void nFlushCaches(int level);

    /**
     * Release all resources associated with the underlying caches. This should
     * only be called after a full flushCaches().
     * 
     * @hide
     */
    public static void terminateCaches() {
        nTerminateCaches();
    }

    private static native void nTerminateCaches();

    /**
     * @hide
     */
    public static void initCaches() {
        nInitCaches();
    }

    private static native void nInitCaches();
    
    ///////////////////////////////////////////////////////////////////////////
    // Display list
    ///////////////////////////////////////////////////////////////////////////
Loading