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

Commit 3501faf8 authored by Mateusz Cicheński's avatar Mateusz Cicheński
Browse files

Add sysprop for extra delay for content overlay fade out

This will only apply to gesture nav, where we set withDelay to false.

3 button nav already has a 500 ms delay built in to avoid flickers.

Bug: 291099063
Test: n/a
Flag: NONE, new integer system property with default value

Change-Id: I96db41157e1f24e00dc872e124fa24726848e638
parent 07a7e3ed
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -63,6 +63,7 @@ import android.content.pm.ActivityInfo;
import android.content.res.Configuration;
import android.graphics.Rect;
import android.os.RemoteException;
import android.os.SystemProperties;
import android.view.Choreographer;
import android.view.Display;
import android.view.Surface;
@@ -120,6 +121,10 @@ public class PipTaskOrganizer implements ShellTaskOrganizer.TaskListener,
     */
    private static final int CONTENT_OVERLAY_FADE_OUT_DELAY_MS = 500;

    private static final int EXTRA_CONTENT_OVERLAY_FADE_OUT_DELAY_MS =
            SystemProperties.getInt(
                    "persist.wm.debug.extra_content_overlay_fade_out_delay_ms", 0);

    private final Context mContext;
    private final SyncTransactionQueue mSyncTransactionQueue;
    private final PipBoundsState mPipBoundsState;
@@ -1863,7 +1868,9 @@ public class PipTaskOrganizer implements ShellTaskOrganizer.TaskListener,
                removeContentOverlay(surface, callback);
            }
        });
        animator.setStartDelay(withStartDelay ? CONTENT_OVERLAY_FADE_OUT_DELAY_MS : 0);
        animator.setStartDelay(withStartDelay
                ? CONTENT_OVERLAY_FADE_OUT_DELAY_MS
                : EXTRA_CONTENT_OVERLAY_FADE_OUT_DELAY_MS);
        animator.start();
    }