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

Commit c28e5886 authored by longyu.huang's avatar longyu.huang
Browse files

can not launch recents app after change time to earlier

[Preconditions]
set Home Button to launch recent apps

[operating steps]
1.long pres Home Button to launch recent apps activity
2.press Back Button and enter Settings
3.change current time to a earlier time
4.long press Home Button has no response

Change-Id: I354d9e273cd386a6876ad6795f6a0b1f6a2eff92
parent b63fd70a
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ import android.graphics.Canvas;
import android.graphics.Rect;
import android.os.Handler;
import android.os.UserHandle;
import android.os.SystemClock;
import android.util.Pair;
import android.view.LayoutInflater;
import android.view.View;
@@ -330,7 +331,7 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta
        // If the user has toggled it too quickly, then just eat up the event here (it's better than
        // showing a janky screenshot).
        // NOTE: Ideally, the screenshot mechanism would take the window transform into account
        if (System.currentTimeMillis() - mLastToggleTime < sMinToggleDelay) {
        if (SystemClock.elapsedRealtime() - mLastToggleTime < sMinToggleDelay) {
            return;
        }

@@ -345,7 +346,7 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta
            intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT |
                    Intent.FLAG_RECEIVER_FOREGROUND);
            mContext.sendBroadcastAsUser(intent, UserHandle.CURRENT);
            mLastToggleTime = System.currentTimeMillis();
            mLastToggleTime = SystemClock.elapsedRealtime();
            return;
        } else {
            // Otherwise, start the recents activity
@@ -538,7 +539,7 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta
                startAlternateRecentsActivity(topTask, opts, null);
            }
        }
        mLastToggleTime = System.currentTimeMillis();
        mLastToggleTime = SystemClock.elapsedRealtime();
    }

    /** Starts the recents activity */