summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2018-05-11 21:55:21 +0000
committerWinson Chung <winsonc@google.com>2018-05-11 21:55:21 +0000
commita0f09f94b58988ed28666183aaa3917fc78eca6d (patch)
treef26e2c8f3b82f470fc8f92e79ac202bf5b382075 /src
parentf5d5b6f00fcf64dc7d4a0df5dad683ba8d8921f6 (diff)
downloadandroid_packages_apps_Trebuchet-a0f09f94b58988ed28666183aaa3917fc78eca6d.tar.gz
android_packages_apps_Trebuchet-a0f09f94b58988ed28666183aaa3917fc78eca6d.tar.bz2
android_packages_apps_Trebuchet-a0f09f94b58988ed28666183aaa3917fc78eca6d.zip
Revert "Revert "Update sysui flags on swipe, skip task backgrounds on opaque apps""
This reverts commit f5d5b6f00fcf64dc7d4a0df5dad683ba8d8921f6. Reason for revert: Can be submitted once a build with ag/4040557 is available for flashing Change-Id: Id94440a1dc9b765bb9758af81b0567628befa283
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher3/BaseActivity.java7
-rw-r--r--src/com/android/launcher3/util/SystemUiController.java3
2 files changed, 9 insertions, 1 deletions
diff --git a/src/com/android/launcher3/BaseActivity.java b/src/com/android/launcher3/BaseActivity.java
index bd38bf00d..1f70cfaa1 100644
--- a/src/com/android/launcher3/BaseActivity.java
+++ b/src/com/android/launcher3/BaseActivity.java
@@ -16,6 +16,7 @@
package com.android.launcher3;
+import static com.android.launcher3.util.SystemUiController.UI_STATE_OVERVIEW;
import static java.lang.annotation.RetentionPolicy.SOURCE;
import android.app.Activity;
@@ -153,6 +154,12 @@ public abstract class BaseActivity extends Activity {
protected void onPause() {
mActivityFlags &= ~ACTIVITY_STATE_RESUMED;
super.onPause();
+
+ // Reset the overridden sysui flags used for the task-swipe launch animation, we do this
+ // here instead of at the end of the animation because the start of the new activity does
+ // not happen immediately, which would cause us to reset to launcher's sysui flags and then
+ // back to the new app (causing a flash)
+ getSystemUiController().updateUiState(UI_STATE_OVERVIEW, 0);
}
public boolean isStarted() {
diff --git a/src/com/android/launcher3/util/SystemUiController.java b/src/com/android/launcher3/util/SystemUiController.java
index edbf05a7c..7ef53a97d 100644
--- a/src/com/android/launcher3/util/SystemUiController.java
+++ b/src/com/android/launcher3/util/SystemUiController.java
@@ -31,6 +31,7 @@ public class SystemUiController {
public static final int UI_STATE_ALL_APPS = 1;
public static final int UI_STATE_WIDGET_BOTTOM_SHEET = 2;
public static final int UI_STATE_ROOT_VIEW = 3;
+ public static final int UI_STATE_OVERVIEW = 4;
public static final int FLAG_LIGHT_NAV = 1 << 0;
public static final int FLAG_DARK_NAV = 1 << 1;
@@ -38,7 +39,7 @@ public class SystemUiController {
public static final int FLAG_DARK_STATUS = 1 << 3;
private final Window mWindow;
- private final int[] mStates = new int[4];
+ private final int[] mStates = new int[5];
public SystemUiController(Window window) {
mWindow = window;