Snap for 6878234 from 7bdf3574a3 to sc-release

Change-Id: I171d6757dd62f43fbd260e5fe79e62eca2938962
This commit is contained in:
android-build-team Robot committed 2020-10-02 01:11:19 +00:00
commit 4ec853e4fd
2 files changed
+16 -3

No files matched your search

@@ -24,10 +24,12 @@ import static com.android.systemui.shared.system.ActivityManagerWrapper.CLOSE_SY
import android.animation.AnimatorSet;
import android.animation.ValueAnimator;
import android.app.ActivityOptions;
import android.content.Intent;
import android.content.IntentSender;
import android.os.Bundle;
import android.os.CancellationSignal;
import android.view.View;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.model.WellbeingModel;
@@ -49,6 +51,7 @@ import com.android.quickstep.util.RemoteFadeOutAnimationListener;
import com.android.quickstep.views.OverviewActionsView;
import com.android.quickstep.views.RecentsView;
import com.android.systemui.shared.system.ActivityManagerWrapper;
import com.android.systemui.shared.system.ActivityOptionsCompat;
import com.android.systemui.shared.system.RemoteAnimationTargetCompat;
import java.util.stream.Stream;
@@ -304,6 +307,15 @@ public abstract class BaseQuickstepLauncher extends Launcher
Stream.of(WellbeingModel.SHORTCUT_FACTORY));
}
@Override
public ActivityOptions getActivityLaunchOptions(View v) {
ActivityOptions activityOptions = super.getActivityLaunchOptions(v);
if (activityOptions != null && mLastTouchUpTime > 0) {
ActivityOptionsCompat.setLauncherSourceInfo(activityOptions, mLastTouchUpTime);
}
return activityOptions;
}
public void setHintUserWillBeActive() {
addActivityFlags(ACTIVITY_STATE_USER_WILL_BE_ACTIVE);
}
+4 -3
View File
@@ -76,6 +76,7 @@ import android.os.CancellationSignal;
import android.os.Parcelable;
import android.os.Process;
import android.os.StrictMode;
import android.os.SystemClock;
import android.text.TextUtils;
import android.text.method.TextKeyListener;
import android.util.Log;
@@ -349,7 +350,7 @@ public class Launcher extends StatefulActivity<LauncherState> implements Launche
private boolean mDeferOverlayCallbacks;
private final Runnable mDeferredOverlayCallbacks = this::checkIfOverlayStillDeferred;
private long mLastTouchUpTime = -1;
protected long mLastTouchUpTime = -1;
private boolean mTouchInProgress;
private SafeCloseable mUserChangedCallbackCloseable;
@@ -1824,7 +1825,7 @@ public class Launcher extends StatefulActivity<LauncherState> implements Launche
mTouchInProgress = true;
break;
case MotionEvent.ACTION_UP:
mLastTouchUpTime = System.currentTimeMillis();
mLastTouchUpTime = ev.getEventTime();
// Follow through
case MotionEvent.ACTION_CANCEL:
mTouchInProgress = false;
@@ -2457,7 +2458,7 @@ public class Launcher extends StatefulActivity<LauncherState> implements Launche
if (mDragController.isDragging()) {
return false;
} else {
return (System.currentTimeMillis() - mLastTouchUpTime)
return (SystemClock.uptimeMillis() - mLastTouchUpTime)
> (NEW_APPS_ANIMATION_INACTIVE_TIMEOUT_SECONDS * 1000);
}
}