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

Commit 8ac258ea authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 8412755 from 5cccc67c to sc-qpr3-release

Change-Id: I884c706e98c693a5496ffeb15c7ad1229d5665a0
parents 4ccc1b83 5cccc67c
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -245,6 +245,7 @@ public final class SurfaceControl implements Parcelable {
            @SurfaceControl.BufferTransform int transformHint);
    private static native int nativeGetTransformHint(long nativeObject);
    private static native int nativeGetLayerId(long nativeObject);
    private static native void nativeSanitize(long transactionObject);

    /**
     * Transforms that can be applied to buffers as they are displayed to a window.
@@ -3543,6 +3544,13 @@ public final class SurfaceControl implements Parcelable {
            return this;
        }

        /**
         * @hide
         */
        public void sanitize() {
            nativeSanitize(mNativeObject);
        }

        /**
         * Merge the other transaction into this transaction, clearing the
         * other transaction as if it had been applied.
+7 −0
Original line number Diff line number Diff line
@@ -877,6 +877,11 @@ static void nativeSetDropInputMode(JNIEnv* env, jclass clazz, jlong transactionO
    transaction->setDropInputMode(ctrl, static_cast<gui::DropInputMode>(mode));
}

static void nativeSanitize(JNIEnv* env, jclass clazz, jlong transactionObj) {
    auto transaction = reinterpret_cast<SurfaceComposerClient::Transaction*>(transactionObj);
    transaction->sanitize();
}

static jlongArray nativeGetPhysicalDisplayIds(JNIEnv* env, jclass clazz) {
    const auto displayIds = SurfaceComposerClient::getPhysicalDisplayIds();
    jlongArray array = env->NewLongArray(displayIds.size());
@@ -2030,6 +2035,8 @@ static const JNINativeMethod sSurfaceControlMethods[] = {
             (void*)nativeSetDropInputMode },
    {"nativeGetLayerId", "(J)I",
            (void*)nativeGetLayerId },
    {"nativeSanitize", "(J)V",
            (void*) nativeSanitize }
        // clang-format on
};

+4 −1
Original line number Diff line number Diff line
@@ -390,7 +390,10 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements
                    // Their staging dirs will be removed too
                    PackageInstallerSession root = !session.hasParentSessionId()
                            ? session : mSessions.get(session.getParentSessionId());
                    if (!root.isDestroyed()) {
                    if (root == null) {
                        Slog.e(TAG, "freeStageDirs: found an orphaned session: "
                                + session.sessionId + " parent=" + session.getParentSessionId());
                    } else if (!root.isDestroyed()) {
                        root.abandon();
                    }
                } else {
+4 −0
Original line number Diff line number Diff line
@@ -2676,6 +2676,10 @@ public class WindowManagerService extends IWindowManager.Stub

    void finishDrawingWindow(Session session, IWindow client,
            @Nullable SurfaceControl.Transaction postDrawTransaction) {
        if (postDrawTransaction != null) {
            postDrawTransaction.sanitize();
        }

        final long origId = Binder.clearCallingIdentity();
        try {
            synchronized (mGlobalLock) {