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

Commit daaeab0b authored by chaviw's avatar chaviw
Browse files

Remove closeTransactionSync since it's no longer used.

Cleaning up code so it's easier to determine where Transactions are applied
with the sync flag.

Test: Builds and runs. No logic change
Change-Id: Ia237dc26e47c8fb6fdd356c61fd722056bb9c757
parent f85bf680
Loading
Loading
Loading
Loading
+11 −21
Original line number Original line Diff line number Diff line
@@ -930,17 +930,6 @@ public final class SurfaceControl implements Parcelable {
        }
        }
    }
    }


    private static void closeTransaction(boolean sync) {
        synchronized(SurfaceControl.class) {
            if (sTransactionNestCount == 0) {
                Log.e(TAG, "Call to SurfaceControl.closeTransaction without matching openTransaction");
            } else if (--sTransactionNestCount > 0) {
                return;
            }
            sGlobalTransaction.apply(sync);
        }
    }

    /**
    /**
     * Merge the supplied transaction in to the deprecated "global" transaction.
     * Merge the supplied transaction in to the deprecated "global" transaction.
     * This clears the supplied transaction in an identical fashion to {@link Transaction#merge}.
     * This clears the supplied transaction in an identical fashion to {@link Transaction#merge}.
@@ -960,14 +949,15 @@ public final class SurfaceControl implements Parcelable {
     */
     */
    @UnsupportedAppUsage
    @UnsupportedAppUsage
    public static void closeTransaction() {
    public static void closeTransaction() {
        closeTransaction(false);
        synchronized(SurfaceControl.class) {
            if (sTransactionNestCount == 0) {
                Log.e(TAG,
                        "Call to SurfaceControl.closeTransaction without matching openTransaction");
            } else if (--sTransactionNestCount > 0) {
                return;
            }
            sGlobalTransaction.apply();
        }
        }

    /**
     * @hide
     */
    public static void closeTransactionSync() {
        closeTransaction(true);
    }
    }


    /**
    /**