summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/Recents.java8
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java44
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/RecentsResizeTaskDialog.java8
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java13
7 files changed, 34 insertions, 49 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/recents/Recents.java b/packages/SystemUI/src/com/android/systemui/recents/Recents.java
index a78351a1ffbc..b1cc27a3445a 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/Recents.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/Recents.java
@@ -116,9 +116,8 @@ public class Recents extends SystemUI
/** Preloads the next task */
public void run() {
- // Temporarily skip this if multi stack is enabled
- if (mConfig.multiWindowEnabled) return;
-
+ // TODO: Temporarily skip this if multi stack is enabled
+ /*
RecentsConfiguration config = RecentsConfiguration.getInstance();
if (config.svelteLevel == RecentsConfiguration.SVELTE_NONE) {
RecentsTaskLoader loader = RecentsTaskLoader.getInstance();
@@ -127,7 +126,7 @@ public class Recents extends SystemUI
// Load the next task only if we aren't svelte
RecentsTaskLoadPlan plan = loader.createLoadPlan(mContext);
- loader.preloadTasks(plan, true /* isTopTaskHome */);
+ loader.preloadTasks(plan, true);
RecentsTaskLoadPlan.Options launchOpts = new RecentsTaskLoadPlan.Options();
// This callback is made when a new activity is launched and the old one is paused
// so ignore the current activity and try and preload the thumbnail for the
@@ -141,6 +140,7 @@ public class Recents extends SystemUI
launchOpts.onlyLoadPausedActivities = true;
loader.loadTasks(mContext, plan, launchOpts);
}
+ */
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java
index 284d54094d09..e647c1f6dcfe 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java
@@ -111,22 +111,11 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
@Override
public void run() {
- // Finish Recents
- if (mLaunchIntent != null) {
- try {
- if (mLaunchOpts != null) {
- startActivityAsUser(mLaunchIntent, mLaunchOpts.toBundle(), UserHandle.CURRENT);
- } else {
- startActivityAsUser(mLaunchIntent, UserHandle.CURRENT);
- }
- } catch (Exception e) {
- Console.logError(RecentsActivity.this,
- getString(R.string.recents_launch_error_message, "Home"));
- }
- } else {
- finish();
- overridePendingTransition(R.anim.recents_to_launcher_enter,
- R.anim.recents_to_launcher_exit);
+ try {
+ startActivityAsUser(mLaunchIntent, mLaunchOpts.toBundle(), UserHandle.CURRENT);
+ } catch (Exception e) {
+ Console.logError(RecentsActivity.this,
+ getString(R.string.recents_launch_error_message, "Home"));
}
}
}
@@ -144,7 +133,7 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
dismissRecentsToFocusedTaskOrHome(false);
} else if (intent.getBooleanExtra(Recents.EXTRA_TRIGGERED_FROM_HOME_KEY, false)) {
// Otherwise, dismiss Recents to Home
- dismissRecentsToHomeRaw(true);
+ dismissRecentsToHome(true);
} else {
// Do nothing
}
@@ -170,7 +159,7 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
String action = intent.getAction();
if (action.equals(Intent.ACTION_SCREEN_OFF)) {
// When the screen turns off, dismiss Recents to Home
- dismissRecentsToHome(false);
+ dismissRecentsToHomeIfVisible(false);
} else if (action.equals(SearchManager.INTENT_GLOBAL_SEARCH_ACTIVITY_CHANGED)) {
// When the search activity changes, update the search widget view
SystemServicesProxy ssp = RecentsTaskLoader.getInstance().getSystemServicesProxy();
@@ -286,25 +275,28 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
if (mRecentsView.launchFocusedTask()) return true;
// If we launched from Home, then return to Home
if (launchState.launchedFromHome) {
- dismissRecentsToHomeRaw(true);
+ dismissRecentsToHome(true);
return true;
}
// Otherwise, try and return to the Task that Recents was launched from
if (mRecentsView.launchPreviousTask()) return true;
// If none of the other cases apply, then just go Home
- dismissRecentsToHomeRaw(true);
+ dismissRecentsToHome(true);
return true;
}
return false;
}
- /** Dismisses Recents directly to Home. */
- void dismissRecentsToHomeRaw(boolean animated) {
+ /**
+ * Dismisses Recents directly to Home without checking whether it is currently visible.
+ */
+ void dismissRecentsToHome(boolean animated) {
if (animated) {
ReferenceCountedTrigger exitTrigger = new ReferenceCountedTrigger(this,
null, mFinishLaunchHomeRunnable, null);
mRecentsView.startExitToHomeAnimation(
new ViewAnimation.TaskViewExitContext(exitTrigger));
+ mScrimViews.startExitRecentsAnimation();
} else {
mFinishLaunchHomeRunnable.run();
}
@@ -317,11 +309,11 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
}
/** Dismisses Recents directly to Home if we currently aren't transitioning. */
- boolean dismissRecentsToHome(boolean animated) {
+ boolean dismissRecentsToHomeIfVisible(boolean animated) {
SystemServicesProxy ssp = RecentsTaskLoader.getInstance().getSystemServicesProxy();
if (ssp.isRecentsTopMost(ssp.getTopMostTask(), null)) {
// Return to Home
- dismissRecentsToHomeRaw(animated);
+ dismissRecentsToHome(animated);
return true;
}
return false;
@@ -421,7 +413,6 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
protected void onStop() {
super.onStop();
MetricsLogger.hidden(this, MetricsLogger.OVERVIEW_ACTIVITY);
- RecentsActivityLaunchState launchState = mConfig.getLaunchState();
RecentsTaskLoader loader = RecentsTaskLoader.getInstance();
SystemServicesProxy ssp = loader.getSystemServicesProxy();
Recents.notifyVisibilityChanged(this, ssp, false);
@@ -438,6 +429,7 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
// Workaround for b/22542869, if the RecentsActivity is started again, but without going
// through SystemUI, we need to reset the config launch flags to ensure that we do not
// wait on the system to send a signal that was never queued.
+ RecentsActivityLaunchState launchState = mConfig.getLaunchState();
launchState.launchedFromHome = false;
launchState.launchedFromSearchHome = false;
launchState.launchedFromAppWithThumbnail = false;
@@ -560,7 +552,7 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
@Override
public void onTaskLaunchFailed() {
// Return to Home
- dismissRecentsToHomeRaw(true);
+ dismissRecentsToHome(true);
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java
index 59c590cd26f9..b6f4a3c61383 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java
@@ -78,7 +78,6 @@ public class RecentsConfiguration {
public int searchBarSpaceHeightPx;
/** Dev options and global settings */
- public boolean multiWindowEnabled;
public boolean lockToAppEnabled;
/** Private constructor */
@@ -115,7 +114,6 @@ public class RecentsConfiguration {
// settings or via multi window
lockToAppEnabled = ssp.getSystemSetting(context,
Settings.System.LOCK_TO_APP_ENABLED) != 0;
- multiWindowEnabled = "true".equals(ssp.getSystemProperty("persist.sys.debug.multi_window"));
hasDockedTasks = ssp.hasDockedTask();
// Recompute some values based on the given state, since we can not rely on the resource
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsResizeTaskDialog.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsResizeTaskDialog.java
index 59df293f71d7..88270650ca1c 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/RecentsResizeTaskDialog.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsResizeTaskDialog.java
@@ -235,11 +235,9 @@ public class RecentsResizeTaskDialog extends DialogFragment {
// In debug mode, we force all task to be resizeable regardless of the
// current app configuration.
- if (RecentsConfiguration.getInstance().multiWindowEnabled) {
- for (int i = additionalTasks; i >= 0; --i) {
- if (mTasks[i] != null) {
- mSsp.setTaskResizeable(mTasks[i].key.id);
- }
+ for (int i = additionalTasks; i >= 0; --i) {
+ if (mTasks[i] != null) {
+ mSsp.setTaskResizeable(mTasks[i].key.id);
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
index bc1f4814119e..78b986263213 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
@@ -1296,9 +1296,7 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
RecentsTaskLoader.getInstance().loadTaskData(task);
// If the doze trigger has already fired, then update the state for this task view
- if (mUIDozeTrigger.hasTriggered() || mConfig.multiWindowEnabled) {
- tv.setNoUserInteractionState();
- }
+ tv.setNoUserInteractionState();
// If we've finished the start animation, then ensure we always enable the focus animations
if (mStartEnterAnimationCompleted) {
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java
index f213a10bac73..9d08ee907626 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java
@@ -627,8 +627,12 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks,
/** Compute the dim as a function of the scale of this view. */
int getDimFromTaskProgress() {
+ // TODO: Temporarily disable the dim on the stack
+ /*
float dim = mMaxDimScale * mDimInterpolator.getInterpolation(1f - mTaskProgress);
return (int) (dim * 255);
+ */
+ return 0;
}
/** Update the dim as a function of the scale of this view. */
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java
index a71fdaab985e..949d515a75f0 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java
@@ -244,11 +244,9 @@ public class TaskViewHeader extends FrameLayout
mLightDismissDrawable : mDarkDismissDrawable);
mDismissButton.setContentDescription(String.format(mDismissContentDescription,
t.contentDescription));
- mMoveTaskButton.setVisibility((mConfig.multiWindowEnabled) ? View.VISIBLE : View.INVISIBLE);
- if (mConfig.multiWindowEnabled) {
- updateResizeTaskBarIcon(t);
- mMoveTaskButton.setOnClickListener(this);
- }
+ updateResizeTaskBarIcon(t);
+ mMoveTaskButton.setVisibility(View.VISIBLE);
+ mMoveTaskButton.setOnClickListener(this);
// In accessibility, a single click on the focused app info button will show it
AccessibilityManager am = (AccessibilityManager) getContext().
@@ -263,10 +261,7 @@ public class TaskViewHeader extends FrameLayout
mTask = null;
mApplicationIcon.setImageDrawable(null);
mApplicationIcon.setOnClickListener(null);
-
- if (mConfig.multiWindowEnabled) {
- mMoveTaskButton.setOnClickListener(null);
- }
+ mMoveTaskButton.setOnClickListener(null);
}
/** Updates the resize task bar button. */