diff options
author | Tracy Zhou <tracyzhou@google.com> | 2018-04-17 23:45:47 -0700 |
---|---|---|
committer | Tracy Zhou <tracyzhou@google.com> | 2018-04-17 23:45:47 -0700 |
commit | b67e35337b9a46e8804afee8513c1c627882115e (patch) | |
tree | c442a5167d19de8f597952603d402cbda5d5e017 /src | |
parent | 9e8213052503356f2b387b5d2b444dc90eabc2bb (diff) | |
download | android_packages_apps_Trebuchet-b67e35337b9a46e8804afee8513c1c627882115e.tar.gz android_packages_apps_Trebuchet-b67e35337b9a46e8804afee8513c1c627882115e.tar.bz2 android_packages_apps_Trebuchet-b67e35337b9a46e8804afee8513c1c627882115e.zip |
Reset PIP position when canceling swipe up
onStop() is a confirmed signal of user leaving Launcher. In most use
cases, we use onUserLeaveHint() to move PIP. However, in some cases,
onUserLeaveHint() does not get triggered. It's still a good signal for
those use cases because it happens sooner than onStop() and is not
interrupted by focus change. In order to address cases that
onUserLeaveHint() is not triggered (e.g. cancelling swipe up), onStop()
pushes PIP to the right position. In other cases, we simply set it
twice, which does not hurt.
Change-Id: Ia206590d10d673b16196bbab927a24aaae3ba46b
Fixes: 77648293
Test: manual test
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/launcher3/BaseActivity.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/launcher3/BaseActivity.java b/src/com/android/launcher3/BaseActivity.java index f197921ce..a41edc08b 100644 --- a/src/com/android/launcher3/BaseActivity.java +++ b/src/com/android/launcher3/BaseActivity.java @@ -144,7 +144,7 @@ public abstract class BaseActivity extends Activity { @Override protected void onStop() { - mActivityFlags &= ~ACTIVITY_STATE_STARTED; + mActivityFlags &= ~ACTIVITY_STATE_STARTED & ~ACTIVITY_STATE_USER_ACTIVE; mForceInvisible = 0; super.onStop(); } |