Merge changes I0c466350,I09a9cd43,I8b2a0819 into pi-dev
am: 4cda02f25f
Change-Id: If5e410a3bb21d7188ef0d505d4d03cec1c4c2a74
This commit is contained in:
@@ -49,6 +49,10 @@ public abstract class AppTransitionAnimationSpecsFuture {
|
||||
mHandler.post(mComposeTask);
|
||||
}
|
||||
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) {
|
||||
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) {
|
||||
mContext = context;
|
||||
mHandler = new Handler();
|
||||
@@ -1108,6 +1111,10 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
|
||||
}
|
||||
});
|
||||
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 ****/
|
||||
|
||||
@@ -96,6 +96,9 @@ public class RecentsOnboarding {
|
||||
public void onTaskStackChanged() {
|
||||
ActivityManager.RunningTaskInfo info = ActivityManagerWrapper.getInstance()
|
||||
.getRunningTask(ACTIVITY_TYPE_UNDEFINED /* ignoreActivityType */);
|
||||
if (info == null) {
|
||||
return;
|
||||
}
|
||||
if (mBlacklistedPackages.contains(info.baseActivity.getPackageName())) {
|
||||
hide(true);
|
||||
return;
|
||||
|
||||
@@ -73,6 +73,7 @@ public class NavigationBarGestureHelper implements TunerService.Tunable, Gesture
|
||||
private int mTouchDownY;
|
||||
private boolean mDownOnRecents;
|
||||
private VelocityTracker mVelocityTracker;
|
||||
private boolean mIsInScreenPinning;
|
||||
|
||||
private boolean mDockWindowEnabled;
|
||||
private boolean mDockWindowTouchSlopExceeded;
|
||||
@@ -105,6 +106,9 @@ public class NavigationBarGestureHelper implements TunerService.Tunable, Gesture
|
||||
}
|
||||
|
||||
public boolean onInterceptTouchEvent(MotionEvent event) {
|
||||
if (event.getActionMasked() == MotionEvent.ACTION_DOWN) {
|
||||
mIsInScreenPinning = mNavigationBarView.inScreenPinning();
|
||||
}
|
||||
if (!canHandleGestures()) {
|
||||
return false;
|
||||
}
|
||||
@@ -269,7 +273,7 @@ public class NavigationBarGestureHelper implements TunerService.Tunable, Gesture
|
||||
}
|
||||
|
||||
private boolean canHandleGestures() {
|
||||
return !mNavigationBarView.inScreenPinning() && !mStatusBar.isKeyguardShowing()
|
||||
return !mIsInScreenPinning && !mStatusBar.isKeyguardShowing()
|
||||
&& mStatusBar.isPresenterFullyCollapsed();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user