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();
|
initAnimFactory.run();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
AbstractFloatingView.closeAllOpenViews(activity, mWasLauncherAlreadyVisible);
|
AbstractFloatingView.closeAllOpenViewsExcept(activity, mWasLauncherAlreadyVisible,
|
||||||
|
AbstractFloatingView.TYPE_LISTENER);
|
||||||
|
|
||||||
if (mWasLauncherAlreadyVisible) {
|
if (mWasLauncherAlreadyVisible) {
|
||||||
mStateCallback.setState(STATE_LAUNCHER_DRAWN);
|
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
|
@Override
|
||||||
public boolean onTouchEvent(MotionEvent ev) {
|
public boolean onTouchEvent(MotionEvent ev) {
|
||||||
super.onTouchEvent(ev);
|
super.onTouchEvent(ev);
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
*/
|
*/
|
||||||
package com.android.quickstep;
|
package com.android.quickstep;
|
||||||
|
|
||||||
import android.app.ActivityManager;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.os.UserManager;
|
import android.os.UserManager;
|
||||||
@@ -23,29 +22,17 @@ import android.util.Log;
|
|||||||
|
|
||||||
import com.android.launcher3.BuildConfig;
|
import com.android.launcher3.BuildConfig;
|
||||||
import com.android.launcher3.MainProcessInitializer;
|
import com.android.launcher3.MainProcessInitializer;
|
||||||
import com.android.launcher3.Utilities;
|
|
||||||
import com.android.systemui.shared.system.ThreadedRendererCompat;
|
import com.android.systemui.shared.system.ThreadedRendererCompat;
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
public class QuickstepProcessInitializer extends MainProcessInitializer {
|
public class QuickstepProcessInitializer extends MainProcessInitializer {
|
||||||
|
|
||||||
private static final String TAG = "QuickstepProcessInitializer";
|
private static final String TAG = "QuickstepProcessInitializer";
|
||||||
private static final int HEAP_LIMIT_MB = 250;
|
|
||||||
|
|
||||||
public QuickstepProcessInitializer(Context context) { }
|
public QuickstepProcessInitializer(Context context) { }
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void init(Context context) {
|
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
|
// 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
|
// a work profile user which we do not support. Disable the application immediately when we
|
||||||
// detect this to be the case.
|
// detect this to be the case.
|
||||||
|
|||||||
@@ -952,10 +952,14 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
|
|||||||
mHandler.removeCallbacks(mHandleDeferredResume);
|
mHandler.removeCallbacks(mHandleDeferredResume);
|
||||||
Utilities.postAsyncCallback(mHandler, mHandleDeferredResume);
|
Utilities.postAsyncCallback(mHandler, mHandleDeferredResume);
|
||||||
|
|
||||||
for (OnResumeCallback cb : mOnResumeCallbacks) {
|
if (!mOnResumeCallbacks.isEmpty()) {
|
||||||
cb.onLauncherResume();
|
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) {
|
if (mLauncherCallbacks != null) {
|
||||||
mLauncherCallbacks.onResume();
|
mLauncherCallbacks.onResume();
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
|
|
||||||
package com.android.launcher3;
|
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.isAccessibilityEnabled;
|
||||||
import static com.android.launcher3.compat.AccessibilityManagerCompat.isObservedEventType;
|
import static com.android.launcher3.compat.AccessibilityManagerCompat.isObservedEventType;
|
||||||
import static com.android.launcher3.config.FeatureFlags.QUICKSTEP_SPRINGS;
|
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
|
// 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);
|
acquireVelocityTrackerAndAddMovement(ev);
|
||||||
|
|
||||||
@@ -1092,10 +1091,14 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
|
|||||||
mAllowOverScroll = enable;
|
mAllowOverScroll = enable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected boolean shouldBlockGestures(MotionEvent ev) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onTouchEvent(MotionEvent ev) {
|
public boolean onTouchEvent(MotionEvent ev) {
|
||||||
// Skip touch handling if there are no pages to swipe
|
// 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);
|
acquireVelocityTrackerAndAddMovement(ev);
|
||||||
|
|
||||||
|
|||||||
@@ -224,12 +224,10 @@ public abstract class BaseDragLayer<T extends Context & ActivityContext>
|
|||||||
if (child instanceof AbstractFloatingView) {
|
if (child instanceof AbstractFloatingView) {
|
||||||
// Handles the case where the view is removed without being properly closed.
|
// Handles the case where the view is removed without being properly closed.
|
||||||
// This can happen if something goes wrong during a state change/transition.
|
// This can happen if something goes wrong during a state change/transition.
|
||||||
postDelayed(() -> {
|
AbstractFloatingView floatingView = (AbstractFloatingView) child;
|
||||||
AbstractFloatingView floatingView = (AbstractFloatingView) child;
|
if (floatingView.isOpen()) {
|
||||||
if (floatingView.isOpen()) {
|
postDelayed(() -> floatingView.close(false), SINGLE_FRAME_MS);
|
||||||
floatingView.close(false);
|
}
|
||||||
}
|
|
||||||
}, SINGLE_FRAME_MS);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -574,17 +574,17 @@ public class FloatingIconView extends View implements
|
|||||||
if (cancellationSignal.isCanceled()) {
|
if (cancellationSignal.isCanceled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (mIconLoadResult.isIconLoaded) {
|
|
||||||
setIcon(originalView, mIconLoadResult.drawable, mIconLoadResult.badge,
|
setIcon(originalView, mIconLoadResult.drawable, mIconLoadResult.badge,
|
||||||
mIconLoadResult.iconOffset);
|
mIconLoadResult.iconOffset);
|
||||||
}
|
|
||||||
// Delay swapping views until the icon is loaded to prevent a flash.
|
// Delay swapping views until the icon is loaded to prevent a flash.
|
||||||
setVisibility(VISIBLE);
|
setVisibility(VISIBLE);
|
||||||
originalView.setVisibility(INVISIBLE);
|
originalView.setVisibility(INVISIBLE);
|
||||||
};
|
};
|
||||||
|
mLoadIconSignal = cancellationSignal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mLoadIconSignal = cancellationSignal;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setBackgroundDrawableBounds(float scale) {
|
private void setBackgroundDrawableBounds(float scale) {
|
||||||
|
|||||||
Reference in New Issue
Block a user