Merge "Merging ub-launcher3-qt-r1-dev, build 5718001" into qt-r1-dev
This commit is contained in:
+2
-1
@@ -505,7 +505,8 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity>
|
||||
initAnimFactory.run();
|
||||
}
|
||||
}
|
||||
AbstractFloatingView.closeAllOpenViews(activity, mWasLauncherAlreadyVisible);
|
||||
AbstractFloatingView.closeAllOpenViewsExcept(activity, mWasLauncherAlreadyVisible,
|
||||
AbstractFloatingView.TYPE_LISTENER);
|
||||
|
||||
if (mWasLauncherAlreadyVisible) {
|
||||
mStateCallback.setState(STATE_LAUNCHER_DRAWN);
|
||||
|
||||
@@ -472,6 +472,11 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean shouldBlockGestures(MotionEvent ev) {
|
||||
return Utilities.shouldDisableGestures(ev);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTouchEvent(MotionEvent ev) {
|
||||
super.onTouchEvent(ev);
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
*/
|
||||
package com.android.quickstep;
|
||||
|
||||
import android.app.ActivityManager;
|
||||
import android.content.Context;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.UserManager;
|
||||
@@ -23,29 +22,17 @@ import android.util.Log;
|
||||
|
||||
import com.android.launcher3.BuildConfig;
|
||||
import com.android.launcher3.MainProcessInitializer;
|
||||
import com.android.launcher3.Utilities;
|
||||
import com.android.systemui.shared.system.ThreadedRendererCompat;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class QuickstepProcessInitializer extends MainProcessInitializer {
|
||||
|
||||
private static final String TAG = "QuickstepProcessInitializer";
|
||||
private static final int HEAP_LIMIT_MB = 250;
|
||||
|
||||
public QuickstepProcessInitializer(Context context) { }
|
||||
|
||||
@Override
|
||||
protected void init(Context context) {
|
||||
if (Utilities.IS_DEBUG_DEVICE) {
|
||||
try {
|
||||
// Trigger a heap dump if the PSS reaches beyond the target heap limit
|
||||
final ActivityManager am = context.getSystemService(ActivityManager.class);
|
||||
am.setWatchHeapLimit(HEAP_LIMIT_MB * 1024 * 1024);
|
||||
} catch (SecurityException e) {
|
||||
// Do nothing
|
||||
}
|
||||
}
|
||||
|
||||
// Workaround for b/120550382, an external app can cause the launcher process to start for
|
||||
// a work profile user which we do not support. Disable the application immediately when we
|
||||
// detect this to be the case.
|
||||
|
||||
@@ -952,10 +952,14 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
|
||||
mHandler.removeCallbacks(mHandleDeferredResume);
|
||||
Utilities.postAsyncCallback(mHandler, mHandleDeferredResume);
|
||||
|
||||
for (OnResumeCallback cb : mOnResumeCallbacks) {
|
||||
cb.onLauncherResume();
|
||||
if (!mOnResumeCallbacks.isEmpty()) {
|
||||
final ArrayList<OnResumeCallback> resumeCallbacks = new ArrayList<>(mOnResumeCallbacks);
|
||||
mOnResumeCallbacks.clear();
|
||||
for (int i = resumeCallbacks.size() - 1; i >= 0; i--) {
|
||||
resumeCallbacks.get(i).onLauncherResume();
|
||||
}
|
||||
resumeCallbacks.clear();
|
||||
}
|
||||
mOnResumeCallbacks.clear();
|
||||
|
||||
if (mLauncherCallbacks != null) {
|
||||
mLauncherCallbacks.onResume();
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package com.android.launcher3;
|
||||
|
||||
import static com.android.launcher3.Utilities.shouldDisableGestures;
|
||||
import static com.android.launcher3.compat.AccessibilityManagerCompat.isAccessibilityEnabled;
|
||||
import static com.android.launcher3.compat.AccessibilityManagerCompat.isObservedEventType;
|
||||
import static com.android.launcher3.config.FeatureFlags.QUICKSTEP_SPRINGS;
|
||||
@@ -847,7 +846,7 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
|
||||
*/
|
||||
|
||||
// Skip touch handling if there are no pages to swipe
|
||||
if (getChildCount() <= 0 || shouldDisableGestures(ev)) return false;
|
||||
if (getChildCount() <= 0 || shouldBlockGestures(ev)) return false;
|
||||
|
||||
acquireVelocityTrackerAndAddMovement(ev);
|
||||
|
||||
@@ -1092,10 +1091,14 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
|
||||
mAllowOverScroll = enable;
|
||||
}
|
||||
|
||||
protected boolean shouldBlockGestures(MotionEvent ev) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTouchEvent(MotionEvent ev) {
|
||||
// Skip touch handling if there are no pages to swipe
|
||||
if (getChildCount() <= 0 || shouldDisableGestures(ev)) return false;
|
||||
if (getChildCount() <= 0 || shouldBlockGestures(ev)) return false;
|
||||
|
||||
acquireVelocityTrackerAndAddMovement(ev);
|
||||
|
||||
|
||||
@@ -224,12 +224,10 @@ public abstract class BaseDragLayer<T extends Context & ActivityContext>
|
||||
if (child instanceof AbstractFloatingView) {
|
||||
// Handles the case where the view is removed without being properly closed.
|
||||
// This can happen if something goes wrong during a state change/transition.
|
||||
postDelayed(() -> {
|
||||
AbstractFloatingView floatingView = (AbstractFloatingView) child;
|
||||
if (floatingView.isOpen()) {
|
||||
floatingView.close(false);
|
||||
}
|
||||
}, SINGLE_FRAME_MS);
|
||||
AbstractFloatingView floatingView = (AbstractFloatingView) child;
|
||||
if (floatingView.isOpen()) {
|
||||
postDelayed(() -> floatingView.close(false), SINGLE_FRAME_MS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -574,17 +574,17 @@ public class FloatingIconView extends View implements
|
||||
if (cancellationSignal.isCanceled()) {
|
||||
return;
|
||||
}
|
||||
if (mIconLoadResult.isIconLoaded) {
|
||||
setIcon(originalView, mIconLoadResult.drawable, mIconLoadResult.badge,
|
||||
mIconLoadResult.iconOffset);
|
||||
}
|
||||
|
||||
setIcon(originalView, mIconLoadResult.drawable, mIconLoadResult.badge,
|
||||
mIconLoadResult.iconOffset);
|
||||
|
||||
// Delay swapping views until the icon is loaded to prevent a flash.
|
||||
setVisibility(VISIBLE);
|
||||
originalView.setVisibility(INVISIBLE);
|
||||
};
|
||||
mLoadIconSignal = cancellationSignal;
|
||||
}
|
||||
}
|
||||
mLoadIconSignal = cancellationSignal;
|
||||
}
|
||||
|
||||
private void setBackgroundDrawableBounds(float scale) {
|
||||
|
||||
Reference in New Issue
Block a user