summaryrefslogtreecommitdiffstats
path: root/quickstep
diff options
context:
space:
mode:
Diffstat (limited to 'quickstep')
-rw-r--r--quickstep/src/com/android/quickstep/OverviewCommandHelper.java10
-rw-r--r--quickstep/src/com/android/quickstep/RecentsActivity.java21
-rw-r--r--quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java6
3 files changed, 10 insertions, 27 deletions
diff --git a/quickstep/src/com/android/quickstep/OverviewCommandHelper.java b/quickstep/src/com/android/quickstep/OverviewCommandHelper.java
index eff94fcb5..7094a53db 100644
--- a/quickstep/src/com/android/quickstep/OverviewCommandHelper.java
+++ b/quickstep/src/com/android/quickstep/OverviewCommandHelper.java
@@ -197,14 +197,10 @@ public class OverviewCommandHelper {
}
public void onTip(int actionType, int viewType) {
- mMainThreadExecutor.execute(new Runnable() {
- @Override
- public void run() {
+ mMainThreadExecutor.execute(() ->
UserEventDispatcher.newInstance(mContext,
- new InvariantDeviceProfile(mContext).getDeviceProfile(mContext))
- .logActionTip(actionType, viewType);
- }
- });
+ InvariantDeviceProfile.INSTANCE.get(mContext).getDeviceProfile(mContext))
+ .logActionTip(actionType, viewType));
}
public ActivityControlHelper getActivityControlHelper() {
diff --git a/quickstep/src/com/android/quickstep/RecentsActivity.java b/quickstep/src/com/android/quickstep/RecentsActivity.java
index ed8b4d2b1..32079bf13 100644
--- a/quickstep/src/com/android/quickstep/RecentsActivity.java
+++ b/quickstep/src/com/android/quickstep/RecentsActivity.java
@@ -42,7 +42,6 @@ import com.android.launcher3.DeviceProfile;
import com.android.launcher3.InvariantDeviceProfile;
import com.android.launcher3.ItemInfo;
import com.android.launcher3.LauncherAnimationRunner;
-import com.android.launcher3.LauncherAppState;
import com.android.launcher3.R;
import com.android.launcher3.anim.Interpolators;
import com.android.launcher3.badge.BadgeInfo;
@@ -131,21 +130,13 @@ public class RecentsActivity extends BaseDraggingActivity {
}
private void initDeviceProfile() {
- // In case we are reusing IDP, create a copy so that we dont conflict with Launcher
+ DeviceProfile dp = InvariantDeviceProfile.INSTANCE.get(this).getDeviceProfile(this);
+
+ // In case we are reusing IDP, create a copy so that we don't conflict with Launcher
// activity.
- LauncherAppState appState = LauncherAppState.getInstanceNoCreate();
- if (isInMultiWindowModeCompat()) {
- InvariantDeviceProfile idp = appState == null
- ? new InvariantDeviceProfile(this) : appState.getInvariantDeviceProfile();
- DeviceProfile dp = idp.getDeviceProfile(this);
- mDeviceProfile = mRecentsRootView == null ? dp.copy(this)
- : dp.getMultiWindowProfile(this, mRecentsRootView.getLastKnownSize());
- } else {
- // If we are reusing the Invariant device profile, make a copy.
- mDeviceProfile = appState == null
- ? new InvariantDeviceProfile(this).getDeviceProfile(this)
- : appState.getInvariantDeviceProfile().getDeviceProfile(this).copy(this);
- }
+ mDeviceProfile = (mRecentsRootView != null) && isInMultiWindowModeCompat()
+ ? dp.getMultiWindowProfile(this, mRecentsRootView.getLastKnownSize())
+ : dp.copy(this);
onDeviceProfileInitiated();
}
diff --git a/quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java b/quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java
index 15ff19e26..366263309 100644
--- a/quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java
+++ b/quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java
@@ -57,7 +57,6 @@ import com.android.launcher3.AbstractFloatingView;
import com.android.launcher3.BaseDraggingActivity;
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.InvariantDeviceProfile;
-import com.android.launcher3.LauncherAppState;
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
import com.android.launcher3.anim.AnimationSuccessListener;
@@ -611,10 +610,7 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity> {
public void onRecentsAnimationStart(RecentsAnimationControllerCompat controller,
RemoteAnimationTargetSet targets, Rect homeContentInsets, Rect minimizedHomeBounds) {
- LauncherAppState appState = LauncherAppState.getInstanceNoCreate();
- InvariantDeviceProfile idp = appState == null ?
- new InvariantDeviceProfile(mContext) : appState.getInvariantDeviceProfile();
- DeviceProfile dp = idp.getDeviceProfile(mContext);
+ DeviceProfile dp = InvariantDeviceProfile.INSTANCE.get(mContext).getDeviceProfile(mContext);
final Rect overviewStackBounds;
RemoteAnimationTargetCompat runningTaskTarget = targets.findTask(mRunningTaskId);