Merge changes I0c466350,I09a9cd43,I8b2a0819 into pi-dev
* changes: Reset dummy stack view tasks after computing transition into Recents Don't update onboarding if there is no valid running task. Only check screen pinning state on touch down.
This commit is contained in:
committed by
Android (Google) Code Review
commit
4cda02f25f
@@ -49,6 +49,10 @@ public abstract class AppTransitionAnimationSpecsFuture {
|
|||||||
mHandler.post(mComposeTask);
|
mHandler.post(mComposeTask);
|
||||||
}
|
}
|
||||||
List<AppTransitionAnimationSpecCompat> specs = mComposeTask.get();
|
List<AppTransitionAnimationSpecCompat> specs = mComposeTask.get();
|
||||||
|
// Clear reference to the compose task this future holds onto the reference to it's
|
||||||
|
// implementation (which can leak references to the bitmap it creates for the
|
||||||
|
// transition)
|
||||||
|
mComposeTask = null;
|
||||||
if (specs == null) {
|
if (specs == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -276,6 +276,9 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Used to reset the dummy stack view
|
||||||
|
private final TaskStack mEmptyTaskStack = new TaskStack();
|
||||||
|
|
||||||
public RecentsImpl(Context context) {
|
public RecentsImpl(Context context) {
|
||||||
mContext = context;
|
mContext = context;
|
||||||
mHandler = new Handler();
|
mHandler = new Handler();
|
||||||
@@ -1108,6 +1111,10 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
EventBus.getDefault().send(hideMenuEvent);
|
EventBus.getDefault().send(hideMenuEvent);
|
||||||
|
|
||||||
|
// Once we have launched the activity, reset the dummy stack view tasks so we don't hold
|
||||||
|
// onto references to the same tasks consumed by the activity
|
||||||
|
mDummyStackView.setTasks(mEmptyTaskStack, false /* notifyStackChanges */);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**** OnAnimationFinishedListener Implementation ****/
|
/**** OnAnimationFinishedListener Implementation ****/
|
||||||
|
|||||||
@@ -96,6 +96,9 @@ public class RecentsOnboarding {
|
|||||||
public void onTaskStackChanged() {
|
public void onTaskStackChanged() {
|
||||||
ActivityManager.RunningTaskInfo info = ActivityManagerWrapper.getInstance()
|
ActivityManager.RunningTaskInfo info = ActivityManagerWrapper.getInstance()
|
||||||
.getRunningTask(ACTIVITY_TYPE_UNDEFINED /* ignoreActivityType */);
|
.getRunningTask(ACTIVITY_TYPE_UNDEFINED /* ignoreActivityType */);
|
||||||
|
if (info == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (mBlacklistedPackages.contains(info.baseActivity.getPackageName())) {
|
if (mBlacklistedPackages.contains(info.baseActivity.getPackageName())) {
|
||||||
hide(true);
|
hide(true);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -73,6 +73,7 @@ public class NavigationBarGestureHelper implements TunerService.Tunable, Gesture
|
|||||||
private int mTouchDownY;
|
private int mTouchDownY;
|
||||||
private boolean mDownOnRecents;
|
private boolean mDownOnRecents;
|
||||||
private VelocityTracker mVelocityTracker;
|
private VelocityTracker mVelocityTracker;
|
||||||
|
private boolean mIsInScreenPinning;
|
||||||
|
|
||||||
private boolean mDockWindowEnabled;
|
private boolean mDockWindowEnabled;
|
||||||
private boolean mDockWindowTouchSlopExceeded;
|
private boolean mDockWindowTouchSlopExceeded;
|
||||||
@@ -105,6 +106,9 @@ public class NavigationBarGestureHelper implements TunerService.Tunable, Gesture
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean onInterceptTouchEvent(MotionEvent event) {
|
public boolean onInterceptTouchEvent(MotionEvent event) {
|
||||||
|
if (event.getActionMasked() == MotionEvent.ACTION_DOWN) {
|
||||||
|
mIsInScreenPinning = mNavigationBarView.inScreenPinning();
|
||||||
|
}
|
||||||
if (!canHandleGestures()) {
|
if (!canHandleGestures()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -269,7 +273,7 @@ public class NavigationBarGestureHelper implements TunerService.Tunable, Gesture
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean canHandleGestures() {
|
private boolean canHandleGestures() {
|
||||||
return !mNavigationBarView.inScreenPinning() && !mStatusBar.isKeyguardShowing()
|
return !mIsInScreenPinning && !mStatusBar.isKeyguardShowing()
|
||||||
&& mStatusBar.isPresenterFullyCollapsed();
|
&& mStatusBar.isPresenterFullyCollapsed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user