Merge "Fix IME hiding animation being delayed after unlocking the device" into tm-dev
diff --git a/quickstep/src/com/android/launcher3/taskbar/BaseTaskbarContext.java b/quickstep/src/com/android/launcher3/taskbar/BaseTaskbarContext.java
index 4e1f54c..b4052e3 100644
--- a/quickstep/src/com/android/launcher3/taskbar/BaseTaskbarContext.java
+++ b/quickstep/src/com/android/launcher3/taskbar/BaseTaskbarContext.java
@@ -19,7 +19,6 @@
import android.view.ContextThemeWrapper;
import android.view.LayoutInflater;
-import com.android.launcher3.DeviceProfile;
import com.android.launcher3.DeviceProfile.DeviceProfileListenable;
import com.android.launcher3.DeviceProfile.OnDeviceProfileChangeListener;
import com.android.launcher3.util.Themes;
@@ -36,8 +35,6 @@
protected final LayoutInflater mLayoutInflater;
private final List<OnDeviceProfileChangeListener> mDPChangeListeners = new ArrayList<>();
- protected DeviceProfile mDeviceProfile;
-
public BaseTaskbarContext(Context windowContext) {
super(windowContext, Themes.getActivityThemeRes(windowContext));
mLayoutInflater = LayoutInflater.from(this).cloneInContext(this);
@@ -49,18 +46,10 @@
}
@Override
- public final DeviceProfile getDeviceProfile() {
- return mDeviceProfile;
- }
-
- @Override
public final List<OnDeviceProfileChangeListener> getOnDeviceProfileChangeListeners() {
return mDPChangeListeners;
}
- /** Updates the {@link DeviceProfile} instance to the latest representation of the screen. */
- public abstract void updateDeviceProfile(DeviceProfile dp);
-
/** Callback invoked when a drag is initiated within this context. */
public abstract void onDragStart();
diff --git a/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java b/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java
index cbdbdb9..5d576f7 100644
--- a/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java
+++ b/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java
@@ -522,7 +522,7 @@
if (button.getVisibility() == View.VISIBLE) {
parent.getDescendantRectRelativeToSelf(button, mTempRect);
if (mHitboxExtender.extendedHitboxEnabled()) {
- mTempRect.bottom += mContext.mDeviceProfile.getTaskbarOffsetY();
+ mTempRect.bottom += mContext.getDeviceProfile().getTaskbarOffsetY();
}
outRegion.op(mTempRect, Op.UNION);
}
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java
index ed1001c..95da118 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java
@@ -111,6 +111,7 @@
private final WindowManager mWindowManager;
private final @Nullable RoundedCorner mLeftCorner, mRightCorner;
+ private DeviceProfile mDeviceProfile;
private WindowManager.LayoutParams mWindowLayoutParams;
private boolean mIsFullscreen;
// The size we should return to when we call setTaskbarWindowFullscreen(false)
@@ -135,7 +136,7 @@
TaskbarNavButtonController buttonController, ScopedUnfoldTransitionProgressProvider
unfoldTransitionProgressProvider) {
super(windowContext);
- mDeviceProfile = dp;
+ mDeviceProfile = dp.copy(this);
final Resources resources = getResources();
@@ -198,7 +199,7 @@
new TaskbarAutohideSuspendController(this),
new TaskbarPopupController(this),
new TaskbarForceVisibleImmersiveController(this),
- new TaskbarAllAppsController(this),
+ new TaskbarAllAppsController(this, dp),
new TaskbarInsetsController(this));
}
@@ -214,8 +215,14 @@
}
@Override
+ public DeviceProfile getDeviceProfile() {
+ return mDeviceProfile;
+ }
+
+ /** Updates {@link DeviceProfile} instances for any Taskbar windows. */
public void updateDeviceProfile(DeviceProfile dp) {
- mDeviceProfile = dp;
+ mControllers.taskbarAllAppsController.updateDeviceProfile(dp);
+ mDeviceProfile = dp.copy(this);
updateIconSize(getResources());
AbstractFloatingView.closeAllOpenViewsExcept(this, false, TYPE_REBIND_SAFE);
@@ -230,7 +237,6 @@
mDeviceProfile.updateIconSize(1, resources);
float iconScale = taskbarIconSize / mDeviceProfile.iconSizePx;
mDeviceProfile.updateIconSize(iconScale, resources);
- mDeviceProfile.updateAllAppsIconSize(1, resources); // Leave all apps unscaled.
}
@VisibleForTesting
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarInsetsController.kt b/quickstep/src/com/android/launcher3/taskbar/TaskbarInsetsController.kt
index 21d7af9..6a6a693 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarInsetsController.kt
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarInsetsController.kt
@@ -21,6 +21,7 @@
import android.view.WindowManager
import com.android.launcher3.AbstractFloatingView
import com.android.launcher3.AbstractFloatingView.TYPE_TASKBAR_ALL_APPS
+import com.android.launcher3.DeviceProfile
import com.android.launcher3.anim.AlphaUpdateListener
import com.android.launcher3.taskbar.TaskbarControllers.LoggableTaskbarController
import com.android.quickstep.KtR
@@ -38,6 +39,9 @@
val taskbarHeightForIme: Int = context.resources.getDimensionPixelSize(
KtR.dimen.taskbar_ime_size)
private val contentRegion: Region = Region()
+ private val deviceProfileChangeListener = { _: DeviceProfile ->
+ onTaskbarWindowHeightOrInsetsChanged()
+ }
// Initialized in init.
private lateinit var controllers: TaskbarControllers
@@ -63,16 +67,19 @@
onTaskbarWindowHeightOrInsetsChanged()
windowLayoutParams.insetsRoundedCornerFrame = true
+ context.addOnDeviceProfileChangeListener(deviceProfileChangeListener)
}
- fun onDestroy() {}
+ fun onDestroy() {
+ context.removeOnDeviceProfileChangeListener(deviceProfileChangeListener)
+ }
fun onTaskbarWindowHeightOrInsetsChanged() {
var reducingSize = getReducingInsetsForTaskbarInsetsHeight(
controllers.taskbarStashController.contentHeightToReportToApps)
contentRegion.set(0, reducingSize.top,
- context.dragLayer.width, windowLayoutParams.height)
+ context.deviceProfile.widthPx, windowLayoutParams.height)
windowLayoutParams.providedInternalInsets[ITYPE_EXTRA_NAVIGATION_BAR] = reducingSize
windowLayoutParams.providedInternalInsets[ITYPE_BOTTOM_MANDATORY_GESTURES] = reducingSize
reducingSize = getReducingInsetsForTaskbarInsetsHeight(
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java
index ef7bab9..06262c0 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java
@@ -148,7 +148,7 @@
// Config change might be handled without re-creating the taskbar
if (mTaskbarActivityContext != null) {
if (dp != null && dp.isTaskbarPresent) {
- mTaskbarActivityContext.updateDeviceProfile(dp.copy(mContext));
+ mTaskbarActivityContext.updateDeviceProfile(dp);
}
mTaskbarActivityContext.onConfigurationChanged(configDiff);
}
@@ -274,8 +274,8 @@
return;
}
- mTaskbarActivityContext = new TaskbarActivityContext(mContext, dp.copy(mContext),
- mNavButtonController, mUnfoldProgressProvider);
+ mTaskbarActivityContext = new TaskbarActivityContext(mContext, dp, mNavButtonController,
+ mUnfoldProgressProvider);
mTaskbarActivityContext.init(mSharedState);
if (mActivity != null) {
diff --git a/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsContext.java b/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsContext.java
index 1cdbdb2..e2f7522 100644
--- a/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsContext.java
+++ b/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsContext.java
@@ -19,7 +19,6 @@
import static android.view.KeyEvent.KEYCODE_BACK;
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
-import static com.android.launcher3.AbstractFloatingView.TYPE_REBIND_SAFE;
import static com.android.systemui.shared.system.ViewTreeObserverWrapper.InsetsInfo.TOUCHABLE_INSETS_REGION;
import android.content.Context;
@@ -78,14 +77,13 @@
TaskbarStashController taskbarStashController) {
super(taskbarContext.createWindowContext(TYPE_APPLICATION_OVERLAY, null));
mTaskbarContext = taskbarContext;
- mDeviceProfile = taskbarContext.getDeviceProfile();
+ mWindowController = windowController;
mDragController = new TaskbarDragController(this);
mOnboardingPrefs = new OnboardingPrefs<>(this, Utilities.getPrefs(this));
mDragLayer = new TaskbarAllAppsDragLayer(this);
TaskbarAllAppsSlideInView slideInView = (TaskbarAllAppsSlideInView) mLayoutInflater.inflate(
R.layout.taskbar_all_apps, mDragLayer, false);
- mWindowController = windowController;
mAllAppsViewController = new TaskbarAllAppsViewController(
this,
slideInView,
@@ -102,6 +100,11 @@
}
@Override
+ public DeviceProfile getDeviceProfile() {
+ return mWindowController.getDeviceProfile();
+ }
+
+ @Override
public TaskbarDragController getDragController() {
return mDragController;
}
@@ -142,15 +145,6 @@
}
@Override
- public void updateDeviceProfile(DeviceProfile dp) {
- mDeviceProfile = dp;
-
- AbstractFloatingView.closeAllOpenViewsExcept(this, false, TYPE_REBIND_SAFE);
-
- dispatchDeviceProfileChanged();
- }
-
- @Override
public void onDragStart() {}
@Override
diff --git a/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsController.java b/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsController.java
index eaf9384..6fd98db 100644
--- a/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsController.java
+++ b/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsController.java
@@ -19,6 +19,7 @@
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
import static com.android.launcher3.AbstractFloatingView.TYPE_ALL;
+import static com.android.launcher3.AbstractFloatingView.TYPE_REBIND_SAFE;
import android.content.Context;
import android.graphics.PixelFormat;
@@ -31,7 +32,6 @@
import com.android.launcher3.AbstractFloatingView;
import com.android.launcher3.DeviceProfile;
-import com.android.launcher3.DeviceProfile.OnDeviceProfileChangeListener;
import com.android.launcher3.appprediction.PredictionRowView;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.model.data.AppInfo;
@@ -55,7 +55,7 @@
* Application data may be bound while the window does not exist, so this controller will store
* the models for the next all apps session.
*/
-public final class TaskbarAllAppsController implements OnDeviceProfileChangeListener {
+public final class TaskbarAllAppsController {
private static final String WINDOW_TITLE = "Taskbar All Apps";
@@ -70,6 +70,7 @@
}
};
+ private DeviceProfile mDeviceProfile;
private TaskbarControllers mControllers;
/** Window context for all apps if it is open. */
private @Nullable TaskbarAllAppsContext mAllAppsContext;
@@ -79,7 +80,8 @@
private int mAppsModelFlags;
private List<ItemInfo> mPredictedApps;
- public TaskbarAllAppsController(TaskbarActivityContext context) {
+ public TaskbarAllAppsController(TaskbarActivityContext context, DeviceProfile dp) {
+ mDeviceProfile = dp;
mTaskbarContext = context;
mProxyView = new TaskbarAllAppsProxyView(mTaskbarContext);
mLayoutParams = createLayoutParams();
@@ -146,7 +148,6 @@
this,
mControllers.taskbarStashController);
mAllAppsContext.getDragController().init(mControllers);
- mTaskbarContext.addOnDeviceProfileChangeListener(this);
TaskStackChangeListeners.getInstance().registerTaskStackListener(mTaskStackListener);
Optional.ofNullable(mAllAppsContext.getSystemService(WindowManager.class))
.ifPresent(m -> m.addView(mAllAppsContext.getDragLayer(), mLayoutParams));
@@ -184,13 +185,25 @@
/** Destroys the controller and any All Apps window if present. */
public void onDestroy() {
TaskStackChangeListeners.getInstance().unregisterTaskStackListener(mTaskStackListener);
- mTaskbarContext.removeOnDeviceProfileChangeListener(this);
Optional.ofNullable(mAllAppsContext)
.map(c -> c.getSystemService(WindowManager.class))
.ifPresent(m -> m.removeView(mAllAppsContext.getDragLayer()));
mAllAppsContext = null;
}
+ /** Updates {@link DeviceProfile} instance for Taskbar's All Apps window. */
+ public void updateDeviceProfile(DeviceProfile dp) {
+ mDeviceProfile = dp;
+ Optional.ofNullable(mAllAppsContext).ifPresent(c -> {
+ AbstractFloatingView.closeAllOpenViewsExcept(c, false, TYPE_REBIND_SAFE);
+ c.dispatchDeviceProfileChanged();
+ });
+ }
+
+ DeviceProfile getDeviceProfile() {
+ return mDeviceProfile;
+ }
+
private LayoutParams createLayoutParams() {
LayoutParams layoutParams = new LayoutParams(
TYPE_APPLICATION_OVERLAY,
@@ -205,11 +218,6 @@
return layoutParams;
}
- @Override
- public void onDeviceProfileChanged(DeviceProfile dp) {
- Optional.ofNullable(mAllAppsContext).ifPresent(c -> c.updateDeviceProfile(dp));
- }
-
/**
* Proxy view connecting taskbar drag layer to the all apps window.
* <p>
diff --git a/quickstep/src/com/android/launcher3/uioverrides/states/QuickstepAtomicAnimationFactory.java b/quickstep/src/com/android/launcher3/uioverrides/states/QuickstepAtomicAnimationFactory.java
index f2162b0..2d7fe69 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/states/QuickstepAtomicAnimationFactory.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/states/QuickstepAtomicAnimationFactory.java
@@ -191,6 +191,9 @@
1 - ALL_APPS_SCRIM_OPAQUE_THRESHOLD,
1 - ALL_APPS_SCRIM_VISIBLE_THRESHOLD));
config.setInterpolator(ANIM_VERTICAL_PROGRESS, EMPHASIZED_ACCELERATE);
+ if (!isTablet) {
+ config.setInterpolator(ANIM_WORKSPACE_FADE, INSTANT);
+ }
} else if (fromState == NORMAL && toState == ALL_APPS) {
if (mActivity.getDeviceProfile().isTablet) {
config.setInterpolator(ANIM_VERTICAL_PROGRESS, EMPHASIZED_DECELERATE);
diff --git a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonNavbarToOverviewTouchController.java b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonNavbarToOverviewTouchController.java
index 4da1d41..8faabc9 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonNavbarToOverviewTouchController.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonNavbarToOverviewTouchController.java
@@ -86,7 +86,7 @@
@Override
protected boolean canInterceptTouch(MotionEvent ev) {
mDidTouchStartInNavBar = (ev.getEdgeFlags() & EDGE_NAV_BAR) != 0;
- return super.canInterceptTouch(ev);
+ return super.canInterceptTouch(ev) && !mLauncher.isInState(HINT_STATE);
}
@Override
diff --git a/quickstep/src/com/android/quickstep/TopTaskTracker.java b/quickstep/src/com/android/quickstep/TopTaskTracker.java
index 39c5f2a..723dc72 100644
--- a/quickstep/src/com/android/quickstep/TopTaskTracker.java
+++ b/quickstep/src/com/android/quickstep/TopTaskTracker.java
@@ -15,12 +15,13 @@
*/
package com.android.quickstep;
+import static android.app.ActivityTaskManager.INVALID_TASK_ID;
+import static android.app.WindowConfiguration.ACTIVITY_TYPE_ASSISTANT;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME;
import static android.content.Intent.ACTION_CHOOSER;
import static android.content.Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS;
import static com.android.launcher3.util.SplitConfigurationOptions.STAGE_POSITION_TOP_OR_LEFT;
-import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.ACTIVITY_TYPE_ASSISTANT;
import android.app.ActivityManager.RunningTaskInfo;
import android.content.Context;
@@ -64,6 +65,7 @@
private final StagedSplitTaskPosition mMainStagePosition = new StagedSplitTaskPosition();
private final StagedSplitTaskPosition mSideStagePosition = new StagedSplitTaskPosition();
+ private int mPinnedTaskId = INVALID_TASK_ID;
private TopTaskTracker(Context context) {
mMainStagePosition.stageType = SplitConfigurationOptions.STAGE_TYPE_MAIN;
@@ -132,8 +134,18 @@
}
}
+ @Override
+ public void onActivityPinned(String packageName, int userId, int taskId, int stackId) {
+ mPinnedTaskId = taskId;
+ }
+
+ @Override
+ public void onActivityUnpinned() {
+ mPinnedTaskId = INVALID_TASK_ID;
+ }
+
private void resetTaskId(StagedSplitTaskPosition taskPosition) {
- taskPosition.taskId = -1;
+ taskPosition.taskId = INVALID_TASK_ID;
}
/**
@@ -141,7 +153,8 @@
* Will return empty array if device is not in staged split
*/
public int[] getRunningSplitTaskIds() {
- if (mMainStagePosition.taskId == -1 || mSideStagePosition.taskId == -1) {
+ if (mMainStagePosition.taskId == INVALID_TASK_ID
+ || mSideStagePosition.taskId == INVALID_TASK_ID) {
return new int[]{};
}
int[] out = new int[2];
@@ -175,7 +188,11 @@
false /* filterOnlyVisibleRecents */));
Collections.addAll(mOrderedTaskList, tasks);
}
- return new CachedTaskInfo(new ArrayList<>(mOrderedTaskList));
+
+ // Strip the pinned task
+ ArrayList<RunningTaskInfo> tasks = new ArrayList<>(mOrderedTaskList);
+ tasks.removeIf(t -> t.taskId == mPinnedTaskId);
+ return new CachedTaskInfo(tasks);
}
/**
@@ -194,7 +211,7 @@
}
public int getTaskId() {
- return mTopTask == null ? -1 : mTopTask.taskId;
+ return mTopTask == null ? INVALID_TASK_ID : mTopTask.taskId;
}
/**
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index 4e00a05..b276397 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -792,7 +792,7 @@
/**
* Updates the iconSize for allApps* variants.
*/
- public void updateAllAppsIconSize(float scale, Resources res) {
+ private void updateAllAppsIconSize(float scale, Resources res) {
allAppsBorderSpacePx = new Point(
pxFromDp(inv.allAppsBorderSpaces[mTypeIndex].x, mMetrics, scale),
pxFromDp(inv.allAppsBorderSpaces[mTypeIndex].y, mMetrics, scale));
diff --git a/src/com/android/launcher3/PagedView.java b/src/com/android/launcher3/PagedView.java
index 4d33eae..73be5be 100644
--- a/src/com/android/launcher3/PagedView.java
+++ b/src/com/android/launcher3/PagedView.java
@@ -727,15 +727,16 @@
pageScrollChanged = true;
}
- if (childCount == 0) {
- return;
- }
-
if (DEBUG) Log.d(TAG, "PagedView.onLayout()");
pageScrollChanged |= getPageScrolls(pageScrolls, true, SIMPLE_SCROLL_LOGIC);
mPageScrolls = pageScrolls;
+ if (childCount == 0) {
+ onPageScrollsInitialized();
+ return;
+ }
+
final LayoutTransition transition = getLayoutTransition();
// If the transition is running defer updating max scroll, as some empty pages could
// still be present, and a max scroll change could cause sudden jumps in scroll.
diff --git a/src/com/android/launcher3/allapps/BaseAllAppsAdapter.java b/src/com/android/launcher3/allapps/BaseAllAppsAdapter.java
index c7c4607..fcba246 100644
--- a/src/com/android/launcher3/allapps/BaseAllAppsAdapter.java
+++ b/src/com/android/launcher3/allapps/BaseAllAppsAdapter.java
@@ -119,7 +119,7 @@
* Returns true if the items represent the same object
*/
public boolean isSameAs(AdapterItem other) {
- return (other.viewType != viewType) && (other.getClass() == getClass());
+ return (other.viewType == viewType) && (other.getClass() == getClass());
}
/**
diff --git a/src/com/android/launcher3/allapps/SearchUiManager.java b/src/com/android/launcher3/allapps/SearchUiManager.java
index 6299657..6138bc4 100644
--- a/src/com/android/launcher3/allapps/SearchUiManager.java
+++ b/src/com/android/launcher3/allapps/SearchUiManager.java
@@ -68,4 +68,9 @@
/** Refresh the currently displayed list of results. */
default void refreshResults() {}
+
+ /** Returns whether search is in zero state. */
+ default boolean inZeroState() {
+ return false;
+ }
}
diff --git a/src/com/android/launcher3/touch/AllAppsSwipeController.java b/src/com/android/launcher3/touch/AllAppsSwipeController.java
index 787d9ea..db43baa 100644
--- a/src/com/android/launcher3/touch/AllAppsSwipeController.java
+++ b/src/com/android/launcher3/touch/AllAppsSwipeController.java
@@ -65,13 +65,13 @@
public static final Interpolator BLUR =
Interpolators.clampToProgress(
Interpolators.mapToProgress(
- EMPHASIZED_DECELERATE, 0f, ALL_APPS_FULL_DEPTH_PROGRESS),
+ LINEAR, 0f, ALL_APPS_FULL_DEPTH_PROGRESS),
WORKSPACE_MOTION_START, ALL_APPS_STATE_TRANSITION);
public static final Interpolator WORKSPACE_FADE =
Interpolators.clampToProgress(FINAL_FRAME, 0f, ALL_APPS_STATE_TRANSITION);
public static final Interpolator WORKSPACE_SCALE =
Interpolators.clampToProgress(
- EMPHASIZED_DECELERATE, WORKSPACE_MOTION_START, ALL_APPS_STATE_TRANSITION);
+ EMPHASIZED_ACCELERATE, WORKSPACE_MOTION_START, ALL_APPS_STATE_TRANSITION);
public static final Interpolator HOTSEAT_FADE = WORKSPACE_FADE;
public static final Interpolator HOTSEAT_SCALE = HOTSEAT_FADE;
public static final Interpolator HOTSEAT_TRANSLATE =
@@ -157,6 +157,9 @@
config.setInterpolator(ANIM_SCRIM_FADE, ALLAPPS_STAGGERED_FADE_LATE_RESPONDER);
config.setInterpolator(ANIM_ALL_APPS_FADE, isTablet
? FINAL_FRAME : ALLAPPS_STAGGERED_FADE_EARLY_RESPONDER);
+ if (!isTablet) {
+ config.setInterpolator(ANIM_WORKSPACE_FADE, INSTANT);
+ }
}
/**
diff --git a/src/com/android/launcher3/util/OnboardingPrefs.java b/src/com/android/launcher3/util/OnboardingPrefs.java
index 64aeceb..f4cf21e 100644
--- a/src/com/android/launcher3/util/OnboardingPrefs.java
+++ b/src/com/android/launcher3/util/OnboardingPrefs.java
@@ -142,16 +142,11 @@
}
/**
- * Add "incCountBy" to the given event count, if we haven't already reached the max count.
+ * Sets the event count to the given value.
*
* @return Whether we have now reached the max count.
*/
- public boolean incrementEventCountBy(int incCountBy, @EventCountKey String eventKey) {
- int count = getCount(eventKey);
- if (hasReachedMaxCount(count, eventKey)) {
- return true;
- }
- count += incCountBy;
+ public boolean setEventCount(int count, @EventCountKey String eventKey) {
mSharedPrefs.edit().putInt(eventKey, count).apply();
return hasReachedMaxCount(count, eventKey);
}
diff --git a/src/com/android/launcher3/views/FloatingIconView.java b/src/com/android/launcher3/views/FloatingIconView.java
index babe607..acdd9a1 100644
--- a/src/com/android/launcher3/views/FloatingIconView.java
+++ b/src/com/android/launcher3/views/FloatingIconView.java
@@ -525,7 +525,7 @@
& ItemInfoWithIcon.FLAG_SHOW_DOWNLOAD_PROGRESS_MASK) != 0) {
btvIcon = btv.makePreloadIcon();
} else {
- btvIcon = btv.getIcon();
+ btvIcon = (FastBitmapDrawable) btv.getIcon().getConstantState().newDrawable();
}
} else {
btvIcon = null;