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

Commit 022a0a30 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Merge cherrypicks of [2830125, 2833486, 2833487, 2833488, 2831683, 2831684,...

Merge cherrypicks of [2830125, 2833486, 2833487, 2833488, 2831683, 2831684, 2832961] into oc-mr1-release

Change-Id: I9b23e0709d942209148b9c48036f3be2ad3e3ddd
parents d0d87383 6f04b1c6
Loading
Loading
Loading
Loading
+1 −13
Original line number Diff line number Diff line
@@ -28,7 +28,6 @@ import android.database.MatrixCursor.RowBuilder;
import android.graphics.Point;
import android.net.Uri;
import android.os.Binder;
import android.os.Build;
import android.os.Bundle;
import android.os.CancellationSignal;
import android.os.FileObserver;
@@ -74,7 +73,6 @@ public abstract class FileSystemProvider extends DocumentsProvider {

    private Handler mHandler;

    private static final String MIMETYPE_PDF = "application/pdf";

    private static final String MIMETYPE_JPEG = "image/jpeg";

@@ -425,13 +423,6 @@ public abstract class FileSystemProvider extends DocumentsProvider {
            String documentId, Point sizeHint, CancellationSignal signal)
            throws FileNotFoundException {
        final File file = getFileForDocId(documentId);
        if (getTypeForFile(file).equals(MIMETYPE_PDF)) {
            try {
                return PdfUtils.openPdfThumbnail(file, sizeHint);
            } catch (Exception e) {
                Log.v(TAG, "Could not load PDF's thumbnail", e);
            }
        }
        return DocumentsContract.openImageThumbnail(file);
    }

@@ -461,10 +452,7 @@ public abstract class FileSystemProvider extends DocumentsProvider {

        final String mimeType = getTypeForFile(file);
        final String displayName = file.getName();
        // As of right now, we aren't sure on the performance affect of loading all PDF Thumbnails
        // Until a solution is found, it will be behind a debuggable flag.
        if (mimeType.startsWith("image/")
                || (mimeType.equals(MIMETYPE_PDF) && Build.IS_DEBUGGABLE)) {
        if (mimeType.startsWith("image/")) {
            flags |= Document.FLAG_SUPPORTS_THUMBNAIL;
        }

+9 −6
Original line number Diff line number Diff line
@@ -216,10 +216,7 @@ void BakedOpRenderer::drawRects(const float* rects, int count, const SkPaint* pa
            .setTransform(Matrix4::identity(), TransformFlags::None)
            .setModelViewIdentityEmptyBounds()
            .build();
    // Disable blending if this is the first draw to the main framebuffer, in case app has defined
    // transparency where it doesn't make sense - as first draw in opaque window.
    bool overrideDisableBlending = !mHasDrawn && mOpaque && !mRenderTarget.frameBufferId;
    mRenderState.render(glop, mRenderTarget.orthoMatrix, overrideDisableBlending);
    mRenderState.render(glop, mRenderTarget.orthoMatrix, false);
    mHasDrawn = true;
}

@@ -350,8 +347,14 @@ void BakedOpRenderer::renderGlopImpl(const Rect* dirtyBounds, const ClipBase* cl
        const Glop& glop) {
    prepareRender(dirtyBounds, clip);
    // Disable blending if this is the first draw to the main framebuffer, in case app has defined
    // transparency where it doesn't make sense - as first draw in opaque window.
    bool overrideDisableBlending = !mHasDrawn && mOpaque && !mRenderTarget.frameBufferId;
    // transparency where it doesn't make sense - as first draw in opaque window. Note that we only
    // apply this improvement when the blend mode is SRC_OVER - other modes (e.g. CLEAR) can be
    // valid draws that affect other content (e.g. draw CLEAR, then draw DST_OVER)
    bool overrideDisableBlending = !mHasDrawn
        && mOpaque
        && !mRenderTarget.frameBufferId
        && glop.blend.src == GL_ONE
        && glop.blend.dst == GL_ONE_MINUS_SRC_ALPHA;
    mRenderState.render(glop, mRenderTarget.orthoMatrix, overrideDisableBlending);
    if (!mRenderTarget.frameBufferId) mHasDrawn = true;
}
+17 −6
Original line number Diff line number Diff line
@@ -801,6 +801,16 @@ public class AudioService extends IAudioService.Stub
    public void systemReady() {
        sendMsg(mAudioHandler, MSG_SYSTEM_READY, SENDMSG_QUEUE,
                0, 0, null, 0);
        if (false) {
            // This is turned off for now, because it is racy and thus causes apps to break.
            // Currently banning a uid means that if an app tries to start playing an audio
            // stream, that will be preventing, and unbanning it will not allow that stream
            // to resume.  However these changes in uid state are racy with what the app is doing,
            // so that after taking a process out of the cached state we can't guarantee that
            // we will unban the uid before the app actually tries to start playing audio.
            // (To do that, the activity manager would need to wait until it knows for sure
            // that the ban has been removed, before telling the app to do whatever it is
            // supposed to do that caused it to go out of the cached state.)
            try {
                ActivityManager.getService().registerUidObserver(mUidObserver,
                        ActivityManager.UID_OBSERVER_CACHED | ActivityManager.UID_OBSERVER_GONE,
@@ -809,6 +819,7 @@ public class AudioService extends IAudioService.Stub
                // ignored; both services live in system_server
            }
        }
    }

    public void onSystemReady() {
        mSystemReady = true;
+1 −1
Original line number Diff line number Diff line
@@ -450,7 +450,7 @@ public class AppWindowAnimator {
        return isAnimating;
    }

    void dump(PrintWriter pw, String prefix, boolean dumpAll) {
    void dump(PrintWriter pw, String prefix) {
        pw.print(prefix); pw.print("mAppToken="); pw.println(mAppToken);
        pw.print(prefix); pw.print("mAnimator="); pw.println(mAnimator);
        pw.print(prefix); pw.print("freezingScreen="); pw.print(freezingScreen);
+6 −3
Original line number Diff line number Diff line
@@ -368,10 +368,10 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree

            boolean runningAppAnimation = false;

            if (transit != AppTransition.TRANSIT_UNSET) {
            if (mAppAnimator.animation == AppWindowAnimator.sDummyAnimation) {
                mAppAnimator.setNullAnimation();
            }
            if (transit != AppTransition.TRANSIT_UNSET) {
                if (mService.applyAnimationLocked(this, lp, transit, visible, isVoiceInteraction)) {
                    delayed = runningAppAnimation = true;
                }
@@ -1759,6 +1759,9 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree
        if (mRemovingFromDisplay) {
            pw.println(prefix + "mRemovingFromDisplay=" + mRemovingFromDisplay);
        }
        if (mAppAnimator.isAnimating()) {
            mAppAnimator.dump(pw, prefix + "  ");
        }
    }

    @Override