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

Commit 43ed1aa7 authored by Roman Birg's avatar Roman Birg
Browse files

SystemUI: allow devices to disable recents-to-home anim



Ref: CYNGNOS-1136

Change-Id: I035d9dd844144afd48322c71a398a019697b8d4b
Signed-off-by: default avatarRoman Birg <roman@cyngn.com>
parent 23ece02a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -323,5 +323,8 @@
    <bool name="config_enableDataSwitch">false</bool>
    <!-- Enable the default volume dialog -->
    <bool name="enable_volume_ui">true</bool>

    <!-- Whether to disable exit-to-home animations for this device -->
    <bool name="config_disableRecentsToHomeAnimation">false</bool>
</resources>
+6 −3
Original line number Diff line number Diff line
@@ -27,7 +27,6 @@ import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.content.res.Resources;
import android.os.Bundle;
import android.os.SystemClock;
import android.os.UserHandle;
@@ -39,7 +38,6 @@ import android.view.ViewStub;
import android.widget.Toast;

import com.android.systemui.R;
import com.android.systemui.recents.RecentsConfiguration;
import com.android.systemui.recents.misc.DebugTrigger;
import com.android.systemui.recents.misc.ReferenceCountedTrigger;
import com.android.systemui.recents.misc.SystemServicesProxy;
@@ -88,6 +86,8 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView

    private PhoneStatusBar mStatusBar;

    private boolean mAnimateHome;

    /**
     * A common Runnable to finish Recents either by calling finish() (with a custom animation) or
     * launching Home with some ActivityOptions.  Generally we always launch home when we exit
@@ -357,7 +357,7 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView

    /** Dismisses Recents directly to Home. */
    void dismissRecentsToHomeRaw(boolean animated) {
        if (animated) {
        if (animated && mAnimateHome) {
            ReferenceCountedTrigger exitTrigger = new ReferenceCountedTrigger(this,
                    null, mFinishLaunchHomeRunnable, null);
            mRecentsView.startExitToHomeAnimation(
@@ -382,6 +382,9 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        mAnimateHome = !getResources().getBoolean(R.bool.config_disableRecentsToHomeAnimation);

        // For the non-primary user, ensure that the SystemServicesProxy and configuration is
        // initialized
        RecentsTaskLoader.initialize(this);