feat: Add option to clear home screen in settings (#6125)
Signed-off-by: abhixv <abhi.sharma1@hotmail.com>
This commit is contained in:
1 parent
9898749619
commit
5f3a03f4fb
1577 files changed
+112559
-80244
No files matched your search
@@ -17,7 +17,6 @@
|
||||
package com.android.launcher3;
|
||||
|
||||
import static com.android.app.animation.Interpolators.SCROLL;
|
||||
import static com.android.launcher3.RemoveAnimationSettingsTracker.WINDOW_ANIMATION_SCALE_URI;
|
||||
import static com.android.launcher3.compat.AccessibilityManagerCompat.isAccessibilityEnabled;
|
||||
import static com.android.launcher3.compat.AccessibilityManagerCompat.isObservedEventType;
|
||||
import static com.android.launcher3.testing.shared.TestProtocol.SCROLL_FINISHED_MESSAGE;
|
||||
@@ -34,6 +33,7 @@ import android.content.res.TypedArray;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Rect;
|
||||
import android.os.Bundle;
|
||||
import android.provider.Settings;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.view.InputDevice;
|
||||
@@ -723,14 +723,12 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the given `callback` immediately once {@code mPageScrolls} has been initialized,
|
||||
* otherwise queue the callback to `mOnPageScrollsInitializedCallbacks`.
|
||||
* Queues the given callback to be run once {@code mPageScrolls} has been initialized.
|
||||
*/
|
||||
public void runOnPageScrollsInitialized(Runnable callback) {
|
||||
mOnPageScrollsInitializedCallbacks.add(callback);
|
||||
if (isPageScrollsInitialized()) {
|
||||
callback.run();
|
||||
} else {
|
||||
mOnPageScrollsInitializedCallbacks.add(callback);
|
||||
onPageScrollsInitialized();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1478,15 +1476,6 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
|
||||
mEdgeGlowLeft.onFlingVelocity(velocity);
|
||||
mEdgeGlowRight.onFlingVelocity(velocity);
|
||||
}
|
||||
|
||||
// Detect if user tries to swipe to -1 page but gets disallowed by checking if there was
|
||||
// left-over values in mEdgeGlowLeft (or mEdgeGlowRight in RLT).
|
||||
final int layoutDir = getLayoutDirection();
|
||||
if ((mEdgeGlowLeft.getDistance() > 0 && layoutDir == LAYOUT_DIRECTION_LTR)
|
||||
|| (mEdgeGlowRight.getDistance() > 0 && layoutDir == LAYOUT_DIRECTION_RTL)) {
|
||||
onDisallowSwipeToMinusOnePage();
|
||||
}
|
||||
|
||||
mEdgeGlowLeft.onRelease(ev);
|
||||
mEdgeGlowRight.onRelease(ev);
|
||||
// End any intermediate reordering states
|
||||
@@ -1511,8 +1500,6 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
|
||||
return true;
|
||||
}
|
||||
|
||||
protected void onDisallowSwipeToMinusOnePage() {}
|
||||
|
||||
protected void onNotSnappingToPageInFreeScroll() { }
|
||||
|
||||
/**
|
||||
@@ -1769,8 +1756,8 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
|
||||
}
|
||||
|
||||
if (FeatureFlags.IS_STUDIO_BUILD && !Utilities.isRunningInTestHarness()) {
|
||||
duration *= RemoveAnimationSettingsTracker.INSTANCE.get(getContext()).getValue(
|
||||
WINDOW_ANIMATION_SCALE_URI);
|
||||
duration *= Settings.Global.getFloat(getContext().getContentResolver(),
|
||||
Settings.Global.WINDOW_ANIMATION_SCALE, 1);
|
||||
}
|
||||
|
||||
whichPage = validateNewPage(whichPage);
|
||||
|
||||
Reference in new issue
Block a user